initKeyboardEvent error
See original GitHub issueWith
import Gremlins from 'gremlins.js'
Gremlins.createHorde().unleash()
This error in console:
Uncaught TypeError: Failed to execute ‘initKeyboardEvent’ on ‘KeyboardEvent’: parameter 4 is not of type ‘Window’. gremlins.min.js?61fa:22
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:9 (1 by maintainers)
Top Results From Across the Web
KeyboardEvent.initKeyboardEvent() - Web APIs | MDN
initKeyboardEvent () method initializes the attributes of a keyboard event ... method as experimental broke existing web apps (see bug 999645).
Read more >initKeyboardEvent fires successfully but doesn't do anything.
What steps will reproduce the problem? 1.var event = document.createEvent('KeyboardEvent'); 2.event.initKeyboardEvent("keypress", true, true ...
Read more >javascript - Basic example of initKeyboardEvent - Stack Overflow
I'm trying to find a basic example of the use of initKeyboardEvent() . Ideally, I want to create a keyboard event where when...
Read more >ISSUE-157: Problems with initKeyboardEvent
2) There are a couple of problems with initKeyboardEvent(). First, when it first apperas in the gray box, it has a repeat argument....
Read more >KeyboardEvent.initKeyboardEvent()
initKeyboardEvent () method initializes the attributes of a keyboard event ... method as experimental broke existing web apps (see bug 999645).
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 Free
Top 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
@bcherny & @thepianist2 this fixed it for me as well. Would be good to have the bower/npm versions updated!
I have been researching , and the version on the repository: https://github.com/marmelab/gremlins.js
It is different from that found in bower and npm .
Specifically this file :
https://github.com/marmelab/gremlins.js/blob/master/src/species/typer.js
It is not the same, in the version that failure bower and npm this line is the one that fails:
line 84
KeyboardEvent [ initMethod ] ( config.randomizer.pick ( config.eventTypes ) ,
true , true , targetElement , false, false , false, false , key ,0);
To fix it I imported the file repository :
https://github.com/marmelab/gremlins.js/blob/master/gremlins.min.js
and it is working properly but a error with socket-js.
this is really wrong? if so , when will update the version of npm and bower ?