English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM defaultView Property

HTML DOM Document Object

defaultViewRead-only property returns the one associated with the documentWindow (window)Object, if there is no available window object, it will return asnull.

Syntax:

document.defaultView
var win = document.defaultView;
Test and see‹/›

Browser Compatibility

The numbers in the table specify the first browser version that fully supports the defaultView property:

Property
defaultViewIsIsIsIs9

Technical Details

Return Value:Associated with the documentWindowObject
DOM Version:DOM Level1

More Examples

Get all properties and methods of the window object:

var win = document.defaultView;
for (let x in winObj) {
items += x;
}
Test and see‹/›

HTML DOM Document Object