Re: getComputedStyle - Why window member function?
"Axel Dahmen" <[email protected]> Mon, 14 Feb 2011 21:58:27 +0100
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
> And you can have a pure in memory DOM document that is not rendered > anywhere, like an responseXML document or one created from DOMParser or > one created with document.implementation.createDocument. As computing > styles on such documents does not make much sense I think the > document.defaultView > (http://www.w3.org/TR/DOM-Level-2-Views/views.html#Views-AbstractView) > was introduced and that is null for documents like I listed above. For > rendered documents implementors mapped document.defaultView to the > window object. I don't know whether that was the intention of the > authors of the "Document Object Model Views" spec. But it certainly make > sense not to have getComputedStyle exposed on all kind of documents. Shouldn't this function then return 'undefined' in those cases? _______________________________________________ dev-tech-dom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-dom