/* * Copyright (C)2005-2013 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ // This file is generated, do not edit! package js.html; /**
Each web page loaded in the browser has its own document object. This object serves as an entry point to the web page's content (the DOM tree, including elements such as <body>
and <table>
) and provides functionality global to the document (such as obtaining the page's URL and creating new elements in the document).
A document object can be obtained from various APIs:
document
in document's scripts. (The same document can also be referred to as window.document
.)contentDocument
property.responseXML
of an XMLHttpRequest
object.ownerDocument
property.Depending on the kind of the document (e.g. HTML or XML) different APIs may be available on the document object. This theoretical availability of APIs is usually described in terms of implementing interfaces defined in the relevant W3C DOM specifications:
Document
and Node
interfaces, meaning that the "core" properties and methods are available for all kinds of documents.HTMLDocument
interface, which is a more specialized interface for dealing with HTML documents (e.g., document.cookie, document.alinkColor).Methods or properties listed here that are part of a more specialized interface have an asterisk (*) next to them and have additional information in the Availability column.
Note that some APIs listed below are not available in all browsers for various reasons:
Detailed browser compatibility tables are located at the pages describing each property or method.
readystatechange
event.
Starting in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6)
, you can now use the syntax if ("onabort" in document)
to determine whether or not a given event handler property exists. This is because event handler interfaces have been updated to be proper web IDL interfaces. See DOM event handlers for details.
<script>
elements on the document. */
var scripts(default,null) : HTMLCollection;
var selectedStylesheetSet : String;
/** Returns a list of the stylesheet objects on the current document. */
var styleSheets(default,null) : StyleSheetList;
/** Returns the title of the current document. */
var title : String;
var visibilityState(default,null) : String;
/** Gets/sets the color of visited hyperlinks. */
var vlinkColor : String;
/** Returns the width of the current document. */
var width(default,null) : Int;
/** Returns the encoding as determined by the XML declaration.true
if the XML declaration specifies the document is standalone (e.g., An external part of the DTD affects the document's content), else false
. Setter throws DOMException. */
var xmlStandalone : Bool;
/** Returns the version number as specified in the XML declaration or "1.0"
if the declaration is absent. Setter throws DOMException. */
var xmlVersion : String;
function adoptNode( source : Node ) : Node;
function cancelFullScreen() : Void;
function captureEvents() : Void;
function caretRangeFromPoint( x : Int, y : Int ) : Range;
function clear() : Void;
function close() : Void;
function createAttribute( name : String ) : Attr;
function createAttributeNS( ?namespaceURI : String, ?qualifiedName : String ) : Attr;
function createCDATASection( data : String ) : CDATASection;
function createComment( data : String ) : Comment;
function createDocumentFragment() : DocumentFragment;
function createElement( ?tagName : String ) : Element;
function createElementNS( ?namespaceURI : String, ?qualifiedName : String ) : Element;
function createEntityReference( name : String ) : EntityReference;
function createEvent( eventType : String ) : Event;
function createExpression( expression : String, resolver : XPathNSResolver ) : XPathExpression;
function createNSResolver( nodeResolver : Node ) : XPathNSResolver;
function createNodeIterator( root : Node, whatToShow : Int, filter : NodeFilter, expandEntityReferences : Bool ) : NodeIterator;
function createProcessingInstruction( target : String, data : String ) : ProcessingInstruction;
function createRange() : Range;
function createTextNode( data : String ) : Text;
function createTouch( window : DOMWindow, target : EventTarget, identifier : Int, pageX : Int, pageY : Int, screenX : Int, screenY : Int, radiusX : Int, radiusY : Int, rotationAngle : Float, force : Float ) : Touch;
function createTouchList() : TouchList;
function createTreeWalker( root : Node, whatToShow : Int, filter : NodeFilter, expandEntityReferences : Bool ) : TreeWalker;
function elementFromPoint( x : Int, y : Int ) : Element;
function evaluate( expression : String, contextNode : Node, resolver : XPathNSResolver, type : Int, inResult : XPathResult ) : XPathResult;
function execCommand( command : String, userInterface : Bool, ?value : String ) : Bool;
function exitFullscreen() : Void;
function exitPointerLock() : Void;
function getCSSCanvasContext( contextId : String, name : String, width : Int, height : Int ) : CanvasRenderingContext;
function getElementById( elementId : String ) : Element;
function getElementsByClassName( tagname : String ) : NodeList;
function getElementsByName( elementName : String ) : NodeList;
function getElementsByTagName( tagname : String ) : NodeList;
function getElementsByTagNameNS( ?namespaceURI : String, localName : String ) : NodeList;
function getOverrideStyle( element : Element, pseudoElement : String ) : CSSStyleDeclaration;
function getSelection() : DOMSelection;
function hasFocus() : Bool;
function importNode( importedNode : Node, ?deep : Bool ) : Node;
function open() : Void;
function queryCommandEnabled( command : String ) : Bool;
function queryCommandIndeterm( command : String ) : Bool;
function queryCommandState( command : String ) : Bool;
function queryCommandSupported( command : String ) : Bool;
function queryCommandValue( command : String ) : String;
function querySelector( selectors : String ) : Element;
function querySelectorAll( selectors : String ) : NodeList;
function releaseEvents() : Void;
function write( text : String ) : Void;
function writeln( text : String ) : Void;
/** A typed shortcut for createElement("td")
. */
public inline function createTableCellElement() : TableCellElement { return cast createElement("td"); }
/** A typed shortcut for createElement("hr")
. */
public inline function createHRElement() : HRElement { return cast createElement("hr"); }
/** A typed shortcut for createElement("marquee")
. */
public inline function createMarqueeElement() : MarqueeElement { return cast createElement("marquee"); }
/** A typed shortcut for createElement("basefont")
. */
public inline function createBaseFontElement() : BaseFontElement { return cast createElement("basefont"); }
/** A typed shortcut for createElement("select")
. */
public inline function createSelectElement() : SelectElement { return cast createElement("select"); }
/** A typed shortcut for createElement("map")
. */
public inline function createMapElement() : MapElement { return cast createElement("map"); }
/** A typed shortcut for createElement("form")
. */
public inline function createFormElement() : FormElement { return cast createElement("form"); }
/** A typed shortcut for createElement("option")
. */
public inline function createOptionElement() : OptionElement { return cast createElement("option"); }
/** A typed shortcut for createElement("label")
. */
public inline function createLabelElement() : LabelElement { return cast createElement("label"); }
/** A typed shortcut for createElement("meta")
. */
public inline function createMetaElement() : MetaElement { return cast createElement("meta"); }
/** A typed shortcut for createElement("img")
. */
public inline function createImageElement() : ImageElement { return cast createElement("img"); }
/** A typed shortcut for createElement("dl")
. */
public inline function createDListElement() : DListElement { return cast createElement("dl"); }
/** A typed shortcut for createElement("frame")
. */
public inline function createFrameElement() : FrameElement { return cast createElement("frame"); }
/** A typed shortcut for createElement("mod")
. */
public inline function createModElement() : ModElement { return cast createElement("mod"); }
/** A typed shortcut for createElement("ul")
. */
public inline function createUListElement() : UListElement { return cast createElement("ul"); }
/** A typed shortcut for createElement("output")
. */
public inline function createOutputElement() : OutputElement { return cast createElement("output"); }
/** A typed shortcut for createElement("ol")
. */
public inline function createOListElement() : OListElement { return cast createElement("ol"); }
/** A typed shortcut for createElement("shadow")
. */
public inline function createShadowElement() : ShadowElement { return cast createElement("shadow"); }
/** A typed shortcut for createElement("li")
. */
public inline function createLIElement() : LIElement { return cast createElement("li"); }
/** A typed shortcut for createElement("datalist")
. */
public inline function createDataListElement() : DataListElement { return cast createElement("datalist"); }
/** A typed shortcut for createElement("param")
. */
public inline function createParamElement() : ParamElement { return cast createElement("param"); }
/** A typed shortcut for createElement("font")
. */
public inline function createFontElement() : FontElement { return cast createElement("font"); }
/** A typed shortcut for createElement("track")
. */
public inline function createTrackElement() : TrackElement { return cast createElement("track"); }
/** A typed shortcut for createElement("applet")
. */
public inline function createAppletElement() : AppletElement { return cast createElement("applet"); }
/** A typed shortcut for createElement("area")
. */
public inline function createAreaElement() : AreaElement { return cast createElement("area"); }
/** A typed shortcut for createElement("link")
. */
public inline function createLinkElement() : LinkElement { return cast createElement("link"); }
/** A typed shortcut for createElement("div")
. */
public inline function createDivElement() : DivElement { return cast createElement("div"); }
/** A typed shortcut for createElement("title")
. */
public inline function createTitleElement() : TitleElement { return cast createElement("title"); }
/** A typed shortcut for createElement("style")
. */
public inline function createStyleElement() : StyleElement { return cast createElement("style"); }
/** A typed shortcut for createElement("progress")
. */
public inline function createProgressElement() : ProgressElement { return cast createElement("progress"); }
/** A typed shortcut for createElement("button")
. */
public inline function createButtonElement() : ButtonElement { return cast createElement("button"); }
/** A typed shortcut for createElement("fieldset")
. */
public inline function createFieldSetElement() : FieldSetElement { return cast createElement("fieldset"); }
/** A typed shortcut for createElement("a")
. */
public inline function createAnchorElement() : AnchorElement { return cast createElement("a"); }
/** A typed shortcut for createElement("iframe")
. */
public inline function createIFrameElement() : IFrameElement { return cast createElement("iframe"); }
/** A typed shortcut for createElement("span")
. */
public inline function createSpanElement() : SpanElement { return cast createElement("span"); }
/** A typed shortcut for createElement("details")
. */
public inline function createDetailsElement() : DetailsElement { return cast createElement("details"); }
/** A typed shortcut for createElement("body")
. */
public inline function createBodyElement() : BodyElement { return cast createElement("body"); }
/** A typed shortcut for createElement("input")
. */
public inline function createInputElement() : InputElement { return cast createElement("input"); }
/** A typed shortcut for createElement("embed")
. */
public inline function createEmbedElement() : EmbedElement { return cast createElement("embed"); }
/** A typed shortcut for createElement("meter")
. */
public inline function createMeterElement() : MeterElement { return cast createElement("meter"); }
/** A typed shortcut for createElement("pre")
. */
public inline function createPreElement() : PreElement { return cast createElement("pre"); }
/** A typed shortcut for createElement("thead")
. */
public inline function createTableSectionElement() : TableSectionElement { return cast createElement("thead"); }
/** A typed shortcut for createElement("head")
. */
public inline function createHeadElement() : HeadElement { return cast createElement("head"); }
/** A typed shortcut for createElement("base")
. */
public inline function createBaseElement() : BaseElement { return cast createElement("base"); }
/** A typed shortcut for createElement("optgroup")
. */
public inline function createOptGroupElement() : OptGroupElement { return cast createElement("optgroup"); }
/** A typed shortcut for createElement("quote")
. */
public inline function createQuoteElement() : QuoteElement { return cast createElement("quote"); }
/** A typed shortcut for createElement("audio")
. */
public inline function createAudioElement() : AudioElement { return cast createElement("audio"); }
/** A typed shortcut for createElement("video")
. */
public inline function createVideoElement() : VideoElement { return cast createElement("video"); }
/** A typed shortcut for createElement("legend")
. */
public inline function createLegendElement() : LegendElement { return cast createElement("legend"); }
/** A typed shortcut for createElement("menu")
. */
public inline function createMenuElement() : MenuElement { return cast createElement("menu"); }
/** A typed shortcut for createElement("frameset")
. */
public inline function createFrameSetElement() : FrameSetElement { return cast createElement("frameset"); }
/** A typed shortcut for createElement("canvas")
. */
public inline function createCanvasElement() : CanvasElement { return cast createElement("canvas"); }
/** A typed shortcut for createElement("keygen")
. */
public inline function createKeygenElement() : KeygenElement { return cast createElement("keygen"); }
/** A typed shortcut for createElement("col")
. */
public inline function createTableColElement() : TableColElement { return cast createElement("col"); }
/** A typed shortcut for createElement("dir")
. */
public inline function createDirectoryElement() : DirectoryElement { return cast createElement("dir"); }
/** A typed shortcut for createElement("table")
. */
public inline function createTableElement() : TableElement { return cast createElement("table"); }
/** A typed shortcut for createElement("tr")
. */
public inline function createTableRowElement() : TableRowElement { return cast createElement("tr"); }
/** A typed shortcut for createElement("script")
. */
public inline function createScriptElement() : ScriptElement { return cast createElement("script"); }
/** A typed shortcut for createElement("source")
. */
public inline function createSourceElement() : SourceElement { return cast createElement("source"); }
/** A typed shortcut for createElement("p")
. */
public inline function createParagraphElement() : ParagraphElement { return cast createElement("p"); }
/** A typed shortcut for createElement("content")
. */
public inline function createContentElement() : ContentElement { return cast createElement("content"); }
/** A typed shortcut for createElement("br")
. */
public inline function createBRElement() : BRElement { return cast createElement("br"); }
/** A typed shortcut for createElement("html")
. */
public inline function createHtmlElement() : HtmlElement { return cast createElement("html"); }
/** A typed shortcut for createElement("textarea")
. */
public inline function createTextAreaElement() : TextAreaElement { return cast createElement("textarea"); }
/** A typed shortcut for createElement("media")
. */
public inline function createMediaElement() : MediaElement { return cast createElement("media"); }
/** A typed shortcut for createElement("object")
. */
public inline function createObjectElement() : ObjectElement { return cast createElement("object"); }
/** A typed shortcut for createElement("caption")
. */
public inline function createTableCaptionElement() : TableCaptionElement { return cast createElement("caption"); }
}