Module Ext_util_Observable


module Ext_util_Observable: sig .. end
Base class that provides a common interface for pu ...

Base class that provides a common interface for publishing events. Subclasses are expected to to have a property "events" with all the events defined, and, optionally, a property "listeners" with configured listeners defined.

For example:

Ext.define('Employee', {
    mixins: {
        observable: 'Ext.util.Observable'
    },

    constructor: function (config) {
        // The Observable constructor copies all of the properties of `config` on
        // to `this` using Ext.apply. Further, the `listeners` property is
        // processed to add listeners.
        //
        this.mixins.observable.constructor.call(this, config);

        this.addEvents(
            'fired',
            'quit'
        );
    }
});

This could then be used like this:

var newEmployee = new Employee({
    name: employeeName,
    listeners: {
        quit: function() {
            // By default, "this" will be the object that fired the event.
            alert(this.name + " has quit!");
        }
    }
});


class type t = object .. end
class type configs = object .. end
class type events = object .. end
class type statics = object .. end
val get_static : unit -> statics Js.t
Static instance for lazy-loaded modules.
val static : statics Js.t
Static instance.
val capture : 'a Js.t -> 'b Js.callback -> 'c Js.t Js.optdef -> unit
See method statics.capture
val observe : 'a Js.callback -> 'b Js.t -> unit
See method statics.observe
val releaseCapture : 'a Js.t -> unit
See method statics.releaseCapture
val of_configs : configs Js.t -> t Js.t
of_configs c casts a config object c to an instance of class t
val to_configs : t Js.t -> configs Js.t
to_configs o casts instance o of class t to a config object