HTML DOM defaultView Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML DOM defaultView Property

❮ Document Object

Example

Get the document's window object:

var x = document.defaultWiew;
Try it Yourself »

Definition and Usage

The defaultView property returns the document's Window Object.


Browser Support

Property
defaultView Yes Yes Yes Yes Yes

Syntax

document.defaultView

Technical Details

Return Value: The document's Window Object
DOM Version Core Level 1 Document Object

More Examples

Example

Get the size of the window:

var x = document.defaultView;
var w = x.innerWidth;
var h = x.innerHeight;
Try it Yourself »

Related Pages

HTML DOM Window Object


❮ Document Object