Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/lang/observable.js

  • Provides:

    • dojox.lang.observable
  • dojox.lang.observable

    • parameters:
      • wrapped: (typeof Object)
        The object to be wrapped and monitored for property access and modification
      • onRead: (typeof function)
        See dojox.lang.makeObservable.onRead
      • onWrite: (typeof function)
        See dojox.lang.makeObservable.onWrite
      • onInvoke: (typeof function)
        See dojox.lang.makeObservable.onInvoke
    • summary
      Creates a wrapper object, which can be observed. The wrapper object
      is a proxy to the wrapped object. If you will be making multiple wrapper
      objects with the same set of listeners, it is recommended that you
      use makeObservable, as it is more memory efficient.
    • type
      Function
  • dojox.lang.makeObservable

    • parameters:
      • onRead: (typeof function)
        This is called whenever one of the wrapper objects created
        from the constructor has a property that is accessed. onRead
        will be called with two arguments, the first being the wrapped object,
        and the second is the name of property that is being accessed.
        The value that onRead returns will be used as the value returned
        by the property access
      • onWrite: (typeof function)
        This is called whenever one of the wrapper objects created
        from the constructor has a property that is modified. onWrite
        will be called with three arguments, the first being the wrapped object,
        the second is the name of property that is being modified, and the
        third is the value that is being set on the property.
      • onInvoke: (typeof function)
        This is called when a method on the object is invoked. The first
        argument is the wrapper object, the second is the original wrapped object,
        the third is the method name, and the fourth is the arguments.
      • hiddenFunctions: (typeof Object)
        allows you to define functions that should be delegated
        but may not be enumerable on the wrapped objects, so they must be
        explicitly included
    • returns
      do it with getters and setters
    • summary
      Creates and returns an observable creator function. All the objects that
      are created with the returned constructor will use the provided onRead and
      onWrite listeners.
      The created constructor should be called with a single argument,
      the object that will be wrapped to be observed. The constructor will
      return the wrapper object.
    • example
      The following could be used to create a wrapper that would
      prevent functions from being accessed on an object:
      	function onRead(obj,prop){
      		return typeof obj[prop] == 'function' ? null : obj[prop];
      	}
      	var observable = dojox.lang.makeObservable(onRead,onWrite);
      	var obj = {foo:1,bar:function(){}};
      	obj = observable(obj);
      	obj.foo -> 1
      	obj.bar -> null
    • alias - dojox.lang.makeObservable
    • type
      Function
  • dojox.lang.makeObservable.inc

    • type
      Number
  • frame

    • type
      Object
  • frame.style.display

    • type
      String
  • frame.contentWindow.document

    • alias - frame.contentWindow.document
  • dojox.lang.lettableWin

    • alias - frame.contentWindow
  • dojox.lang.ReadOnlyProxy

    • type
      Object
  • dojox.lang

    • type
      Object
  • dojox

    • type
      Object