How to use the DomUtils function from htmlparser2
Find comprehensive JavaScript htmlparser2.DomUtils code examples handpicked from public code repositorys.
696 697 698 699 700 701 702 703 704 705
*/ function remove(selector) { // Filter if we have selector var elems = selector ? this.filter(selector) : this; utils_1.domEach(elems, function (el) { htmlparser2_1.DomUtils.removeElement(el); el.prev = el.next = el.parent = null; }); return this; }
12
1
0
GitHub: AbilBotz/node_modules
48 49 50 51 52 53 54 55 56 57
// Update neighbors for (var i = 0; i < arr.length; i++) { var node = arr[i]; // Cleanly remove existing nodes from their previous structures. if (node.parent && node.parent.children !== arr) { htmlparser2_1.DomUtils.removeElement(node); } if (parent) { node.prev = arr[i - 1] || null; node.next = arr[i + 1] || null;
12
1
0
9 10 11 12 13 14 15 16 17 18
var domhandler_1 = require("domhandler"); var select = tslib_1.__importStar(require("cheerio-select")); var utils_1 = require("../utils"); var static_1 = require("../static"); var htmlparser2_1 = require("htmlparser2"); var uniqueSort = htmlparser2_1.DomUtils.uniqueSort; var reSiblingSelector = /^\s*[~+]/; /** * Get the descendants of each element in the current set of matched elements, * filtered by a selector, jQuery object, or element.
12
1
0
+ 6 other calls in file
htmlparser2.Parser is the most popular function in htmlparser2 (216 examples)