[dom] Resize events needed? (#149)

Sorry I'm out of the loop but this issue came up before and I have no idea if it has been addressed

Assume you want to make a custom graphing element `<graph>`. To do this you use a canvas element wrapped in whatever is needed to make it a custom element. Anytime the element changes size the element's code needs to re-render the graph to fit the new size of the element.

As far as I am aware this is currently impossible. The only resize event is on `window` and there are plenty of other reasons an element might change size from css animations or other settings to flexboxes. A good example is Chrome's or Firefox's dev tools. Both of them have areas whose sizes can be changed without changing the size of the window. 

![graph](https://cloud.githubusercontent.com/assets/234804/11430556/cc98a3dc-94cb-11e5-8847-7f947b364c63.gif)

For example if the graph on the right was a custom element it would have no way to know it had been resized. It's only options are (1) require the user to notify it or (2) poll its size in a loop (setTimeout, rAF)

Has this been addressed? One solution would be an element level resize event. Maybe there are others.


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/149

Received on Wednesday, 13 January 2016 08:24:44 UTC