W3C DOM tests - the document

This paragraph is element x.

The entire browser window now has name="TestWindowName".

This page contains test cases for basic document properties.

Test scripts

documentElement

alert(document.documentElement.nodeName);

ownerDocument

alert(x.ownerDocument.nodeName);

body

alert(document.body.nodeName);

defaultView

alert(document.defaultView.name);

parentWindow

alert(document.parentWindow.name);