'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 |