sanctuary-js / sanctuary-def

Run-time type system for JavaScript
MIT License
294 stars 23 forks source link

fix test for HtmlElement type #310

Closed dotnetCarpenter closed 2 years ago

dotnetCarpenter commented 2 years ago

This PR addresses the issue of HtmlElement's test not working for HTMLElements as described in #309.

Currently, the test will always fail because Object.toString.call on an HTMLElement produces an error.

In Gecko (Firefox) the error is: "TypeError: Function.prototype.toString called on incompatible object"

In Blink (Chrome, Edge) the error is: "TypeError: Function.prototype.toString requires that 'this' be a Function"

This PR does not contain any new unit tests.

dotnetCarpenter commented 2 years ago

Obsoleted by #311

I used Object.toString; and not Object.prototype.toString;.