defaultView
Summary
Returns the Document’s browsing context’s Window object (essentially the environment in which objects are presented to the user) if there is one, or null otherwise.
Property of dom/Documentdom/Document
Syntax
var Window = document.defaultView;
document.defaultView = value;
Return Value
Returns an object of type ObjectObject
Returns the Window object of the active document
Examples
//displays the document's browsing context
function showDefView() {
alert(document.defaultView);
}
Related specifications
- HTML5 Specification
- Working Draft
See also
Related pages
- DocumentDocument
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]