W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2015

Re: [whatwg] "resize" events on elements

From: Ryosuke Niwa <rniwa@apple.com>
Date: Mon, 23 Feb 2015 20:16:52 -0800
Message-id: <1B5525CC-7EAE-4313-9598-FF06D7EB7EF0@apple.com>
To: Dean Jackson <dino@apple.com>
Cc: WHAT Working Group <whatwg@whatwg.org>

> On Feb 23, 2015, at 5:40 PM, Dean Jackson <dino@apple.com> wrote:
> 
> At the recent Houdini meeting there was a vague agreement between the browser engines on adding a way for elements to be notified when their size changes. We've run into a number of scenarios where this is extremely useful, and is otherwise difficult or annoying (e.g. checking your size on a timer).
> 
> The idea was to allow the resize event on elements. I don't really care what the solution is, so maybe someone here can come up with a better idea (size observers?). And of course there are a lot of details to be worked out.

I would like it be an async event on an element although we might want it to fire earlier than setTimeout(~, 0) to avoid FOC (maybe the same timing as rAF?).  I don't think end-of-microtask makes sense as that may force too many layouts.

- R. Niwa
Received on Tuesday, 24 February 2015 04:17:17 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:27 UTC