Skip to content

Add Deno support #181

Open
Open
@Stephan-C

Description

@Stephan-C

Expected Behavior

html-dom-parser uses a server dom parser implementation on deno, similar to nodejs. But with guards in place if there is no document defined.

Actual Behavior

Throwing exception that document.implementation doesn't exist. There is no document defined on deno.

Steps to Reproduce

Import html-dom-parser on deno. In my case I used a library that uses html-react-parser, which uses html-dom-parser underneath.

Reproducible Demo

Save this to a file like test.js and then run it on deno: deno run test.js

import parse from 'https://cdn.skypack.dev/html-dom-parser';

console.log(parse('<p class="foo" style="color: #bada55">Hello, <em>world</em>!</p>'));

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions