A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Resize event on DOM elements

stuartpb
2015-03-18

Currently, only IE implements a resize event on DOM elements. Making this standard would address / help fix https://github.com/ajaxorg/ace/issues/2153, SVG element resize event, and many other headaches involving changes in content size.

jonathank
2015-03-19

I think this could use something similar to a matchMedia() query for element queries if/when that solidifies: http://responsiveimagescg.github.io/eq-usecases/

There is even an open issue which matches this:

This would certainly give far more fine grained control.

Boldewyn
2015-03-20

For what it’s worth, here is the Firefox issue, that I submitted over 3 years ago: https://bugzilla.mozilla.org/show_bug.cgi?id=701648

RickByers
2015-07-19

II believe blink layout engineers are against this for performance reasons. But they’re trying to enable the scenarios via “custom layout” as part of CSS Houdini.

tabatkins
2015-07-21

Nope, Blink is for it. We discussed it in public with other browser vendors at the last Extensible Web meetup.

stuartpb
2015-07-21

When you say you discussed in public, do you mean you discussed it in person at a public meetup? Because, to the internet, “in person” discussions are private (unless they’re webcast and saved).

RickByers
2015-07-24

Oh sorry - I stand corrected!

trusktr
2016-09-04

Not to be a troll or anything, but the lack of simple features like this one are why “native” developers that don’t like web tech don’t like web tech.

Then again, a “native” developer (who will manually ship an app that doesn’t run in the web anyway) could fork a browser and easily add this feature and then ship the browser as part of the app’s stack. :laughing:

But,

Blink is for it.

So, then hopefully this will be fixed soon?

What’s taking so long!

MT
2016-09-04

I suspect it is something about 5-10 years as usual. :slight_smile:

DanielHerr
2016-09-04

Implemented in Chrome Dev 54 behind experimental web platform features flag.

new ResizeObserver(callback).observe(element)

https://crbug.com/612962