[9.4.0] ReferenceError: MouseEvent is not defined
See original GitHub issueGetting this error with the newly released 9.4.0.
ReferenceError: MouseEvent is not defined
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
ReferenceError: MouseEvent is not defined - Stack Overflow
1) Make sure the right Components are being imported, and verify if MouseEvent is defined · 2) Verify if all the components are...
Read more >How to Fix ReferenceError: Event is Not Defined in JavaScript
The Javascript ReferenceError occurs when referencing a variable that does not exist or has not yet been initialized in the current scope.
Read more >MouseEvent is not defined-angular.js - appsloveworld
[Solved]-Angular Universal error ReferenceError: MouseEvent is not defined-angular.js ... Client side code like Document , Window , localstorage , MouseEvent etc ...
Read more >Changelog.md - jest-environment-jsdom-fourteen - GitLab
JSDOM.fragment() now creates fragments whose document has no browsing ... Fixed all events fired by jsdom to have isTrusted set to true ....
Read more >@forbeslindesay/jsdom | Yarn - Package Manager
9.4.0. Added the DOMParser API. It is spec-compliant, including producing ... Fix: Using querySelector :not() throws a ReferenceError (Felix Gnass) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
=>
Looks fine to me. Your code is wrong, it was probably broken by 8978de23642f7276f20640f911dc1eebfc3f1d05. But if you check
Object.keys(window)
in your browser, you’ll see thatMouseEvent
is not in there.Might be related but since 9.4.0, it seems I’m not able to use
sinon
to restore a spy ondocument.addEventListener
The second time I create the spy, I get this error:
TypeError: Attempted to wrap addEventListener which is already wrapped
, but I’m 100% sure the spy is restored. (document.addEventListener.restore();
)Any idea?