Lines Matching defs:DOM
4165 // DOM 0 "onload" event, but not "load". All versions of IE fire
4749 // Script or CSS on everything else. Using DOM 0 events because that
6247 * The DOM utility provides a cross-browser abtraction layer
6248 * normalizing DOM tasks, and adds extra helper functionality
6253 * @for DOM
6258 * Provides DOM helper methods.
6259 * @class DOM
6303 * The optional function is passed the current DOM node being tested as its only argument.
6306 * @return {HTMLElement | null} The matching DOM node or null if none found.
6322 * The optional function is passed the current DOM node being tested as its only argument.
6325 * @return {Array} An array containing all matching DOM nodes.
6547 element[OWNER_DOCUMENT] || // element === DOM node
6600 Y.DOM = Y_DOM;
6607 * @for DOM
6611 Y_DOM = Y.DOM,
6698 ret = ''; // per DOM spec
6804 Y.log('multiple select normalization not implemented', 'warn', 'DOM');
6815 Y.mix(Y.DOM, {
6817 * Determines whether a DOM element has the given className.
6819 * @for DOM
6820 * @param {HTMLElement} element The DOM element.
6825 var re = Y.DOM._getRegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
6830 * Adds a class name to a given DOM element.
6832 * @for DOM
6833 * @param {HTMLElement} element The DOM element.
6837 if (!Y.DOM.hasClass(node, className)) { // skip if already present
6845 * @for DOM
6846 * @param {HTMLElement} element The DOM element.
6851 node.className = Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\s+)' +
6864 * @for DOM
6865 * @param {HTMLElement} element The DOM element
6878 * @for DOM
6879 * @param {HTMLElement} element The DOM element
6896 hasClass = Y.DOM.hasClass;
6897 removeClass = Y.DOM.removeClass;
6898 addClass = Y.DOM.addClass;
6902 Y_DOM = Y.DOM,
6926 Y.mix(Y.DOM, {
7074 if (content.nodeType) { // DOM node, just add it
7127 var parent = (html && html.nodeType) ? html : Y.DOM.create(html),
7192 tb = Y.DOM._children(frag, 'tbody')[0];
7246 Y.mix(Y.DOM, {
7251 * @param {HTMLElement} element The DOM element.
7256 Y.DOM._setSize(node, 'width', size);
7263 * @param {HTMLElement} element The DOM element.
7268 Y.DOM._setSize(node, 'height', size);
7296 * Add style management functionality to DOM.
7299 * @for DOM
7317 Y_DOM = Y.DOM,
7475 Y.DOM._getAttrOffset = function(node, attr) {
7476 var val = Y.DOM[GET_COMPUTED_STYLE](node, attr),
7483 position = Y.DOM.getStyle(node, 'position');
7500 Y.DOM._getOffset = function(node) {
7664 if (property === OPACITY && Y.DOM.CUSTOM_STYLES[OPACITY]) {
7665 value = Y.DOM.CUSTOM_STYLES[OPACITY].get(el);
7668 } else if (Y.DOM.IE.COMPUTED[property]) { // use compute function
7669 value = Y.DOM.IE.COMPUTED[property](el, property);
7785 Y.DOM.elementByAxis(node, 'parentNode', null, function(parent) {
7827 Y.DOM.CUSTOM_STYLES[OPACITY] = {
7873 Y.DOM.CUSTOM_STYLES.height = {
7884 Y.DOM.CUSTOM_STYLES.width = {
7914 Y.DOM[GET_COMPUTED_STYLE] = ComputedStyle.get;
7916 Y.namespace('DOM.IE');
7917 Y.DOM.IE.COMPUTED = IEComputed;
7918 Y.DOM.IE.ComputedStyle = ComputedStyle;
7930 * Adds position and region management functionality to DOM.
7933 * @for DOM
7950 Y_DOM = Y.DOM,
8037 * Element must be part of the DOM tree to have page coordinates
8074 inDoc = Y.DOM.contains(rootNode, node);
8208 * Element must be part of the DOM tree to have page coordinates
8221 * Element must be part of the DOM tree to have page coordinates
8234 * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
8280 * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
8291 * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
8378 DOM = Y.DOM;
8380 Y.mix(DOM, {
8383 * @for DOM
8385 * @param {HTMLElement} element The DOM element.
8389 var xy = DOM.getXY(node),
8393 ret = DOM._getRegion(
8407 * @for DOM
8414 var r = altRegion || DOM.region(node), region = {},
8419 region = DOM.region(n);
8435 inRegion: DOM.inRegion(node, node2, false, altRegion)
8442 * @for DOM
8451 r = altRegion || DOM.region(node),
8456 region = DOM.region(n);
8483 * @for DOM
8484 * @param {HTMLElement} element The DOM element.
8490 return DOM.inRegion(node, DOM.viewportRegion(node), all, altRegion);
8510 * @for DOM
8520 scrollX = DOM.docScrollX(node);
8521 scrollY = DOM.docScrollY(node);
8523 ret = DOM._getRegion(scrollY, // top
8524 DOM.winWidth(node) + scrollX, // right
8525 scrollY + DOM.winHeight(node), // bottom
8547 * Provides support for using CSS selectors to query the DOM
8679 if (!firstOnly) { // coerce DOM Collection to Array
8757 id = Y.Selector._escapeId(Y.DOM.getId(node));
8761 Y.DOM.setId(node, id);
8826 if (!root && !Y.DOM.inDoc(node)) {
8839 id = Y.Selector._escapeId(Y.DOM.getId(node));
8842 Y.DOM.setId(node, id);
8879 return Y.DOM.ancestor(element, function(n) {
8920 * Custom event engine, DOM event listener abstraction layer, synthetic DOM
8932 * Custom event engine, DOM event listener abstraction layer, synthetic DOM
9314 * Custom event engine, DOM event listener abstraction layer, synthetic DOM
9563 * that is similar to a DOM event object.
10202 * Custom event engine, DOM event listener abstraction layer, synthetic DOM
10503 // Captures both DOM events and event plugins.
10630 // The YUI instance handles DOM events and adaptors
10637 // DOM event fork
10967 * Executes the callback before a DOM event, custom event
10969 * is assumed the target is a method. For DOM and custom
10972 * For DOM and custom events:
11014 <li>Subscribe to DOM events</li>
11025 To subscribe to DOM events, pass the name of a DOM event as the first argument
11038 The `this` object in DOM event callbacks will be the `Node` targeted by the CSS
11041 `on()` subscribers for DOM events or custom events `publish`ed with a
11052 @param {String} type DOM or custom event name
11071 @param {String} type DOM or custom event name
11633 * The Node Utility provides a DOM-like interface for interacting with DOM nodes.
11640 * The Node class provides a wrapper for manipulating DOM Nodes.
11649 * @param {DOMNode} node the DOM node to be mapped to the Node instance.
11664 Y_DOM = Y.DOM,
11692 * The underlying DOM node bound to the Y.Node instance
11764 * Retrieves the DOM node bound to a Node instance
11769 * @return {HTMLNode} The DOM node bound to the Node instance. If a DOM node is passed
11780 * Checks Node return values and wraps DOM Nodes as Y.Node instances
11781 * and DOM Collections / Arrays as Y.NodeList instances.
11788 * @return {Node | NodeList | Any} Depends on what is returned from the DOM node.
11796 (val[0] && val[0][NODE_TYPE])) { // array of DOM Nodes
11803 val = null; // IE: DOM null not the same as null
11818 * @return {any} Depends on what is returned from the DOM node.
11917 if (node.nodeType || Y.DOM.isWindow(node)) { // avoid bad input (numbers, boolean, etc)
11934 * The default setter for DOM properties
11951 } else if (typeof node[name] != 'undefined') { // pass thru DOM properties
11959 * The default getter for DOM properties
11972 } else if (typeof node[name] != 'undefined') { // pass thru from DOM
12015 * off to the underlying DOM node. Only valid
12033 val = null; // IE: DOM null is not true null (even though they ===)
12063 * off to the underlying DOM node. Only valid
12303 * Replace the node with the other node. This is a DOM update only
12375 * DOM Nodes and Collections return values
12397 * @description Swap DOM locations with the given node.
12398 * This does not change which DOM node each Node instance refers to.
12447 * Returns the DOM node bound to the Node instance
12465 * The NodeList class provides a wrapper for manipulating DOM NodeLists.
12497 * The underlying array of DOM nodes bound to the Y.NodeList instance
12507 * Retrieves the DOM nodes bound to a NodeList instance
12512 * @return {Array} The array of DOM nodes bound to the NodeList
12661 return Y.one(Y.DOM._nl2frag(this._nodes));
12798 * Returns the DOM node bound to the Node instance
12953 while (typeof (arg = arguments[i++]) != 'undefined') { // use DOM nodes/nodeLists
12975 * Passes through to DOM method.
12984 * Passes through to DOM method.
12991 * Passes through to DOM method.
13000 * Passes through to DOM method.
13008 * Passes through to DOM method.
13015 * Passes through to DOM method.
13023 * Passes through to DOM method.
13030 * Passes through to DOM method.
13037 * Passes through to DOM method.
13045 * Passes through to DOM method.
13053 * Passes through to DOM method.
13060 * Passes through to DOM method.
13076 * Passes through to DOM method.
13091 Y.Node.importMethod(Y.DOM, [
13093 * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy.
13100 * Allows setting attributes on DOM nodes, normalizing in some cases.
13101 * This passes through to the DOM node, allowing for custom attributes.
13110 * Allows getting attributes on DOM nodes, normalizing in some cases.
13111 * This passes through to the DOM node, allowing for custom attributes.
13145 * Allows getting attributes on DOM nodes, normalizing in some cases.
13146 * This passes through to the DOM node, allowing for custom attributes.
13156 * Allows setting attributes on DOM nodes, normalizing in some cases.
13157 * This passes through to the DOM node, allowing for custom attributes.
13168 * Allows for removing attributes on DOM nodes.
13169 * This passes through to the DOM node, allowing for custom attributes.
13253 Y.Node.importMethod(Y.DOM, methods);
13303 Y_DOM = Y.DOM;
13311 * @return {Node} A Node instance bound to a DOM node or fragment
13327 * @return {Node} A Node instance bound to a DOM node or fragment
13537 Y_DOM = Y.DOM;
13624 Y.Node.importMethod(Y.DOM, [
13626 * Allows setting attributes on DOM nodes, normalizing in some cases.
13627 * This passes through to the DOM node, allowing for custom attributes.
13637 * Allows getting attributes on DOM nodes, normalizing in some cases.
13638 * This passes through to the DOM node, allowing for custom attributes.
13656 * List of events that route to DOM events
13750 in response to a DOM event.
13756 Most DOM events are associated with a preventable default behavior, such as
13865 Subscribe a callback function to execute in response to a DOM event or custom
13868 Most DOM events are associated with a preventable default behavior such as
13874 If the event name passed as the first parameter is not a whitelisted DOM event,
13877 for the full DOM event whitelist.
13907 Y.DOM.setHeight(this._node, h);
13918 Y.DOM.setWidth(this._node, w);
13982 return Y.DOM.getStyle(this._node, 'display') === 'none';
14141 _bypassProxy: true // don't update DOM when using with Attribute
14239 * This is not stored with the DOM node.
14295 * NodeList. This is not stored with the DOM node.
14336 * DOM event listener abstraction layer
14342 * The domready event fires at the moment the browser's DOM is
14374 * Custom event engine, DOM event listener abstraction layer, synthetic DOM
14381 * Wraps a DOM event, properties requiring browser abstraction are
14384 * @param ev {Event} the DOM event
14386 * @param wrapper {Event.Custom} the custom event wrapper for this DOM event
14557 * @type {Native DOM Event}
14751 // aliases to support DOM event subscription clean up when the last
14752 // subscriber is detached. deleteAndClean overrides the DOM event's wrapper
14795 * Custom event wrappers for DOM events. Key is
14807 * Custom event wrapper map DOM events. Key is
14821 * in the DOM at the time the event is requested after the document
14937 // set by the event system for lazy DOM listeners
15111 // oEl = (compat) ? Y.DOM.byId(el) : Y.Selector.query(el);
15114 oEl = Y.DOM.byId(el);
15229 // el = (compat) ? Y.DOM.byId(el) : Y.all(el);
15231 el = Y.DOM.byId(el);
15305 return Y.DOM.generateID(el);
15350 * attempting to attach to DOM Nodes as soon as they are
15414 // el = (item.compat) ? Y.DOM.byId(item.id) : Y.one(item.id);
15415 el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true);
15433 // el = (item.compat) ? Y.DOM.byId(item.id) : Y.one(item.id);
15434 el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true);
15504 * Removes all object references and the DOM proxy subscription for
15505 * a given event for a DOM node.
15508 * @param wrapper {CustomEvent} Custom event proxy for the DOM
15536 * @return {CustomEvent} the custom event wrapper for the DOM event(s)
15591 * Adds a DOM event directly without the caching, cleanup, context adj, etc
15627 // Process onAvailable/onContentReady items when when the DOM is ready in IE
15645 * DOM event listener abstraction layer
15652 * is detected in the DOM. This function expects a selector
15674 * is detected in the DOM with a nextSibling property
16137 Overrides the <code>_notify</code> method on the normal DOM subscription to
16146 @param ce {CustomEvent} the custom event managing the DOM subscriptions for
16228 @param ce {CustomEvent} the DOM event wrapper
16280 args[1] = e; // restore the raw DOM event
16502 return Y.DOM[name].apply(this, args);
16511 return ('scrollLeft' in node) ? node.scrollLeft : Y.DOM.docScrollX(node);
16520 Y.DOM._getWin(node).scrollTo(val, Y.DOM.docScrollY(node)); // scroll window if win or doc
16531 return ('scrollTop' in node) ? node.scrollTop : Y.DOM.docScrollY(node);
16540 Y.DOM._getWin(node).scrollTo(Y.DOM.docScrollX(node), val); // scroll window if win or doc
16548 Y.Node.importMethod(Y.DOM, [
16625 if (Y.DOM.isWindow(node)) {
16626 region = Y.DOM.viewportRegion(node);
16628 region = Y.DOM.region(node);
16641 return Y.DOM.viewportRegion(Y.Node.getDOMNode(this));
16645 Y.Node.importMethod(Y.DOM, 'inViewportRegion');
16661 return Y.DOM.intersect(node1, node2, altRegion);
16677 return Y.DOM.inRegion(node1, node2, all, altRegion);
16701 Y.DOM.setStyle(this._node, attr, val);
16713 Y.DOM.setStyles(this._node, hash);
16727 return Y.DOM.getStyle(this._node, attr);
16738 return Y.DOM.getComputedStyle(this._node, attr);
18271 computed = Y.DOM.getComputedStyle(node, prop);
18312 Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr));
18778 * The selector module provides helper methods allowing CSS2 Selectors to be used with DOM elements.
18785 * Provides helper methods for collecting and filtering DOM elements.
18823 '': function(node, attr) { return Y.DOM.getAttribute(node, attr) !== ''; }, // Just test for existence of attribute
18830 return Y.DOM._children(node[PARENT_NODE])[0] === node;
18839 rootDoc = Y.DOM._getDoc(root),
18851 if (root.getElementsByTagName) { // non-IE lacks DOM api on doc frags
18854 if (id && (root.all || (root.nodeType === 9 || Y.DOM.inDoc(root)))) {
18855 nodes = Y.DOM.allById(id, root);
19200 return Y.DOM.getAttribute(node, attr);
19204 return Y.DOM.getId(node);
19245 siblings = Y.DOM._children(node.parentNode, tag),
19311 var children = Y.DOM._children(node.parentNode);
19316 return Y.DOM._children(node.parentNode, node.tagName)[0] === node;
19320 var children = Y.DOM._children(node.parentNode, node.tagName);
19325 var children = Y.DOM._children(node.parentNode);
19330 var children = Y.DOM._children(node.parentNode, node.tagName);
19722 if (name in anim._node.style || name in Y.DOM.CUSTOM_STYLES) {
19801 return Y.DOM._getAttrOffset(anim._node, attr);
19822 if (att in node.style || att in Y.DOM.CUSTOM_STYLES) {
19824 Y.DOM.setStyle(node, att, val + unit);
19841 if (att in node.style || att in Y.DOM.CUSTOM_STYLES) {
19842 val = Y.DOM.getComputedStyle(node, att);