1 module libwasm.bindings.Element; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.Animatable; 7 import libwasm.bindings.Animation; 8 import libwasm.bindings.Attr; 9 import libwasm.bindings.ChildNode; 10 import libwasm.bindings.DOMMatrix; 11 import libwasm.bindings.DOMPoint; 12 import libwasm.bindings.DOMQuad; 13 import libwasm.bindings.DOMRect; 14 import libwasm.bindings.DOMRectList; 15 import libwasm.bindings.DOMTokenList; 16 import libwasm.bindings.EventHandler; 17 import libwasm.bindings.GeometryUtils; 18 import libwasm.bindings.Grid; 19 import libwasm.bindings.HTMLCollection; 20 import libwasm.bindings.HTMLSlotElement; 21 import libwasm.bindings.KeyframeAnimationOptions; 22 import libwasm.bindings.LegacyQueryInterface; 23 import libwasm.bindings.NamedNodeMap; 24 import libwasm.bindings.Node; 25 import libwasm.bindings.NodeList; 26 import libwasm.bindings.ParentNode; 27 import libwasm.bindings.ShadowRoot; 28 import libwasm.bindings.Window; 29 30 @safe: 31 nothrow: 32 33 struct Element { 34 nothrow: 35 libwasm.bindings.Node.Node _parent; 36 alias _parent this; 37 this(Handle h) { 38 _parent = .Node(h); 39 } 40 Optional!(string) namespaceURI()() { 41 return Object_Getter__OptionalString(this._parent, "namespaceURI"); 42 } 43 Optional!(string) prefix()() { 44 return Object_Getter__OptionalString(this._parent, "prefix"); 45 } 46 string localName()() { 47 return Object_Getter__string(this._parent, "localName"); 48 } 49 string tagName()() { 50 return Object_Getter__string(this._parent, "tagName"); 51 } 52 void id()(string id) { 53 Object_Call_string__void(this._parent, "id", id); 54 } 55 string id()() { 56 return Object_Getter__string(this._parent, "id"); 57 } 58 void className()(string className) { 59 Object_Call_string__void(this._parent, "className", className); 60 } 61 string className()() { 62 return Object_Getter__string(this._parent, "className"); 63 } 64 auto classList()() { 65 return DOMTokenList(Object_Getter__Handle(this._parent, "classList")); 66 } 67 auto attributes()() { 68 return NamedNodeMap(Object_Getter__Handle(this._parent, "attributes")); 69 } 70 auto getAttributeNames()() { 71 return Sequence!(string)(Object_Getter__Handle(this._parent, "getAttributeNames")); 72 } 73 Optional!(string) getAttribute()(string name) { 74 return Object_Call_string__OptionalString(this._parent, "getAttribute", name); 75 } 76 Optional!(string) getAttributeNS(T0)(scope auto ref Optional!(T0) namespace, string localName) if (isTOrPointer!(T0, string)) { 77 return Serialize_Object_VarArgCall!(Optional!string)(this._parent, "getAttributeNS", "Optional!(string);string", tuple(!namespace.empty, namespace.front, localName)); 78 } 79 bool toggleAttribute()(string name, bool force) { 80 return Serialize_Object_VarArgCall!bool(this._parent, "toggleAttribute", "string;bool", tuple(name, force)); 81 } 82 bool toggleAttribute()(string name) { 83 return Object_Call_string__bool(this._parent, "toggleAttribute", name); 84 } 85 void setAttribute()(string name, string value) { 86 Object_Call_string_string__void(this._parent, "setAttribute", name, value); 87 } 88 void setAttributeNS(T0)(scope auto ref Optional!(T0) namespace, string name, string value) if (isTOrPointer!(T0, string)) { 89 Serialize_Object_VarArgCall!void(this._parent, "setAttributeNS", "Optional!(string);string;string", tuple(!namespace.empty, namespace.front, name, value)); 90 } 91 void removeAttribute()(string name) { 92 Object_Call_string__void(this._parent, "removeAttribute", name); 93 } 94 void removeAttributeNS(T0)(scope auto ref Optional!(T0) namespace, string localName) if (isTOrPointer!(T0, string)) { 95 Serialize_Object_VarArgCall!void(this._parent, "removeAttributeNS", "Optional!(string);string", tuple(!namespace.empty, namespace.front, localName)); 96 } 97 bool hasAttribute()(string name) { 98 return Object_Call_string__bool(this._parent, "hasAttribute", name); 99 } 100 bool hasAttributeNS(T0)(scope auto ref Optional!(T0) namespace, string localName) if (isTOrPointer!(T0, string)) { 101 return Serialize_Object_VarArgCall!bool(this._parent, "hasAttributeNS", "Optional!(string);string", tuple(!namespace.empty, namespace.front, localName)); 102 } 103 bool hasAttributes()() { 104 return Object_Getter__bool(this._parent, "hasAttributes"); 105 } 106 auto closest()(string selector) { 107 return recastOpt!(Element)(Object_Call_string__OptionalHandle(this._parent, "closest", selector)); 108 } 109 bool matches()(string selector) { 110 return Object_Call_string__bool(this._parent, "matches", selector); 111 } 112 bool webkitMatchesSelector()(string selector) { 113 return Object_Call_string__bool(this._parent, "webkitMatchesSelector", selector); 114 } 115 auto getElementsByTagName()(string localName) { 116 return HTMLCollection(Object_Call_string__Handle(this._parent, "getElementsByTagName", localName)); 117 } 118 auto getElementsByTagNameNS(T0)(scope auto ref Optional!(T0) namespace, string localName) if (isTOrPointer!(T0, string)) { 119 return HTMLCollection(Serialize_Object_VarArgCall!Handle(this._parent, "getElementsByTagNameNS", "Optional!(string);string", tuple(!namespace.empty, namespace.front, localName))); 120 } 121 auto getElementsByClassName()(string classNames) { 122 return HTMLCollection(Object_Call_string__Handle(this._parent, "getElementsByClassName", classNames)); 123 } 124 auto insertAdjacentElement()(string where, scope ref Element element) { 125 return recastOpt!(Element)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "insertAdjacentElement", "string;Handle", tuple(where, cast(Handle)element._parent))); 126 } 127 void insertAdjacentText()(string where, string data) { 128 Object_Call_string_string__void(this._parent, "insertAdjacentText", where, data); 129 } 130 float fontSizeInflation()() { 131 return Object_Getter__float(this._parent, "fontSizeInflation"); 132 } 133 bool mozMatchesSelector()(string selector) { 134 return Object_Call_string__bool(this._parent, "mozMatchesSelector", selector); 135 } 136 void setPointerCapture()(int pointerId) { 137 Object_Call_int__void(this._parent, "setPointerCapture", pointerId); 138 } 139 void releasePointerCapture()(int pointerId) { 140 Object_Call_int__void(this._parent, "releasePointerCapture", pointerId); 141 } 142 bool hasPointerCapture()(int pointerId) { 143 return Serialize_Object_VarArgCall!bool(this._parent, "hasPointerCapture", "int", tuple(pointerId)); 144 } 145 void setCapture()(bool retargetToElement /* = false */) { 146 Object_Call_bool__void(this._parent, "setCapture", retargetToElement); 147 } 148 void setCapture()() { 149 Object_Call__void(this._parent, "setCapture"); 150 } 151 void releaseCapture()() { 152 Object_Call__void(this._parent, "releaseCapture"); 153 } 154 void setCaptureAlways()(bool retargetToElement /* = false */) { 155 Object_Call_bool__void(this._parent, "setCaptureAlways", retargetToElement); 156 } 157 void setCaptureAlways()() { 158 Object_Call__void(this._parent, "setCaptureAlways"); 159 } 160 auto getAttributeNode()(string name) { 161 return recastOpt!(Attr)(Object_Call_string__OptionalHandle(this._parent, "getAttributeNode", name)); 162 } 163 auto setAttributeNode()(scope ref Attr newAttr) { 164 return recastOpt!(Attr)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "setAttributeNode", "Handle", tuple(cast(Handle)newAttr._parent))); 165 } 166 auto removeAttributeNode()(scope ref Attr oldAttr) { 167 return recastOpt!(Attr)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "removeAttributeNode", "Handle", tuple(cast(Handle)oldAttr._parent))); 168 } 169 auto getAttributeNodeNS(T0)(scope auto ref Optional!(T0) namespaceURI, string localName) if (isTOrPointer!(T0, string)) { 170 return recastOpt!(Attr)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "getAttributeNodeNS", "Optional!(string);string", tuple(!namespaceURI.empty, namespaceURI.front, localName))); 171 } 172 auto setAttributeNodeNS()(scope ref Attr newAttr) { 173 return recastOpt!(Attr)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "setAttributeNodeNS", "Handle", tuple(cast(Handle)newAttr._parent))); 174 } 175 auto getTransformToAncestor()(scope ref Element ancestor) { 176 return DOMMatrixReadOnly(Object_Call_Handle__Handle(this._parent, "getTransformToAncestor", ancestor._parent)); 177 } 178 auto getTransformToParent()() { 179 return DOMMatrixReadOnly(Object_Getter__Handle(this._parent, "getTransformToParent")); 180 } 181 auto getTransformToViewport()() { 182 return DOMMatrixReadOnly(Object_Getter__Handle(this._parent, "getTransformToViewport")); 183 } 184 auto getClientRects()() { 185 return DOMRectList(Object_Getter__Handle(this._parent, "getClientRects")); 186 } 187 auto getBoundingClientRect()() { 188 return DOMRect(Object_Getter__Handle(this._parent, "getBoundingClientRect")); 189 } 190 void scrollIntoView()(scope ref SumType!(bool, ScrollIntoViewOptions) arg) { 191 Serialize_Object_VarArgCall!void(this._parent, "scrollIntoView", "SumType!(bool,Handle)", tuple(libwasm.sumtype.match!(((bool v) => 0),((ref arg.Types[1] v) => 1))(arg),tuple(libwasm.sumtype.match!(((bool v) => v),((ref arg.Types[1] v) => bool.init))(arg),libwasm.sumtype.match!(((bool v) => Handle.init),((ref arg.Types[1] v) => cast(Handle)v.handle))(arg)))); 192 } 193 void scrollIntoView()() { 194 Object_Call__void(this._parent, "scrollIntoView"); 195 } 196 void scrollTop()(int scrollTop) { 197 Object_Call_int__void(this._parent, "scrollTop", scrollTop); 198 } 199 int scrollTop()() { 200 return Object_Getter__int(this._parent, "scrollTop"); 201 } 202 void scrollLeft()(int scrollLeft) { 203 Object_Call_int__void(this._parent, "scrollLeft", scrollLeft); 204 } 205 int scrollLeft()() { 206 return Object_Getter__int(this._parent, "scrollLeft"); 207 } 208 int scrollWidth()() { 209 return Object_Getter__int(this._parent, "scrollWidth"); 210 } 211 int scrollHeight()() { 212 return Object_Getter__int(this._parent, "scrollHeight"); 213 } 214 void scroll()(double x, double y) { 215 Object_Call_double_double__void(this._parent, "scroll", x, y); 216 } 217 void scroll()(scope ref ScrollToOptions options) { 218 Object_Call_Handle__void(this._parent, "scroll", options._parent); 219 } 220 void scroll()() { 221 Object_Call__void(this._parent, "scroll"); 222 } 223 void scrollTo()(double x, double y) { 224 Object_Call_double_double__void(this._parent, "scrollTo", x, y); 225 } 226 void scrollTo()(scope ref ScrollToOptions options) { 227 Object_Call_Handle__void(this._parent, "scrollTo", options._parent); 228 } 229 void scrollTo()() { 230 Object_Call__void(this._parent, "scrollTo"); 231 } 232 void scrollBy()(double x, double y) { 233 Object_Call_double_double__void(this._parent, "scrollBy", x, y); 234 } 235 void scrollBy()(scope ref ScrollToOptions options) { 236 Object_Call_Handle__void(this._parent, "scrollBy", options._parent); 237 } 238 void scrollBy()() { 239 Object_Call__void(this._parent, "scrollBy"); 240 } 241 void mozScrollSnap()() { 242 Object_Call__void(this._parent, "mozScrollSnap"); 243 } 244 int clientTop()() { 245 return Object_Getter__int(this._parent, "clientTop"); 246 } 247 int clientLeft()() { 248 return Object_Getter__int(this._parent, "clientLeft"); 249 } 250 int clientWidth()() { 251 return Object_Getter__int(this._parent, "clientWidth"); 252 } 253 int clientHeight()() { 254 return Object_Getter__int(this._parent, "clientHeight"); 255 } 256 int scrollTopMin()() { 257 return Object_Getter__int(this._parent, "scrollTopMin"); 258 } 259 int scrollTopMax()() { 260 return Object_Getter__int(this._parent, "scrollTopMax"); 261 } 262 int scrollLeftMin()() { 263 return Object_Getter__int(this._parent, "scrollLeftMin"); 264 } 265 int scrollLeftMax()() { 266 return Object_Getter__int(this._parent, "scrollLeftMax"); 267 } 268 void innerHTML()(string innerHTML) { 269 Object_Call_string__void(this._parent, "innerHTML", innerHTML); 270 } 271 string innerHTML()() { 272 return Object_Getter__string(this._parent, "innerHTML"); 273 } 274 void outerHTML()(string outerHTML) { 275 Object_Call_string__void(this._parent, "outerHTML", outerHTML); 276 } 277 string outerHTML()() { 278 return Object_Getter__string(this._parent, "outerHTML"); 279 } 280 void insertAdjacentHTML()(string position, string text) { 281 Object_Call_string_string__void(this._parent, "insertAdjacentHTML", position, text); 282 } 283 auto querySelector()(string selectors) { 284 return recastOpt!(Element)(Object_Call_string__OptionalHandle(this._parent, "querySelector", selectors)); 285 } 286 auto querySelectorAll()(string selectors) { 287 return NodeList(Object_Call_string__Handle(this._parent, "querySelectorAll", selectors)); 288 } 289 auto attachShadow()(scope ref ShadowRootInit shadowRootInitDict) { 290 return ShadowRoot(Object_Call_Handle__Handle(this._parent, "attachShadow", shadowRootInitDict.handle)); 291 } 292 auto shadowRoot()() { 293 return recastOpt!(ShadowRoot)(Object_Getter__OptionalHandle(this._parent, "shadowRoot")); 294 } 295 auto openOrClosedShadowRoot()() { 296 return recastOpt!(ShadowRoot)(Object_Getter__OptionalHandle(this._parent, "openOrClosedShadowRoot")); 297 } 298 auto assignedSlot()() { 299 return recastOpt!(HTMLSlotElement)(Object_Getter__OptionalHandle(this._parent, "assignedSlot")); 300 } 301 auto openOrClosedAssignedSlot()() { 302 return recastOpt!(HTMLSlotElement)(Object_Getter__OptionalHandle(this._parent, "openOrClosedAssignedSlot")); 303 } 304 void slot()(string slot) { 305 Object_Call_string__void(this._parent, "slot", slot); 306 } 307 string slot()() { 308 return Object_Getter__string(this._parent, "slot"); 309 } 310 auto requestFullscreen()() { 311 return JsPromise!(void)(Object_Getter__Handle(this._parent, "requestFullscreen")); 312 } 313 auto mozRequestFullScreen()() { 314 return JsPromise!(void)(Object_Getter__Handle(this._parent, "mozRequestFullScreen")); 315 } 316 void onfullscreenchange(T0)(scope auto ref Optional!(T0) onfullscreenchange) if (isTOrPointer!(T0, EventHandlerNonNull)) { 317 Object_Call_EventHandler__void(this._parent, "onfullscreenchange", !onfullscreenchange.empty, onfullscreenchange.front); 318 } 319 EventHandler onfullscreenchange()() { 320 return Object_Getter__EventHandler(this._parent, "onfullscreenchange"); 321 } 322 void onfullscreenerror(T0)(scope auto ref Optional!(T0) onfullscreenerror) if (isTOrPointer!(T0, EventHandlerNonNull)) { 323 Object_Call_EventHandler__void(this._parent, "onfullscreenerror", !onfullscreenerror.empty, onfullscreenerror.front); 324 } 325 EventHandler onfullscreenerror()() { 326 return Object_Getter__EventHandler(this._parent, "onfullscreenerror"); 327 } 328 void requestPointerLock()() { 329 Object_Call__void(this._parent, "requestPointerLock"); 330 } 331 auto getAsFlexContainer()() { 332 return recastOpt!(Flex)(Object_Getter__OptionalHandle(this._parent, "getAsFlexContainer")); 333 } 334 auto getGridFragments()() { 335 return Sequence!(Grid)(Object_Getter__Handle(this._parent, "getGridFragments")); 336 } 337 auto getElementsWithGrid()() { 338 return Sequence!(Element)(Object_Getter__Handle(this._parent, "getElementsWithGrid")); 339 } 340 void before()(scope ref SumType!(Node, string) nodes) { 341 Serialize_Object_VarArgCall!void(this._parent, "before", "SumType!(Handle,string)", tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => 0),((string v) => 1))(nodes),tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => cast(Handle)v.handle),((string v) => Handle.init))(nodes),libwasm.sumtype.match!(((ref nodes.Types[0] v) => string.init),((string v) => v))(nodes)))); 342 } 343 void after()(scope ref SumType!(Node, string) nodes) { 344 Serialize_Object_VarArgCall!void(this._parent, "after", "SumType!(Handle,string)", tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => 0),((string v) => 1))(nodes),tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => cast(Handle)v.handle),((string v) => Handle.init))(nodes),libwasm.sumtype.match!(((ref nodes.Types[0] v) => string.init),((string v) => v))(nodes)))); 345 } 346 void replaceWith()(scope ref SumType!(Node, string) nodes) { 347 Serialize_Object_VarArgCall!void(this._parent, "replaceWith", "SumType!(Handle,string)", tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => 0),((string v) => 1))(nodes),tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => cast(Handle)v.handle),((string v) => Handle.init))(nodes),libwasm.sumtype.match!(((ref nodes.Types[0] v) => string.init),((string v) => v))(nodes)))); 348 } 349 void remove()() { 350 Object_Call__void(this._parent, "remove"); 351 } 352 auto previousElementSibling()() { 353 return recastOpt!(Element)(Object_Getter__OptionalHandle(this._parent, "previousElementSibling")); 354 } 355 auto nextElementSibling()() { 356 return recastOpt!(Element)(Object_Getter__OptionalHandle(this._parent, "nextElementSibling")); 357 } 358 auto children()() { 359 return HTMLCollection(Object_Getter__Handle(this._parent, "children")); 360 } 361 auto firstElementChild()() { 362 return recastOpt!(Element)(Object_Getter__OptionalHandle(this._parent, "firstElementChild")); 363 } 364 auto lastElementChild()() { 365 return recastOpt!(Element)(Object_Getter__OptionalHandle(this._parent, "lastElementChild")); 366 } 367 uint childElementCount()() { 368 return Object_Getter__uint(this._parent, "childElementCount"); 369 } 370 auto getElementsByAttribute()(string name, string value) { 371 return HTMLCollection(Object_Call_string_string__Handle(this._parent, "getElementsByAttribute", name, value)); 372 } 373 auto getElementsByAttributeNS(T0)(scope auto ref Optional!(T0) namespaceURI, string name, string value) if (isTOrPointer!(T0, string)) { 374 return HTMLCollection(Serialize_Object_VarArgCall!Handle(this._parent, "getElementsByAttributeNS", "Optional!(string);string;string", tuple(!namespaceURI.empty, namespaceURI.front, name, value))); 375 } 376 void prepend()(scope ref SumType!(Node, string) nodes) { 377 Serialize_Object_VarArgCall!void(this._parent, "prepend", "SumType!(Handle,string)", tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => 0),((string v) => 1))(nodes),tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => cast(Handle)v.handle),((string v) => Handle.init))(nodes),libwasm.sumtype.match!(((ref nodes.Types[0] v) => string.init),((string v) => v))(nodes)))); 378 } 379 void append()(scope ref SumType!(Node, string) nodes) { 380 Serialize_Object_VarArgCall!void(this._parent, "append", "SumType!(Handle,string)", tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => 0),((string v) => 1))(nodes),tuple(libwasm.sumtype.match!(((ref nodes.Types[0] v) => cast(Handle)v.handle),((string v) => Handle.init))(nodes),libwasm.sumtype.match!(((ref nodes.Types[0] v) => string.init),((string v) => v))(nodes)))); 381 } 382 auto animate(T0)(scope auto ref Optional!(T0) keyframes, scope ref SumType!(double, KeyframeAnimationOptions) options) if (isTOrPointer!(T0, JsObject)) { 383 return Animation(Serialize_Object_VarArgCall!Handle(this._parent, "animate", "Optional!Handle;SumType!(double,Handle)", tuple(!keyframes.empty, cast(Handle)keyframes.front.handle, libwasm.sumtype.match!(((double v) => 0),((ref options.Types[1] v) => 1))(options),tuple(libwasm.sumtype.match!(((double v) => v),((ref options.Types[1] v) => double.init))(options),libwasm.sumtype.match!(((double v) => Handle.init),((ref options.Types[1] v) => cast(Handle)v.handle))(options))))); 384 } 385 auto animate(T0)(scope auto ref Optional!(T0) keyframes) if (isTOrPointer!(T0, JsObject)) { 386 return Animation(Serialize_Object_VarArgCall!Handle(this._parent, "animate", "Optional!Handle", tuple(!keyframes.empty, cast(Handle)keyframes.front.handle))); 387 } 388 auto getAnimations()(scope ref AnimationFilter filter) { 389 return Sequence!(Animation)(Object_Call_Handle__Handle(this._parent, "getAnimations", filter.handle)); 390 } 391 auto getAnimations()() { 392 return Sequence!(Animation)(Object_Getter__Handle(this._parent, "getAnimations")); 393 } 394 auto getBoxQuads()(scope ref BoxQuadOptions options) { 395 return Sequence!(DOMQuad)(Object_Call_Handle__Handle(this._parent, "getBoxQuads", options.handle)); 396 } 397 auto getBoxQuads()() { 398 return Sequence!(DOMQuad)(Object_Getter__Handle(this._parent, "getBoxQuads")); 399 } 400 auto convertQuadFromNode()(scope ref DOMQuad quad, scope ref GeometryNode from, scope ref ConvertCoordinateOptions options) { 401 return DOMQuad(Serialize_Object_VarArgCall!Handle(this._parent, "convertQuadFromNode", "Handle;SumType!(Handle,Handle,Handle);Handle", tuple(cast(Handle)quad.handle, libwasm.sumtype.match!(((ref from.Types[0] v) => 0),((ref from.Types[1] v) => 1),((ref from.Types[2] v) => 2))(from),tuple(libwasm.sumtype.match!(((ref from.Types[0] v) => cast(Handle)v.handle),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => cast(Handle)v.handle),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => cast(Handle)v.handle))(from)), cast(Handle)options.handle))); 402 } 403 auto convertQuadFromNode()(scope ref DOMQuad quad, scope ref GeometryNode from) { 404 return DOMQuad(Serialize_Object_VarArgCall!Handle(this._parent, "convertQuadFromNode", "Handle;SumType!(Handle,Handle,Handle)", tuple(cast(Handle)quad.handle, libwasm.sumtype.match!(((ref from.Types[0] v) => 0),((ref from.Types[1] v) => 1),((ref from.Types[2] v) => 2))(from),tuple(libwasm.sumtype.match!(((ref from.Types[0] v) => cast(Handle)v.handle),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => cast(Handle)v.handle),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => cast(Handle)v.handle))(from))))); 405 } 406 auto convertRectFromNode()(scope ref DOMRectReadOnly rect, scope ref GeometryNode from, scope ref ConvertCoordinateOptions options) { 407 return DOMQuad(Serialize_Object_VarArgCall!Handle(this._parent, "convertRectFromNode", "Handle;SumType!(Handle,Handle,Handle);Handle", tuple(cast(Handle)rect.handle, libwasm.sumtype.match!(((ref from.Types[0] v) => 0),((ref from.Types[1] v) => 1),((ref from.Types[2] v) => 2))(from),tuple(libwasm.sumtype.match!(((ref from.Types[0] v) => cast(Handle)v.handle),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => cast(Handle)v.handle),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => cast(Handle)v.handle))(from)), cast(Handle)options.handle))); 408 } 409 auto convertRectFromNode()(scope ref DOMRectReadOnly rect, scope ref GeometryNode from) { 410 return DOMQuad(Serialize_Object_VarArgCall!Handle(this._parent, "convertRectFromNode", "Handle;SumType!(Handle,Handle,Handle)", tuple(cast(Handle)rect.handle, libwasm.sumtype.match!(((ref from.Types[0] v) => 0),((ref from.Types[1] v) => 1),((ref from.Types[2] v) => 2))(from),tuple(libwasm.sumtype.match!(((ref from.Types[0] v) => cast(Handle)v.handle),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => cast(Handle)v.handle),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => cast(Handle)v.handle))(from))))); 411 } 412 auto convertPointFromNode()(scope ref DOMPointInit point, scope ref GeometryNode from, scope ref ConvertCoordinateOptions options) { 413 return DOMPoint(Serialize_Object_VarArgCall!Handle(this._parent, "convertPointFromNode", "Handle;SumType!(Handle,Handle,Handle);Handle", tuple(cast(Handle)point.handle, libwasm.sumtype.match!(((ref from.Types[0] v) => 0),((ref from.Types[1] v) => 1),((ref from.Types[2] v) => 2))(from),tuple(libwasm.sumtype.match!(((ref from.Types[0] v) => cast(Handle)v.handle),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => cast(Handle)v.handle),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => cast(Handle)v.handle))(from)), cast(Handle)options.handle))); 414 } 415 auto convertPointFromNode()(scope ref DOMPointInit point, scope ref GeometryNode from) { 416 return DOMPoint(Serialize_Object_VarArgCall!Handle(this._parent, "convertPointFromNode", "Handle;SumType!(Handle,Handle,Handle)", tuple(cast(Handle)point.handle, libwasm.sumtype.match!(((ref from.Types[0] v) => 0),((ref from.Types[1] v) => 1),((ref from.Types[2] v) => 2))(from),tuple(libwasm.sumtype.match!(((ref from.Types[0] v) => cast(Handle)v.handle),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => cast(Handle)v.handle),((ref from.Types[2] v) => Handle.init))(from),libwasm.sumtype.match!(((ref from.Types[0] v) => Handle.init),((ref from.Types[1] v) => Handle.init),((ref from.Types[2] v) => cast(Handle)v.handle))(from))))); 417 } 418 auto QueryInterface(T0)(scope auto ref T0 iid) { 419 // Any 420 Handle _handle_iid = getOrCreateHandle(iid); 421 auto result = nsISupports(Object_Call_Handle__Handle(this._parent, "QueryInterface", _handle_iid)); 422 dropHandle!(T0)(_handle_iid); 423 return result; 424 } 425 } 426 struct ScrollIntoViewOptions { 427 nothrow: 428 libwasm.bindings.Window.ScrollOptions _parent; 429 alias _parent this; 430 this(Handle h) { 431 _parent = .ScrollOptions(h); 432 } 433 static auto create() { 434 return ScrollIntoViewOptions(libwasm_add__object()); 435 } 436 void block()(ScrollLogicalPosition block) { 437 Object_Call_int__void(this._parent, "block", block); 438 } 439 ScrollLogicalPosition block()() { 440 return Object_Getter__int(this._parent, "block"); 441 } 442 void inline()(ScrollLogicalPosition inline) { 443 Object_Call_int__void(this._parent, "inline", inline); 444 } 445 ScrollLogicalPosition inline()() { 446 return Object_Getter__int(this._parent, "inline"); 447 } 448 } 449 enum ScrollLogicalPosition { 450 start, 451 center, 452 end, 453 nearest 454 } 455 struct ShadowRootInit { 456 nothrow: 457 JsHandle handle; 458 alias handle this; 459 this(Handle h) { 460 this.handle = JsHandle(h); 461 } 462 static auto create() { 463 return ShadowRootInit(libwasm_add__object()); 464 } 465 void mode()(ShadowRootMode mode) { 466 Object_Call_int__void(this.handle, "mode", mode); 467 } 468 ShadowRootMode mode()() { 469 return Object_Getter__int(this.handle, "mode"); 470 } 471 } 472 473