[英]how in rxjs bubble a scroll event
with vanilla js, I can write something like this to catch any scroll on any element (pay attention to true as the last argument)使用 vanilla js,我可以写这样的东西来捕捉任何元素上的任何滚动(注意true作为最后一个参数)
document.addEventListener('scroll', function(e) {
console.log(e);
}, true);
but with rxjs I can't do the bubbling (or I don't know how) and something like this doesn't work但是使用 rxjs 我不能冒泡(或者我不知道怎么做),这样的东西不起作用
fromEvent(window, 'scroll').subscribe(console.log);
how to register an event in rxjs that support bubbling?如何在支持冒泡的 rxjs 中注册事件?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.