- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 01 Jan 2016 08:31:24 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Message-ID: <whatwg/dom/pull/82/r48678693@github.com>
> + > +<p>Unfortunately, some event APIs have been designed such that implementing them > +efficiently requires observing <a>event listeners</a>. This can make the presence > +of listeners observable in that even empty listeners can have a dramatic performance impact > +on the behavior of the application. For example, touch and wheel events which can be used to block > +asynchronous scrolling. In some cases this problem can be mitigated by specifying > +the event to be {{Event/cancelable}} only when there is at least one > +non-{{EventListenerOptions/passive}} listener. For example, non-{{EventListenerOptions/passive}} > +{{TouchEvent}} listeners must block scrolling, but if all listeners are {{EventListenerOptions/passive}} then > +scrolling can be allowed to start <a>in parallel</a> by making the {{TouchEvent}} > +uncancelable (so that calls to {{Event/preventDefault()}} are ignored). So code > +dispatching an event is able to observe the absence of non-{{EventListenerOptions/passive}} > +listeners, and use that to clear the {{Event/cancelable}} property of the event > +being dispatched. > + > +<p>Ideally, any new event types are defined such that they don't need this s/new event types/new event APIs/ s/don't/do not/ --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/82/files#r48678693
Received on Friday, 1 January 2016 16:32:05 UTC