Compatiblity with happy-dom #816
dairyisscary
started this conversation in
General
Replies: 2 comments
-
|
This is actually rather an error in happy-dom, because currentTarget is supposed to be read-only: https://dom.spec.whatwg.org/#interface-event Update: I filed an issue with happy-dom. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Oh wow, so fast, @atk! Thanks! I'm not sure where I read that it's writable now, and I feel silly. Happy weekend! For everyone's reference, or those coming from google capricorn86/happy-dom#343 |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello solid folks! Hope you're doing well. As a side note, Ryan, I watch your Friday streams religiously and I must admit I've found them very insightful.
Currently, I'm bootstrapping a new solid js project and I'm using
jestandsolid-testing-libarywith thejsdomenvironment to write tests. I wanted to try out the alternative DOM implementationhappy-dombut I ran into this issue:it appears this is caused by this line in
dom-expressionshttps://github.com/ryansolid/dom-expressions/blob/95668430dc4bd0b4d4836ee6f03568841085caed/packages/dom-expressions/src/client.js#L301happy-domis doing an assignment tocurrentTargetduring event dispatch (i guess jsdom, which works fine, doesn't do this).Is this a bug? as far as I can tell, the DOM spec, currentTarget should be writable. I monkeypatched my local solid-js/web module with a setter like
which made my tests pass.
Beta Was this translation helpful? Give feedback.
All reactions