node-new.js revision 10d67463820db9c4acc3bc438d9e11a9dc72c9c5
/**
* The Node Utility provides a DOM-like interface for interacting with DOM nodes.
* @module node
* @submodule node-base
*/
/**
* The NodeList class provides a wrapper for manipulating DOM NodeLists.
* Use Y.get() to retrieve NodeList instances.
*
* <strong>NOTE:</strong> NodeList properties are accessed using
* the <code>set</code> and <code>get</code> methods.
*
* @class NodeList
* @constructor
*/
// "globals"
var g_nodes = [],
DOT = '.',
NODE_NAME = 'nodeName',
UID = '_yuid',
},
SuperConstr = Y.Base,
// end "globals"
Node.DOM_EVENTS = {
click: true
};
Node._instances = {};
};
var instance = null;
if (node) {
new Node({
});
}
return instance;
};
};
/*
style: {
setter: function(val, e) {
var node = g_nodes[this[UID]],
name = e.attrName,
path;
if (node) {
if (typeof val === 'string' && name.indexOf(DOT) > -1) {
path = name.split('.');
Y.DOM.setStyle(node, path[1], val);
} else { // assume multiple styles
Y.DOM.setStyles(node, val);
}
} else {
Y.log('unable to set style: ' + name + ' on node :' + this, 'warn', 'Node');
}
},
value: {}
},
*/
text: {
getter: function() {
},
readOnly: true
},
restricted: {
writeOnce: true,
value: false
}
};
// call with instance context
if (path) {
allowSet = false;
}
}
} else {
}
return val;
};
// call with instance context
};
// TODO: move to Attribute
},
toString: function() {
var str = '',
if (node) {
}
}
// TODO: add yuid?
}
},
_addDOMAttr: function(attr) {
getter: function() {
},
}
});
} else {
}
},
},
}
},
/**
* Detaches a DOM event handler.
* @method detach
* @param {String} type The type of DOM Event
* @param {Function} fn The handler to call when the event fires
*/
},
this._addDOMAttr(attr);
}
},
this._addDOMAttr(attr);
}
},
destructor: function() {
}
}, true);