Replies: 2 comments
-
|
I think in general the issue is related to typings, it seems that most of the types that come from |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thank you for reporting @vabatta! 🙂 I think that this can be considered a bug. We should look over how typings are handled within Happy DOM. Feel free to convert it to a bug if you want. For now maybe you can just cast it to HTMLInputElement or use the Typescript DOM typings? Example 1: const node = <HTMLInputElement>document.createElement('input'));Example 2: /// <reference lib="dom" />
const node = document.createElement('input')); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a function which runs in the browser with the following signature:
In the code, I use
instanceofto check if the passedNodeis input like - hence havingvalue.But this code would fail in the
happy-domtest as theIElementcreated would not be an instance of the class (const input = document.createElement('input')).What is a suggested approach to test it?
Beta Was this translation helpful? Give feedback.
All reactions