Socket
Socket
Sign inDemoInstall

happy-dom

Package Overview
Dependencies
Maintainers
1
Versions
576
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

happy-dom - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

14

lib/html-parser/HTMLParser.js

@@ -8,2 +8,3 @@ "use strict";

col: true,
embed: true,
hr: true,

@@ -13,3 +14,7 @@ img: true,

link: true,
meta: true
meta: true,
param: true,
source: true,
track: true,
wbr: true
};

@@ -46,6 +51,9 @@ /**

newElement.setRawAttributes(match[3]);
currentParent = currentParent.appendChild(newElement);
if (!SELF_CLOSING_ELEMENTS[tagName]) {
currentParent = currentParent.appendChild(newElement);
stack.push(currentParent);
}
else {
currentParent.appendChild(newElement);
}
lastTextIndex = markupRegexp.lastIndex;

@@ -60,3 +68,3 @@ }

// Text after last element
if ((!match && data.length > 0) || match && lastTextIndex !== match.index) {
if ((!match && data.length > 0) || (match && lastTextIndex !== match.index)) {
var text = data.substring(lastTextIndex);

@@ -63,0 +71,0 @@ this.appendTextAndCommentNodes(document, root, text);

{
"name": "happy-dom",
"version": "0.4.0",
"version": "0.4.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom#readme",

@@ -197,4 +197,5 @@ # Happy DOM

| ------- | ---------- | ---------------- |
| 0.4.0 | 2019-10-07 | Adds type and eventInit to Event constructor. (#4)
| 0.3.1 | 2019-10-07 | Fixes bug where global.Error is undefined. (#6)
| 0.4.1 | 2019-10-07 | Fixes issue with self closing elements become parent of next element in HTMLParser. (#1) |
| 0.4.0 | 2019-10-07 | Adds type and eventInit to Event constructor. (#4) |
| 0.3.1 | 2019-10-07 | Fixes bug where global.Error is undefined. (#6) |
| 0.3.0 | 2019-10-06 | Adds support for scrollTop, scrollLeft, scrollTo(), offsetLeft, offsetTop offsetHeight, offsetWidth. |

@@ -201,0 +202,0 @@ | 0.2.16 | 2019-10-06 | Major bug fixes with server side rendering. |

@@ -10,2 +10,3 @@ import Node from '../nodes/basic-types/Node';

col: true,
embed: true,
hr: true,

@@ -15,3 +16,7 @@ img: true,

link: true,
meta: true
meta: true,
param: true,
source: true,
track: true,
wbr: true
};

@@ -50,6 +55,8 @@

newElement.setRawAttributes(match[3]);
currentParent = <Element>currentParent.appendChild(newElement);
if (!SELF_CLOSING_ELEMENTS[tagName]) {
currentParent = <Element>currentParent.appendChild(newElement);
stack.push(currentParent);
} else {
currentParent.appendChild(newElement);
}

@@ -66,3 +73,3 @@

// Text after last element
if ((!match && data.length > 0) || match && lastTextIndex !== match.index) {
if ((!match && data.length > 0) || (match && lastTextIndex !== match.index)) {
const text = data.substring(lastTextIndex);

@@ -69,0 +76,0 @@ this.appendTextAndCommentNodes(document, root, text);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc