Jsdom: Canvas element fails "instanceof HTMLElement"

Created on 30 Jun 2013  ·  4Comments  ·  Source: jsdom/jsdom

At least the canvas element (I have not tested other) returns false on "element instanceof HTMLElement". It should return true.

bug important or easy

Most helpful comment

window.HTMLElement works. Not sure what that has to do with this issue though.

All 4 comments

It might be connected with the fact that canvas is from another module.

Is there a way to get access to the HTMLElement class directly from jsdom, to be extended in es6 contexts?

window.HTMLElement works. Not sure what that has to do with this issue though.

Confirmed this is still broken as of 6.1.0.

Was this page helpful?
0 / 5 - 0 ratings