Document: defaultView property
In browsers, document.defaultView
returns the
window
object associated with a document, or null
if none is available.
This property is read-only.
Value
The window
object.
Document
activeElement
adoptedStyleSheets
alinkColor
Deprecated
all
Deprecated
anchors
Deprecated
applets
Deprecated
bgColor
Deprecated
body
characterSet
childElementCount
children
compatMode
contentType
cookie
currentScript
defaultView
designMode
dir
doctype
documentElement
documentURI
domain
Deprecated
embeds
featurePolicy
Experimental
fgColor
Deprecated
firstElementChild
fonts
forms
fragmentDirective
fullscreen
Deprecated
fullscreenElement
fullscreenEnabled
head
hidden
images
implementation
lastElementChild
lastModified
lastStyleSheetSet
Non-standard
Deprecated
linkColor
Deprecated
links
location
pictureInPictureElement
pictureInPictureEnabled
plugins
pointerLockElement
preferredStyleSheetSet
Non-standard
Deprecated
prerendering
Experimental
readyState
referrer
rootElement
Deprecated
scripts
scrollingElement
selectedStyleSheetSet
Non-standard
Deprecated
styleSheets
styleSheetSets
Non-standard
Deprecated
timeline
title
URL
visibilityState
vlinkColor
Deprecated
xmlEncoding
Deprecated
xmlVersion
Deprecated
adoptNode()
append()
browsingTopics()
Experimental
Non-standard
caretPositionFromPoint()
caretRangeFromPoint()
Non-standard
clear()
Deprecated
close()
createAttribute()
createAttributeNS()
createCDATASection()
createComment()
createDocumentFragment()
createElement()
createElementNS()
createEvent()
Deprecated
createExpression()
createNodeIterator()
createNSResolver()
Deprecated
createProcessingInstruction()
createRange()
createTextNode()
createTouch()
Non-standard
Deprecated
createTouchList()
Non-standard
Deprecated
createTreeWalker()
elementFromPoint()
elementsFromPoint()
enableStyleSheetsForSet()
Non-standard
Deprecated
evaluate()
execCommand()
Deprecated
exitFullscreen()
exitPictureInPicture()
exitPointerLock()
getAnimations()
getElementById()
getElementsByClassName()
getElementsByName()
getElementsByTagName()
getElementsByTagNameNS()
getSelection()
hasFocus()
hasStorageAccess()
hasUnpartitionedCookieAccess()
importNode()
mozSetImageElement()
Non-standard
open()
prepend()
queryCommandEnabled()
Non-standard
Deprecated
queryCommandState()
Non-standard
Deprecated
queryCommandSupported()
Non-standard
Deprecated
querySelector()
querySelectorAll()
releaseCapture()
Non-standard
replaceChildren()
requestStorageAccess()
requestStorageAccessFor()
Experimental
startViewTransition()
write()
Deprecated
writeln()
afterscriptexecute
Non-standard
Deprecated
beforescriptexecute
Non-standard
Deprecated
copy
cut
DOMContentLoaded
fullscreenchange
fullscreenerror
paste
pointerlockchange
pointerlockerror
prerenderingchange
Experimental
readystatechange
scroll
scrollend
scrollsnapchange
Experimental
scrollsnapchanging
Experimental
securitypolicyviolation
selectionchange
visibilitychange
In browsers, document.defaultView
returns the
window
object associated with a document, or null
if none is available.
This property is read-only.
The window
object.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2024 by individual mozilla.org contributors. Content available under a Creative Commons license.