Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

HTMLParser is not defined #16

Closed
Closed

Description

@obonyojimmy

Kindly include HTMLParser as a dependency to avoid node HTMLParser is not defined compilation errors in node ,

this line (line 5-7 ) :

if (typeof window === 'undefined') {
    require('../lib/Pure-JavaScript-HTML5-Parser/htmlparser.js');
  }

why not directly include the dependency either by checking if type is node module export as in below :

if (typeof module === "object" && typeof module.exports === "object") {
  require('../lib/Pure-JavaScript-HTML5-Parser/htmlparser.js');
}

Activity

  1. added a commit that references this issue on May 1, 2016
  2. added a commit that references this issue on May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions