Re: measurements

Cameron Hart wrote:

>> Yes, IMO it's out of scope.
>> 
>> DOM concerns itself only with the document, not a current rendering of
>> it. Even when you set an HTML element's position with the likes of
>> "x.style.top= '20px'", you're only simulating adding the inline style
>> "top: 20px" to the document, not directly telling the browser to
>> place the element.
> 
> 
> It is a practical consideration to be able to set and retrieve information
> on how the browser renders a page. I'm not a browser developer, but I'm sure
> all browsers know the size of an element internally, surely they would have
> to to be able to render a page. It would be great to have a standard way of
> accessing this information.
> 
> I'm quite suprised this issue hasn't been covered in the DOM before.

It has been started, as the Views and Formatting module for DOM Level 3.

http://www.w3.org/TR/DOM-Level-3-Views/
You will find that this is a separate module rather than adding 
presentation methods to the elements directly, because adding 
presentation methods to the content model is extremely problematic.

As the status of this document indicates, the DOM WG is waiting for some 
momentum and surge in interest in multiple companies to experiment and 
implement this type of interfaces.

>> It's not very glamourous from a forward-looking point-of-view, but
>> I believe it'd help a lot of people if this area were standardised.
> 
> 
> It would definetly help anyone writing DHTML applications IMHO.

If done modularly, portably, adaptibly to all presentations, it can be, 
IMO, both glamorous and good.  But if pursued like DOM level 0, adding 
presentation-assumption-specific methods to DOM nodes, I hope no one 
seriously wants to pursue it as a standardization, since the API will 
break badly on future devices and browser models.  What is the pitch of 
a phrase being bresented in a visual browser.  What is the pixel width 
of an element being presented in a voice browser?  How about the width 
in a visual browser presenting the same document in multiple 
different-sized windows, or where the element has been broken across 
fixed-size pages for print preview or to better utilize a multiheaded or 
non-standard display?

Ray Whitmer
rayw@netscape.com

Received on Tuesday, 30 January 2001 09:55:46 UTC