Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse5

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse5 - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

26

lib/parser/stream.js

@@ -37,2 +37,3 @@ 'use strict';

this.writeCallback = null;
this.parserLoopLock = false;

@@ -61,3 +62,3 @@ /**

this.parser.tokenizer.write(chunk.toString('utf8'), this.lastChunkWritten);
this.parser._runParsingLoop(this.writeCallback);
this._runParsingLoop();
};

@@ -71,2 +72,13 @@

//Scriptable parser implementation
ParserStream.prototype._runParsingLoop = function () {
// NOTE: This helps avoid reentrant invocation of parsing loop
// in cases then `resume` called synchronously
// (see: https://github.com/inikulin/parse5/issues/98).
if (!this.parserLoopLock) {
this.parserLoopLock = true;
this.parser._runParsingLoop(this.writeCallback);
this.parserLoopLock = false;
}
};
ParserStream.prototype._resume = function () {

@@ -86,3 +98,3 @@ if (!this.parser.pausedByScript)

if (this.parser.tokenizer.active)
this.parser._runParsingLoop(this.writeCallback);
this._runParsingLoop();
};

@@ -132,14 +144,6 @@

var parser = this;
// NOTE: emit `script` on next tick so we let parsing
// loop stop spinning due to `pausedByScript` flag.
// This helps avoid reentrant invocation of parsing loop
// in cases then `resume` called synchronously
// (see: https://github.com/inikulin/parse5/issues/98).
process.nextTick(function () {
parser.emit('script', scriptElement, parser._documentWrite, parser._resume);
});
this.emit('script', scriptElement, this._documentWrite, this._resume);
}
};
{
"name": "parse5",
"description": "WHATWG HTML5 specification-compliant, fast and ready for production HTML parsing/serialization toolset for Node.js",
"version": "2.1.3",
"version": "2.1.4",
"author": "Ivan Nikulin <ifaaan@gmail.com> (https://github.com/inikulin)",

@@ -6,0 +6,0 @@ "contributors": [

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