HTMLDocument.hx 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /*
  2. * Copyright (C)2005-2018 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\HTMLDocument.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. `HTMLDocument` is an abstract interface of the DOM which provides access to special properties and methods not present by default on a regular (XML) document.
  26. Documentation [HTMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument>
  28. **/
  29. @:native("HTMLDocument")
  30. extern class HTMLDocument extends Document
  31. {
  32. var domain : String;
  33. var cookie : String;
  34. var body : BodyElement;
  35. var head(default,null) : HeadElement;
  36. var images(default,null) : HTMLCollection;
  37. var embeds(default,null) : HTMLCollection;
  38. var plugins(default,null) : HTMLCollection;
  39. var links(default,null) : HTMLCollection;
  40. var forms(default,null) : HTMLCollection;
  41. var scripts(default,null) : HTMLCollection;
  42. var designMode : String;
  43. var fgColor : String;
  44. var linkColor : String;
  45. var vlinkColor : String;
  46. var alinkColor : String;
  47. var bgColor : String;
  48. var anchors(default,null) : HTMLCollection;
  49. var applets(default,null) : HTMLCollection;
  50. var all(default,null) : HTMLAllCollection;
  51. function getElementsByName( elementName : String ) : NodeList;
  52. function getItems( ?typeNames : String = "" ) : NodeList;
  53. /** @throws DOMError */
  54. @:overload( function( ?type : String = "text/html", ?replace : String = "" ) : HTMLDocument {} )
  55. function open( url : String, name : String, features : String, ?replace : Bool = false ) : Window;
  56. /** @throws DOMError */
  57. function close() : Void;
  58. /** @throws DOMError */
  59. function write( text : haxe.extern.Rest<String> ) : Void;
  60. /** @throws DOMError */
  61. function writeln( text : haxe.extern.Rest<String> ) : Void;
  62. /** @throws DOMError */
  63. function execCommand( commandId : String, ?showUI : Bool = false, ?value : String = "" ) : Bool;
  64. /** @throws DOMError */
  65. function queryCommandEnabled( commandId : String ) : Bool;
  66. /** @throws DOMError */
  67. function queryCommandIndeterm( commandId : String ) : Bool;
  68. /** @throws DOMError */
  69. function queryCommandState( commandId : String ) : Bool;
  70. function queryCommandSupported( commandId : String ) : Bool;
  71. /** @throws DOMError */
  72. function queryCommandValue( commandId : String ) : String;
  73. function clear() : Void;
  74. /** @throws DOMError */
  75. function getSelection() : Selection;
  76. function captureEvents() : Void;
  77. function releaseEvents() : Void;
  78. /** Shorthand for creating an HTML `<td>` element. */
  79. inline function createTableCellElement() : TableCellElement { return cast createElement("td"); }
  80. /** Shorthand for creating an HTML `<hr>` element. */
  81. inline function createHRElement() : HRElement { return cast createElement("hr"); }
  82. /** Shorthand for creating an HTML `<select>` element. */
  83. inline function createSelectElement() : SelectElement { return cast createElement("select"); }
  84. /** Shorthand for creating an HTML `<map>` element. */
  85. inline function createMapElement() : MapElement { return cast createElement("map"); }
  86. /** Shorthand for creating an HTML `<form>` element. */
  87. inline function createFormElement() : FormElement { return cast createElement("form"); }
  88. /** Shorthand for creating an HTML `<option>` element. */
  89. inline function createOptionElement() : OptionElement { return cast createElement("option"); }
  90. /** Shorthand for creating an HTML `<label>` element. */
  91. inline function createLabelElement() : LabelElement { return cast createElement("label"); }
  92. /** Shorthand for creating an HTML `<meta>` element. */
  93. inline function createMetaElement() : MetaElement { return cast createElement("meta"); }
  94. /** Shorthand for creating an HTML `<img>` element. */
  95. inline function createImageElement() : ImageElement { return cast createElement("img"); }
  96. /** Shorthand for creating an HTML `<dl>` element. */
  97. inline function createDListElement() : DListElement { return cast createElement("dl"); }
  98. /** Shorthand for creating an HTML `<frame>` element. */
  99. inline function createFrameElement() : FrameElement { return cast createElement("frame"); }
  100. /** Shorthand for creating an HTML `<mod>` element. */
  101. inline function createModElement() : ModElement { return cast createElement("mod"); }
  102. /** Shorthand for creating an HTML `<ul>` element. */
  103. inline function createUListElement() : UListElement { return cast createElement("ul"); }
  104. /** Shorthand for creating an HTML `<output>` element. */
  105. inline function createOutputElement() : OutputElement { return cast createElement("output"); }
  106. /** Shorthand for creating an HTML `<ol>` element. */
  107. inline function createOListElement() : OListElement { return cast createElement("ol"); }
  108. /** Shorthand for creating an HTML `<shadow>` element. */
  109. inline function createShadowElement() : ShadowElement { return cast createElement("shadow"); }
  110. /** Shorthand for creating an HTML `<li>` element. */
  111. inline function createLIElement() : LIElement { return cast createElement("li"); }
  112. /** Shorthand for creating an HTML `<datalist>` element. */
  113. inline function createDataListElement() : DataListElement { return cast createElement("datalist"); }
  114. /** Shorthand for creating an HTML `<param>` element. */
  115. inline function createParamElement() : ParamElement { return cast createElement("param"); }
  116. /** Shorthand for creating an HTML `<font>` element. */
  117. inline function createFontElement() : FontElement { return cast createElement("font"); }
  118. /** Shorthand for creating an HTML `<track>` element. */
  119. inline function createTrackElement() : TrackElement { return cast createElement("track"); }
  120. /** Shorthand for creating an HTML `<applet>` element. */
  121. inline function createAppletElement() : AppletElement { return cast createElement("applet"); }
  122. /** Shorthand for creating an HTML `<area>` element. */
  123. inline function createAreaElement() : AreaElement { return cast createElement("area"); }
  124. /** Shorthand for creating an HTML `<link>` element. */
  125. inline function createLinkElement() : LinkElement { return cast createElement("link"); }
  126. /** Shorthand for creating an HTML `<div>` element. */
  127. inline function createDivElement() : DivElement { return cast createElement("div"); }
  128. /** Shorthand for creating an HTML `<title>` element. */
  129. inline function createTitleElement() : TitleElement { return cast createElement("title"); }
  130. /** Shorthand for creating an HTML `<style>` element. */
  131. inline function createStyleElement() : StyleElement { return cast createElement("style"); }
  132. /** Shorthand for creating an HTML `<progress>` element. */
  133. inline function createProgressElement() : ProgressElement { return cast createElement("progress"); }
  134. /** Shorthand for creating an HTML `<button>` element. */
  135. inline function createButtonElement() : ButtonElement { return cast createElement("button"); }
  136. /** Shorthand for creating an HTML `<fieldset>` element. */
  137. inline function createFieldSetElement() : FieldSetElement { return cast createElement("fieldset"); }
  138. /** Shorthand for creating an HTML `<a>` element. */
  139. inline function createAnchorElement() : AnchorElement { return cast createElement("a"); }
  140. /** Shorthand for creating an HTML `<iframe>` element. */
  141. inline function createIFrameElement() : IFrameElement { return cast createElement("iframe"); }
  142. /** Shorthand for creating an HTML `<span>` element. */
  143. inline function createSpanElement() : SpanElement { return cast createElement("span"); }
  144. /** Shorthand for creating an HTML `<body>` element. */
  145. inline function createBodyElement() : BodyElement { return cast createElement("body"); }
  146. /** Shorthand for creating an HTML `<input>` element. */
  147. inline function createInputElement() : InputElement { return cast createElement("input"); }
  148. /** Shorthand for creating an HTML `<embed>` element. */
  149. inline function createEmbedElement() : EmbedElement { return cast createElement("embed"); }
  150. /** Shorthand for creating an HTML `<meter>` element. */
  151. inline function createMeterElement() : MeterElement { return cast createElement("meter"); }
  152. /** Shorthand for creating an HTML `<picture>` element. */
  153. inline function createPictureElement() : PictureElement { return cast createElement("picture"); }
  154. /** Shorthand for creating an HTML `<pre>` element. */
  155. inline function createPreElement() : PreElement { return cast createElement("pre"); }
  156. /** Shorthand for creating an HTML `<thead>` element. */
  157. inline function createTableSectionElement() : TableSectionElement { return cast createElement("thead"); }
  158. /** Shorthand for creating an HTML `<head>` element. */
  159. inline function createHeadElement() : HeadElement { return cast createElement("head"); }
  160. /** Shorthand for creating an HTML `<base>` element. */
  161. inline function createBaseElement() : BaseElement { return cast createElement("base"); }
  162. /** Shorthand for creating an HTML `<optgroup>` element. */
  163. inline function createOptGroupElement() : OptGroupElement { return cast createElement("optgroup"); }
  164. /** Shorthand for creating an HTML `<quote>` element. */
  165. inline function createQuoteElement() : QuoteElement { return cast createElement("quote"); }
  166. /** Shorthand for creating an HTML `<audio>` element. */
  167. inline function createAudioElement() : AudioElement { return cast createElement("audio"); }
  168. /** Shorthand for creating an HTML `<video>` element. */
  169. inline function createVideoElement() : VideoElement { return cast createElement("video"); }
  170. /** Shorthand for creating an HTML `<legend>` element. */
  171. inline function createLegendElement() : LegendElement { return cast createElement("legend"); }
  172. /** Shorthand for creating an HTML `<menu>` element. */
  173. inline function createMenuElement() : MenuElement { return cast createElement("menu"); }
  174. /** Shorthand for creating an HTML `<frameset>` element. */
  175. inline function createFrameSetElement() : FrameSetElement { return cast createElement("frameset"); }
  176. /** Shorthand for creating an HTML `<canvas>` element. */
  177. inline function createCanvasElement() : CanvasElement { return cast createElement("canvas"); }
  178. /** Shorthand for creating an HTML `<p>` element. */
  179. inline function createParagraphElement() : ParagraphElement { return cast createElement("p"); }
  180. /** Shorthand for creating an HTML `<col>` element. */
  181. inline function createTableColElement() : TableColElement { return cast createElement("col"); }
  182. /** Shorthand for creating an HTML `<dir>` element. */
  183. inline function createDirectoryElement() : DirectoryElement { return cast createElement("dir"); }
  184. /** Shorthand for creating an HTML `<table>` element. */
  185. inline function createTableElement() : TableElement { return cast createElement("table"); }
  186. /** Shorthand for creating an HTML `<tr>` element. */
  187. inline function createTableRowElement() : TableRowElement { return cast createElement("tr"); }
  188. /** Shorthand for creating an HTML `<script>` element. */
  189. inline function createScriptElement() : ScriptElement { return cast createElement("script"); }
  190. /** Shorthand for creating an HTML `<source>` element. */
  191. inline function createSourceElement() : SourceElement { return cast createElement("source"); }
  192. /** Shorthand for creating an HTML `<content>` element. */
  193. inline function createContentElement() : ContentElement { return cast createElement("content"); }
  194. /** Shorthand for creating an HTML `<br>` element. */
  195. inline function createBRElement() : BRElement { return cast createElement("br"); }
  196. /** Shorthand for creating an HTML `<html>` element. */
  197. inline function createHtmlElement() : HtmlElement { return cast createElement("html"); }
  198. /** Shorthand for creating an HTML `<textarea>` element. */
  199. inline function createTextAreaElement() : TextAreaElement { return cast createElement("textarea"); }
  200. /** Shorthand for creating an HTML `<media>` element. */
  201. inline function createMediaElement() : MediaElement { return cast createElement("media"); }
  202. /** Shorthand for creating an HTML `<object>` element. */
  203. inline function createObjectElement() : ObjectElement { return cast createElement("object"); }
  204. /** Shorthand for creating an HTML `<caption>` element. */
  205. inline function createTableCaptionElement() : TableCaptionElement { return cast createElement("caption"); }
  206. }