NodeWrapperFactory.cpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2020, Luke Wilde <lukew@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibWeb/Bindings/CharacterDataWrapper.h>
  8. #include <LibWeb/Bindings/CommentWrapper.h>
  9. #include <LibWeb/Bindings/DocumentFragmentWrapper.h>
  10. #include <LibWeb/Bindings/DocumentTypeWrapper.h>
  11. #include <LibWeb/Bindings/DocumentWrapper.h>
  12. #include <LibWeb/Bindings/HTMLAnchorElementWrapper.h>
  13. #include <LibWeb/Bindings/HTMLAreaElementWrapper.h>
  14. #include <LibWeb/Bindings/HTMLAudioElementWrapper.h>
  15. #include <LibWeb/Bindings/HTMLBRElementWrapper.h>
  16. #include <LibWeb/Bindings/HTMLBaseElementWrapper.h>
  17. #include <LibWeb/Bindings/HTMLBodyElementWrapper.h>
  18. #include <LibWeb/Bindings/HTMLButtonElementWrapper.h>
  19. #include <LibWeb/Bindings/HTMLCanvasElementWrapper.h>
  20. #include <LibWeb/Bindings/HTMLDListElementWrapper.h>
  21. #include <LibWeb/Bindings/HTMLDataElementWrapper.h>
  22. #include <LibWeb/Bindings/HTMLDataListElementWrapper.h>
  23. #include <LibWeb/Bindings/HTMLDetailsElementWrapper.h>
  24. #include <LibWeb/Bindings/HTMLDialogElementWrapper.h>
  25. #include <LibWeb/Bindings/HTMLDirectoryElementWrapper.h>
  26. #include <LibWeb/Bindings/HTMLDivElementWrapper.h>
  27. #include <LibWeb/Bindings/HTMLElementWrapper.h>
  28. #include <LibWeb/Bindings/HTMLEmbedElementWrapper.h>
  29. #include <LibWeb/Bindings/HTMLFieldSetElementWrapper.h>
  30. #include <LibWeb/Bindings/HTMLFontElementWrapper.h>
  31. #include <LibWeb/Bindings/HTMLFormElementWrapper.h>
  32. #include <LibWeb/Bindings/HTMLFrameElementWrapper.h>
  33. #include <LibWeb/Bindings/HTMLFrameSetElementWrapper.h>
  34. #include <LibWeb/Bindings/HTMLHRElementWrapper.h>
  35. #include <LibWeb/Bindings/HTMLHeadElementWrapper.h>
  36. #include <LibWeb/Bindings/HTMLHeadingElementWrapper.h>
  37. #include <LibWeb/Bindings/HTMLHtmlElementWrapper.h>
  38. #include <LibWeb/Bindings/HTMLIFrameElementWrapper.h>
  39. #include <LibWeb/Bindings/HTMLImageElementWrapper.h>
  40. #include <LibWeb/Bindings/HTMLInputElementWrapper.h>
  41. #include <LibWeb/Bindings/HTMLLIElementWrapper.h>
  42. #include <LibWeb/Bindings/HTMLLabelElementWrapper.h>
  43. #include <LibWeb/Bindings/HTMLLegendElementWrapper.h>
  44. #include <LibWeb/Bindings/HTMLLinkElementWrapper.h>
  45. #include <LibWeb/Bindings/HTMLMapElementWrapper.h>
  46. #include <LibWeb/Bindings/HTMLMarqueeElementWrapper.h>
  47. #include <LibWeb/Bindings/HTMLMenuElementWrapper.h>
  48. #include <LibWeb/Bindings/HTMLMetaElementWrapper.h>
  49. #include <LibWeb/Bindings/HTMLMeterElementWrapper.h>
  50. #include <LibWeb/Bindings/HTMLModElementWrapper.h>
  51. #include <LibWeb/Bindings/HTMLOListElementWrapper.h>
  52. #include <LibWeb/Bindings/HTMLObjectElementWrapper.h>
  53. #include <LibWeb/Bindings/HTMLOptGroupElementWrapper.h>
  54. #include <LibWeb/Bindings/HTMLOptionElementWrapper.h>
  55. #include <LibWeb/Bindings/HTMLOutputElementWrapper.h>
  56. #include <LibWeb/Bindings/HTMLParagraphElementWrapper.h>
  57. #include <LibWeb/Bindings/HTMLParamElementWrapper.h>
  58. #include <LibWeb/Bindings/HTMLPictureElementWrapper.h>
  59. #include <LibWeb/Bindings/HTMLPreElementWrapper.h>
  60. #include <LibWeb/Bindings/HTMLProgressElementWrapper.h>
  61. #include <LibWeb/Bindings/HTMLQuoteElementWrapper.h>
  62. #include <LibWeb/Bindings/HTMLScriptElementWrapper.h>
  63. #include <LibWeb/Bindings/HTMLSelectElementWrapper.h>
  64. #include <LibWeb/Bindings/HTMLSlotElementWrapper.h>
  65. #include <LibWeb/Bindings/HTMLSourceElementWrapper.h>
  66. #include <LibWeb/Bindings/HTMLSpanElementWrapper.h>
  67. #include <LibWeb/Bindings/HTMLStyleElementWrapper.h>
  68. #include <LibWeb/Bindings/HTMLTableCaptionElementWrapper.h>
  69. #include <LibWeb/Bindings/HTMLTableCellElementWrapper.h>
  70. #include <LibWeb/Bindings/HTMLTableColElementWrapper.h>
  71. #include <LibWeb/Bindings/HTMLTableElementWrapper.h>
  72. #include <LibWeb/Bindings/HTMLTableRowElementWrapper.h>
  73. #include <LibWeb/Bindings/HTMLTableSectionElementWrapper.h>
  74. #include <LibWeb/Bindings/HTMLTemplateElementWrapper.h>
  75. #include <LibWeb/Bindings/HTMLTextAreaElementWrapper.h>
  76. #include <LibWeb/Bindings/HTMLTimeElementWrapper.h>
  77. #include <LibWeb/Bindings/HTMLTitleElementWrapper.h>
  78. #include <LibWeb/Bindings/HTMLTrackElementWrapper.h>
  79. #include <LibWeb/Bindings/HTMLUListElementWrapper.h>
  80. #include <LibWeb/Bindings/HTMLUnknownElementWrapper.h>
  81. #include <LibWeb/Bindings/HTMLVideoElementWrapper.h>
  82. #include <LibWeb/Bindings/NodeWrapper.h>
  83. #include <LibWeb/Bindings/NodeWrapperFactory.h>
  84. #include <LibWeb/Bindings/SVGCircleElementWrapper.h>
  85. #include <LibWeb/Bindings/SVGEllipseElementWrapper.h>
  86. #include <LibWeb/Bindings/SVGLineElementWrapper.h>
  87. #include <LibWeb/Bindings/SVGPathElementWrapper.h>
  88. #include <LibWeb/Bindings/SVGPolygonElementWrapper.h>
  89. #include <LibWeb/Bindings/SVGPolylineElementWrapper.h>
  90. #include <LibWeb/Bindings/SVGRectElementWrapper.h>
  91. #include <LibWeb/Bindings/SVGSVGElementWrapper.h>
  92. #include <LibWeb/Bindings/SVGTextContentElementWrapper.h>
  93. #include <LibWeb/Bindings/TextWrapper.h>
  94. #include <LibWeb/DOM/Document.h>
  95. #include <LibWeb/DOM/Node.h>
  96. #include <LibWeb/HTML/HTMLAnchorElement.h>
  97. #include <LibWeb/HTML/HTMLAreaElement.h>
  98. #include <LibWeb/HTML/HTMLAudioElement.h>
  99. #include <LibWeb/HTML/HTMLBRElement.h>
  100. #include <LibWeb/HTML/HTMLBaseElement.h>
  101. #include <LibWeb/HTML/HTMLBodyElement.h>
  102. #include <LibWeb/HTML/HTMLButtonElement.h>
  103. #include <LibWeb/HTML/HTMLCanvasElement.h>
  104. #include <LibWeb/HTML/HTMLDListElement.h>
  105. #include <LibWeb/HTML/HTMLDataElement.h>
  106. #include <LibWeb/HTML/HTMLDataListElement.h>
  107. #include <LibWeb/HTML/HTMLDetailsElement.h>
  108. #include <LibWeb/HTML/HTMLDialogElement.h>
  109. #include <LibWeb/HTML/HTMLDirectoryElement.h>
  110. #include <LibWeb/HTML/HTMLDivElement.h>
  111. #include <LibWeb/HTML/HTMLEmbedElement.h>
  112. #include <LibWeb/HTML/HTMLFieldSetElement.h>
  113. #include <LibWeb/HTML/HTMLFontElement.h>
  114. #include <LibWeb/HTML/HTMLFormElement.h>
  115. #include <LibWeb/HTML/HTMLFrameElement.h>
  116. #include <LibWeb/HTML/HTMLFrameSetElement.h>
  117. #include <LibWeb/HTML/HTMLHRElement.h>
  118. #include <LibWeb/HTML/HTMLHeadElement.h>
  119. #include <LibWeb/HTML/HTMLHeadingElement.h>
  120. #include <LibWeb/HTML/HTMLHtmlElement.h>
  121. #include <LibWeb/HTML/HTMLIFrameElement.h>
  122. #include <LibWeb/HTML/HTMLImageElement.h>
  123. #include <LibWeb/HTML/HTMLInputElement.h>
  124. #include <LibWeb/HTML/HTMLLIElement.h>
  125. #include <LibWeb/HTML/HTMLLabelElement.h>
  126. #include <LibWeb/HTML/HTMLLegendElement.h>
  127. #include <LibWeb/HTML/HTMLLinkElement.h>
  128. #include <LibWeb/HTML/HTMLMapElement.h>
  129. #include <LibWeb/HTML/HTMLMarqueeElement.h>
  130. #include <LibWeb/HTML/HTMLMenuElement.h>
  131. #include <LibWeb/HTML/HTMLMetaElement.h>
  132. #include <LibWeb/HTML/HTMLMeterElement.h>
  133. #include <LibWeb/HTML/HTMLModElement.h>
  134. #include <LibWeb/HTML/HTMLOListElement.h>
  135. #include <LibWeb/HTML/HTMLObjectElement.h>
  136. #include <LibWeb/HTML/HTMLOptGroupElement.h>
  137. #include <LibWeb/HTML/HTMLOptionElement.h>
  138. #include <LibWeb/HTML/HTMLOutputElement.h>
  139. #include <LibWeb/HTML/HTMLParagraphElement.h>
  140. #include <LibWeb/HTML/HTMLParamElement.h>
  141. #include <LibWeb/HTML/HTMLPictureElement.h>
  142. #include <LibWeb/HTML/HTMLPreElement.h>
  143. #include <LibWeb/HTML/HTMLProgressElement.h>
  144. #include <LibWeb/HTML/HTMLQuoteElement.h>
  145. #include <LibWeb/HTML/HTMLScriptElement.h>
  146. #include <LibWeb/HTML/HTMLSelectElement.h>
  147. #include <LibWeb/HTML/HTMLSlotElement.h>
  148. #include <LibWeb/HTML/HTMLSourceElement.h>
  149. #include <LibWeb/HTML/HTMLSpanElement.h>
  150. #include <LibWeb/HTML/HTMLStyleElement.h>
  151. #include <LibWeb/HTML/HTMLTableCaptionElement.h>
  152. #include <LibWeb/HTML/HTMLTableCellElement.h>
  153. #include <LibWeb/HTML/HTMLTableColElement.h>
  154. #include <LibWeb/HTML/HTMLTableElement.h>
  155. #include <LibWeb/HTML/HTMLTableRowElement.h>
  156. #include <LibWeb/HTML/HTMLTableSectionElement.h>
  157. #include <LibWeb/HTML/HTMLTemplateElement.h>
  158. #include <LibWeb/HTML/HTMLTextAreaElement.h>
  159. #include <LibWeb/HTML/HTMLTimeElement.h>
  160. #include <LibWeb/HTML/HTMLTitleElement.h>
  161. #include <LibWeb/HTML/HTMLTrackElement.h>
  162. #include <LibWeb/HTML/HTMLUListElement.h>
  163. #include <LibWeb/HTML/HTMLUnknownElement.h>
  164. #include <LibWeb/HTML/HTMLVideoElement.h>
  165. #include <LibWeb/SVG/SVGCircleElement.h>
  166. #include <LibWeb/SVG/SVGEllipseElement.h>
  167. #include <LibWeb/SVG/SVGLineElement.h>
  168. #include <LibWeb/SVG/SVGPathElement.h>
  169. #include <LibWeb/SVG/SVGPolygonElement.h>
  170. #include <LibWeb/SVG/SVGPolylineElement.h>
  171. #include <LibWeb/SVG/SVGRectElement.h>
  172. #include <LibWeb/SVG/SVGSVGElement.h>
  173. namespace Web::Bindings {
  174. NodeWrapper* wrap(JS::GlobalObject& global_object, DOM::Node& node)
  175. {
  176. if (node.wrapper())
  177. return static_cast<NodeWrapper*>(node.wrapper());
  178. if (is<DOM::Document>(node))
  179. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::Document>(node)));
  180. if (is<DOM::DocumentType>(node))
  181. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::DocumentType>(node)));
  182. if (is<HTML::HTMLAnchorElement>(node))
  183. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLAnchorElement>(node)));
  184. if (is<HTML::HTMLAreaElement>(node))
  185. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLAreaElement>(node)));
  186. if (is<HTML::HTMLAudioElement>(node))
  187. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLAudioElement>(node)));
  188. if (is<HTML::HTMLBaseElement>(node))
  189. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLBaseElement>(node)));
  190. if (is<HTML::HTMLBodyElement>(node))
  191. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLBodyElement>(node)));
  192. if (is<HTML::HTMLBRElement>(node))
  193. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLBRElement>(node)));
  194. if (is<HTML::HTMLButtonElement>(node))
  195. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLButtonElement>(node)));
  196. if (is<HTML::HTMLCanvasElement>(node))
  197. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLCanvasElement>(node)));
  198. if (is<HTML::HTMLDataElement>(node))
  199. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDataElement>(node)));
  200. if (is<HTML::HTMLDataListElement>(node))
  201. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDataListElement>(node)));
  202. if (is<HTML::HTMLDetailsElement>(node))
  203. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDetailsElement>(node)));
  204. if (is<HTML::HTMLDialogElement>(node))
  205. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDialogElement>(node)));
  206. if (is<HTML::HTMLDirectoryElement>(node))
  207. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDirectoryElement>(node)));
  208. if (is<HTML::HTMLDivElement>(node))
  209. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDivElement>(node)));
  210. if (is<HTML::HTMLDListElement>(node))
  211. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLDListElement>(node)));
  212. if (is<HTML::HTMLEmbedElement>(node))
  213. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLEmbedElement>(node)));
  214. if (is<HTML::HTMLFieldSetElement>(node))
  215. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLFieldSetElement>(node)));
  216. if (is<HTML::HTMLFontElement>(node))
  217. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLFontElement>(node)));
  218. if (is<HTML::HTMLFormElement>(node))
  219. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLFormElement>(node)));
  220. if (is<HTML::HTMLFrameElement>(node))
  221. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLFrameElement>(node)));
  222. if (is<HTML::HTMLFrameSetElement>(node))
  223. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLFrameSetElement>(node)));
  224. if (is<HTML::HTMLHeadElement>(node))
  225. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLHeadElement>(node)));
  226. if (is<HTML::HTMLHeadingElement>(node))
  227. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLHeadingElement>(node)));
  228. if (is<HTML::HTMLHRElement>(node))
  229. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLHRElement>(node)));
  230. if (is<HTML::HTMLHtmlElement>(node))
  231. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLHtmlElement>(node)));
  232. if (is<HTML::HTMLIFrameElement>(node))
  233. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLIFrameElement>(node)));
  234. if (is<HTML::HTMLImageElement>(node))
  235. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLImageElement>(node)));
  236. if (is<HTML::HTMLInputElement>(node))
  237. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLInputElement>(node)));
  238. if (is<HTML::HTMLLabelElement>(node))
  239. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLLabelElement>(node)));
  240. if (is<HTML::HTMLLegendElement>(node))
  241. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLLegendElement>(node)));
  242. if (is<HTML::HTMLLIElement>(node))
  243. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLLIElement>(node)));
  244. if (is<HTML::HTMLLinkElement>(node))
  245. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLLinkElement>(node)));
  246. if (is<HTML::HTMLMapElement>(node))
  247. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLMapElement>(node)));
  248. if (is<HTML::HTMLMarqueeElement>(node))
  249. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLMarqueeElement>(node)));
  250. if (is<HTML::HTMLMenuElement>(node))
  251. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLMenuElement>(node)));
  252. if (is<HTML::HTMLMetaElement>(node))
  253. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLMetaElement>(node)));
  254. if (is<HTML::HTMLMeterElement>(node))
  255. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLMeterElement>(node)));
  256. if (is<HTML::HTMLModElement>(node))
  257. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLModElement>(node)));
  258. if (is<HTML::HTMLObjectElement>(node))
  259. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLObjectElement>(node)));
  260. if (is<HTML::HTMLOListElement>(node))
  261. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLOListElement>(node)));
  262. if (is<HTML::HTMLOptGroupElement>(node))
  263. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLOptGroupElement>(node)));
  264. if (is<HTML::HTMLOptionElement>(node))
  265. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLOptionElement>(node)));
  266. if (is<HTML::HTMLOutputElement>(node))
  267. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLOutputElement>(node)));
  268. if (is<HTML::HTMLParagraphElement>(node))
  269. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLParagraphElement>(node)));
  270. if (is<HTML::HTMLParamElement>(node))
  271. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLParamElement>(node)));
  272. if (is<HTML::HTMLPictureElement>(node))
  273. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLPictureElement>(node)));
  274. if (is<HTML::HTMLPreElement>(node))
  275. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLPreElement>(node)));
  276. if (is<HTML::HTMLProgressElement>(node))
  277. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLProgressElement>(node)));
  278. if (is<HTML::HTMLQuoteElement>(node))
  279. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLQuoteElement>(node)));
  280. if (is<HTML::HTMLScriptElement>(node))
  281. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLScriptElement>(node)));
  282. if (is<HTML::HTMLSelectElement>(node))
  283. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLSelectElement>(node)));
  284. if (is<HTML::HTMLSlotElement>(node))
  285. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLSlotElement>(node)));
  286. if (is<HTML::HTMLSourceElement>(node))
  287. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLSourceElement>(node)));
  288. if (is<HTML::HTMLSpanElement>(node))
  289. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLSpanElement>(node)));
  290. if (is<HTML::HTMLStyleElement>(node))
  291. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLStyleElement>(node)));
  292. if (is<HTML::HTMLTableCaptionElement>(node))
  293. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTableCaptionElement>(node)));
  294. if (is<HTML::HTMLTableCellElement>(node))
  295. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTableCellElement>(node)));
  296. if (is<HTML::HTMLTableColElement>(node))
  297. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTableColElement>(node)));
  298. if (is<HTML::HTMLTableElement>(node))
  299. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTableElement>(node)));
  300. if (is<HTML::HTMLTableRowElement>(node))
  301. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTableRowElement>(node)));
  302. if (is<HTML::HTMLTableSectionElement>(node))
  303. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTableSectionElement>(node)));
  304. if (is<HTML::HTMLTemplateElement>(node))
  305. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTemplateElement>(node)));
  306. if (is<HTML::HTMLTextAreaElement>(node))
  307. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTextAreaElement>(node)));
  308. if (is<HTML::HTMLTimeElement>(node))
  309. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTimeElement>(node)));
  310. if (is<HTML::HTMLTitleElement>(node))
  311. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTitleElement>(node)));
  312. if (is<HTML::HTMLTrackElement>(node))
  313. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLTrackElement>(node)));
  314. if (is<HTML::HTMLUListElement>(node))
  315. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLUListElement>(node)));
  316. if (is<HTML::HTMLUnknownElement>(node))
  317. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLUnknownElement>(node)));
  318. if (is<HTML::HTMLVideoElement>(node))
  319. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLVideoElement>(node)));
  320. if (is<HTML::HTMLElement>(node))
  321. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<HTML::HTMLElement>(node)));
  322. if (is<SVG::SVGSVGElement>(node))
  323. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGSVGElement>(node)));
  324. if (is<SVG::SVGCircleElement>(node))
  325. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGCircleElement>(node)));
  326. if (is<SVG::SVGEllipseElement>(node))
  327. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGEllipseElement>(node)));
  328. if (is<SVG::SVGLineElement>(node))
  329. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGLineElement>(node)));
  330. if (is<SVG::SVGPolygonElement>(node))
  331. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGPolygonElement>(node)));
  332. if (is<SVG::SVGPolylineElement>(node))
  333. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGPolylineElement>(node)));
  334. if (is<SVG::SVGPathElement>(node))
  335. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGPathElement>(node)));
  336. if (is<SVG::SVGRectElement>(node))
  337. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGRectElement>(node)));
  338. if (is<SVG::SVGTextContentElement>(node))
  339. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<SVG::SVGTextContentElement>(node)));
  340. if (is<DOM::Element>(node))
  341. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::Element>(node)));
  342. if (is<DOM::DocumentFragment>(node))
  343. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::DocumentFragment>(node)));
  344. if (is<DOM::Comment>(node))
  345. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::Comment>(node)));
  346. if (is<DOM::Text>(node))
  347. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::Text>(node)));
  348. if (is<DOM::CharacterData>(node))
  349. return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::CharacterData>(node)));
  350. return static_cast<NodeWrapper*>(wrap_impl(global_object, node));
  351. }
  352. }