Code coverage report for lib/elements/dom_traversing.js

Statements: 55.56% (5 / 9)      Branches: 0% (0 / 2)      Functions: 0% (0 / 4)      Lines: 55.56% (5 / 9)      Ignored: none     

All files » lib/elements/ » dom_traversing.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45    1             1                   1                     1                   1        
'use strict';
 
var elements = require('../elements');
 
/**
 * Returns the element's parent node
 * @param {HTMLElement} element
 * @return {HTMLElement}
 */
elements.parent = /** @function 
                  * @param element */function (element) {
  return element.parentNode;
};
 
/**
 * Returns the element's child[number] node
 * @param {HTMLElement} element
 * @return {HTMLElement}
 */
elements.child = /** @function 
                 * @param element 
                 * @param number */function (element, number) {
  return element.children[number || 0];
};
 
/**
 * Returns the element's next sibling
 * @param {HTMLElement} element
 * @return {HTMLElement}
 */
elements.next = /** @function 
                * @param element */function (element) {
  return element.nextElementSibling;
};
 
/**
 * Returns the element's previous sibling
 * @param {HTMLElement} element
 * @return {HTMLElement}
 */
elements.previous = /** @function 
                    * @param element */function (element) {
  return element.previousElementSibling;
};
//# sourceMappingURL=dom_traversing.js.map