[Cycle.js Neo] The new DOM driver by jvanbruegge · Pull Request #969 · cyclejs/cyclejs
added 2 commits
April 27, 2021 16:56This implements the basic event delegation for bubbling events. It already takes total and sibling isolation into account, but is currently still lacking the ability to simulate the capture phase. It also does not take non-bubbling listeners into account at the moment.
This makes it easier to use `isolate()` with a single string as argument instead of providing an isolation scope per driver. In general this should be allowed for all drivers and by convention, a simple string should default to the tightest, ie total, isolation.
Before this change, if an element was updated or added, only the new element would be notified to the user, not the updated result of their query
Before this, when an elementListener was added and the elements it listens to were patched afterwards, the user would be notified twice. Now there is only one `patch` per animation frame and the user is only notified once
As one id is generated for every event, using a number would lead to a wrap-around of ids. This might lead to very subtle bugs for long running applications. As we are only incrementing the ids by one and not do any arithmetic on them, using bigint does not create any performance impact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters