Super lightweight base class for abstract elements (documents, commands, meta)
LSD.Node = new Class({
Implements: [Events, Options, States],
options: {},
initialize: function(element, options) {
if (element) this.element = document.id(element)
this.setOptions(options);
var states = this.options.states;
if (states) this.addStates(states);
},
dispose: function() {
if (this.element) this.element.dispose();
},
destroy: function() {
if (this.parentNode) this.dispose();
if (this.element) this.element.destroy();
},
toElement: function() {
return this.element;
},
This declaration speeds up mootools type checks
$family: function() {
return "object"
}
});