package js.html
extends Node › EventTarget
extended by Document, HTMLDocument, XMLDocument
Available on jsThe
Documentinterface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. The DOM tree includes elements such asbodyandtable, among many others. It provides functionality global to the document, like how to obtain the page's URL and create new elements in the document.Documentation Document by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
new ()Throws:
null |
DOMError |
|---|
read only URL:StringReturns the document location as a string.
read only activeElement:ElementReturns the currently focused element.
read only characterSet:StringReturns the character set being used by the document.
read only charset:StringAlias of Document.characterSet. Use this property instead.
read only childElementCount:Intread only children:HTMLCollectionread only compatMode:StringIndicates whether the document is rendered in quirks or strict mode.
read only contentType:StringReturns the Content-Type from the MIME Header of the current document.
read only currentScript:Elementread only defaultView:WindowReturns a reference to the window object.
dir:StringGets/sets directionality (rtl/ltr) of the document.
read only doctype:DocumentTypeReturns the Document Type Definition (DTD) of the current document.
read only documentElement:ElementReturns the Element that is a direct child of the document. For HTML documents, this is normally the html element.
read only documentURI:StringReturns the document location as a string.
read only firstElementChild:Elementread only fonts:FontFaceSetread only fullscreenElement:Elementread only fullscreenEnabled:Boolread only hidden:Bool…
read only implementation:DOMImplementationReturns the DOM implementation associated with the current document.
read only inputEncoding:StringAlias of Document.characterSet. Use this property instead.
read only lastElementChild:Elementread only lastModified:StringReturns the date on which the document was last modified.
read only lastStyleSheetSet:StringReturns the name of the style sheet set that was last enabled. Has the value null until the style sheet is changed by setting the value of document.selectedStyleSheetSet.
read only location:LocationReturns the URI of the current document.
onabort:Functiononafterscriptexecute:FunctionRepresents the event handling code for the afterscriptexecute event.
onbeforescriptexecute:FunctionRepresents the event handling code for the beforescriptexecute event.
onblur:Functiononcanplay:Functiononcanplaythrough:Functiononchange:Functiononclick:Functiononcontextmenu:Functiononcopy:FunctionRepresents the event handling code for the copy event.
oncut:FunctionRepresents the event handling code for the cut event.
ondblclick:Functionondrag:Functionondragend:Functionondragenter:Functionondragleave:Functionondragover:Functionondragstart:Functionondrop:Functionondurationchange:Functiononemptied:Functiononended:Functiononerror:Functiononfocus:Functiononfullscreenchange:FunctionIs an EventHandler representing the code to be called when the fullscreenchange event is raised.
onfullscreenerror:FunctionIs an EventHandler representing the code to be called when the fullscreenerror event is raised.
ongotpointercapture:Functiononinput:Functiononinvalid:Functiononkeydown:Functiononkeypress:Functiononkeyup:Functiononload:Functiononloadeddata:Functiononloadedmetadata:Functiononloadstart:Functiononlostpointercapture:Functiononmousedown:Functiononmouseenter:Functiononmouseleave:Functiononmousemove:Functiononmouseout:Functiononmouseover:Functiononmouseup:Functiononpaste:FunctionRepresents the event handling code for the paste event.
onpause:Functiononplay:Functiononplaying:Functiononpointercancel:Functiononpointerdown:Functiononpointerenter:Functiononpointerleave:Functiononpointerlockchange:FunctionRepresents the event handling code for the pointerlockchange event.
onpointerlockerror:FunctionRepresetnts the event handling code for the pointerlockerror event.
onpointermove:Functiononpointerout:Functiononpointerover:Functiononpointerup:Functiononprogress:Functiononratechange:Functiononreadystatechange:FunctionRepresents the event handling code for the readystatechange event.
onreset:Functiononresize:Functiononscroll:Functiononseeked:Functiononseeking:Functiononselect:Functiononshow:Functiononstalled:Functiononsubmit:Functiononsuspend:Functionontimeupdate:Functionontouchcancel:Functionontouchend:Functionontouchmove:Functionontouchstart:Functiononvolumechange:Functiononwaiting:Functiononwheel:FunctionRepresents the event handling code for the wheel event.
read only pointerLockElement:ElementReturns the element set as the target for mouse events while the pointer is locked. null if lock is pending, pointer is unlocked, or if the target is in another document.
read only preferredStyleSheetSet:StringReturns the preferred style sheet set as specified by the page author.
read only readyState:StringReturns loading status of the document.
read only referrer:StringReturns the URI of the page that linked to this page.
selectedStyleSheetSet:StringReturns which style sheet set is currently in use.
read only styleSheetSets:DOMStringListReturns a list of the style sheet sets available on the document.
read only styleSheets:StyleSheetListReturns a list of the style sheet objects on the current document.
read only timeline:DocumentTimeline…
title:StringSets or gets title of the current document.
read only visibilityState:VisibilityStateReturns a string denoting the visibility state of the document. Possible values are visible, hidden, prerender, and unloaded.
adoptNode (node:Node):NodeThrows:
null |
DOMError |
|---|
caretPositionFromPoint (x:Float, y:Float):CaretPositionGets the CaretPosition at or near the specified coordinates.
convertPointFromNode (point:DOMPointInit, from:EitherType<Text, EitherType<Element, HTMLDocument>>, ?options:ConvertCoordinateOptions):DOMPointThrows:
null |
DOMError |
|---|
convertQuadFromNode (quad:DOMQuad, from:EitherType<Text, EitherType<Element, HTMLDocument>>, ?options:ConvertCoordinateOptions):DOMQuadThrows:
null |
DOMError |
|---|
convertRectFromNode (rect:DOMRectReadOnly, from:EitherType<Text, EitherType<Element, HTMLDocument>>, ?options:ConvertCoordinateOptions):DOMQuadThrows:
null |
DOMError |
|---|
createAttribute (name:String):AttrThrows:
null |
DOMError |
|---|
createAttributeNS (namespace_:String, name:String):AttrThrows:
null |
DOMError |
|---|
createCDATASection (data:String):CDATASectionThrows:
null |
DOMError |
|---|
createComment (data:String):CommentCreates a new comment node and returns it.
createDocumentFragment ():DocumentFragmentCreates a new document fragment.
createElement (localName:String, typeExtension:String):ElementcreateElement (localName:String):ElementThrows:
null |
DOMError |
|---|
createElementNS (namespace_:String, qualifiedName:String, typeExtension:String):ElementcreateElementNS (namespace_:String, qualifiedName:String):ElementThrows:
null |
DOMError |
|---|
createEvent (interface_:String):EventThrows:
null |
DOMError |
|---|
createExpression (expression:String, resolver:XPathNSResolver):XPathExpressionThrows:
null |
DOMError |
|---|
createNSResolver (nodeResolver:Node):Node createNodeIterator (root:Node, whatToShow:Int = cast 4294967295, ?filter:NodeFilter):NodeIteratorThrows:
null |
DOMError |
|---|
createProcessingInstruction (target:String, data:String):ProcessingInstructionThrows:
null |
DOMError |
|---|
createRange ():RangeThrows:
null |
DOMError |
|---|
createTextNode (data:String):TextCreates a text node.
createTouch (?view:Window, ?target:EventTarget, identifier:Int = 0, pageX:Int = 0, pageY:Int = 0, screenX:Int = 0, screenY:Int = 0, clientX:Int = 0, clientY:Int = 0, radiusX:Int = 0, radiusY:Int = 0, rotationAngle:Float = 0.0, force:Float = 0.0):TouchCreates a Touch object.
createTouchList (touches:Array<Touch>):TouchListcreateTouchList (touch:Touch, touches:Rest<Touch>):TouchListcreateTouchList ():TouchList createTreeWalker (root:Node, whatToShow:Int = cast 4294967295, ?filter:NodeFilter):TreeWalkerThrows:
null |
DOMError |
|---|
elementFromPoint (x:Float, y:Float):ElementReturns the topmost element at the specified coordinates.
elementsFromPoint (x:Float, y:Float):Array<Element>Returns an array of all elements at the specified coordinates.
enableStyleSheetsForSet (name:String):VoidEnables the style sheets for the specified style sheet set.
evaluate (expression:String, contextNode:Node, resolver:XPathNSResolver, type:Int, result:Dynamic):XPathResultThrows:
null |
DOMError |
|---|
exitFullscreen ():VoidexitPointerLock ():VoidRelease the pointer lock.
getAnimations ():Array<Animation>Returns an array of all Animation objects currently in effect whose target elements are descendants of the document.
getElementById (elementId:String):ElementgetElementsByClassName (classNames:String):HTMLCollectionReturns a list of elements with the given class name.
getElementsByTagName (localName:String):HTMLCollectionReturns a list of elements with the given tag name.
getElementsByTagNameNS (namespace_:String, localName:String):HTMLCollectionThrows:
null |
DOMError |
|---|
hasFocus ():BoolThrows:
null |
DOMError |
|---|
importNode (node:Node, deep:Bool = false):NodeThrows:
null |
DOMError |
|---|
querySelector (selectors:String):ElementThrows:
null |
DOMError |
|---|
querySelectorAll (selectors:String):NodeListThrows:
null |
DOMError |
|---|
registerElement (name:String, ?options:ElementRegistrationOptions):DynamicThrows:
null |
DOMError |
|---|
releaseCapture ():VoidReleases the current mouse capture if it's on an element in this document.
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Document.html