Support Event Listener Options
See original GitHub issueIt would be nice if Kefir.fromEvents
supported passing event listener options to the addEventListener
call underneath. For example, you may need to pass the passive
flag to for touch performance reasons or want to attach to the capture phase with useCapture
. Example:
document.addEventListener('touchstart', handler, {passive: true});
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
EventTarget.addEventListener() - Web APIs | MDN
The method addEventListener() works by adding a function, or an object that implements EventListener , to the list of event listeners for the ......
Read more >EventTarget.addEventListener() | Can I use... Support tables ...
The modern standard API for adding DOM event handlers. Introduced in the DOM Level 2 Events spec. Also implies support for removeEventListener ,...
Read more >HTML DOM Document addEventListener() Method - W3Schools
Definition and Usage. The addEventListener() method attaches an event handler to a document. ; Syntax. document.addEventListener(event, function, Capture) ...
Read more >EventTarget.addEventListener() - Web APIs
addEventListener () works by adding a function or an object that implements EventListener to the list of event listeners for the specified event...
Read more >The addEventListener() Method – JavaScript Event Listener ...
The JavaScript addEventListener() method allows you to set up functions to be called when a specified event happens, such as when a user ......
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
Part of the issue with this proposal is
Kefir.fromEvents
isn’t for DOM events only, but also works withon
/off
andaddListener
/removeListener
pairs, neither of which necessarily support this. That said,Kefir.fromEvents
isn’t particularly magical. You could easily just do:I think we all agree that
Kefir.stream()
is the way to go. Thanks!