On Thu, Aug 6, 2015 at 9:58 AM, Jonas Sicking <jo...@sicking.cc> wrote:
> Lots of features force layout. Accessing any layout related properties
> like .offsetTop or .getComputedStyle() force a layout.

Yes. dglazkov has a library that enumerates the full set. CSSOM should
just define it.


> Having an API which provides a callback when layout happens would be
> nice, but given how long that has been debated with little progress,
> we shouldn't block on that.

Has it? Hmm.


> A simple solution here would be to simply use MutationObservers to
> detect when the last <meta> is removed. Any time that layout
> properties are queried after that they could behave like they
> currently do, i.e. force a synchronous layout.

Right, but we also need to define how they behave otherwise.


> If we want to we can provide syntax sugar which makes it easier to
> detect when the last <meta> is removed. But we should relate that to
> when the DOM mutation happens and not when screen rendering or layout
> happens.

Sure.

I think at this point it would be nice if we reached out to other
browsers to see if they have any thoughts on this kind of API. James,
would you be willing to email either public-weba...@w3.org or
wha...@whatwg.org?


-- 
https://annevankesteren.nl/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to