[3.0.0-beta.15] Events being emitted, but callbacks not firing.
See original GitHub issueI’m attempting to hook into the ready
event using:
import plyr from 'plyr';
const player = new plyr(el, {...});
player.on('ready', e => {...});
With debugging enabled, you can see the event: ready
line emitted in the console, but the callback passed to instance.on(...)
never fires. There seems to be a bit of a disconnect here.
Any idea why this might be happening?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Event not firing/being caught - javascript - Stack Overflow
I have a class DiscordClient that I would like to emit events because I want other classes to be able to respond to...
Read more >Event emitter calls listeners immediately, rather than on nextTick
Rather than being "emit my event", the present behavior is actually "execute arbitrary code". That seems like broken behavior, and I know from ......
Read more >Application API - Sphinx documentation
Return the return values of all callbacks as a list. Do not emit core Sphinx events in extensions! Parameters: event – The name...
Read more >Events | Node.js v19.3.0 Documentation
All objects that emit events are instances of the EventEmitter class. ... callback are inserted before the listener that is in the process...
Read more >jQuery 3.0 Beta Released
Despite the 3.0 version number, we anticipate that these releases shouldn't be too much trouble when it comes to upgrading existing code. Yes, ......
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
And sorry @gehaktmolen. If you would have made that timeout
0
it would been the same solution.👍 I’m not sure my terminology is correct, but
setTimeout
with 0 duration will run the method on the next “tick” (next iteration in the eventloop), so yes. I probably over thought it by assumingready
should work retroactively, like jquery etc.In retrospect I think your solution is better (less code & more consistent).