lz.Eventable
Base class for all LZX classes that wish to send or receive events.

JavaScript: lz.Eventable

lz.Eventable is the base class for any class that wishes to send and receive events. It defines the setAttribute protocol that creates implicit events for every attribute that is modified using setAttribute.

See <event> and <handler>.

Methods

destroy()
lz.Eventable.destroy();
Marks an instance as no longer eligible to participate in the event system. If it is registered to receive events, events will no longer be sent to it (to prevent it from being resurrected).

setAttribute()
lz.Eventable.setAttribute(prop : String, val : any);
Sets the named attribute to the given value. If there is a setter for the property, the setter is called, otherwise, this[ prop ] is set to the value, and the event this [ "on"+prop ] is sent.
Parameter Name Type Description
prop String A string naming the key of attribute to set
val any The value for that attribute

Events

Name Description
ondestroy Sent just before an instance is destroyed