Socket
Socket
Sign inDemoInstall

domhandler

Package Overview
Dependencies
1
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2

runtests.js

8

index.js
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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc