Skip to content

v5.0.0

Compare
Choose a tag to compare
@inikulin inikulin released this 23 May 12:56
· 776 commits to master since this release

Starting from this release parse5 functionality will be shipped in separate packages. With parse5 package contatining only basic functionality. Please, refer to the list of packages for more info.

  • Updated (breaking): source code location now inserted by tree adapter, so tree adapter developers have control over location info property name. Tree adapters should implement setNodeSourceCodeLocation and getNodeSourceCodeLocation methods. Location info property name added by currently implemented tree adapters has been renamed from __location to sourceCodeLocation (GH #189).

  • Updated (breaking): Location info line and col properties have been renamed to startLine and
    startCol
    respectively.

  • Updated (breaking): SAXParser now passes token objects to event handlers instead of separate arguments. See SAXParser documentation for more info.
    (GH #247).

  • Added: endLine and endCol location info
    properties.

  • Added: scriptingEnabled flag to the ParserOptions which controls how <noscript> tags are handled by the parser. (GH #192).

  • Added: HTML rewriting stream.
    (GH #222).

  • Removed (breaking): parse5 no longer ship TypeScript definitions. Existing TypeScript definitions have been moved to DefinitelyTyped repo. Please, track the PR in the DefinitelyTyped repo for the updates.