Re: why not MediaQueryList.onchange

Please do change this to fire a "change" event. The current semantics
involves a bunch of special logic to deal with copying the handlers and not
notifying new handlers that are added inside dispatch (across all
MediaLists which is far different than events). Gecko has that logic too,
and it's messy.

Lets make addListener/removeListener an alias for
addEventListener/removeEventListener, fire a change event, and stop trying
to reinvent events with all these new APIs. :)

I suspect very little code is using this feature anyway. Blink/WebKit fire
them in totally different orders and at different times than Gecko.



On Mon, Mar 31, 2014 at 4:18 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 3/31/14 5:07 PM, Tab Atkins Jr. wrote:
>
>> Yeah, we should fire a "change" event or something on it, and define
>> addListener(...) as just calling addEventListener("change", ...)
>>
>
> That changes the sematics of calling addListener(f) twice in a row with
> the same function.  Are we sure there's no code depending on the current
> semantics?
>
> -Boris
>
>

Received on Thursday, 10 April 2014 00:46:54 UTC