HTMLDocument.hx 12 KB

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