W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: why not MediaQueryList.onchange

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 16 Apr 2014 10:10:58 -0700
To: Elliott Sprehn <esprehn@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <20140416171058.GA31844@crum.dbaron.org>
On Wednesday 2014-04-09 17:45 -0700, Elliott Sprehn wrote:
> 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.

I don't think we'd get rid of that logic if we switched to events;
we'd still want to fire the events at the end of the internal
processing rather than having to worry about what happens if we call
out to JS in the middle of it.  And that's all it's really doing.

I'm fine with switching to events, though.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Wednesday, 16 April 2014 17:11:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:21 UTC