• Revision slug: DOM/document.defaultView
  • Revision title: document.defaultView
  • Revision id: 11027
  • Created:
  • Creator: ziyunfei
  • Is current revision? No
  • Comment 16 words added, 2 words removed

Revision Content


In browsers returns the window object associated with the document or null if none available.


var win = document.defaultView;

This property is read-only.


According to quirksmode, defaultView is not supported in IE until IE 9.


{{ languages( {"pl": "pl/DOM/document.defaultView","zh-cn": "zh-cn/DOM/document.defaultView" } ) }}

Revision Source

<h3 id="Summary" name="Summary">Summary</h3>
<p>In browsers returns the <a href="/en/DOM/window" title="en/DOM/window">window</a> object associated with the document or <code>null</code> if none available.</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="eval">var win = document.defaultView;
<p>This property is read-only.</p>
<h3 id="Notes" name="Notes">Notes</h3>
<p>According to <a class="external" href="" title="">quirksmode</a>, <code>defaultView</code> is not supported in IE until IE 9.</p>
<h3 id="Specification" name="Specification">Specification</h3>
<ul> <li><a href="/en/HTML/HTML5" title="en/HTML/HTML5">HTML5: defaultView</a></li> <li><a class="external" href="">DOM Level 2 Views: defaultView</a></li> <li><a class="external" href="" title="">DOM Level 3 Views</a> (Only developed to Working Group Note and not implemented)</li>
<p>{{ languages( {"pl": "pl/DOM/document.defaultView","zh-cn": "zh-cn/DOM/document.defaultView" } ) }}</p>
Revert to this revision