Socket
Socket
Sign inDemoInstall

domhandler

Package Overview
Dependencies
0
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

14

lib/handler.js

@@ -46,4 +46,5 @@ var ElementType = require("./ElementType.js"),

DomHandler.prototype._addDomElement = function(element){
var lastTag = element.parent = this._tagStack[this._tagStack.length - 1];
var lastTag = this._tagStack[this._tagStack.length - 1];
if(!lastTag){ //There aren't parent elements

@@ -54,8 +55,4 @@ this.dom.push(element);

if(lastTag.children === null){
lastTag.children = [element];
return;
}
if(DomUtils.isTag(element)){
element.parent = lastTag;
var idx = lastTag.children.length;

@@ -79,5 +76,6 @@ while(idx > 0){

attribs: attribs,
children: null,
children: [],
prev: null,
next: null
next: null,
parent: null
};

@@ -84,0 +82,0 @@ this._addDomElement(element);

{
"name": "domhandler",
"version": "1.2.0",
"version": "1.3.0",
"description": "htmlparser2's dom as a separate module",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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