domhandler
Advanced tools
Comparing version 2.0.1 to 2.0.2
var ElementType = require("domelementtype"); | ||
function isTag(elem){ | ||
return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style; | ||
} | ||
function DomHandler(callback, options, elementCB){ | ||
@@ -41,3 +37,3 @@ if(typeof callback === "object"){ | ||
DomHandler.prototype._handleCallback = | ||
DomHandler.prototype._handleCallback = | ||
DomHandler.prototype.onerror = function(error){ | ||
@@ -83,3 +79,3 @@ if(typeof this._callback === "function"){ | ||
while(idx > 0){ | ||
if(isTag(lastTag.children[--idx])){ | ||
if(ElementType.isTag(lastTag.children[--idx])){ | ||
element.prev = lastTag.children[idx]; | ||
@@ -86,0 +82,0 @@ lastTag.children[idx].next = element; |
{ | ||
"name": "domhandler", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "htmlparser2's dom as a separate module", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "node tests/00-runtests.js" | ||
"test": "node runtests.js" | ||
}, | ||
@@ -13,0 +13,0 @@ "repository": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
17358
27
702
1