8346e283ad797ef549be70335d3961f4324901baRyan Grove/**
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @module node
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @submodule node-base
8346e283ad797ef549be70335d3961f4324901baRyan Grove */
8346e283ad797ef549be70335d3961f4324901baRyan Grove
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeneyvar Y_Node = Y.Node,
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney Y_DOM = Y.DOM;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney/**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Returns a new dom node using the provided markup string.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method create
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @static
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {String} html The markup used to create the element
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {HTMLDocument} doc An optional document context
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @return {Node} A Node instance bound to a DOM node or fragment
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @for Node
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt SweeneyY_Node.create = function(html, doc) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney if (doc && doc._node) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney doc = doc._node;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney }
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return Y.one(Y_DOM.create(html, doc));
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney};
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt SweeneyY.mix(Y_Node.prototype, {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Creates a new Node using the provided markup string.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method create
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {String} html The markup used to create the element
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @param {HTMLDocument} doc An optional document context
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @return {Node} A Node instance bound to a DOM node or fragment
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney create: Y_Node.create,
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Inserts the content before the reference node.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method insert
6eae5adc42f886ebacac1f714be3f0c9e4b205c1Luke Smith * @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
6eae5adc42f886ebacac1f714be3f0c9e4b205c1Luke Smith * @param {Int | Node | HTMLElement | String} where The position to insert at.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Possible "where" arguments
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dl>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>Y.Node</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>The Node to insert before</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>HTMLElement</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>The element to insert before</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>Int</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>The index of the child element to insert before</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>"replace"</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>Replaces the existing HTML</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>"before"</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>Inserts before the existing HTML</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>"before"</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>Inserts content before the node</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dt>"after"</dt>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * <dd>Inserts content after the node</dd>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * </dl>
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney insert: function(content, where) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney this._insert(content, where);
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney _insert: function(content, where) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney var node = this._node,
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney ret = null;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney if (typeof where == 'number') { // allow index
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney where = this._node.childNodes[where];
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney } else if (where && where._node) { // Node
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney where = where._node;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney }
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney if (content && typeof content != 'string') { // allow Node or NodeList/Array instances
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney content = content._node || content._nodes || content;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney }
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney ret = Y_DOM.addHTML(node, content, where);
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return ret;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Inserts the content as the firstChild of the node.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method prepend
6eae5adc42f886ebacac1f714be3f0c9e4b205c1Luke Smith * @param {String | Node | HTMLElement} content The content to insert
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney prepend: function(content) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this.insert(content, 0);
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Inserts the content as the lastChild of the node.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method append
6eae5adc42f886ebacac1f714be3f0c9e4b205c1Luke Smith * @param {String | Node | HTMLElement} content The content to insert
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney append: function(content) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this.insert(content, null);
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method appendChild
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {String | HTMLElement | Node} node Node to be appended
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @return {Node} The appended node
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney appendChild: function(node) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return Y_Node.scrubVal(this._insert(node));
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method insertBefore
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {String | HTMLElement | Node} newNode Node to be appended
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {HTMLElement | Node} refNode Node to be inserted before
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @return {Node} The inserted node
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney insertBefore: function(newNode, refNode) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return Y.Node.scrubVal(this._insert(newNode, refNode));
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8346e283ad797ef549be70335d3961f4324901baRyan Grove * Appends the node to the given node.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method appendTo
6eae5adc42f886ebacac1f714be3f0c9e4b205c1Luke Smith * @param {Node | HTMLElement} node The node to append to
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney appendTo: function(node) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney Y.one(node).append(this);
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Replaces the node's current content with the content.
bc434ac650a27231efd02bc22efb6aa323286ab8Matt Sweeney * Note that this passes to innerHTML and is not escaped.
36ca1e4313c10e481525962934a360b773992432Matt Sweeney * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method setContent
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney * @deprecated Use setHTML
6eae5adc42f886ebacac1f714be3f0c9e4b205c1Luke Smith * @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney setContent: function(content) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney this._insert(content, 'replace');
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney },
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8346e283ad797ef549be70335d3961f4324901baRyan Grove * Returns the node's current content (e.g. innerHTML)
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method getContent
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney * @deprecated Use getHTML
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @return {String} The current content
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney getContent: function(content) {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this.get('innerHTML');
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney }
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney});
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney/**
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney * Replaces the node's current html content with the content provided.
bc434ac650a27231efd02bc22efb6aa323286ab8Matt Sweeney * Note that this passes to innerHTML and is not escaped.
36ca1e4313c10e481525962934a360b773992432Matt Sweeney * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney * @method setHTML
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney * @param {String | HTML | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney * @chainable
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney */
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt SweeneyY.Node.prototype.setHTML = Y.Node.prototype.setContent;
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney/**
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney * Returns the node's current html content (e.g. innerHTML)
36ca1e4313c10e481525962934a360b773992432Matt Sweeney * @method getHTML
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney * @return {String} The html content
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney */
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt SweeneyY.Node.prototype.getHTML = Y.Node.prototype.getContent;
41483addf2a47df89e3a3056f22a16bf4cf87abeMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt SweeneyY.NodeList.importMethod(Y.Node.prototype, [
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Called on each Node instance
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @for NodeList
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method append
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @see Node.append
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'append',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method insert
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @see Node.insert
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'insert',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney /**
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Called on each Node instance
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @for NodeList
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method appendChild
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @see Node.appendChild
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'appendChild',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method insertBefore
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @see Node.insertBefore
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'insertBefore',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method prepend
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @see Node.prepend
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'prepend',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Note that this passes to innerHTML and is not escaped.
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method setContent
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @deprecated Use setHTML
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'setContent',
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method getContent
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @deprecated Use getHTML
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney 'getContent',
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Note that this passes to innerHTML and is not escaped.
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method setHTML
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @see Node.setHTML
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney 'setHTML',
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman /**
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * Called on each Node instance
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @for NodeList
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @method getHTML
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman * @see Node.getHTML
f07192e1225be4be8a8a0ba37c0b98bc64b59cd8Daniel Stockman */
db006be6df49e087e3df27f259256be08df7a1efMatt Sweeney 'getHTML'
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney]);