node-attrs.js revision 5b1c89071eae2ae83f92260d7a50f9ad4e574f3d
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Static collection of configuration attributes for special handling
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @property ATTRS
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @type object
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Allows for getting and setting the text of an element.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Formatting is preserved and special characters are treated literally.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @config text
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @type String
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney getter: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Allows for getting and setting the text of an element.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Formatting is preserved and special characters are treated literally.
5b1c89071eae2ae83f92260d7a50f9ad4e574f3dMatt Sweeney * @config for
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @type String
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney getter: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'options': {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney getter: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this._node.getElementsByTagName('option');
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Returns a NodeList instance of all HTMLElement children.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @config children
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @type NodeList
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'children': {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney getter: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney for (i = 0, len = childNodes.length; i < len; ++i) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney getter: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Allows setting attributes on DOM nodes, normalizing in some cases.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * This passes through to the DOM node, allowing for custom attributes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method setAttribute
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @for NodeList
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {string} name The attribute name
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {string} value The value to set
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'setAttribute',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Allows getting attributes on DOM nodes, normalizing in some cases.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * This passes through to the DOM node, allowing for custom attributes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method getAttribute
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @for NodeList
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {string} name The attribute name
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @return {string} The attribute value
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'getAttribute'