Some more points:

> On Mar 25, 2018, at 10:03 AM, Alex Harui <> wrote:
>  I think
> _explicitWidth will mirror style.width, but again, how often are folks
> setting style.width, and who is reading it? If you scanned HTML DOMs in
> existing JS apps, I don't think we see it too often.

It depends. Setting hard width and height values is a very important piece of 
AMP.[1] It can be very useful for optimizing rendering performance — especially 
on mobile.

> Did we rule out just
> always returning HTMLElement.offsetWidth?

We don’t want to do that unless we absolutely have to. Checking the offsetWidth 
will force a reflow if any DOM properties have been written since the last 
measuring. Client code needs to have a way of getting the dimensions without 
always forcing a reflow.

> Shouldn't it be possible to
> create a full DOM without ever reading width if you are completely relying
> on browser layout?


> If so, the Basic code should allow you to do that.

Theoretically, but unless we want specialized layouts which know that every 
part of the app is browser-sized, I’m not sure how a layout can know what all 
the ancestors layouts are.



Reply via email to