DescriptiondefaultView is an instance of the DOM-2 AbstractView as described at
http://www.w3.org/TR/DOM-Level-2-Views/views.html#Views-AbstractView
That isn't really very useful, since the only API that specifies is
that there is a readonly "document" member that points back.
https://developer.mozilla.org/en/DOM/document.defaultView says
document.defaultView is generally a reference to the window object for the
document, however that is not defined in the specification and can't be
relied upon for all host environments, particularly as not all browsers
implement it.
We can't provide access to the tamed window obviously since that's a
gadget's global scope, so would leak way too much authority.
The view is meant to be a dumping ground for all kind of methods that
capture the way the document is presented to the user, so we can
expose the computed style, sizing, resizing, and the position
properties.
I implement a TameDefaultView class in such a way that it exposes:
document
{resize,scroll}{By,To}
getComputedStyle
{client,offset, scroll}{Left,Top,Height,Width}
page{X,Y}Offset
Patch Set 1 #
MessagesTotal messages: 3
|
||||||||||||||||||||||||||||