HTMLDocument.hx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /*
  2. * Copyright (C)2005-2019 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 which extends the `Document` interface to add HTML-specific features to the document object. It represents the root of the HTML document, within which its entire DOM hierarchy resides.
  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. var domain : String;
  32. var cookie : String;
  33. var designMode : String;
  34. var fgColor : String;
  35. var linkColor : String;
  36. var vlinkColor : String;
  37. var alinkColor : String;
  38. var bgColor : String;
  39. var all(default,null) : HTMLAllCollection;
  40. /** @throws DOMError */
  41. @:overload( function( ?type : String, replace : String = "" ) : HTMLDocument {} )
  42. function open( url : String, name : String, features : String, replace : Bool = false ) : Window;
  43. /** @throws DOMError */
  44. function close() : Void;
  45. /** @throws DOMError */
  46. function write( text : haxe.extern.Rest<String> ) : Void;
  47. /** @throws DOMError */
  48. function writeln( text : haxe.extern.Rest<String> ) : Void;
  49. /** @throws DOMError */
  50. function execCommand( commandId : String, showUI : Bool = false, value : String = "" ) : Bool;
  51. /** @throws DOMError */
  52. function queryCommandEnabled( commandId : String ) : Bool;
  53. /** @throws DOMError */
  54. function queryCommandIndeterm( commandId : String ) : Bool;
  55. /** @throws DOMError */
  56. function queryCommandState( commandId : String ) : Bool;
  57. function queryCommandSupported( commandId : String ) : Bool;
  58. /** @throws DOMError */
  59. function queryCommandValue( commandId : String ) : String;
  60. function clear() : Void;
  61. function captureEvents() : Void;
  62. function releaseEvents() : Void;
  63. /** Shorthand for creating an HTML `<td>` element. */
  64. inline function createTableCellElement() : TableCellElement { return cast createElement("td"); }
  65. /** Shorthand for creating an HTML `<select>` element. */
  66. inline function createSelectElement() : SelectElement { return cast createElement("select"); }
  67. /** Shorthand for creating an HTML `<font>` element. */
  68. inline function createFontElement() : FontElement { return cast createElement("font"); }
  69. /** Shorthand for creating an HTML `<dl>` element. */
  70. inline function createDListElement() : DListElement { return cast createElement("dl"); }
  71. /** Shorthand for creating an HTML `<frame>` element. */
  72. inline function createFrameElement() : FrameElement { return cast createElement("frame"); }
  73. /** Shorthand for creating an HTML `<ol>` element. */
  74. inline function createOListElement() : OListElement { return cast createElement("ol"); }
  75. /** Shorthand for creating an HTML `<li>` element. */
  76. inline function createLIElement() : LIElement { return cast createElement("li"); }
  77. /** Shorthand for creating an HTML `<hr>` element. */
  78. inline function createHRElement() : HRElement { return cast createElement("hr"); }
  79. /** Shorthand for creating an HTML `<param>` element. */
  80. inline function createParamElement() : ParamElement { return cast createElement("param"); }
  81. /** Shorthand for creating an HTML `<label>` element. */
  82. inline function createLabelElement() : LabelElement { return cast createElement("label"); }
  83. /** Shorthand for creating an HTML `<track>` element. */
  84. inline function createTrackElement() : TrackElement { return cast createElement("track"); }
  85. /** Shorthand for creating an HTML `<div>` element. */
  86. inline function createDivElement() : DivElement { return cast createElement("div"); }
  87. /** Shorthand for creating an HTML `<title>` element. */
  88. inline function createTitleElement() : TitleElement { return cast createElement("title"); }
  89. /** Shorthand for creating an HTML `<a>` element. */
  90. inline function createAnchorElement() : AnchorElement { return cast createElement("a"); }
  91. /** Shorthand for creating an HTML `<style>` element. */
  92. inline function createStyleElement() : StyleElement { return cast createElement("style"); }
  93. /** Shorthand for creating an HTML `<embed>` element. */
  94. inline function createEmbedElement() : EmbedElement { return cast createElement("embed"); }
  95. /** Shorthand for creating an HTML `<meter>` element. */
  96. inline function createMeterElement() : MeterElement { return cast createElement("meter"); }
  97. /** Shorthand for creating an HTML `<picture>` element. */
  98. inline function createPictureElement() : PictureElement { return cast createElement("picture"); }
  99. /** Shorthand for creating an HTML `<pre>` element. */
  100. inline function createPreElement() : PreElement { return cast createElement("pre"); }
  101. /** Shorthand for creating an HTML `<thead>` element. */
  102. inline function createTableSectionElement() : TableSectionElement { return cast createElement("thead"); }
  103. /** Shorthand for creating an HTML `<head>` element. */
  104. inline function createHeadElement() : HeadElement { return cast createElement("head"); }
  105. /** Shorthand for creating an HTML `<optgroup>` element. */
  106. inline function createOptGroupElement() : OptGroupElement { return cast createElement("optgroup"); }
  107. /** Shorthand for creating an HTML `<audio>` element. */
  108. inline function createAudioElement() : AudioElement { return cast createElement("audio"); }
  109. /** Shorthand for creating an HTML `<video>` element. */
  110. inline function createVideoElement() : VideoElement { return cast createElement("video"); }
  111. /** Shorthand for creating an HTML `<legend>` element. */
  112. inline function createLegendElement() : LegendElement { return cast createElement("legend"); }
  113. /** Shorthand for creating an HTML `<ul>` element. */
  114. inline function createUListElement() : UListElement { return cast createElement("ul"); }
  115. /** Shorthand for creating an HTML `<dir>` element. */
  116. inline function createDirectoryElement() : DirectoryElement { return cast createElement("dir"); }
  117. /** Shorthand for creating an HTML `<table>` element. */
  118. inline function createTableElement() : TableElement { return cast createElement("table"); }
  119. /** Shorthand for creating an HTML `<slot>` element. */
  120. inline function createSlotElement() : SlotElement { return cast createElement("slot"); }
  121. /** Shorthand for creating an HTML `<source>` element. */
  122. inline function createSourceElement() : SourceElement { return cast createElement("source"); }
  123. /** Shorthand for creating an HTML `<link>` element. */
  124. inline function createLinkElement() : LinkElement { return cast createElement("link"); }
  125. /** Shorthand for creating an HTML `<iframe>` element. */
  126. inline function createIFrameElement() : IFrameElement { return cast createElement("iframe"); }
  127. /** Shorthand for creating an HTML `<media>` element. */
  128. inline function createMediaElement() : MediaElement { return cast createElement("media"); }
  129. /** Shorthand for creating an HTML `<map>` element. */
  130. inline function createMapElement() : MapElement { return cast createElement("map"); }
  131. /** Shorthand for creating an HTML `<form>` element. */
  132. inline function createFormElement() : FormElement { return cast createElement("form"); }
  133. /** Shorthand for creating an HTML `<option>` element. */
  134. inline function createOptionElement() : OptionElement { return cast createElement("option"); }
  135. /** Shorthand for creating an HTML `<meta>` element. */
  136. inline function createMetaElement() : MetaElement { return cast createElement("meta"); }
  137. /** Shorthand for creating an HTML `<object>` element. */
  138. inline function createObjectElement() : ObjectElement { return cast createElement("object"); }
  139. /** Shorthand for creating an HTML `<caption>` element. */
  140. inline function createTableCaptionElement() : TableCaptionElement { return cast createElement("caption"); }
  141. /** Shorthand for creating an HTML `<img>` element. */
  142. inline function createImageElement() : ImageElement { return cast createElement("img"); }
  143. /** Shorthand for creating an HTML `<textarea>` element. */
  144. inline function createTextAreaElement() : TextAreaElement { return cast createElement("textarea"); }
  145. /** Shorthand for creating an HTML `<script>` element. */
  146. inline function createScriptElement() : ScriptElement { return cast createElement("script"); }
  147. /** Shorthand for creating an HTML `<datalist>` element. */
  148. inline function createDataListElement() : DataListElement { return cast createElement("datalist"); }
  149. /** Shorthand for creating an HTML `<mod>` element. */
  150. inline function createModElement() : ModElement { return cast createElement("mod"); }
  151. /** Shorthand for creating an HTML `<output>` element. */
  152. inline function createOutputElement() : OutputElement { return cast createElement("output"); }
  153. /** Shorthand for creating an HTML `<area>` element. */
  154. inline function createAreaElement() : AreaElement { return cast createElement("area"); }
  155. /** Shorthand for creating an HTML `<progress>` element. */
  156. inline function createProgressElement() : ProgressElement { return cast createElement("progress"); }
  157. /** Shorthand for creating an HTML `<button>` element. */
  158. inline function createButtonElement() : ButtonElement { return cast createElement("button"); }
  159. /** Shorthand for creating an HTML `<fieldset>` element. */
  160. inline function createFieldSetElement() : FieldSetElement { return cast createElement("fieldset"); }
  161. /** Shorthand for creating an HTML `<menu>` element. */
  162. inline function createMenuElement() : MenuElement { return cast createElement("menu"); }
  163. /** Shorthand for creating an HTML `<br>` element. */
  164. inline function createBRElement() : BRElement { return cast createElement("br"); }
  165. /** Shorthand for creating an HTML `<span>` element. */
  166. inline function createSpanElement() : SpanElement { return cast createElement("span"); }
  167. /** Shorthand for creating an HTML `<details>` element. */
  168. inline function createDetailsElement() : DetailsElement { return cast createElement("details"); }
  169. /** Shorthand for creating an HTML `<body>` element. */
  170. inline function createBodyElement() : BodyElement { return cast createElement("body"); }
  171. /** Shorthand for creating an HTML `<input>` element. */
  172. inline function createInputElement() : InputElement { return cast createElement("input"); }
  173. /** Shorthand for creating an HTML `<base>` element. */
  174. inline function createBaseElement() : BaseElement { return cast createElement("base"); }
  175. /** Shorthand for creating an HTML `<quote>` element. */
  176. inline function createQuoteElement() : QuoteElement { return cast createElement("quote"); }
  177. /** Shorthand for creating an HTML `<frameset>` element. */
  178. inline function createFrameSetElement() : FrameSetElement { return cast createElement("frameset"); }
  179. /** Shorthand for creating an HTML `<canvas>` element. */
  180. inline function createCanvasElement() : CanvasElement { return cast createElement("canvas"); }
  181. /** Shorthand for creating an HTML `<p>` element. */
  182. inline function createParagraphElement() : ParagraphElement { return cast createElement("p"); }
  183. /** Shorthand for creating an HTML `<col>` element. */
  184. inline function createTableColElement() : TableColElement { return cast createElement("col"); }
  185. /** Shorthand for creating an HTML `<tr>` element. */
  186. inline function createTableRowElement() : TableRowElement { return cast createElement("tr"); }
  187. /** Shorthand for creating an HTML `<html>` element. */
  188. inline function createHtmlElement() : HtmlElement { return cast createElement("html"); }
  189. }