Re: [dom] Add EventListenerOptions and passive event listeners (#82)

> @@ -1057,6 +1096,25 @@ invoked, must run these steps:
>   <li><p><a>Dispatch</a> the <var>event</var> and return the value that returns.
>  </ol>
>  
> +<h3 id=observing-event-listeners>Observing event listeners</h3>
> +In general, developers do not expect the presence of an <a>event listener</a> to be
> +observable.  The impact of an <a>event listener</a> is determined by its <b>callback</b>.
> +That is, a developer adding a no-op <a>event listener</a> would not expect it to have
> +any side effects.
> +
> +Unfortunately, some event APIs have been designed such that implementing them
> +efficiently requires observing <a>event listeners</a>.  For example, sensor APIs which
> +enable an underlying device sensor, and touch APIs which can be used to block

Ok.  I thought about this some more, and there is at least one subtle script-observable behavior change (at least in Chrome and Safari where I tested): if there are no touch listeners present and a listener is added mid-gesture, no events are sent for that finger.  I built a demo of this [here](http://output.jsbin.com/vuqeda).  You could argue however that this is a bug we could fix (though not sure we'd ever get Safari to change).

Do you think that's worth mentioning here?

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/82/files#r47803228

Received on Wednesday, 16 December 2015 17:04:47 UTC