github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis57_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package web 5 6 import ( 7 "github.com/primecitizens/pcz/std/ffi/js" 8 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 9 ) 10 11 func NewWebGLContextEvent(typ js.String, eventInit WebGLContextEventInit) (ret WebGLContextEvent) { 12 ret.ref = bindings.NewWebGLContextEventByWebGLContextEvent( 13 typ.Ref(), 14 js.Pointer(&eventInit)) 15 return 16 } 17 18 func NewWebGLContextEventByWebGLContextEvent1(typ js.String) (ret WebGLContextEvent) { 19 ret.ref = bindings.NewWebGLContextEventByWebGLContextEvent1( 20 typ.Ref()) 21 return 22 } 23 24 type WebGLContextEvent struct { 25 Event 26 } 27 28 func (this WebGLContextEvent) Once() WebGLContextEvent { 29 this.ref.Once() 30 return this 31 } 32 33 func (this WebGLContextEvent) Ref() js.Ref { 34 return this.Event.Ref() 35 } 36 37 func (this WebGLContextEvent) FromRef(ref js.Ref) WebGLContextEvent { 38 this.Event = this.Event.FromRef(ref) 39 return this 40 } 41 42 func (this WebGLContextEvent) Free() { 43 this.ref.Free() 44 } 45 46 // StatusMessage returns the value of property "WebGLContextEvent.statusMessage". 47 // 48 // It returns ok=false if there is no such property. 49 func (this WebGLContextEvent) StatusMessage() (ret js.String, ok bool) { 50 ok = js.True == bindings.GetWebGLContextEventStatusMessage( 51 this.ref, js.Pointer(&ret), 52 ) 53 return 54 } 55 56 type WebGLObject struct { 57 ref js.Ref 58 } 59 60 func (this WebGLObject) Once() WebGLObject { 61 this.ref.Once() 62 return this 63 } 64 65 func (this WebGLObject) Ref() js.Ref { 66 return this.ref 67 } 68 69 func (this WebGLObject) FromRef(ref js.Ref) WebGLObject { 70 this.ref = ref 71 return this 72 } 73 74 func (this WebGLObject) Free() { 75 this.ref.Free() 76 } 77 78 const ( 79 WebSocket_CONNECTING uint16 = 0 80 WebSocket_OPEN uint16 = 1 81 WebSocket_CLOSING uint16 = 2 82 WebSocket_CLOSED uint16 = 3 83 ) 84 85 func NewWebSocket(url js.String, protocols OneOf_String_ArrayString) (ret WebSocket) { 86 ret.ref = bindings.NewWebSocketByWebSocket( 87 url.Ref(), 88 protocols.Ref()) 89 return 90 } 91 92 func NewWebSocketByWebSocket1(url js.String) (ret WebSocket) { 93 ret.ref = bindings.NewWebSocketByWebSocket1( 94 url.Ref()) 95 return 96 } 97 98 type WebSocket struct { 99 EventTarget 100 } 101 102 func (this WebSocket) Once() WebSocket { 103 this.ref.Once() 104 return this 105 } 106 107 func (this WebSocket) Ref() js.Ref { 108 return this.EventTarget.Ref() 109 } 110 111 func (this WebSocket) FromRef(ref js.Ref) WebSocket { 112 this.EventTarget = this.EventTarget.FromRef(ref) 113 return this 114 } 115 116 func (this WebSocket) Free() { 117 this.ref.Free() 118 } 119 120 // Url returns the value of property "WebSocket.url". 121 // 122 // It returns ok=false if there is no such property. 123 func (this WebSocket) Url() (ret js.String, ok bool) { 124 ok = js.True == bindings.GetWebSocketUrl( 125 this.ref, js.Pointer(&ret), 126 ) 127 return 128 } 129 130 // ReadyState returns the value of property "WebSocket.readyState". 131 // 132 // It returns ok=false if there is no such property. 133 func (this WebSocket) ReadyState() (ret uint16, ok bool) { 134 ok = js.True == bindings.GetWebSocketReadyState( 135 this.ref, js.Pointer(&ret), 136 ) 137 return 138 } 139 140 // BufferedAmount returns the value of property "WebSocket.bufferedAmount". 141 // 142 // It returns ok=false if there is no such property. 143 func (this WebSocket) BufferedAmount() (ret uint64, ok bool) { 144 ok = js.True == bindings.GetWebSocketBufferedAmount( 145 this.ref, js.Pointer(&ret), 146 ) 147 return 148 } 149 150 // Extensions returns the value of property "WebSocket.extensions". 151 // 152 // It returns ok=false if there is no such property. 153 func (this WebSocket) Extensions() (ret js.String, ok bool) { 154 ok = js.True == bindings.GetWebSocketExtensions( 155 this.ref, js.Pointer(&ret), 156 ) 157 return 158 } 159 160 // Protocol returns the value of property "WebSocket.protocol". 161 // 162 // It returns ok=false if there is no such property. 163 func (this WebSocket) Protocol() (ret js.String, ok bool) { 164 ok = js.True == bindings.GetWebSocketProtocol( 165 this.ref, js.Pointer(&ret), 166 ) 167 return 168 } 169 170 // BinaryType returns the value of property "WebSocket.binaryType". 171 // 172 // It returns ok=false if there is no such property. 173 func (this WebSocket) BinaryType() (ret BinaryType, ok bool) { 174 ok = js.True == bindings.GetWebSocketBinaryType( 175 this.ref, js.Pointer(&ret), 176 ) 177 return 178 } 179 180 // SetBinaryType sets the value of property "WebSocket.binaryType" to val. 181 // 182 // It returns false if the property cannot be set. 183 func (this WebSocket) SetBinaryType(val BinaryType) bool { 184 return js.True == bindings.SetWebSocketBinaryType( 185 this.ref, 186 uint32(val), 187 ) 188 } 189 190 // HasFuncClose returns true if the method "WebSocket.close" exists. 191 func (this WebSocket) HasFuncClose() bool { 192 return js.True == bindings.HasFuncWebSocketClose( 193 this.ref, 194 ) 195 } 196 197 // FuncClose returns the method "WebSocket.close". 198 func (this WebSocket) FuncClose() (fn js.Func[func(code uint16, reason js.String)]) { 199 bindings.FuncWebSocketClose( 200 this.ref, js.Pointer(&fn), 201 ) 202 return 203 } 204 205 // Close calls the method "WebSocket.close". 206 func (this WebSocket) Close(code uint16, reason js.String) (ret js.Void) { 207 bindings.CallWebSocketClose( 208 this.ref, js.Pointer(&ret), 209 uint32(code), 210 reason.Ref(), 211 ) 212 213 return 214 } 215 216 // TryClose calls the method "WebSocket.close" 217 // in a try/catch block and returns (_, err, ok = false) when it went through 218 // the catch clause. 219 func (this WebSocket) TryClose(code uint16, reason js.String) (ret js.Void, exception js.Any, ok bool) { 220 ok = js.True == bindings.TryWebSocketClose( 221 this.ref, js.Pointer(&ret), js.Pointer(&exception), 222 uint32(code), 223 reason.Ref(), 224 ) 225 226 return 227 } 228 229 // HasFuncClose1 returns true if the method "WebSocket.close" exists. 230 func (this WebSocket) HasFuncClose1() bool { 231 return js.True == bindings.HasFuncWebSocketClose1( 232 this.ref, 233 ) 234 } 235 236 // FuncClose1 returns the method "WebSocket.close". 237 func (this WebSocket) FuncClose1() (fn js.Func[func(code uint16)]) { 238 bindings.FuncWebSocketClose1( 239 this.ref, js.Pointer(&fn), 240 ) 241 return 242 } 243 244 // Close1 calls the method "WebSocket.close". 245 func (this WebSocket) Close1(code uint16) (ret js.Void) { 246 bindings.CallWebSocketClose1( 247 this.ref, js.Pointer(&ret), 248 uint32(code), 249 ) 250 251 return 252 } 253 254 // TryClose1 calls the method "WebSocket.close" 255 // in a try/catch block and returns (_, err, ok = false) when it went through 256 // the catch clause. 257 func (this WebSocket) TryClose1(code uint16) (ret js.Void, exception js.Any, ok bool) { 258 ok = js.True == bindings.TryWebSocketClose1( 259 this.ref, js.Pointer(&ret), js.Pointer(&exception), 260 uint32(code), 261 ) 262 263 return 264 } 265 266 // HasFuncClose2 returns true if the method "WebSocket.close" exists. 267 func (this WebSocket) HasFuncClose2() bool { 268 return js.True == bindings.HasFuncWebSocketClose2( 269 this.ref, 270 ) 271 } 272 273 // FuncClose2 returns the method "WebSocket.close". 274 func (this WebSocket) FuncClose2() (fn js.Func[func()]) { 275 bindings.FuncWebSocketClose2( 276 this.ref, js.Pointer(&fn), 277 ) 278 return 279 } 280 281 // Close2 calls the method "WebSocket.close". 282 func (this WebSocket) Close2() (ret js.Void) { 283 bindings.CallWebSocketClose2( 284 this.ref, js.Pointer(&ret), 285 ) 286 287 return 288 } 289 290 // TryClose2 calls the method "WebSocket.close" 291 // in a try/catch block and returns (_, err, ok = false) when it went through 292 // the catch clause. 293 func (this WebSocket) TryClose2() (ret js.Void, exception js.Any, ok bool) { 294 ok = js.True == bindings.TryWebSocketClose2( 295 this.ref, js.Pointer(&ret), js.Pointer(&exception), 296 ) 297 298 return 299 } 300 301 // HasFuncSend returns true if the method "WebSocket.send" exists. 302 func (this WebSocket) HasFuncSend() bool { 303 return js.True == bindings.HasFuncWebSocketSend( 304 this.ref, 305 ) 306 } 307 308 // FuncSend returns the method "WebSocket.send". 309 func (this WebSocket) FuncSend() (fn js.Func[func(data OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String)]) { 310 bindings.FuncWebSocketSend( 311 this.ref, js.Pointer(&fn), 312 ) 313 return 314 } 315 316 // Send calls the method "WebSocket.send". 317 func (this WebSocket) Send(data OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) (ret js.Void) { 318 bindings.CallWebSocketSend( 319 this.ref, js.Pointer(&ret), 320 data.Ref(), 321 ) 322 323 return 324 } 325 326 // TrySend calls the method "WebSocket.send" 327 // in a try/catch block and returns (_, err, ok = false) when it went through 328 // the catch clause. 329 func (this WebSocket) TrySend(data OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) (ret js.Void, exception js.Any, ok bool) { 330 ok = js.True == bindings.TryWebSocketSend( 331 this.ref, js.Pointer(&ret), js.Pointer(&exception), 332 data.Ref(), 333 ) 334 335 return 336 } 337 338 type WebTransportHash struct { 339 // Algorithm is "WebTransportHash.algorithm" 340 // 341 // Optional 342 Algorithm js.String 343 // Value is "WebTransportHash.value" 344 // 345 // Optional 346 Value BufferSource 347 348 FFI_USE bool 349 } 350 351 // FromRef calls UpdateFrom and returns a WebTransportHash with all fields set. 352 func (p WebTransportHash) FromRef(ref js.Ref) WebTransportHash { 353 p.UpdateFrom(ref) 354 return p 355 } 356 357 // New creates a new WebTransportHash in the application heap. 358 func (p WebTransportHash) New() js.Ref { 359 return bindings.WebTransportHashJSLoad( 360 js.Pointer(&p), js.True, 0, 361 ) 362 } 363 364 // UpdateFrom copies value of all fields of the heap object to p. 365 func (p *WebTransportHash) UpdateFrom(ref js.Ref) { 366 bindings.WebTransportHashJSStore( 367 js.Pointer(p), ref, 368 ) 369 } 370 371 // Update writes all fields of the p to the heap object referenced by ref. 372 func (p *WebTransportHash) Update(ref js.Ref) { 373 bindings.WebTransportHashJSLoad( 374 js.Pointer(p), js.False, ref, 375 ) 376 } 377 378 // FreeMembers frees fields with heap reference, if recursive is true 379 // free all heap references reachable from p. 380 func (p *WebTransportHash) FreeMembers(recursive bool) { 381 js.Free( 382 p.Algorithm.Ref(), 383 p.Value.Ref(), 384 ) 385 p.Algorithm = p.Algorithm.FromRef(js.Undefined) 386 p.Value = p.Value.FromRef(js.Undefined) 387 } 388 389 type WebTransportCongestionControl uint32 390 391 const ( 392 _ WebTransportCongestionControl = iota 393 394 WebTransportCongestionControl_DEFAULT 395 WebTransportCongestionControl_THROUGHPUT 396 WebTransportCongestionControl_LOW_LATENCY 397 ) 398 399 func (WebTransportCongestionControl) FromRef(str js.Ref) WebTransportCongestionControl { 400 return WebTransportCongestionControl(bindings.ConstOfWebTransportCongestionControl(str)) 401 } 402 403 func (x WebTransportCongestionControl) String() (string, bool) { 404 switch x { 405 case WebTransportCongestionControl_DEFAULT: 406 return "default", true 407 case WebTransportCongestionControl_THROUGHPUT: 408 return "throughput", true 409 case WebTransportCongestionControl_LOW_LATENCY: 410 return "low-latency", true 411 default: 412 return "", false 413 } 414 } 415 416 type WebTransportOptions struct { 417 // AllowPooling is "WebTransportOptions.allowPooling" 418 // 419 // Optional, defaults to false. 420 // 421 // NOTE: FFI_USE_AllowPooling MUST be set to true to make this field effective. 422 AllowPooling bool 423 // RequireUnreliable is "WebTransportOptions.requireUnreliable" 424 // 425 // Optional, defaults to false. 426 // 427 // NOTE: FFI_USE_RequireUnreliable MUST be set to true to make this field effective. 428 RequireUnreliable bool 429 // ServerCertificateHashes is "WebTransportOptions.serverCertificateHashes" 430 // 431 // Optional 432 ServerCertificateHashes js.Array[WebTransportHash] 433 // CongestionControl is "WebTransportOptions.congestionControl" 434 // 435 // Optional, defaults to "default". 436 CongestionControl WebTransportCongestionControl 437 438 FFI_USE_AllowPooling bool // for AllowPooling. 439 FFI_USE_RequireUnreliable bool // for RequireUnreliable. 440 441 FFI_USE bool 442 } 443 444 // FromRef calls UpdateFrom and returns a WebTransportOptions with all fields set. 445 func (p WebTransportOptions) FromRef(ref js.Ref) WebTransportOptions { 446 p.UpdateFrom(ref) 447 return p 448 } 449 450 // New creates a new WebTransportOptions in the application heap. 451 func (p WebTransportOptions) New() js.Ref { 452 return bindings.WebTransportOptionsJSLoad( 453 js.Pointer(&p), js.True, 0, 454 ) 455 } 456 457 // UpdateFrom copies value of all fields of the heap object to p. 458 func (p *WebTransportOptions) UpdateFrom(ref js.Ref) { 459 bindings.WebTransportOptionsJSStore( 460 js.Pointer(p), ref, 461 ) 462 } 463 464 // Update writes all fields of the p to the heap object referenced by ref. 465 func (p *WebTransportOptions) Update(ref js.Ref) { 466 bindings.WebTransportOptionsJSLoad( 467 js.Pointer(p), js.False, ref, 468 ) 469 } 470 471 // FreeMembers frees fields with heap reference, if recursive is true 472 // free all heap references reachable from p. 473 func (p *WebTransportOptions) FreeMembers(recursive bool) { 474 js.Free( 475 p.ServerCertificateHashes.Ref(), 476 ) 477 p.ServerCertificateHashes = p.ServerCertificateHashes.FromRef(js.Undefined) 478 } 479 480 type WebTransportDatagramStats struct { 481 // Timestamp is "WebTransportDatagramStats.timestamp" 482 // 483 // Optional 484 // 485 // NOTE: FFI_USE_Timestamp MUST be set to true to make this field effective. 486 Timestamp DOMHighResTimeStamp 487 // ExpiredOutgoing is "WebTransportDatagramStats.expiredOutgoing" 488 // 489 // Optional 490 // 491 // NOTE: FFI_USE_ExpiredOutgoing MUST be set to true to make this field effective. 492 ExpiredOutgoing uint64 493 // DroppedIncoming is "WebTransportDatagramStats.droppedIncoming" 494 // 495 // Optional 496 // 497 // NOTE: FFI_USE_DroppedIncoming MUST be set to true to make this field effective. 498 DroppedIncoming uint64 499 // LostOutgoing is "WebTransportDatagramStats.lostOutgoing" 500 // 501 // Optional 502 // 503 // NOTE: FFI_USE_LostOutgoing MUST be set to true to make this field effective. 504 LostOutgoing uint64 505 506 FFI_USE_Timestamp bool // for Timestamp. 507 FFI_USE_ExpiredOutgoing bool // for ExpiredOutgoing. 508 FFI_USE_DroppedIncoming bool // for DroppedIncoming. 509 FFI_USE_LostOutgoing bool // for LostOutgoing. 510 511 FFI_USE bool 512 } 513 514 // FromRef calls UpdateFrom and returns a WebTransportDatagramStats with all fields set. 515 func (p WebTransportDatagramStats) FromRef(ref js.Ref) WebTransportDatagramStats { 516 p.UpdateFrom(ref) 517 return p 518 } 519 520 // New creates a new WebTransportDatagramStats in the application heap. 521 func (p WebTransportDatagramStats) New() js.Ref { 522 return bindings.WebTransportDatagramStatsJSLoad( 523 js.Pointer(&p), js.True, 0, 524 ) 525 } 526 527 // UpdateFrom copies value of all fields of the heap object to p. 528 func (p *WebTransportDatagramStats) UpdateFrom(ref js.Ref) { 529 bindings.WebTransportDatagramStatsJSStore( 530 js.Pointer(p), ref, 531 ) 532 } 533 534 // Update writes all fields of the p to the heap object referenced by ref. 535 func (p *WebTransportDatagramStats) Update(ref js.Ref) { 536 bindings.WebTransportDatagramStatsJSLoad( 537 js.Pointer(p), js.False, ref, 538 ) 539 } 540 541 // FreeMembers frees fields with heap reference, if recursive is true 542 // free all heap references reachable from p. 543 func (p *WebTransportDatagramStats) FreeMembers(recursive bool) { 544 } 545 546 type WebTransportStats struct { 547 // Timestamp is "WebTransportStats.timestamp" 548 // 549 // Optional 550 // 551 // NOTE: FFI_USE_Timestamp MUST be set to true to make this field effective. 552 Timestamp DOMHighResTimeStamp 553 // BytesSent is "WebTransportStats.bytesSent" 554 // 555 // Optional 556 // 557 // NOTE: FFI_USE_BytesSent MUST be set to true to make this field effective. 558 BytesSent uint64 559 // PacketsSent is "WebTransportStats.packetsSent" 560 // 561 // Optional 562 // 563 // NOTE: FFI_USE_PacketsSent MUST be set to true to make this field effective. 564 PacketsSent uint64 565 // PacketsLost is "WebTransportStats.packetsLost" 566 // 567 // Optional 568 // 569 // NOTE: FFI_USE_PacketsLost MUST be set to true to make this field effective. 570 PacketsLost uint64 571 // NumOutgoingStreamsCreated is "WebTransportStats.numOutgoingStreamsCreated" 572 // 573 // Optional 574 // 575 // NOTE: FFI_USE_NumOutgoingStreamsCreated MUST be set to true to make this field effective. 576 NumOutgoingStreamsCreated uint32 577 // NumIncomingStreamsCreated is "WebTransportStats.numIncomingStreamsCreated" 578 // 579 // Optional 580 // 581 // NOTE: FFI_USE_NumIncomingStreamsCreated MUST be set to true to make this field effective. 582 NumIncomingStreamsCreated uint32 583 // BytesReceived is "WebTransportStats.bytesReceived" 584 // 585 // Optional 586 // 587 // NOTE: FFI_USE_BytesReceived MUST be set to true to make this field effective. 588 BytesReceived uint64 589 // PacketsReceived is "WebTransportStats.packetsReceived" 590 // 591 // Optional 592 // 593 // NOTE: FFI_USE_PacketsReceived MUST be set to true to make this field effective. 594 PacketsReceived uint64 595 // SmoothedRtt is "WebTransportStats.smoothedRtt" 596 // 597 // Optional 598 // 599 // NOTE: FFI_USE_SmoothedRtt MUST be set to true to make this field effective. 600 SmoothedRtt DOMHighResTimeStamp 601 // RttVariation is "WebTransportStats.rttVariation" 602 // 603 // Optional 604 // 605 // NOTE: FFI_USE_RttVariation MUST be set to true to make this field effective. 606 RttVariation DOMHighResTimeStamp 607 // MinRtt is "WebTransportStats.minRtt" 608 // 609 // Optional 610 // 611 // NOTE: FFI_USE_MinRtt MUST be set to true to make this field effective. 612 MinRtt DOMHighResTimeStamp 613 // Datagrams is "WebTransportStats.datagrams" 614 // 615 // Optional 616 // 617 // NOTE: Datagrams.FFI_USE MUST be set to true to get Datagrams used. 618 Datagrams WebTransportDatagramStats 619 // EstimatedSendRate is "WebTransportStats.estimatedSendRate" 620 // 621 // Optional 622 // 623 // NOTE: FFI_USE_EstimatedSendRate MUST be set to true to make this field effective. 624 EstimatedSendRate uint64 625 626 FFI_USE_Timestamp bool // for Timestamp. 627 FFI_USE_BytesSent bool // for BytesSent. 628 FFI_USE_PacketsSent bool // for PacketsSent. 629 FFI_USE_PacketsLost bool // for PacketsLost. 630 FFI_USE_NumOutgoingStreamsCreated bool // for NumOutgoingStreamsCreated. 631 FFI_USE_NumIncomingStreamsCreated bool // for NumIncomingStreamsCreated. 632 FFI_USE_BytesReceived bool // for BytesReceived. 633 FFI_USE_PacketsReceived bool // for PacketsReceived. 634 FFI_USE_SmoothedRtt bool // for SmoothedRtt. 635 FFI_USE_RttVariation bool // for RttVariation. 636 FFI_USE_MinRtt bool // for MinRtt. 637 FFI_USE_EstimatedSendRate bool // for EstimatedSendRate. 638 639 FFI_USE bool 640 } 641 642 // FromRef calls UpdateFrom and returns a WebTransportStats with all fields set. 643 func (p WebTransportStats) FromRef(ref js.Ref) WebTransportStats { 644 p.UpdateFrom(ref) 645 return p 646 } 647 648 // New creates a new WebTransportStats in the application heap. 649 func (p WebTransportStats) New() js.Ref { 650 return bindings.WebTransportStatsJSLoad( 651 js.Pointer(&p), js.True, 0, 652 ) 653 } 654 655 // UpdateFrom copies value of all fields of the heap object to p. 656 func (p *WebTransportStats) UpdateFrom(ref js.Ref) { 657 bindings.WebTransportStatsJSStore( 658 js.Pointer(p), ref, 659 ) 660 } 661 662 // Update writes all fields of the p to the heap object referenced by ref. 663 func (p *WebTransportStats) Update(ref js.Ref) { 664 bindings.WebTransportStatsJSLoad( 665 js.Pointer(p), js.False, ref, 666 ) 667 } 668 669 // FreeMembers frees fields with heap reference, if recursive is true 670 // free all heap references reachable from p. 671 func (p *WebTransportStats) FreeMembers(recursive bool) { 672 if recursive { 673 p.Datagrams.FreeMembers(true) 674 } 675 } 676 677 type WebTransportCloseInfo struct { 678 // CloseCode is "WebTransportCloseInfo.closeCode" 679 // 680 // Optional, defaults to 0. 681 // 682 // NOTE: FFI_USE_CloseCode MUST be set to true to make this field effective. 683 CloseCode uint32 684 // Reason is "WebTransportCloseInfo.reason" 685 // 686 // Optional, defaults to "". 687 Reason js.String 688 689 FFI_USE_CloseCode bool // for CloseCode. 690 691 FFI_USE bool 692 } 693 694 // FromRef calls UpdateFrom and returns a WebTransportCloseInfo with all fields set. 695 func (p WebTransportCloseInfo) FromRef(ref js.Ref) WebTransportCloseInfo { 696 p.UpdateFrom(ref) 697 return p 698 } 699 700 // New creates a new WebTransportCloseInfo in the application heap. 701 func (p WebTransportCloseInfo) New() js.Ref { 702 return bindings.WebTransportCloseInfoJSLoad( 703 js.Pointer(&p), js.True, 0, 704 ) 705 } 706 707 // UpdateFrom copies value of all fields of the heap object to p. 708 func (p *WebTransportCloseInfo) UpdateFrom(ref js.Ref) { 709 bindings.WebTransportCloseInfoJSStore( 710 js.Pointer(p), ref, 711 ) 712 } 713 714 // Update writes all fields of the p to the heap object referenced by ref. 715 func (p *WebTransportCloseInfo) Update(ref js.Ref) { 716 bindings.WebTransportCloseInfoJSLoad( 717 js.Pointer(p), js.False, ref, 718 ) 719 } 720 721 // FreeMembers frees fields with heap reference, if recursive is true 722 // free all heap references reachable from p. 723 func (p *WebTransportCloseInfo) FreeMembers(recursive bool) { 724 js.Free( 725 p.Reason.Ref(), 726 ) 727 p.Reason = p.Reason.FromRef(js.Undefined) 728 } 729 730 type WebTransportReceiveStreamStats struct { 731 // Timestamp is "WebTransportReceiveStreamStats.timestamp" 732 // 733 // Optional 734 // 735 // NOTE: FFI_USE_Timestamp MUST be set to true to make this field effective. 736 Timestamp DOMHighResTimeStamp 737 // BytesReceived is "WebTransportReceiveStreamStats.bytesReceived" 738 // 739 // Optional 740 // 741 // NOTE: FFI_USE_BytesReceived MUST be set to true to make this field effective. 742 BytesReceived uint64 743 // BytesRead is "WebTransportReceiveStreamStats.bytesRead" 744 // 745 // Optional 746 // 747 // NOTE: FFI_USE_BytesRead MUST be set to true to make this field effective. 748 BytesRead uint64 749 750 FFI_USE_Timestamp bool // for Timestamp. 751 FFI_USE_BytesReceived bool // for BytesReceived. 752 FFI_USE_BytesRead bool // for BytesRead. 753 754 FFI_USE bool 755 } 756 757 // FromRef calls UpdateFrom and returns a WebTransportReceiveStreamStats with all fields set. 758 func (p WebTransportReceiveStreamStats) FromRef(ref js.Ref) WebTransportReceiveStreamStats { 759 p.UpdateFrom(ref) 760 return p 761 } 762 763 // New creates a new WebTransportReceiveStreamStats in the application heap. 764 func (p WebTransportReceiveStreamStats) New() js.Ref { 765 return bindings.WebTransportReceiveStreamStatsJSLoad( 766 js.Pointer(&p), js.True, 0, 767 ) 768 } 769 770 // UpdateFrom copies value of all fields of the heap object to p. 771 func (p *WebTransportReceiveStreamStats) UpdateFrom(ref js.Ref) { 772 bindings.WebTransportReceiveStreamStatsJSStore( 773 js.Pointer(p), ref, 774 ) 775 } 776 777 // Update writes all fields of the p to the heap object referenced by ref. 778 func (p *WebTransportReceiveStreamStats) Update(ref js.Ref) { 779 bindings.WebTransportReceiveStreamStatsJSLoad( 780 js.Pointer(p), js.False, ref, 781 ) 782 } 783 784 // FreeMembers frees fields with heap reference, if recursive is true 785 // free all heap references reachable from p. 786 func (p *WebTransportReceiveStreamStats) FreeMembers(recursive bool) { 787 } 788 789 func NewWebTransportReceiveStream(underlyingSource js.Object, strategy QueuingStrategy) (ret WebTransportReceiveStream) { 790 ret.ref = bindings.NewWebTransportReceiveStreamByWebTransportReceiveStream( 791 underlyingSource.Ref(), 792 js.Pointer(&strategy)) 793 return 794 } 795 796 func NewWebTransportReceiveStreamByWebTransportReceiveStream1(underlyingSource js.Object) (ret WebTransportReceiveStream) { 797 ret.ref = bindings.NewWebTransportReceiveStreamByWebTransportReceiveStream1( 798 underlyingSource.Ref()) 799 return 800 } 801 802 func NewWebTransportReceiveStreamByWebTransportReceiveStream2() (ret WebTransportReceiveStream) { 803 ret.ref = bindings.NewWebTransportReceiveStreamByWebTransportReceiveStream2() 804 return 805 } 806 807 type WebTransportReceiveStream struct { 808 ReadableStream 809 } 810 811 func (this WebTransportReceiveStream) Once() WebTransportReceiveStream { 812 this.ref.Once() 813 return this 814 } 815 816 func (this WebTransportReceiveStream) Ref() js.Ref { 817 return this.ReadableStream.Ref() 818 } 819 820 func (this WebTransportReceiveStream) FromRef(ref js.Ref) WebTransportReceiveStream { 821 this.ReadableStream = this.ReadableStream.FromRef(ref) 822 return this 823 } 824 825 func (this WebTransportReceiveStream) Free() { 826 this.ref.Free() 827 } 828 829 // HasFuncGetStats returns true if the method "WebTransportReceiveStream.getStats" exists. 830 func (this WebTransportReceiveStream) HasFuncGetStats() bool { 831 return js.True == bindings.HasFuncWebTransportReceiveStreamGetStats( 832 this.ref, 833 ) 834 } 835 836 // FuncGetStats returns the method "WebTransportReceiveStream.getStats". 837 func (this WebTransportReceiveStream) FuncGetStats() (fn js.Func[func() js.Promise[WebTransportReceiveStreamStats]]) { 838 bindings.FuncWebTransportReceiveStreamGetStats( 839 this.ref, js.Pointer(&fn), 840 ) 841 return 842 } 843 844 // GetStats calls the method "WebTransportReceiveStream.getStats". 845 func (this WebTransportReceiveStream) GetStats() (ret js.Promise[WebTransportReceiveStreamStats]) { 846 bindings.CallWebTransportReceiveStreamGetStats( 847 this.ref, js.Pointer(&ret), 848 ) 849 850 return 851 } 852 853 // TryGetStats calls the method "WebTransportReceiveStream.getStats" 854 // in a try/catch block and returns (_, err, ok = false) when it went through 855 // the catch clause. 856 func (this WebTransportReceiveStream) TryGetStats() (ret js.Promise[WebTransportReceiveStreamStats], exception js.Any, ok bool) { 857 ok = js.True == bindings.TryWebTransportReceiveStreamGetStats( 858 this.ref, js.Pointer(&ret), js.Pointer(&exception), 859 ) 860 861 return 862 } 863 864 type WebTransportSendStreamStats struct { 865 // Timestamp is "WebTransportSendStreamStats.timestamp" 866 // 867 // Optional 868 // 869 // NOTE: FFI_USE_Timestamp MUST be set to true to make this field effective. 870 Timestamp DOMHighResTimeStamp 871 // BytesWritten is "WebTransportSendStreamStats.bytesWritten" 872 // 873 // Optional 874 // 875 // NOTE: FFI_USE_BytesWritten MUST be set to true to make this field effective. 876 BytesWritten uint64 877 // BytesSent is "WebTransportSendStreamStats.bytesSent" 878 // 879 // Optional 880 // 881 // NOTE: FFI_USE_BytesSent MUST be set to true to make this field effective. 882 BytesSent uint64 883 // BytesAcknowledged is "WebTransportSendStreamStats.bytesAcknowledged" 884 // 885 // Optional 886 // 887 // NOTE: FFI_USE_BytesAcknowledged MUST be set to true to make this field effective. 888 BytesAcknowledged uint64 889 890 FFI_USE_Timestamp bool // for Timestamp. 891 FFI_USE_BytesWritten bool // for BytesWritten. 892 FFI_USE_BytesSent bool // for BytesSent. 893 FFI_USE_BytesAcknowledged bool // for BytesAcknowledged. 894 895 FFI_USE bool 896 } 897 898 // FromRef calls UpdateFrom and returns a WebTransportSendStreamStats with all fields set. 899 func (p WebTransportSendStreamStats) FromRef(ref js.Ref) WebTransportSendStreamStats { 900 p.UpdateFrom(ref) 901 return p 902 } 903 904 // New creates a new WebTransportSendStreamStats in the application heap. 905 func (p WebTransportSendStreamStats) New() js.Ref { 906 return bindings.WebTransportSendStreamStatsJSLoad( 907 js.Pointer(&p), js.True, 0, 908 ) 909 } 910 911 // UpdateFrom copies value of all fields of the heap object to p. 912 func (p *WebTransportSendStreamStats) UpdateFrom(ref js.Ref) { 913 bindings.WebTransportSendStreamStatsJSStore( 914 js.Pointer(p), ref, 915 ) 916 } 917 918 // Update writes all fields of the p to the heap object referenced by ref. 919 func (p *WebTransportSendStreamStats) Update(ref js.Ref) { 920 bindings.WebTransportSendStreamStatsJSLoad( 921 js.Pointer(p), js.False, ref, 922 ) 923 } 924 925 // FreeMembers frees fields with heap reference, if recursive is true 926 // free all heap references reachable from p. 927 func (p *WebTransportSendStreamStats) FreeMembers(recursive bool) { 928 } 929 930 func NewWebTransportSendStream(underlyingSink js.Object, strategy QueuingStrategy) (ret WebTransportSendStream) { 931 ret.ref = bindings.NewWebTransportSendStreamByWebTransportSendStream( 932 underlyingSink.Ref(), 933 js.Pointer(&strategy)) 934 return 935 } 936 937 func NewWebTransportSendStreamByWebTransportSendStream1(underlyingSink js.Object) (ret WebTransportSendStream) { 938 ret.ref = bindings.NewWebTransportSendStreamByWebTransportSendStream1( 939 underlyingSink.Ref()) 940 return 941 } 942 943 func NewWebTransportSendStreamByWebTransportSendStream2() (ret WebTransportSendStream) { 944 ret.ref = bindings.NewWebTransportSendStreamByWebTransportSendStream2() 945 return 946 } 947 948 type WebTransportSendStream struct { 949 WritableStream 950 } 951 952 func (this WebTransportSendStream) Once() WebTransportSendStream { 953 this.ref.Once() 954 return this 955 } 956 957 func (this WebTransportSendStream) Ref() js.Ref { 958 return this.WritableStream.Ref() 959 } 960 961 func (this WebTransportSendStream) FromRef(ref js.Ref) WebTransportSendStream { 962 this.WritableStream = this.WritableStream.FromRef(ref) 963 return this 964 } 965 966 func (this WebTransportSendStream) Free() { 967 this.ref.Free() 968 } 969 970 // SendOrder returns the value of property "WebTransportSendStream.sendOrder". 971 // 972 // It returns ok=false if there is no such property. 973 func (this WebTransportSendStream) SendOrder() (ret int64, ok bool) { 974 ok = js.True == bindings.GetWebTransportSendStreamSendOrder( 975 this.ref, js.Pointer(&ret), 976 ) 977 return 978 } 979 980 // SetSendOrder sets the value of property "WebTransportSendStream.sendOrder" to val. 981 // 982 // It returns false if the property cannot be set. 983 func (this WebTransportSendStream) SetSendOrder(val int64) bool { 984 return js.True == bindings.SetWebTransportSendStreamSendOrder( 985 this.ref, 986 float64(val), 987 ) 988 } 989 990 // HasFuncGetStats returns true if the method "WebTransportSendStream.getStats" exists. 991 func (this WebTransportSendStream) HasFuncGetStats() bool { 992 return js.True == bindings.HasFuncWebTransportSendStreamGetStats( 993 this.ref, 994 ) 995 } 996 997 // FuncGetStats returns the method "WebTransportSendStream.getStats". 998 func (this WebTransportSendStream) FuncGetStats() (fn js.Func[func() js.Promise[WebTransportSendStreamStats]]) { 999 bindings.FuncWebTransportSendStreamGetStats( 1000 this.ref, js.Pointer(&fn), 1001 ) 1002 return 1003 } 1004 1005 // GetStats calls the method "WebTransportSendStream.getStats". 1006 func (this WebTransportSendStream) GetStats() (ret js.Promise[WebTransportSendStreamStats]) { 1007 bindings.CallWebTransportSendStreamGetStats( 1008 this.ref, js.Pointer(&ret), 1009 ) 1010 1011 return 1012 } 1013 1014 // TryGetStats calls the method "WebTransportSendStream.getStats" 1015 // in a try/catch block and returns (_, err, ok = false) when it went through 1016 // the catch clause. 1017 func (this WebTransportSendStream) TryGetStats() (ret js.Promise[WebTransportSendStreamStats], exception js.Any, ok bool) { 1018 ok = js.True == bindings.TryWebTransportSendStreamGetStats( 1019 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1020 ) 1021 1022 return 1023 } 1024 1025 type WebTransportBidirectionalStream struct { 1026 ref js.Ref 1027 } 1028 1029 func (this WebTransportBidirectionalStream) Once() WebTransportBidirectionalStream { 1030 this.ref.Once() 1031 return this 1032 } 1033 1034 func (this WebTransportBidirectionalStream) Ref() js.Ref { 1035 return this.ref 1036 } 1037 1038 func (this WebTransportBidirectionalStream) FromRef(ref js.Ref) WebTransportBidirectionalStream { 1039 this.ref = ref 1040 return this 1041 } 1042 1043 func (this WebTransportBidirectionalStream) Free() { 1044 this.ref.Free() 1045 } 1046 1047 // Readable returns the value of property "WebTransportBidirectionalStream.readable". 1048 // 1049 // It returns ok=false if there is no such property. 1050 func (this WebTransportBidirectionalStream) Readable() (ret WebTransportReceiveStream, ok bool) { 1051 ok = js.True == bindings.GetWebTransportBidirectionalStreamReadable( 1052 this.ref, js.Pointer(&ret), 1053 ) 1054 return 1055 } 1056 1057 // Writable returns the value of property "WebTransportBidirectionalStream.writable". 1058 // 1059 // It returns ok=false if there is no such property. 1060 func (this WebTransportBidirectionalStream) Writable() (ret WebTransportSendStream, ok bool) { 1061 ok = js.True == bindings.GetWebTransportBidirectionalStreamWritable( 1062 this.ref, js.Pointer(&ret), 1063 ) 1064 return 1065 } 1066 1067 type WebTransportSendStreamOptions struct { 1068 // SendOrder is "WebTransportSendStreamOptions.sendOrder" 1069 // 1070 // Optional, defaults to null. 1071 // 1072 // NOTE: FFI_USE_SendOrder MUST be set to true to make this field effective. 1073 SendOrder int64 1074 1075 FFI_USE_SendOrder bool // for SendOrder. 1076 1077 FFI_USE bool 1078 } 1079 1080 // FromRef calls UpdateFrom and returns a WebTransportSendStreamOptions with all fields set. 1081 func (p WebTransportSendStreamOptions) FromRef(ref js.Ref) WebTransportSendStreamOptions { 1082 p.UpdateFrom(ref) 1083 return p 1084 } 1085 1086 // New creates a new WebTransportSendStreamOptions in the application heap. 1087 func (p WebTransportSendStreamOptions) New() js.Ref { 1088 return bindings.WebTransportSendStreamOptionsJSLoad( 1089 js.Pointer(&p), js.True, 0, 1090 ) 1091 } 1092 1093 // UpdateFrom copies value of all fields of the heap object to p. 1094 func (p *WebTransportSendStreamOptions) UpdateFrom(ref js.Ref) { 1095 bindings.WebTransportSendStreamOptionsJSStore( 1096 js.Pointer(p), ref, 1097 ) 1098 } 1099 1100 // Update writes all fields of the p to the heap object referenced by ref. 1101 func (p *WebTransportSendStreamOptions) Update(ref js.Ref) { 1102 bindings.WebTransportSendStreamOptionsJSLoad( 1103 js.Pointer(p), js.False, ref, 1104 ) 1105 } 1106 1107 // FreeMembers frees fields with heap reference, if recursive is true 1108 // free all heap references reachable from p. 1109 func (p *WebTransportSendStreamOptions) FreeMembers(recursive bool) { 1110 } 1111 1112 type WebTransportReliabilityMode uint32 1113 1114 const ( 1115 _ WebTransportReliabilityMode = iota 1116 1117 WebTransportReliabilityMode_PENDING 1118 WebTransportReliabilityMode_RELIABLE_ONLY 1119 WebTransportReliabilityMode_SUPPORTS_UNRELIABLE 1120 ) 1121 1122 func (WebTransportReliabilityMode) FromRef(str js.Ref) WebTransportReliabilityMode { 1123 return WebTransportReliabilityMode(bindings.ConstOfWebTransportReliabilityMode(str)) 1124 } 1125 1126 func (x WebTransportReliabilityMode) String() (string, bool) { 1127 switch x { 1128 case WebTransportReliabilityMode_PENDING: 1129 return "pending", true 1130 case WebTransportReliabilityMode_RELIABLE_ONLY: 1131 return "reliable-only", true 1132 case WebTransportReliabilityMode_SUPPORTS_UNRELIABLE: 1133 return "supports-unreliable", true 1134 default: 1135 return "", false 1136 } 1137 } 1138 1139 type WebTransportDatagramDuplexStream struct { 1140 ref js.Ref 1141 } 1142 1143 func (this WebTransportDatagramDuplexStream) Once() WebTransportDatagramDuplexStream { 1144 this.ref.Once() 1145 return this 1146 } 1147 1148 func (this WebTransportDatagramDuplexStream) Ref() js.Ref { 1149 return this.ref 1150 } 1151 1152 func (this WebTransportDatagramDuplexStream) FromRef(ref js.Ref) WebTransportDatagramDuplexStream { 1153 this.ref = ref 1154 return this 1155 } 1156 1157 func (this WebTransportDatagramDuplexStream) Free() { 1158 this.ref.Free() 1159 } 1160 1161 // Readable returns the value of property "WebTransportDatagramDuplexStream.readable". 1162 // 1163 // It returns ok=false if there is no such property. 1164 func (this WebTransportDatagramDuplexStream) Readable() (ret ReadableStream, ok bool) { 1165 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamReadable( 1166 this.ref, js.Pointer(&ret), 1167 ) 1168 return 1169 } 1170 1171 // Writable returns the value of property "WebTransportDatagramDuplexStream.writable". 1172 // 1173 // It returns ok=false if there is no such property. 1174 func (this WebTransportDatagramDuplexStream) Writable() (ret WritableStream, ok bool) { 1175 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamWritable( 1176 this.ref, js.Pointer(&ret), 1177 ) 1178 return 1179 } 1180 1181 // MaxDatagramSize returns the value of property "WebTransportDatagramDuplexStream.maxDatagramSize". 1182 // 1183 // It returns ok=false if there is no such property. 1184 func (this WebTransportDatagramDuplexStream) MaxDatagramSize() (ret uint32, ok bool) { 1185 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamMaxDatagramSize( 1186 this.ref, js.Pointer(&ret), 1187 ) 1188 return 1189 } 1190 1191 // IncomingMaxAge returns the value of property "WebTransportDatagramDuplexStream.incomingMaxAge". 1192 // 1193 // It returns ok=false if there is no such property. 1194 func (this WebTransportDatagramDuplexStream) IncomingMaxAge() (ret float64, ok bool) { 1195 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamIncomingMaxAge( 1196 this.ref, js.Pointer(&ret), 1197 ) 1198 return 1199 } 1200 1201 // SetIncomingMaxAge sets the value of property "WebTransportDatagramDuplexStream.incomingMaxAge" to val. 1202 // 1203 // It returns false if the property cannot be set. 1204 func (this WebTransportDatagramDuplexStream) SetIncomingMaxAge(val float64) bool { 1205 return js.True == bindings.SetWebTransportDatagramDuplexStreamIncomingMaxAge( 1206 this.ref, 1207 float64(val), 1208 ) 1209 } 1210 1211 // OutgoingMaxAge returns the value of property "WebTransportDatagramDuplexStream.outgoingMaxAge". 1212 // 1213 // It returns ok=false if there is no such property. 1214 func (this WebTransportDatagramDuplexStream) OutgoingMaxAge() (ret float64, ok bool) { 1215 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamOutgoingMaxAge( 1216 this.ref, js.Pointer(&ret), 1217 ) 1218 return 1219 } 1220 1221 // SetOutgoingMaxAge sets the value of property "WebTransportDatagramDuplexStream.outgoingMaxAge" to val. 1222 // 1223 // It returns false if the property cannot be set. 1224 func (this WebTransportDatagramDuplexStream) SetOutgoingMaxAge(val float64) bool { 1225 return js.True == bindings.SetWebTransportDatagramDuplexStreamOutgoingMaxAge( 1226 this.ref, 1227 float64(val), 1228 ) 1229 } 1230 1231 // IncomingHighWaterMark returns the value of property "WebTransportDatagramDuplexStream.incomingHighWaterMark". 1232 // 1233 // It returns ok=false if there is no such property. 1234 func (this WebTransportDatagramDuplexStream) IncomingHighWaterMark() (ret float64, ok bool) { 1235 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamIncomingHighWaterMark( 1236 this.ref, js.Pointer(&ret), 1237 ) 1238 return 1239 } 1240 1241 // SetIncomingHighWaterMark sets the value of property "WebTransportDatagramDuplexStream.incomingHighWaterMark" to val. 1242 // 1243 // It returns false if the property cannot be set. 1244 func (this WebTransportDatagramDuplexStream) SetIncomingHighWaterMark(val float64) bool { 1245 return js.True == bindings.SetWebTransportDatagramDuplexStreamIncomingHighWaterMark( 1246 this.ref, 1247 float64(val), 1248 ) 1249 } 1250 1251 // OutgoingHighWaterMark returns the value of property "WebTransportDatagramDuplexStream.outgoingHighWaterMark". 1252 // 1253 // It returns ok=false if there is no such property. 1254 func (this WebTransportDatagramDuplexStream) OutgoingHighWaterMark() (ret float64, ok bool) { 1255 ok = js.True == bindings.GetWebTransportDatagramDuplexStreamOutgoingHighWaterMark( 1256 this.ref, js.Pointer(&ret), 1257 ) 1258 return 1259 } 1260 1261 // SetOutgoingHighWaterMark sets the value of property "WebTransportDatagramDuplexStream.outgoingHighWaterMark" to val. 1262 // 1263 // It returns false if the property cannot be set. 1264 func (this WebTransportDatagramDuplexStream) SetOutgoingHighWaterMark(val float64) bool { 1265 return js.True == bindings.SetWebTransportDatagramDuplexStreamOutgoingHighWaterMark( 1266 this.ref, 1267 float64(val), 1268 ) 1269 } 1270 1271 func NewWebTransport(url js.String, options WebTransportOptions) (ret WebTransport) { 1272 ret.ref = bindings.NewWebTransportByWebTransport( 1273 url.Ref(), 1274 js.Pointer(&options)) 1275 return 1276 } 1277 1278 func NewWebTransportByWebTransport1(url js.String) (ret WebTransport) { 1279 ret.ref = bindings.NewWebTransportByWebTransport1( 1280 url.Ref()) 1281 return 1282 } 1283 1284 type WebTransport struct { 1285 ref js.Ref 1286 } 1287 1288 func (this WebTransport) Once() WebTransport { 1289 this.ref.Once() 1290 return this 1291 } 1292 1293 func (this WebTransport) Ref() js.Ref { 1294 return this.ref 1295 } 1296 1297 func (this WebTransport) FromRef(ref js.Ref) WebTransport { 1298 this.ref = ref 1299 return this 1300 } 1301 1302 func (this WebTransport) Free() { 1303 this.ref.Free() 1304 } 1305 1306 // Ready returns the value of property "WebTransport.ready". 1307 // 1308 // It returns ok=false if there is no such property. 1309 func (this WebTransport) Ready() (ret js.Promise[js.Void], ok bool) { 1310 ok = js.True == bindings.GetWebTransportReady( 1311 this.ref, js.Pointer(&ret), 1312 ) 1313 return 1314 } 1315 1316 // Reliability returns the value of property "WebTransport.reliability". 1317 // 1318 // It returns ok=false if there is no such property. 1319 func (this WebTransport) Reliability() (ret WebTransportReliabilityMode, ok bool) { 1320 ok = js.True == bindings.GetWebTransportReliability( 1321 this.ref, js.Pointer(&ret), 1322 ) 1323 return 1324 } 1325 1326 // CongestionControl returns the value of property "WebTransport.congestionControl". 1327 // 1328 // It returns ok=false if there is no such property. 1329 func (this WebTransport) CongestionControl() (ret WebTransportCongestionControl, ok bool) { 1330 ok = js.True == bindings.GetWebTransportCongestionControl( 1331 this.ref, js.Pointer(&ret), 1332 ) 1333 return 1334 } 1335 1336 // Closed returns the value of property "WebTransport.closed". 1337 // 1338 // It returns ok=false if there is no such property. 1339 func (this WebTransport) Closed() (ret js.Promise[WebTransportCloseInfo], ok bool) { 1340 ok = js.True == bindings.GetWebTransportClosed( 1341 this.ref, js.Pointer(&ret), 1342 ) 1343 return 1344 } 1345 1346 // Draining returns the value of property "WebTransport.draining". 1347 // 1348 // It returns ok=false if there is no such property. 1349 func (this WebTransport) Draining() (ret js.Promise[js.Void], ok bool) { 1350 ok = js.True == bindings.GetWebTransportDraining( 1351 this.ref, js.Pointer(&ret), 1352 ) 1353 return 1354 } 1355 1356 // Datagrams returns the value of property "WebTransport.datagrams". 1357 // 1358 // It returns ok=false if there is no such property. 1359 func (this WebTransport) Datagrams() (ret WebTransportDatagramDuplexStream, ok bool) { 1360 ok = js.True == bindings.GetWebTransportDatagrams( 1361 this.ref, js.Pointer(&ret), 1362 ) 1363 return 1364 } 1365 1366 // IncomingBidirectionalStreams returns the value of property "WebTransport.incomingBidirectionalStreams". 1367 // 1368 // It returns ok=false if there is no such property. 1369 func (this WebTransport) IncomingBidirectionalStreams() (ret ReadableStream, ok bool) { 1370 ok = js.True == bindings.GetWebTransportIncomingBidirectionalStreams( 1371 this.ref, js.Pointer(&ret), 1372 ) 1373 return 1374 } 1375 1376 // IncomingUnidirectionalStreams returns the value of property "WebTransport.incomingUnidirectionalStreams". 1377 // 1378 // It returns ok=false if there is no such property. 1379 func (this WebTransport) IncomingUnidirectionalStreams() (ret ReadableStream, ok bool) { 1380 ok = js.True == bindings.GetWebTransportIncomingUnidirectionalStreams( 1381 this.ref, js.Pointer(&ret), 1382 ) 1383 return 1384 } 1385 1386 // HasFuncGetStats returns true if the method "WebTransport.getStats" exists. 1387 func (this WebTransport) HasFuncGetStats() bool { 1388 return js.True == bindings.HasFuncWebTransportGetStats( 1389 this.ref, 1390 ) 1391 } 1392 1393 // FuncGetStats returns the method "WebTransport.getStats". 1394 func (this WebTransport) FuncGetStats() (fn js.Func[func() js.Promise[WebTransportStats]]) { 1395 bindings.FuncWebTransportGetStats( 1396 this.ref, js.Pointer(&fn), 1397 ) 1398 return 1399 } 1400 1401 // GetStats calls the method "WebTransport.getStats". 1402 func (this WebTransport) GetStats() (ret js.Promise[WebTransportStats]) { 1403 bindings.CallWebTransportGetStats( 1404 this.ref, js.Pointer(&ret), 1405 ) 1406 1407 return 1408 } 1409 1410 // TryGetStats calls the method "WebTransport.getStats" 1411 // in a try/catch block and returns (_, err, ok = false) when it went through 1412 // the catch clause. 1413 func (this WebTransport) TryGetStats() (ret js.Promise[WebTransportStats], exception js.Any, ok bool) { 1414 ok = js.True == bindings.TryWebTransportGetStats( 1415 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1416 ) 1417 1418 return 1419 } 1420 1421 // HasFuncClose returns true if the method "WebTransport.close" exists. 1422 func (this WebTransport) HasFuncClose() bool { 1423 return js.True == bindings.HasFuncWebTransportClose( 1424 this.ref, 1425 ) 1426 } 1427 1428 // FuncClose returns the method "WebTransport.close". 1429 func (this WebTransport) FuncClose() (fn js.Func[func(closeInfo WebTransportCloseInfo)]) { 1430 bindings.FuncWebTransportClose( 1431 this.ref, js.Pointer(&fn), 1432 ) 1433 return 1434 } 1435 1436 // Close calls the method "WebTransport.close". 1437 func (this WebTransport) Close(closeInfo WebTransportCloseInfo) (ret js.Void) { 1438 bindings.CallWebTransportClose( 1439 this.ref, js.Pointer(&ret), 1440 js.Pointer(&closeInfo), 1441 ) 1442 1443 return 1444 } 1445 1446 // TryClose calls the method "WebTransport.close" 1447 // in a try/catch block and returns (_, err, ok = false) when it went through 1448 // the catch clause. 1449 func (this WebTransport) TryClose(closeInfo WebTransportCloseInfo) (ret js.Void, exception js.Any, ok bool) { 1450 ok = js.True == bindings.TryWebTransportClose( 1451 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1452 js.Pointer(&closeInfo), 1453 ) 1454 1455 return 1456 } 1457 1458 // HasFuncClose1 returns true if the method "WebTransport.close" exists. 1459 func (this WebTransport) HasFuncClose1() bool { 1460 return js.True == bindings.HasFuncWebTransportClose1( 1461 this.ref, 1462 ) 1463 } 1464 1465 // FuncClose1 returns the method "WebTransport.close". 1466 func (this WebTransport) FuncClose1() (fn js.Func[func()]) { 1467 bindings.FuncWebTransportClose1( 1468 this.ref, js.Pointer(&fn), 1469 ) 1470 return 1471 } 1472 1473 // Close1 calls the method "WebTransport.close". 1474 func (this WebTransport) Close1() (ret js.Void) { 1475 bindings.CallWebTransportClose1( 1476 this.ref, js.Pointer(&ret), 1477 ) 1478 1479 return 1480 } 1481 1482 // TryClose1 calls the method "WebTransport.close" 1483 // in a try/catch block and returns (_, err, ok = false) when it went through 1484 // the catch clause. 1485 func (this WebTransport) TryClose1() (ret js.Void, exception js.Any, ok bool) { 1486 ok = js.True == bindings.TryWebTransportClose1( 1487 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1488 ) 1489 1490 return 1491 } 1492 1493 // HasFuncCreateBidirectionalStream returns true if the method "WebTransport.createBidirectionalStream" exists. 1494 func (this WebTransport) HasFuncCreateBidirectionalStream() bool { 1495 return js.True == bindings.HasFuncWebTransportCreateBidirectionalStream( 1496 this.ref, 1497 ) 1498 } 1499 1500 // FuncCreateBidirectionalStream returns the method "WebTransport.createBidirectionalStream". 1501 func (this WebTransport) FuncCreateBidirectionalStream() (fn js.Func[func(options WebTransportSendStreamOptions) js.Promise[WebTransportBidirectionalStream]]) { 1502 bindings.FuncWebTransportCreateBidirectionalStream( 1503 this.ref, js.Pointer(&fn), 1504 ) 1505 return 1506 } 1507 1508 // CreateBidirectionalStream calls the method "WebTransport.createBidirectionalStream". 1509 func (this WebTransport) CreateBidirectionalStream(options WebTransportSendStreamOptions) (ret js.Promise[WebTransportBidirectionalStream]) { 1510 bindings.CallWebTransportCreateBidirectionalStream( 1511 this.ref, js.Pointer(&ret), 1512 js.Pointer(&options), 1513 ) 1514 1515 return 1516 } 1517 1518 // TryCreateBidirectionalStream calls the method "WebTransport.createBidirectionalStream" 1519 // in a try/catch block and returns (_, err, ok = false) when it went through 1520 // the catch clause. 1521 func (this WebTransport) TryCreateBidirectionalStream(options WebTransportSendStreamOptions) (ret js.Promise[WebTransportBidirectionalStream], exception js.Any, ok bool) { 1522 ok = js.True == bindings.TryWebTransportCreateBidirectionalStream( 1523 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1524 js.Pointer(&options), 1525 ) 1526 1527 return 1528 } 1529 1530 // HasFuncCreateBidirectionalStream1 returns true if the method "WebTransport.createBidirectionalStream" exists. 1531 func (this WebTransport) HasFuncCreateBidirectionalStream1() bool { 1532 return js.True == bindings.HasFuncWebTransportCreateBidirectionalStream1( 1533 this.ref, 1534 ) 1535 } 1536 1537 // FuncCreateBidirectionalStream1 returns the method "WebTransport.createBidirectionalStream". 1538 func (this WebTransport) FuncCreateBidirectionalStream1() (fn js.Func[func() js.Promise[WebTransportBidirectionalStream]]) { 1539 bindings.FuncWebTransportCreateBidirectionalStream1( 1540 this.ref, js.Pointer(&fn), 1541 ) 1542 return 1543 } 1544 1545 // CreateBidirectionalStream1 calls the method "WebTransport.createBidirectionalStream". 1546 func (this WebTransport) CreateBidirectionalStream1() (ret js.Promise[WebTransportBidirectionalStream]) { 1547 bindings.CallWebTransportCreateBidirectionalStream1( 1548 this.ref, js.Pointer(&ret), 1549 ) 1550 1551 return 1552 } 1553 1554 // TryCreateBidirectionalStream1 calls the method "WebTransport.createBidirectionalStream" 1555 // in a try/catch block and returns (_, err, ok = false) when it went through 1556 // the catch clause. 1557 func (this WebTransport) TryCreateBidirectionalStream1() (ret js.Promise[WebTransportBidirectionalStream], exception js.Any, ok bool) { 1558 ok = js.True == bindings.TryWebTransportCreateBidirectionalStream1( 1559 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1560 ) 1561 1562 return 1563 } 1564 1565 // HasFuncCreateUnidirectionalStream returns true if the method "WebTransport.createUnidirectionalStream" exists. 1566 func (this WebTransport) HasFuncCreateUnidirectionalStream() bool { 1567 return js.True == bindings.HasFuncWebTransportCreateUnidirectionalStream( 1568 this.ref, 1569 ) 1570 } 1571 1572 // FuncCreateUnidirectionalStream returns the method "WebTransport.createUnidirectionalStream". 1573 func (this WebTransport) FuncCreateUnidirectionalStream() (fn js.Func[func(options WebTransportSendStreamOptions) js.Promise[WebTransportSendStream]]) { 1574 bindings.FuncWebTransportCreateUnidirectionalStream( 1575 this.ref, js.Pointer(&fn), 1576 ) 1577 return 1578 } 1579 1580 // CreateUnidirectionalStream calls the method "WebTransport.createUnidirectionalStream". 1581 func (this WebTransport) CreateUnidirectionalStream(options WebTransportSendStreamOptions) (ret js.Promise[WebTransportSendStream]) { 1582 bindings.CallWebTransportCreateUnidirectionalStream( 1583 this.ref, js.Pointer(&ret), 1584 js.Pointer(&options), 1585 ) 1586 1587 return 1588 } 1589 1590 // TryCreateUnidirectionalStream calls the method "WebTransport.createUnidirectionalStream" 1591 // in a try/catch block and returns (_, err, ok = false) when it went through 1592 // the catch clause. 1593 func (this WebTransport) TryCreateUnidirectionalStream(options WebTransportSendStreamOptions) (ret js.Promise[WebTransportSendStream], exception js.Any, ok bool) { 1594 ok = js.True == bindings.TryWebTransportCreateUnidirectionalStream( 1595 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1596 js.Pointer(&options), 1597 ) 1598 1599 return 1600 } 1601 1602 // HasFuncCreateUnidirectionalStream1 returns true if the method "WebTransport.createUnidirectionalStream" exists. 1603 func (this WebTransport) HasFuncCreateUnidirectionalStream1() bool { 1604 return js.True == bindings.HasFuncWebTransportCreateUnidirectionalStream1( 1605 this.ref, 1606 ) 1607 } 1608 1609 // FuncCreateUnidirectionalStream1 returns the method "WebTransport.createUnidirectionalStream". 1610 func (this WebTransport) FuncCreateUnidirectionalStream1() (fn js.Func[func() js.Promise[WebTransportSendStream]]) { 1611 bindings.FuncWebTransportCreateUnidirectionalStream1( 1612 this.ref, js.Pointer(&fn), 1613 ) 1614 return 1615 } 1616 1617 // CreateUnidirectionalStream1 calls the method "WebTransport.createUnidirectionalStream". 1618 func (this WebTransport) CreateUnidirectionalStream1() (ret js.Promise[WebTransportSendStream]) { 1619 bindings.CallWebTransportCreateUnidirectionalStream1( 1620 this.ref, js.Pointer(&ret), 1621 ) 1622 1623 return 1624 } 1625 1626 // TryCreateUnidirectionalStream1 calls the method "WebTransport.createUnidirectionalStream" 1627 // in a try/catch block and returns (_, err, ok = false) when it went through 1628 // the catch clause. 1629 func (this WebTransport) TryCreateUnidirectionalStream1() (ret js.Promise[WebTransportSendStream], exception js.Any, ok bool) { 1630 ok = js.True == bindings.TryWebTransportCreateUnidirectionalStream1( 1631 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1632 ) 1633 1634 return 1635 } 1636 1637 type WebTransportErrorSource uint32 1638 1639 const ( 1640 _ WebTransportErrorSource = iota 1641 1642 WebTransportErrorSource_STREAM 1643 WebTransportErrorSource_SESSION 1644 ) 1645 1646 func (WebTransportErrorSource) FromRef(str js.Ref) WebTransportErrorSource { 1647 return WebTransportErrorSource(bindings.ConstOfWebTransportErrorSource(str)) 1648 } 1649 1650 func (x WebTransportErrorSource) String() (string, bool) { 1651 switch x { 1652 case WebTransportErrorSource_STREAM: 1653 return "stream", true 1654 case WebTransportErrorSource_SESSION: 1655 return "session", true 1656 default: 1657 return "", false 1658 } 1659 } 1660 1661 type WebTransportErrorOptions struct { 1662 // Source is "WebTransportErrorOptions.source" 1663 // 1664 // Optional, defaults to "stream". 1665 Source WebTransportErrorSource 1666 // StreamErrorCode is "WebTransportErrorOptions.streamErrorCode" 1667 // 1668 // Optional, defaults to null. 1669 // 1670 // NOTE: FFI_USE_StreamErrorCode MUST be set to true to make this field effective. 1671 StreamErrorCode uint32 1672 1673 FFI_USE_StreamErrorCode bool // for StreamErrorCode. 1674 1675 FFI_USE bool 1676 } 1677 1678 // FromRef calls UpdateFrom and returns a WebTransportErrorOptions with all fields set. 1679 func (p WebTransportErrorOptions) FromRef(ref js.Ref) WebTransportErrorOptions { 1680 p.UpdateFrom(ref) 1681 return p 1682 } 1683 1684 // New creates a new WebTransportErrorOptions in the application heap. 1685 func (p WebTransportErrorOptions) New() js.Ref { 1686 return bindings.WebTransportErrorOptionsJSLoad( 1687 js.Pointer(&p), js.True, 0, 1688 ) 1689 } 1690 1691 // UpdateFrom copies value of all fields of the heap object to p. 1692 func (p *WebTransportErrorOptions) UpdateFrom(ref js.Ref) { 1693 bindings.WebTransportErrorOptionsJSStore( 1694 js.Pointer(p), ref, 1695 ) 1696 } 1697 1698 // Update writes all fields of the p to the heap object referenced by ref. 1699 func (p *WebTransportErrorOptions) Update(ref js.Ref) { 1700 bindings.WebTransportErrorOptionsJSLoad( 1701 js.Pointer(p), js.False, ref, 1702 ) 1703 } 1704 1705 // FreeMembers frees fields with heap reference, if recursive is true 1706 // free all heap references reachable from p. 1707 func (p *WebTransportErrorOptions) FreeMembers(recursive bool) { 1708 } 1709 1710 func NewWebTransportError(message js.String, options WebTransportErrorOptions) (ret WebTransportError) { 1711 ret.ref = bindings.NewWebTransportErrorByWebTransportError( 1712 message.Ref(), 1713 js.Pointer(&options)) 1714 return 1715 } 1716 1717 func NewWebTransportErrorByWebTransportError1(message js.String) (ret WebTransportError) { 1718 ret.ref = bindings.NewWebTransportErrorByWebTransportError1( 1719 message.Ref()) 1720 return 1721 } 1722 1723 func NewWebTransportErrorByWebTransportError2() (ret WebTransportError) { 1724 ret.ref = bindings.NewWebTransportErrorByWebTransportError2() 1725 return 1726 } 1727 1728 type WebTransportError struct { 1729 DOMException 1730 } 1731 1732 func (this WebTransportError) Once() WebTransportError { 1733 this.ref.Once() 1734 return this 1735 } 1736 1737 func (this WebTransportError) Ref() js.Ref { 1738 return this.DOMException.Ref() 1739 } 1740 1741 func (this WebTransportError) FromRef(ref js.Ref) WebTransportError { 1742 this.DOMException = this.DOMException.FromRef(ref) 1743 return this 1744 } 1745 1746 func (this WebTransportError) Free() { 1747 this.ref.Free() 1748 } 1749 1750 // Source returns the value of property "WebTransportError.source". 1751 // 1752 // It returns ok=false if there is no such property. 1753 func (this WebTransportError) Source() (ret WebTransportErrorSource, ok bool) { 1754 ok = js.True == bindings.GetWebTransportErrorSource( 1755 this.ref, js.Pointer(&ret), 1756 ) 1757 return 1758 } 1759 1760 // StreamErrorCode returns the value of property "WebTransportError.streamErrorCode". 1761 // 1762 // It returns ok=false if there is no such property. 1763 func (this WebTransportError) StreamErrorCode() (ret uint32, ok bool) { 1764 ok = js.True == bindings.GetWebTransportErrorStreamErrorCode( 1765 this.ref, js.Pointer(&ret), 1766 ) 1767 return 1768 } 1769 1770 const ( 1771 WheelEvent_DOM_DELTA_PIXEL uint32 = 0x00 1772 WheelEvent_DOM_DELTA_LINE uint32 = 0x01 1773 WheelEvent_DOM_DELTA_PAGE uint32 = 0x02 1774 ) 1775 1776 type WheelEventInit struct { 1777 // DeltaX is "WheelEventInit.deltaX" 1778 // 1779 // Optional, defaults to 0.0. 1780 // 1781 // NOTE: FFI_USE_DeltaX MUST be set to true to make this field effective. 1782 DeltaX float64 1783 // DeltaY is "WheelEventInit.deltaY" 1784 // 1785 // Optional, defaults to 0.0. 1786 // 1787 // NOTE: FFI_USE_DeltaY MUST be set to true to make this field effective. 1788 DeltaY float64 1789 // DeltaZ is "WheelEventInit.deltaZ" 1790 // 1791 // Optional, defaults to 0.0. 1792 // 1793 // NOTE: FFI_USE_DeltaZ MUST be set to true to make this field effective. 1794 DeltaZ float64 1795 // DeltaMode is "WheelEventInit.deltaMode" 1796 // 1797 // Optional, defaults to 0. 1798 // 1799 // NOTE: FFI_USE_DeltaMode MUST be set to true to make this field effective. 1800 DeltaMode uint32 1801 // ScreenX is "WheelEventInit.screenX" 1802 // 1803 // Optional, defaults to 0. 1804 // 1805 // NOTE: FFI_USE_ScreenX MUST be set to true to make this field effective. 1806 ScreenX int32 1807 // ScreenY is "WheelEventInit.screenY" 1808 // 1809 // Optional, defaults to 0. 1810 // 1811 // NOTE: FFI_USE_ScreenY MUST be set to true to make this field effective. 1812 ScreenY int32 1813 // ClientX is "WheelEventInit.clientX" 1814 // 1815 // Optional, defaults to 0. 1816 // 1817 // NOTE: FFI_USE_ClientX MUST be set to true to make this field effective. 1818 ClientX int32 1819 // ClientY is "WheelEventInit.clientY" 1820 // 1821 // Optional, defaults to 0. 1822 // 1823 // NOTE: FFI_USE_ClientY MUST be set to true to make this field effective. 1824 ClientY int32 1825 // Button is "WheelEventInit.button" 1826 // 1827 // Optional, defaults to 0. 1828 // 1829 // NOTE: FFI_USE_Button MUST be set to true to make this field effective. 1830 Button int16 1831 // Buttons is "WheelEventInit.buttons" 1832 // 1833 // Optional, defaults to 0. 1834 // 1835 // NOTE: FFI_USE_Buttons MUST be set to true to make this field effective. 1836 Buttons uint16 1837 // RelatedTarget is "WheelEventInit.relatedTarget" 1838 // 1839 // Optional, defaults to null. 1840 RelatedTarget EventTarget 1841 // CtrlKey is "WheelEventInit.ctrlKey" 1842 // 1843 // Optional, defaults to false. 1844 // 1845 // NOTE: FFI_USE_CtrlKey MUST be set to true to make this field effective. 1846 CtrlKey bool 1847 // ShiftKey is "WheelEventInit.shiftKey" 1848 // 1849 // Optional, defaults to false. 1850 // 1851 // NOTE: FFI_USE_ShiftKey MUST be set to true to make this field effective. 1852 ShiftKey bool 1853 // AltKey is "WheelEventInit.altKey" 1854 // 1855 // Optional, defaults to false. 1856 // 1857 // NOTE: FFI_USE_AltKey MUST be set to true to make this field effective. 1858 AltKey bool 1859 // MetaKey is "WheelEventInit.metaKey" 1860 // 1861 // Optional, defaults to false. 1862 // 1863 // NOTE: FFI_USE_MetaKey MUST be set to true to make this field effective. 1864 MetaKey bool 1865 // ModifierAltGraph is "WheelEventInit.modifierAltGraph" 1866 // 1867 // Optional, defaults to false. 1868 // 1869 // NOTE: FFI_USE_ModifierAltGraph MUST be set to true to make this field effective. 1870 ModifierAltGraph bool 1871 // ModifierCapsLock is "WheelEventInit.modifierCapsLock" 1872 // 1873 // Optional, defaults to false. 1874 // 1875 // NOTE: FFI_USE_ModifierCapsLock MUST be set to true to make this field effective. 1876 ModifierCapsLock bool 1877 // ModifierFn is "WheelEventInit.modifierFn" 1878 // 1879 // Optional, defaults to false. 1880 // 1881 // NOTE: FFI_USE_ModifierFn MUST be set to true to make this field effective. 1882 ModifierFn bool 1883 // ModifierFnLock is "WheelEventInit.modifierFnLock" 1884 // 1885 // Optional, defaults to false. 1886 // 1887 // NOTE: FFI_USE_ModifierFnLock MUST be set to true to make this field effective. 1888 ModifierFnLock bool 1889 // ModifierHyper is "WheelEventInit.modifierHyper" 1890 // 1891 // Optional, defaults to false. 1892 // 1893 // NOTE: FFI_USE_ModifierHyper MUST be set to true to make this field effective. 1894 ModifierHyper bool 1895 // ModifierNumLock is "WheelEventInit.modifierNumLock" 1896 // 1897 // Optional, defaults to false. 1898 // 1899 // NOTE: FFI_USE_ModifierNumLock MUST be set to true to make this field effective. 1900 ModifierNumLock bool 1901 // ModifierScrollLock is "WheelEventInit.modifierScrollLock" 1902 // 1903 // Optional, defaults to false. 1904 // 1905 // NOTE: FFI_USE_ModifierScrollLock MUST be set to true to make this field effective. 1906 ModifierScrollLock bool 1907 // ModifierSuper is "WheelEventInit.modifierSuper" 1908 // 1909 // Optional, defaults to false. 1910 // 1911 // NOTE: FFI_USE_ModifierSuper MUST be set to true to make this field effective. 1912 ModifierSuper bool 1913 // ModifierSymbol is "WheelEventInit.modifierSymbol" 1914 // 1915 // Optional, defaults to false. 1916 // 1917 // NOTE: FFI_USE_ModifierSymbol MUST be set to true to make this field effective. 1918 ModifierSymbol bool 1919 // ModifierSymbolLock is "WheelEventInit.modifierSymbolLock" 1920 // 1921 // Optional, defaults to false. 1922 // 1923 // NOTE: FFI_USE_ModifierSymbolLock MUST be set to true to make this field effective. 1924 ModifierSymbolLock bool 1925 // View is "WheelEventInit.view" 1926 // 1927 // Optional, defaults to null. 1928 View Window 1929 // Detail is "WheelEventInit.detail" 1930 // 1931 // Optional, defaults to 0. 1932 // 1933 // NOTE: FFI_USE_Detail MUST be set to true to make this field effective. 1934 Detail int32 1935 // Bubbles is "WheelEventInit.bubbles" 1936 // 1937 // Optional, defaults to false. 1938 // 1939 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 1940 Bubbles bool 1941 // Cancelable is "WheelEventInit.cancelable" 1942 // 1943 // Optional, defaults to false. 1944 // 1945 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 1946 Cancelable bool 1947 // Composed is "WheelEventInit.composed" 1948 // 1949 // Optional, defaults to false. 1950 // 1951 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 1952 Composed bool 1953 1954 FFI_USE_DeltaX bool // for DeltaX. 1955 FFI_USE_DeltaY bool // for DeltaY. 1956 FFI_USE_DeltaZ bool // for DeltaZ. 1957 FFI_USE_DeltaMode bool // for DeltaMode. 1958 FFI_USE_ScreenX bool // for ScreenX. 1959 FFI_USE_ScreenY bool // for ScreenY. 1960 FFI_USE_ClientX bool // for ClientX. 1961 FFI_USE_ClientY bool // for ClientY. 1962 FFI_USE_Button bool // for Button. 1963 FFI_USE_Buttons bool // for Buttons. 1964 FFI_USE_CtrlKey bool // for CtrlKey. 1965 FFI_USE_ShiftKey bool // for ShiftKey. 1966 FFI_USE_AltKey bool // for AltKey. 1967 FFI_USE_MetaKey bool // for MetaKey. 1968 FFI_USE_ModifierAltGraph bool // for ModifierAltGraph. 1969 FFI_USE_ModifierCapsLock bool // for ModifierCapsLock. 1970 FFI_USE_ModifierFn bool // for ModifierFn. 1971 FFI_USE_ModifierFnLock bool // for ModifierFnLock. 1972 FFI_USE_ModifierHyper bool // for ModifierHyper. 1973 FFI_USE_ModifierNumLock bool // for ModifierNumLock. 1974 FFI_USE_ModifierScrollLock bool // for ModifierScrollLock. 1975 FFI_USE_ModifierSuper bool // for ModifierSuper. 1976 FFI_USE_ModifierSymbol bool // for ModifierSymbol. 1977 FFI_USE_ModifierSymbolLock bool // for ModifierSymbolLock. 1978 FFI_USE_Detail bool // for Detail. 1979 FFI_USE_Bubbles bool // for Bubbles. 1980 FFI_USE_Cancelable bool // for Cancelable. 1981 FFI_USE_Composed bool // for Composed. 1982 1983 FFI_USE bool 1984 } 1985 1986 // FromRef calls UpdateFrom and returns a WheelEventInit with all fields set. 1987 func (p WheelEventInit) FromRef(ref js.Ref) WheelEventInit { 1988 p.UpdateFrom(ref) 1989 return p 1990 } 1991 1992 // New creates a new WheelEventInit in the application heap. 1993 func (p WheelEventInit) New() js.Ref { 1994 return bindings.WheelEventInitJSLoad( 1995 js.Pointer(&p), js.True, 0, 1996 ) 1997 } 1998 1999 // UpdateFrom copies value of all fields of the heap object to p. 2000 func (p *WheelEventInit) UpdateFrom(ref js.Ref) { 2001 bindings.WheelEventInitJSStore( 2002 js.Pointer(p), ref, 2003 ) 2004 } 2005 2006 // Update writes all fields of the p to the heap object referenced by ref. 2007 func (p *WheelEventInit) Update(ref js.Ref) { 2008 bindings.WheelEventInitJSLoad( 2009 js.Pointer(p), js.False, ref, 2010 ) 2011 } 2012 2013 // FreeMembers frees fields with heap reference, if recursive is true 2014 // free all heap references reachable from p. 2015 func (p *WheelEventInit) FreeMembers(recursive bool) { 2016 js.Free( 2017 p.RelatedTarget.Ref(), 2018 p.View.Ref(), 2019 ) 2020 p.RelatedTarget = p.RelatedTarget.FromRef(js.Undefined) 2021 p.View = p.View.FromRef(js.Undefined) 2022 } 2023 2024 func NewWheelEvent(typ js.String, eventInitDict WheelEventInit) (ret WheelEvent) { 2025 ret.ref = bindings.NewWheelEventByWheelEvent( 2026 typ.Ref(), 2027 js.Pointer(&eventInitDict)) 2028 return 2029 } 2030 2031 func NewWheelEventByWheelEvent1(typ js.String) (ret WheelEvent) { 2032 ret.ref = bindings.NewWheelEventByWheelEvent1( 2033 typ.Ref()) 2034 return 2035 } 2036 2037 type WheelEvent struct { 2038 MouseEvent 2039 } 2040 2041 func (this WheelEvent) Once() WheelEvent { 2042 this.ref.Once() 2043 return this 2044 } 2045 2046 func (this WheelEvent) Ref() js.Ref { 2047 return this.MouseEvent.Ref() 2048 } 2049 2050 func (this WheelEvent) FromRef(ref js.Ref) WheelEvent { 2051 this.MouseEvent = this.MouseEvent.FromRef(ref) 2052 return this 2053 } 2054 2055 func (this WheelEvent) Free() { 2056 this.ref.Free() 2057 } 2058 2059 // DeltaX returns the value of property "WheelEvent.deltaX". 2060 // 2061 // It returns ok=false if there is no such property. 2062 func (this WheelEvent) DeltaX() (ret float64, ok bool) { 2063 ok = js.True == bindings.GetWheelEventDeltaX( 2064 this.ref, js.Pointer(&ret), 2065 ) 2066 return 2067 } 2068 2069 // DeltaY returns the value of property "WheelEvent.deltaY". 2070 // 2071 // It returns ok=false if there is no such property. 2072 func (this WheelEvent) DeltaY() (ret float64, ok bool) { 2073 ok = js.True == bindings.GetWheelEventDeltaY( 2074 this.ref, js.Pointer(&ret), 2075 ) 2076 return 2077 } 2078 2079 // DeltaZ returns the value of property "WheelEvent.deltaZ". 2080 // 2081 // It returns ok=false if there is no such property. 2082 func (this WheelEvent) DeltaZ() (ret float64, ok bool) { 2083 ok = js.True == bindings.GetWheelEventDeltaZ( 2084 this.ref, js.Pointer(&ret), 2085 ) 2086 return 2087 } 2088 2089 // DeltaMode returns the value of property "WheelEvent.deltaMode". 2090 // 2091 // It returns ok=false if there is no such property. 2092 func (this WheelEvent) DeltaMode() (ret uint32, ok bool) { 2093 ok = js.True == bindings.GetWheelEventDeltaMode( 2094 this.ref, js.Pointer(&ret), 2095 ) 2096 return 2097 } 2098 2099 type WindowControlsOverlayGeometryChangeEventInit struct { 2100 // TitlebarAreaRect is "WindowControlsOverlayGeometryChangeEventInit.titlebarAreaRect" 2101 // 2102 // Required 2103 TitlebarAreaRect DOMRect 2104 // Visible is "WindowControlsOverlayGeometryChangeEventInit.visible" 2105 // 2106 // Optional, defaults to false. 2107 // 2108 // NOTE: FFI_USE_Visible MUST be set to true to make this field effective. 2109 Visible bool 2110 // Bubbles is "WindowControlsOverlayGeometryChangeEventInit.bubbles" 2111 // 2112 // Optional, defaults to false. 2113 // 2114 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2115 Bubbles bool 2116 // Cancelable is "WindowControlsOverlayGeometryChangeEventInit.cancelable" 2117 // 2118 // Optional, defaults to false. 2119 // 2120 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2121 Cancelable bool 2122 // Composed is "WindowControlsOverlayGeometryChangeEventInit.composed" 2123 // 2124 // Optional, defaults to false. 2125 // 2126 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2127 Composed bool 2128 2129 FFI_USE_Visible bool // for Visible. 2130 FFI_USE_Bubbles bool // for Bubbles. 2131 FFI_USE_Cancelable bool // for Cancelable. 2132 FFI_USE_Composed bool // for Composed. 2133 2134 FFI_USE bool 2135 } 2136 2137 // FromRef calls UpdateFrom and returns a WindowControlsOverlayGeometryChangeEventInit with all fields set. 2138 func (p WindowControlsOverlayGeometryChangeEventInit) FromRef(ref js.Ref) WindowControlsOverlayGeometryChangeEventInit { 2139 p.UpdateFrom(ref) 2140 return p 2141 } 2142 2143 // New creates a new WindowControlsOverlayGeometryChangeEventInit in the application heap. 2144 func (p WindowControlsOverlayGeometryChangeEventInit) New() js.Ref { 2145 return bindings.WindowControlsOverlayGeometryChangeEventInitJSLoad( 2146 js.Pointer(&p), js.True, 0, 2147 ) 2148 } 2149 2150 // UpdateFrom copies value of all fields of the heap object to p. 2151 func (p *WindowControlsOverlayGeometryChangeEventInit) UpdateFrom(ref js.Ref) { 2152 bindings.WindowControlsOverlayGeometryChangeEventInitJSStore( 2153 js.Pointer(p), ref, 2154 ) 2155 } 2156 2157 // Update writes all fields of the p to the heap object referenced by ref. 2158 func (p *WindowControlsOverlayGeometryChangeEventInit) Update(ref js.Ref) { 2159 bindings.WindowControlsOverlayGeometryChangeEventInitJSLoad( 2160 js.Pointer(p), js.False, ref, 2161 ) 2162 } 2163 2164 // FreeMembers frees fields with heap reference, if recursive is true 2165 // free all heap references reachable from p. 2166 func (p *WindowControlsOverlayGeometryChangeEventInit) FreeMembers(recursive bool) { 2167 js.Free( 2168 p.TitlebarAreaRect.Ref(), 2169 ) 2170 p.TitlebarAreaRect = p.TitlebarAreaRect.FromRef(js.Undefined) 2171 } 2172 2173 func NewWindowControlsOverlayGeometryChangeEvent(typ js.String, eventInitDict WindowControlsOverlayGeometryChangeEventInit) (ret WindowControlsOverlayGeometryChangeEvent) { 2174 ret.ref = bindings.NewWindowControlsOverlayGeometryChangeEventByWindowControlsOverlayGeometryChangeEvent( 2175 typ.Ref(), 2176 js.Pointer(&eventInitDict)) 2177 return 2178 } 2179 2180 type WindowControlsOverlayGeometryChangeEvent struct { 2181 Event 2182 } 2183 2184 func (this WindowControlsOverlayGeometryChangeEvent) Once() WindowControlsOverlayGeometryChangeEvent { 2185 this.ref.Once() 2186 return this 2187 } 2188 2189 func (this WindowControlsOverlayGeometryChangeEvent) Ref() js.Ref { 2190 return this.Event.Ref() 2191 } 2192 2193 func (this WindowControlsOverlayGeometryChangeEvent) FromRef(ref js.Ref) WindowControlsOverlayGeometryChangeEvent { 2194 this.Event = this.Event.FromRef(ref) 2195 return this 2196 } 2197 2198 func (this WindowControlsOverlayGeometryChangeEvent) Free() { 2199 this.ref.Free() 2200 } 2201 2202 // TitlebarAreaRect returns the value of property "WindowControlsOverlayGeometryChangeEvent.titlebarAreaRect". 2203 // 2204 // It returns ok=false if there is no such property. 2205 func (this WindowControlsOverlayGeometryChangeEvent) TitlebarAreaRect() (ret DOMRect, ok bool) { 2206 ok = js.True == bindings.GetWindowControlsOverlayGeometryChangeEventTitlebarAreaRect( 2207 this.ref, js.Pointer(&ret), 2208 ) 2209 return 2210 } 2211 2212 // Visible returns the value of property "WindowControlsOverlayGeometryChangeEvent.visible". 2213 // 2214 // It returns ok=false if there is no such property. 2215 func (this WindowControlsOverlayGeometryChangeEvent) Visible() (ret bool, ok bool) { 2216 ok = js.True == bindings.GetWindowControlsOverlayGeometryChangeEventVisible( 2217 this.ref, js.Pointer(&ret), 2218 ) 2219 return 2220 } 2221 2222 type WorkerLocation struct { 2223 ref js.Ref 2224 } 2225 2226 func (this WorkerLocation) Once() WorkerLocation { 2227 this.ref.Once() 2228 return this 2229 } 2230 2231 func (this WorkerLocation) Ref() js.Ref { 2232 return this.ref 2233 } 2234 2235 func (this WorkerLocation) FromRef(ref js.Ref) WorkerLocation { 2236 this.ref = ref 2237 return this 2238 } 2239 2240 func (this WorkerLocation) Free() { 2241 this.ref.Free() 2242 } 2243 2244 // Href returns the value of property "WorkerLocation.href". 2245 // 2246 // It returns ok=false if there is no such property. 2247 func (this WorkerLocation) Href() (ret js.String, ok bool) { 2248 ok = js.True == bindings.GetWorkerLocationHref( 2249 this.ref, js.Pointer(&ret), 2250 ) 2251 return 2252 } 2253 2254 // Origin returns the value of property "WorkerLocation.origin". 2255 // 2256 // It returns ok=false if there is no such property. 2257 func (this WorkerLocation) Origin() (ret js.String, ok bool) { 2258 ok = js.True == bindings.GetWorkerLocationOrigin( 2259 this.ref, js.Pointer(&ret), 2260 ) 2261 return 2262 } 2263 2264 // Protocol returns the value of property "WorkerLocation.protocol". 2265 // 2266 // It returns ok=false if there is no such property. 2267 func (this WorkerLocation) Protocol() (ret js.String, ok bool) { 2268 ok = js.True == bindings.GetWorkerLocationProtocol( 2269 this.ref, js.Pointer(&ret), 2270 ) 2271 return 2272 } 2273 2274 // Host returns the value of property "WorkerLocation.host". 2275 // 2276 // It returns ok=false if there is no such property. 2277 func (this WorkerLocation) Host() (ret js.String, ok bool) { 2278 ok = js.True == bindings.GetWorkerLocationHost( 2279 this.ref, js.Pointer(&ret), 2280 ) 2281 return 2282 } 2283 2284 // Hostname returns the value of property "WorkerLocation.hostname". 2285 // 2286 // It returns ok=false if there is no such property. 2287 func (this WorkerLocation) Hostname() (ret js.String, ok bool) { 2288 ok = js.True == bindings.GetWorkerLocationHostname( 2289 this.ref, js.Pointer(&ret), 2290 ) 2291 return 2292 } 2293 2294 // Port returns the value of property "WorkerLocation.port". 2295 // 2296 // It returns ok=false if there is no such property. 2297 func (this WorkerLocation) Port() (ret js.String, ok bool) { 2298 ok = js.True == bindings.GetWorkerLocationPort( 2299 this.ref, js.Pointer(&ret), 2300 ) 2301 return 2302 } 2303 2304 // Pathname returns the value of property "WorkerLocation.pathname". 2305 // 2306 // It returns ok=false if there is no such property. 2307 func (this WorkerLocation) Pathname() (ret js.String, ok bool) { 2308 ok = js.True == bindings.GetWorkerLocationPathname( 2309 this.ref, js.Pointer(&ret), 2310 ) 2311 return 2312 } 2313 2314 // Search returns the value of property "WorkerLocation.search". 2315 // 2316 // It returns ok=false if there is no such property. 2317 func (this WorkerLocation) Search() (ret js.String, ok bool) { 2318 ok = js.True == bindings.GetWorkerLocationSearch( 2319 this.ref, js.Pointer(&ret), 2320 ) 2321 return 2322 } 2323 2324 // Hash returns the value of property "WorkerLocation.hash". 2325 // 2326 // It returns ok=false if there is no such property. 2327 func (this WorkerLocation) Hash() (ret js.String, ok bool) { 2328 ok = js.True == bindings.GetWorkerLocationHash( 2329 this.ref, js.Pointer(&ret), 2330 ) 2331 return 2332 } 2333 2334 type WorkerNavigator struct { 2335 ref js.Ref 2336 } 2337 2338 func (this WorkerNavigator) Once() WorkerNavigator { 2339 this.ref.Once() 2340 return this 2341 } 2342 2343 func (this WorkerNavigator) Ref() js.Ref { 2344 return this.ref 2345 } 2346 2347 func (this WorkerNavigator) FromRef(ref js.Ref) WorkerNavigator { 2348 this.ref = ref 2349 return this 2350 } 2351 2352 func (this WorkerNavigator) Free() { 2353 this.ref.Free() 2354 } 2355 2356 // Hid returns the value of property "WorkerNavigator.hid". 2357 // 2358 // It returns ok=false if there is no such property. 2359 func (this WorkerNavigator) Hid() (ret HID, ok bool) { 2360 ok = js.True == bindings.GetWorkerNavigatorHid( 2361 this.ref, js.Pointer(&ret), 2362 ) 2363 return 2364 } 2365 2366 // Serial returns the value of property "WorkerNavigator.serial". 2367 // 2368 // It returns ok=false if there is no such property. 2369 func (this WorkerNavigator) Serial() (ret Serial, ok bool) { 2370 ok = js.True == bindings.GetWorkerNavigatorSerial( 2371 this.ref, js.Pointer(&ret), 2372 ) 2373 return 2374 } 2375 2376 // Permissions returns the value of property "WorkerNavigator.permissions". 2377 // 2378 // It returns ok=false if there is no such property. 2379 func (this WorkerNavigator) Permissions() (ret Permissions, ok bool) { 2380 ok = js.True == bindings.GetWorkerNavigatorPermissions( 2381 this.ref, js.Pointer(&ret), 2382 ) 2383 return 2384 } 2385 2386 // Usb returns the value of property "WorkerNavigator.usb". 2387 // 2388 // It returns ok=false if there is no such property. 2389 func (this WorkerNavigator) Usb() (ret USB, ok bool) { 2390 ok = js.True == bindings.GetWorkerNavigatorUsb( 2391 this.ref, js.Pointer(&ret), 2392 ) 2393 return 2394 } 2395 2396 // MediaCapabilities returns the value of property "WorkerNavigator.mediaCapabilities". 2397 // 2398 // It returns ok=false if there is no such property. 2399 func (this WorkerNavigator) MediaCapabilities() (ret MediaCapabilities, ok bool) { 2400 ok = js.True == bindings.GetWorkerNavigatorMediaCapabilities( 2401 this.ref, js.Pointer(&ret), 2402 ) 2403 return 2404 } 2405 2406 // ServiceWorker returns the value of property "WorkerNavigator.serviceWorker". 2407 // 2408 // It returns ok=false if there is no such property. 2409 func (this WorkerNavigator) ServiceWorker() (ret ServiceWorkerContainer, ok bool) { 2410 ok = js.True == bindings.GetWorkerNavigatorServiceWorker( 2411 this.ref, js.Pointer(&ret), 2412 ) 2413 return 2414 } 2415 2416 // UserAgentData returns the value of property "WorkerNavigator.userAgentData". 2417 // 2418 // It returns ok=false if there is no such property. 2419 func (this WorkerNavigator) UserAgentData() (ret NavigatorUAData, ok bool) { 2420 ok = js.True == bindings.GetWorkerNavigatorUserAgentData( 2421 this.ref, js.Pointer(&ret), 2422 ) 2423 return 2424 } 2425 2426 // DeviceMemory returns the value of property "WorkerNavigator.deviceMemory". 2427 // 2428 // It returns ok=false if there is no such property. 2429 func (this WorkerNavigator) DeviceMemory() (ret float64, ok bool) { 2430 ok = js.True == bindings.GetWorkerNavigatorDeviceMemory( 2431 this.ref, js.Pointer(&ret), 2432 ) 2433 return 2434 } 2435 2436 // Storage returns the value of property "WorkerNavigator.storage". 2437 // 2438 // It returns ok=false if there is no such property. 2439 func (this WorkerNavigator) Storage() (ret StorageManager, ok bool) { 2440 ok = js.True == bindings.GetWorkerNavigatorStorage( 2441 this.ref, js.Pointer(&ret), 2442 ) 2443 return 2444 } 2445 2446 // StorageBuckets returns the value of property "WorkerNavigator.storageBuckets". 2447 // 2448 // It returns ok=false if there is no such property. 2449 func (this WorkerNavigator) StorageBuckets() (ret StorageBucketManager, ok bool) { 2450 ok = js.True == bindings.GetWorkerNavigatorStorageBuckets( 2451 this.ref, js.Pointer(&ret), 2452 ) 2453 return 2454 } 2455 2456 // Locks returns the value of property "WorkerNavigator.locks". 2457 // 2458 // It returns ok=false if there is no such property. 2459 func (this WorkerNavigator) Locks() (ret LockManager, ok bool) { 2460 ok = js.True == bindings.GetWorkerNavigatorLocks( 2461 this.ref, js.Pointer(&ret), 2462 ) 2463 return 2464 } 2465 2466 // AppCodeName returns the value of property "WorkerNavigator.appCodeName". 2467 // 2468 // It returns ok=false if there is no such property. 2469 func (this WorkerNavigator) AppCodeName() (ret js.String, ok bool) { 2470 ok = js.True == bindings.GetWorkerNavigatorAppCodeName( 2471 this.ref, js.Pointer(&ret), 2472 ) 2473 return 2474 } 2475 2476 // AppName returns the value of property "WorkerNavigator.appName". 2477 // 2478 // It returns ok=false if there is no such property. 2479 func (this WorkerNavigator) AppName() (ret js.String, ok bool) { 2480 ok = js.True == bindings.GetWorkerNavigatorAppName( 2481 this.ref, js.Pointer(&ret), 2482 ) 2483 return 2484 } 2485 2486 // AppVersion returns the value of property "WorkerNavigator.appVersion". 2487 // 2488 // It returns ok=false if there is no such property. 2489 func (this WorkerNavigator) AppVersion() (ret js.String, ok bool) { 2490 ok = js.True == bindings.GetWorkerNavigatorAppVersion( 2491 this.ref, js.Pointer(&ret), 2492 ) 2493 return 2494 } 2495 2496 // Platform returns the value of property "WorkerNavigator.platform". 2497 // 2498 // It returns ok=false if there is no such property. 2499 func (this WorkerNavigator) Platform() (ret js.String, ok bool) { 2500 ok = js.True == bindings.GetWorkerNavigatorPlatform( 2501 this.ref, js.Pointer(&ret), 2502 ) 2503 return 2504 } 2505 2506 // Product returns the value of property "WorkerNavigator.product". 2507 // 2508 // It returns ok=false if there is no such property. 2509 func (this WorkerNavigator) Product() (ret js.String, ok bool) { 2510 ok = js.True == bindings.GetWorkerNavigatorProduct( 2511 this.ref, js.Pointer(&ret), 2512 ) 2513 return 2514 } 2515 2516 // ProductSub returns the value of property "WorkerNavigator.productSub". 2517 // 2518 // It returns ok=false if there is no such property. 2519 func (this WorkerNavigator) ProductSub() (ret js.String, ok bool) { 2520 ok = js.True == bindings.GetWorkerNavigatorProductSub( 2521 this.ref, js.Pointer(&ret), 2522 ) 2523 return 2524 } 2525 2526 // UserAgent returns the value of property "WorkerNavigator.userAgent". 2527 // 2528 // It returns ok=false if there is no such property. 2529 func (this WorkerNavigator) UserAgent() (ret js.String, ok bool) { 2530 ok = js.True == bindings.GetWorkerNavigatorUserAgent( 2531 this.ref, js.Pointer(&ret), 2532 ) 2533 return 2534 } 2535 2536 // Vendor returns the value of property "WorkerNavigator.vendor". 2537 // 2538 // It returns ok=false if there is no such property. 2539 func (this WorkerNavigator) Vendor() (ret js.String, ok bool) { 2540 ok = js.True == bindings.GetWorkerNavigatorVendor( 2541 this.ref, js.Pointer(&ret), 2542 ) 2543 return 2544 } 2545 2546 // VendorSub returns the value of property "WorkerNavigator.vendorSub". 2547 // 2548 // It returns ok=false if there is no such property. 2549 func (this WorkerNavigator) VendorSub() (ret js.String, ok bool) { 2550 ok = js.True == bindings.GetWorkerNavigatorVendorSub( 2551 this.ref, js.Pointer(&ret), 2552 ) 2553 return 2554 } 2555 2556 // Oscpu returns the value of property "WorkerNavigator.oscpu". 2557 // 2558 // It returns ok=false if there is no such property. 2559 func (this WorkerNavigator) Oscpu() (ret js.String, ok bool) { 2560 ok = js.True == bindings.GetWorkerNavigatorOscpu( 2561 this.ref, js.Pointer(&ret), 2562 ) 2563 return 2564 } 2565 2566 // Language returns the value of property "WorkerNavigator.language". 2567 // 2568 // It returns ok=false if there is no such property. 2569 func (this WorkerNavigator) Language() (ret js.String, ok bool) { 2570 ok = js.True == bindings.GetWorkerNavigatorLanguage( 2571 this.ref, js.Pointer(&ret), 2572 ) 2573 return 2574 } 2575 2576 // Languages returns the value of property "WorkerNavigator.languages". 2577 // 2578 // It returns ok=false if there is no such property. 2579 func (this WorkerNavigator) Languages() (ret js.FrozenArray[js.String], ok bool) { 2580 ok = js.True == bindings.GetWorkerNavigatorLanguages( 2581 this.ref, js.Pointer(&ret), 2582 ) 2583 return 2584 } 2585 2586 // OnLine returns the value of property "WorkerNavigator.onLine". 2587 // 2588 // It returns ok=false if there is no such property. 2589 func (this WorkerNavigator) OnLine() (ret bool, ok bool) { 2590 ok = js.True == bindings.GetWorkerNavigatorOnLine( 2591 this.ref, js.Pointer(&ret), 2592 ) 2593 return 2594 } 2595 2596 // HardwareConcurrency returns the value of property "WorkerNavigator.hardwareConcurrency". 2597 // 2598 // It returns ok=false if there is no such property. 2599 func (this WorkerNavigator) HardwareConcurrency() (ret uint64, ok bool) { 2600 ok = js.True == bindings.GetWorkerNavigatorHardwareConcurrency( 2601 this.ref, js.Pointer(&ret), 2602 ) 2603 return 2604 } 2605 2606 // Connection returns the value of property "WorkerNavigator.connection". 2607 // 2608 // It returns ok=false if there is no such property. 2609 func (this WorkerNavigator) Connection() (ret NetworkInformation, ok bool) { 2610 ok = js.True == bindings.GetWorkerNavigatorConnection( 2611 this.ref, js.Pointer(&ret), 2612 ) 2613 return 2614 } 2615 2616 // Ml returns the value of property "WorkerNavigator.ml". 2617 // 2618 // It returns ok=false if there is no such property. 2619 func (this WorkerNavigator) Ml() (ret ML, ok bool) { 2620 ok = js.True == bindings.GetWorkerNavigatorMl( 2621 this.ref, js.Pointer(&ret), 2622 ) 2623 return 2624 } 2625 2626 // Gpu returns the value of property "WorkerNavigator.gpu". 2627 // 2628 // It returns ok=false if there is no such property. 2629 func (this WorkerNavigator) Gpu() (ret GPU, ok bool) { 2630 ok = js.True == bindings.GetWorkerNavigatorGpu( 2631 this.ref, js.Pointer(&ret), 2632 ) 2633 return 2634 } 2635 2636 // HasFuncTaintEnabled returns true if the method "WorkerNavigator.taintEnabled" exists. 2637 func (this WorkerNavigator) HasFuncTaintEnabled() bool { 2638 return js.True == bindings.HasFuncWorkerNavigatorTaintEnabled( 2639 this.ref, 2640 ) 2641 } 2642 2643 // FuncTaintEnabled returns the method "WorkerNavigator.taintEnabled". 2644 func (this WorkerNavigator) FuncTaintEnabled() (fn js.Func[func() bool]) { 2645 bindings.FuncWorkerNavigatorTaintEnabled( 2646 this.ref, js.Pointer(&fn), 2647 ) 2648 return 2649 } 2650 2651 // TaintEnabled calls the method "WorkerNavigator.taintEnabled". 2652 func (this WorkerNavigator) TaintEnabled() (ret bool) { 2653 bindings.CallWorkerNavigatorTaintEnabled( 2654 this.ref, js.Pointer(&ret), 2655 ) 2656 2657 return 2658 } 2659 2660 // TryTaintEnabled calls the method "WorkerNavigator.taintEnabled" 2661 // in a try/catch block and returns (_, err, ok = false) when it went through 2662 // the catch clause. 2663 func (this WorkerNavigator) TryTaintEnabled() (ret bool, exception js.Any, ok bool) { 2664 ok = js.True == bindings.TryWorkerNavigatorTaintEnabled( 2665 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2666 ) 2667 2668 return 2669 } 2670 2671 // HasFuncSetAppBadge returns true if the method "WorkerNavigator.setAppBadge" exists. 2672 func (this WorkerNavigator) HasFuncSetAppBadge() bool { 2673 return js.True == bindings.HasFuncWorkerNavigatorSetAppBadge( 2674 this.ref, 2675 ) 2676 } 2677 2678 // FuncSetAppBadge returns the method "WorkerNavigator.setAppBadge". 2679 func (this WorkerNavigator) FuncSetAppBadge() (fn js.Func[func(contents uint64) js.Promise[js.Void]]) { 2680 bindings.FuncWorkerNavigatorSetAppBadge( 2681 this.ref, js.Pointer(&fn), 2682 ) 2683 return 2684 } 2685 2686 // SetAppBadge calls the method "WorkerNavigator.setAppBadge". 2687 func (this WorkerNavigator) SetAppBadge(contents uint64) (ret js.Promise[js.Void]) { 2688 bindings.CallWorkerNavigatorSetAppBadge( 2689 this.ref, js.Pointer(&ret), 2690 float64(contents), 2691 ) 2692 2693 return 2694 } 2695 2696 // TrySetAppBadge calls the method "WorkerNavigator.setAppBadge" 2697 // in a try/catch block and returns (_, err, ok = false) when it went through 2698 // the catch clause. 2699 func (this WorkerNavigator) TrySetAppBadge(contents uint64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2700 ok = js.True == bindings.TryWorkerNavigatorSetAppBadge( 2701 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2702 float64(contents), 2703 ) 2704 2705 return 2706 } 2707 2708 // HasFuncSetAppBadge1 returns true if the method "WorkerNavigator.setAppBadge" exists. 2709 func (this WorkerNavigator) HasFuncSetAppBadge1() bool { 2710 return js.True == bindings.HasFuncWorkerNavigatorSetAppBadge1( 2711 this.ref, 2712 ) 2713 } 2714 2715 // FuncSetAppBadge1 returns the method "WorkerNavigator.setAppBadge". 2716 func (this WorkerNavigator) FuncSetAppBadge1() (fn js.Func[func() js.Promise[js.Void]]) { 2717 bindings.FuncWorkerNavigatorSetAppBadge1( 2718 this.ref, js.Pointer(&fn), 2719 ) 2720 return 2721 } 2722 2723 // SetAppBadge1 calls the method "WorkerNavigator.setAppBadge". 2724 func (this WorkerNavigator) SetAppBadge1() (ret js.Promise[js.Void]) { 2725 bindings.CallWorkerNavigatorSetAppBadge1( 2726 this.ref, js.Pointer(&ret), 2727 ) 2728 2729 return 2730 } 2731 2732 // TrySetAppBadge1 calls the method "WorkerNavigator.setAppBadge" 2733 // in a try/catch block and returns (_, err, ok = false) when it went through 2734 // the catch clause. 2735 func (this WorkerNavigator) TrySetAppBadge1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 2736 ok = js.True == bindings.TryWorkerNavigatorSetAppBadge1( 2737 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2738 ) 2739 2740 return 2741 } 2742 2743 // HasFuncClearAppBadge returns true if the method "WorkerNavigator.clearAppBadge" exists. 2744 func (this WorkerNavigator) HasFuncClearAppBadge() bool { 2745 return js.True == bindings.HasFuncWorkerNavigatorClearAppBadge( 2746 this.ref, 2747 ) 2748 } 2749 2750 // FuncClearAppBadge returns the method "WorkerNavigator.clearAppBadge". 2751 func (this WorkerNavigator) FuncClearAppBadge() (fn js.Func[func() js.Promise[js.Void]]) { 2752 bindings.FuncWorkerNavigatorClearAppBadge( 2753 this.ref, js.Pointer(&fn), 2754 ) 2755 return 2756 } 2757 2758 // ClearAppBadge calls the method "WorkerNavigator.clearAppBadge". 2759 func (this WorkerNavigator) ClearAppBadge() (ret js.Promise[js.Void]) { 2760 bindings.CallWorkerNavigatorClearAppBadge( 2761 this.ref, js.Pointer(&ret), 2762 ) 2763 2764 return 2765 } 2766 2767 // TryClearAppBadge calls the method "WorkerNavigator.clearAppBadge" 2768 // in a try/catch block and returns (_, err, ok = false) when it went through 2769 // the catch clause. 2770 func (this WorkerNavigator) TryClearAppBadge() (ret js.Promise[js.Void], exception js.Any, ok bool) { 2771 ok = js.True == bindings.TryWorkerNavigatorClearAppBadge( 2772 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2773 ) 2774 2775 return 2776 } 2777 2778 type WorkerGlobalScope struct { 2779 EventTarget 2780 } 2781 2782 func (this WorkerGlobalScope) Once() WorkerGlobalScope { 2783 this.ref.Once() 2784 return this 2785 } 2786 2787 func (this WorkerGlobalScope) Ref() js.Ref { 2788 return this.EventTarget.Ref() 2789 } 2790 2791 func (this WorkerGlobalScope) FromRef(ref js.Ref) WorkerGlobalScope { 2792 this.EventTarget = this.EventTarget.FromRef(ref) 2793 return this 2794 } 2795 2796 func (this WorkerGlobalScope) Free() { 2797 this.ref.Free() 2798 } 2799 2800 // Self returns the value of property "WorkerGlobalScope.self". 2801 // 2802 // It returns ok=false if there is no such property. 2803 func (this WorkerGlobalScope) Self() (ret WorkerGlobalScope, ok bool) { 2804 ok = js.True == bindings.GetWorkerGlobalScopeSelf( 2805 this.ref, js.Pointer(&ret), 2806 ) 2807 return 2808 } 2809 2810 // Location returns the value of property "WorkerGlobalScope.location". 2811 // 2812 // It returns ok=false if there is no such property. 2813 func (this WorkerGlobalScope) Location() (ret WorkerLocation, ok bool) { 2814 ok = js.True == bindings.GetWorkerGlobalScopeLocation( 2815 this.ref, js.Pointer(&ret), 2816 ) 2817 return 2818 } 2819 2820 // Navigator returns the value of property "WorkerGlobalScope.navigator". 2821 // 2822 // It returns ok=false if there is no such property. 2823 func (this WorkerGlobalScope) Navigator() (ret WorkerNavigator, ok bool) { 2824 ok = js.True == bindings.GetWorkerGlobalScopeNavigator( 2825 this.ref, js.Pointer(&ret), 2826 ) 2827 return 2828 } 2829 2830 // Fonts returns the value of property "WorkerGlobalScope.fonts". 2831 // 2832 // It returns ok=false if there is no such property. 2833 func (this WorkerGlobalScope) Fonts() (ret FontFaceSet, ok bool) { 2834 ok = js.True == bindings.GetWorkerGlobalScopeFonts( 2835 this.ref, js.Pointer(&ret), 2836 ) 2837 return 2838 } 2839 2840 // Origin returns the value of property "WorkerGlobalScope.origin". 2841 // 2842 // It returns ok=false if there is no such property. 2843 func (this WorkerGlobalScope) Origin() (ret js.String, ok bool) { 2844 ok = js.True == bindings.GetWorkerGlobalScopeOrigin( 2845 this.ref, js.Pointer(&ret), 2846 ) 2847 return 2848 } 2849 2850 // IsSecureContext returns the value of property "WorkerGlobalScope.isSecureContext". 2851 // 2852 // It returns ok=false if there is no such property. 2853 func (this WorkerGlobalScope) IsSecureContext() (ret bool, ok bool) { 2854 ok = js.True == bindings.GetWorkerGlobalScopeIsSecureContext( 2855 this.ref, js.Pointer(&ret), 2856 ) 2857 return 2858 } 2859 2860 // CrossOriginIsolated returns the value of property "WorkerGlobalScope.crossOriginIsolated". 2861 // 2862 // It returns ok=false if there is no such property. 2863 func (this WorkerGlobalScope) CrossOriginIsolated() (ret bool, ok bool) { 2864 ok = js.True == bindings.GetWorkerGlobalScopeCrossOriginIsolated( 2865 this.ref, js.Pointer(&ret), 2866 ) 2867 return 2868 } 2869 2870 // Scheduler returns the value of property "WorkerGlobalScope.scheduler". 2871 // 2872 // It returns ok=false if there is no such property. 2873 func (this WorkerGlobalScope) Scheduler() (ret Scheduler, ok bool) { 2874 ok = js.True == bindings.GetWorkerGlobalScopeScheduler( 2875 this.ref, js.Pointer(&ret), 2876 ) 2877 return 2878 } 2879 2880 // TrustedTypes returns the value of property "WorkerGlobalScope.trustedTypes". 2881 // 2882 // It returns ok=false if there is no such property. 2883 func (this WorkerGlobalScope) TrustedTypes() (ret TrustedTypePolicyFactory, ok bool) { 2884 ok = js.True == bindings.GetWorkerGlobalScopeTrustedTypes( 2885 this.ref, js.Pointer(&ret), 2886 ) 2887 return 2888 } 2889 2890 // Caches returns the value of property "WorkerGlobalScope.caches". 2891 // 2892 // It returns ok=false if there is no such property. 2893 func (this WorkerGlobalScope) Caches() (ret CacheStorage, ok bool) { 2894 ok = js.True == bindings.GetWorkerGlobalScopeCaches( 2895 this.ref, js.Pointer(&ret), 2896 ) 2897 return 2898 } 2899 2900 // Crypto returns the value of property "WorkerGlobalScope.crypto". 2901 // 2902 // It returns ok=false if there is no such property. 2903 func (this WorkerGlobalScope) Crypto() (ret Crypto, ok bool) { 2904 ok = js.True == bindings.GetWorkerGlobalScopeCrypto( 2905 this.ref, js.Pointer(&ret), 2906 ) 2907 return 2908 } 2909 2910 // IndexedDB returns the value of property "WorkerGlobalScope.indexedDB". 2911 // 2912 // It returns ok=false if there is no such property. 2913 func (this WorkerGlobalScope) IndexedDB() (ret IDBFactory, ok bool) { 2914 ok = js.True == bindings.GetWorkerGlobalScopeIndexedDB( 2915 this.ref, js.Pointer(&ret), 2916 ) 2917 return 2918 } 2919 2920 // Performance returns the value of property "WorkerGlobalScope.performance". 2921 // 2922 // It returns ok=false if there is no such property. 2923 func (this WorkerGlobalScope) Performance() (ret Performance, ok bool) { 2924 ok = js.True == bindings.GetWorkerGlobalScopePerformance( 2925 this.ref, js.Pointer(&ret), 2926 ) 2927 return 2928 } 2929 2930 // HasFuncImportScripts returns true if the method "WorkerGlobalScope.importScripts" exists. 2931 func (this WorkerGlobalScope) HasFuncImportScripts() bool { 2932 return js.True == bindings.HasFuncWorkerGlobalScopeImportScripts( 2933 this.ref, 2934 ) 2935 } 2936 2937 // FuncImportScripts returns the method "WorkerGlobalScope.importScripts". 2938 func (this WorkerGlobalScope) FuncImportScripts() (fn js.Func[func(urls ...js.String)]) { 2939 bindings.FuncWorkerGlobalScopeImportScripts( 2940 this.ref, js.Pointer(&fn), 2941 ) 2942 return 2943 } 2944 2945 // ImportScripts calls the method "WorkerGlobalScope.importScripts". 2946 func (this WorkerGlobalScope) ImportScripts(urls ...js.String) (ret js.Void) { 2947 bindings.CallWorkerGlobalScopeImportScripts( 2948 this.ref, js.Pointer(&ret), 2949 js.SliceData(urls), 2950 js.SizeU(len(urls)), 2951 ) 2952 2953 return 2954 } 2955 2956 // TryImportScripts calls the method "WorkerGlobalScope.importScripts" 2957 // in a try/catch block and returns (_, err, ok = false) when it went through 2958 // the catch clause. 2959 func (this WorkerGlobalScope) TryImportScripts(urls ...js.String) (ret js.Void, exception js.Any, ok bool) { 2960 ok = js.True == bindings.TryWorkerGlobalScopeImportScripts( 2961 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2962 js.SliceData(urls), 2963 js.SizeU(len(urls)), 2964 ) 2965 2966 return 2967 } 2968 2969 // HasFuncReportError returns true if the method "WorkerGlobalScope.reportError" exists. 2970 func (this WorkerGlobalScope) HasFuncReportError() bool { 2971 return js.True == bindings.HasFuncWorkerGlobalScopeReportError( 2972 this.ref, 2973 ) 2974 } 2975 2976 // FuncReportError returns the method "WorkerGlobalScope.reportError". 2977 func (this WorkerGlobalScope) FuncReportError() (fn js.Func[func(e js.Any)]) { 2978 bindings.FuncWorkerGlobalScopeReportError( 2979 this.ref, js.Pointer(&fn), 2980 ) 2981 return 2982 } 2983 2984 // ReportError calls the method "WorkerGlobalScope.reportError". 2985 func (this WorkerGlobalScope) ReportError(e js.Any) (ret js.Void) { 2986 bindings.CallWorkerGlobalScopeReportError( 2987 this.ref, js.Pointer(&ret), 2988 e.Ref(), 2989 ) 2990 2991 return 2992 } 2993 2994 // TryReportError calls the method "WorkerGlobalScope.reportError" 2995 // in a try/catch block and returns (_, err, ok = false) when it went through 2996 // the catch clause. 2997 func (this WorkerGlobalScope) TryReportError(e js.Any) (ret js.Void, exception js.Any, ok bool) { 2998 ok = js.True == bindings.TryWorkerGlobalScopeReportError( 2999 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3000 e.Ref(), 3001 ) 3002 3003 return 3004 } 3005 3006 // HasFuncBtoa returns true if the method "WorkerGlobalScope.btoa" exists. 3007 func (this WorkerGlobalScope) HasFuncBtoa() bool { 3008 return js.True == bindings.HasFuncWorkerGlobalScopeBtoa( 3009 this.ref, 3010 ) 3011 } 3012 3013 // FuncBtoa returns the method "WorkerGlobalScope.btoa". 3014 func (this WorkerGlobalScope) FuncBtoa() (fn js.Func[func(data js.String) js.String]) { 3015 bindings.FuncWorkerGlobalScopeBtoa( 3016 this.ref, js.Pointer(&fn), 3017 ) 3018 return 3019 } 3020 3021 // Btoa calls the method "WorkerGlobalScope.btoa". 3022 func (this WorkerGlobalScope) Btoa(data js.String) (ret js.String) { 3023 bindings.CallWorkerGlobalScopeBtoa( 3024 this.ref, js.Pointer(&ret), 3025 data.Ref(), 3026 ) 3027 3028 return 3029 } 3030 3031 // TryBtoa calls the method "WorkerGlobalScope.btoa" 3032 // in a try/catch block and returns (_, err, ok = false) when it went through 3033 // the catch clause. 3034 func (this WorkerGlobalScope) TryBtoa(data js.String) (ret js.String, exception js.Any, ok bool) { 3035 ok = js.True == bindings.TryWorkerGlobalScopeBtoa( 3036 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3037 data.Ref(), 3038 ) 3039 3040 return 3041 } 3042 3043 // HasFuncAtob returns true if the method "WorkerGlobalScope.atob" exists. 3044 func (this WorkerGlobalScope) HasFuncAtob() bool { 3045 return js.True == bindings.HasFuncWorkerGlobalScopeAtob( 3046 this.ref, 3047 ) 3048 } 3049 3050 // FuncAtob returns the method "WorkerGlobalScope.atob". 3051 func (this WorkerGlobalScope) FuncAtob() (fn js.Func[func(data js.String) js.String]) { 3052 bindings.FuncWorkerGlobalScopeAtob( 3053 this.ref, js.Pointer(&fn), 3054 ) 3055 return 3056 } 3057 3058 // Atob calls the method "WorkerGlobalScope.atob". 3059 func (this WorkerGlobalScope) Atob(data js.String) (ret js.String) { 3060 bindings.CallWorkerGlobalScopeAtob( 3061 this.ref, js.Pointer(&ret), 3062 data.Ref(), 3063 ) 3064 3065 return 3066 } 3067 3068 // TryAtob calls the method "WorkerGlobalScope.atob" 3069 // in a try/catch block and returns (_, err, ok = false) when it went through 3070 // the catch clause. 3071 func (this WorkerGlobalScope) TryAtob(data js.String) (ret js.String, exception js.Any, ok bool) { 3072 ok = js.True == bindings.TryWorkerGlobalScopeAtob( 3073 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3074 data.Ref(), 3075 ) 3076 3077 return 3078 } 3079 3080 // HasFuncSetTimeout returns true if the method "WorkerGlobalScope.setTimeout" exists. 3081 func (this WorkerGlobalScope) HasFuncSetTimeout() bool { 3082 return js.True == bindings.HasFuncWorkerGlobalScopeSetTimeout( 3083 this.ref, 3084 ) 3085 } 3086 3087 // FuncSetTimeout returns the method "WorkerGlobalScope.setTimeout". 3088 func (this WorkerGlobalScope) FuncSetTimeout() (fn js.Func[func(handler TimerHandler, timeout int32, arguments ...js.Any) int32]) { 3089 bindings.FuncWorkerGlobalScopeSetTimeout( 3090 this.ref, js.Pointer(&fn), 3091 ) 3092 return 3093 } 3094 3095 // SetTimeout calls the method "WorkerGlobalScope.setTimeout". 3096 func (this WorkerGlobalScope) SetTimeout(handler TimerHandler, timeout int32, arguments ...js.Any) (ret int32) { 3097 bindings.CallWorkerGlobalScopeSetTimeout( 3098 this.ref, js.Pointer(&ret), 3099 handler.Ref(), 3100 int32(timeout), 3101 js.SliceData(arguments), 3102 js.SizeU(len(arguments)), 3103 ) 3104 3105 return 3106 } 3107 3108 // TrySetTimeout calls the method "WorkerGlobalScope.setTimeout" 3109 // in a try/catch block and returns (_, err, ok = false) when it went through 3110 // the catch clause. 3111 func (this WorkerGlobalScope) TrySetTimeout(handler TimerHandler, timeout int32, arguments ...js.Any) (ret int32, exception js.Any, ok bool) { 3112 ok = js.True == bindings.TryWorkerGlobalScopeSetTimeout( 3113 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3114 handler.Ref(), 3115 int32(timeout), 3116 js.SliceData(arguments), 3117 js.SizeU(len(arguments)), 3118 ) 3119 3120 return 3121 } 3122 3123 // HasFuncSetTimeout1 returns true if the method "WorkerGlobalScope.setTimeout" exists. 3124 func (this WorkerGlobalScope) HasFuncSetTimeout1() bool { 3125 return js.True == bindings.HasFuncWorkerGlobalScopeSetTimeout1( 3126 this.ref, 3127 ) 3128 } 3129 3130 // FuncSetTimeout1 returns the method "WorkerGlobalScope.setTimeout". 3131 func (this WorkerGlobalScope) FuncSetTimeout1() (fn js.Func[func(handler TimerHandler) int32]) { 3132 bindings.FuncWorkerGlobalScopeSetTimeout1( 3133 this.ref, js.Pointer(&fn), 3134 ) 3135 return 3136 } 3137 3138 // SetTimeout1 calls the method "WorkerGlobalScope.setTimeout". 3139 func (this WorkerGlobalScope) SetTimeout1(handler TimerHandler) (ret int32) { 3140 bindings.CallWorkerGlobalScopeSetTimeout1( 3141 this.ref, js.Pointer(&ret), 3142 handler.Ref(), 3143 ) 3144 3145 return 3146 } 3147 3148 // TrySetTimeout1 calls the method "WorkerGlobalScope.setTimeout" 3149 // in a try/catch block and returns (_, err, ok = false) when it went through 3150 // the catch clause. 3151 func (this WorkerGlobalScope) TrySetTimeout1(handler TimerHandler) (ret int32, exception js.Any, ok bool) { 3152 ok = js.True == bindings.TryWorkerGlobalScopeSetTimeout1( 3153 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3154 handler.Ref(), 3155 ) 3156 3157 return 3158 } 3159 3160 // HasFuncClearTimeout returns true if the method "WorkerGlobalScope.clearTimeout" exists. 3161 func (this WorkerGlobalScope) HasFuncClearTimeout() bool { 3162 return js.True == bindings.HasFuncWorkerGlobalScopeClearTimeout( 3163 this.ref, 3164 ) 3165 } 3166 3167 // FuncClearTimeout returns the method "WorkerGlobalScope.clearTimeout". 3168 func (this WorkerGlobalScope) FuncClearTimeout() (fn js.Func[func(id int32)]) { 3169 bindings.FuncWorkerGlobalScopeClearTimeout( 3170 this.ref, js.Pointer(&fn), 3171 ) 3172 return 3173 } 3174 3175 // ClearTimeout calls the method "WorkerGlobalScope.clearTimeout". 3176 func (this WorkerGlobalScope) ClearTimeout(id int32) (ret js.Void) { 3177 bindings.CallWorkerGlobalScopeClearTimeout( 3178 this.ref, js.Pointer(&ret), 3179 int32(id), 3180 ) 3181 3182 return 3183 } 3184 3185 // TryClearTimeout calls the method "WorkerGlobalScope.clearTimeout" 3186 // in a try/catch block and returns (_, err, ok = false) when it went through 3187 // the catch clause. 3188 func (this WorkerGlobalScope) TryClearTimeout(id int32) (ret js.Void, exception js.Any, ok bool) { 3189 ok = js.True == bindings.TryWorkerGlobalScopeClearTimeout( 3190 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3191 int32(id), 3192 ) 3193 3194 return 3195 } 3196 3197 // HasFuncClearTimeout1 returns true if the method "WorkerGlobalScope.clearTimeout" exists. 3198 func (this WorkerGlobalScope) HasFuncClearTimeout1() bool { 3199 return js.True == bindings.HasFuncWorkerGlobalScopeClearTimeout1( 3200 this.ref, 3201 ) 3202 } 3203 3204 // FuncClearTimeout1 returns the method "WorkerGlobalScope.clearTimeout". 3205 func (this WorkerGlobalScope) FuncClearTimeout1() (fn js.Func[func()]) { 3206 bindings.FuncWorkerGlobalScopeClearTimeout1( 3207 this.ref, js.Pointer(&fn), 3208 ) 3209 return 3210 } 3211 3212 // ClearTimeout1 calls the method "WorkerGlobalScope.clearTimeout". 3213 func (this WorkerGlobalScope) ClearTimeout1() (ret js.Void) { 3214 bindings.CallWorkerGlobalScopeClearTimeout1( 3215 this.ref, js.Pointer(&ret), 3216 ) 3217 3218 return 3219 } 3220 3221 // TryClearTimeout1 calls the method "WorkerGlobalScope.clearTimeout" 3222 // in a try/catch block and returns (_, err, ok = false) when it went through 3223 // the catch clause. 3224 func (this WorkerGlobalScope) TryClearTimeout1() (ret js.Void, exception js.Any, ok bool) { 3225 ok = js.True == bindings.TryWorkerGlobalScopeClearTimeout1( 3226 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3227 ) 3228 3229 return 3230 } 3231 3232 // HasFuncSetInterval returns true if the method "WorkerGlobalScope.setInterval" exists. 3233 func (this WorkerGlobalScope) HasFuncSetInterval() bool { 3234 return js.True == bindings.HasFuncWorkerGlobalScopeSetInterval( 3235 this.ref, 3236 ) 3237 } 3238 3239 // FuncSetInterval returns the method "WorkerGlobalScope.setInterval". 3240 func (this WorkerGlobalScope) FuncSetInterval() (fn js.Func[func(handler TimerHandler, timeout int32, arguments ...js.Any) int32]) { 3241 bindings.FuncWorkerGlobalScopeSetInterval( 3242 this.ref, js.Pointer(&fn), 3243 ) 3244 return 3245 } 3246 3247 // SetInterval calls the method "WorkerGlobalScope.setInterval". 3248 func (this WorkerGlobalScope) SetInterval(handler TimerHandler, timeout int32, arguments ...js.Any) (ret int32) { 3249 bindings.CallWorkerGlobalScopeSetInterval( 3250 this.ref, js.Pointer(&ret), 3251 handler.Ref(), 3252 int32(timeout), 3253 js.SliceData(arguments), 3254 js.SizeU(len(arguments)), 3255 ) 3256 3257 return 3258 } 3259 3260 // TrySetInterval calls the method "WorkerGlobalScope.setInterval" 3261 // in a try/catch block and returns (_, err, ok = false) when it went through 3262 // the catch clause. 3263 func (this WorkerGlobalScope) TrySetInterval(handler TimerHandler, timeout int32, arguments ...js.Any) (ret int32, exception js.Any, ok bool) { 3264 ok = js.True == bindings.TryWorkerGlobalScopeSetInterval( 3265 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3266 handler.Ref(), 3267 int32(timeout), 3268 js.SliceData(arguments), 3269 js.SizeU(len(arguments)), 3270 ) 3271 3272 return 3273 } 3274 3275 // HasFuncSetInterval1 returns true if the method "WorkerGlobalScope.setInterval" exists. 3276 func (this WorkerGlobalScope) HasFuncSetInterval1() bool { 3277 return js.True == bindings.HasFuncWorkerGlobalScopeSetInterval1( 3278 this.ref, 3279 ) 3280 } 3281 3282 // FuncSetInterval1 returns the method "WorkerGlobalScope.setInterval". 3283 func (this WorkerGlobalScope) FuncSetInterval1() (fn js.Func[func(handler TimerHandler) int32]) { 3284 bindings.FuncWorkerGlobalScopeSetInterval1( 3285 this.ref, js.Pointer(&fn), 3286 ) 3287 return 3288 } 3289 3290 // SetInterval1 calls the method "WorkerGlobalScope.setInterval". 3291 func (this WorkerGlobalScope) SetInterval1(handler TimerHandler) (ret int32) { 3292 bindings.CallWorkerGlobalScopeSetInterval1( 3293 this.ref, js.Pointer(&ret), 3294 handler.Ref(), 3295 ) 3296 3297 return 3298 } 3299 3300 // TrySetInterval1 calls the method "WorkerGlobalScope.setInterval" 3301 // in a try/catch block and returns (_, err, ok = false) when it went through 3302 // the catch clause. 3303 func (this WorkerGlobalScope) TrySetInterval1(handler TimerHandler) (ret int32, exception js.Any, ok bool) { 3304 ok = js.True == bindings.TryWorkerGlobalScopeSetInterval1( 3305 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3306 handler.Ref(), 3307 ) 3308 3309 return 3310 } 3311 3312 // HasFuncClearInterval returns true if the method "WorkerGlobalScope.clearInterval" exists. 3313 func (this WorkerGlobalScope) HasFuncClearInterval() bool { 3314 return js.True == bindings.HasFuncWorkerGlobalScopeClearInterval( 3315 this.ref, 3316 ) 3317 } 3318 3319 // FuncClearInterval returns the method "WorkerGlobalScope.clearInterval". 3320 func (this WorkerGlobalScope) FuncClearInterval() (fn js.Func[func(id int32)]) { 3321 bindings.FuncWorkerGlobalScopeClearInterval( 3322 this.ref, js.Pointer(&fn), 3323 ) 3324 return 3325 } 3326 3327 // ClearInterval calls the method "WorkerGlobalScope.clearInterval". 3328 func (this WorkerGlobalScope) ClearInterval(id int32) (ret js.Void) { 3329 bindings.CallWorkerGlobalScopeClearInterval( 3330 this.ref, js.Pointer(&ret), 3331 int32(id), 3332 ) 3333 3334 return 3335 } 3336 3337 // TryClearInterval calls the method "WorkerGlobalScope.clearInterval" 3338 // in a try/catch block and returns (_, err, ok = false) when it went through 3339 // the catch clause. 3340 func (this WorkerGlobalScope) TryClearInterval(id int32) (ret js.Void, exception js.Any, ok bool) { 3341 ok = js.True == bindings.TryWorkerGlobalScopeClearInterval( 3342 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3343 int32(id), 3344 ) 3345 3346 return 3347 } 3348 3349 // HasFuncClearInterval1 returns true if the method "WorkerGlobalScope.clearInterval" exists. 3350 func (this WorkerGlobalScope) HasFuncClearInterval1() bool { 3351 return js.True == bindings.HasFuncWorkerGlobalScopeClearInterval1( 3352 this.ref, 3353 ) 3354 } 3355 3356 // FuncClearInterval1 returns the method "WorkerGlobalScope.clearInterval". 3357 func (this WorkerGlobalScope) FuncClearInterval1() (fn js.Func[func()]) { 3358 bindings.FuncWorkerGlobalScopeClearInterval1( 3359 this.ref, js.Pointer(&fn), 3360 ) 3361 return 3362 } 3363 3364 // ClearInterval1 calls the method "WorkerGlobalScope.clearInterval". 3365 func (this WorkerGlobalScope) ClearInterval1() (ret js.Void) { 3366 bindings.CallWorkerGlobalScopeClearInterval1( 3367 this.ref, js.Pointer(&ret), 3368 ) 3369 3370 return 3371 } 3372 3373 // TryClearInterval1 calls the method "WorkerGlobalScope.clearInterval" 3374 // in a try/catch block and returns (_, err, ok = false) when it went through 3375 // the catch clause. 3376 func (this WorkerGlobalScope) TryClearInterval1() (ret js.Void, exception js.Any, ok bool) { 3377 ok = js.True == bindings.TryWorkerGlobalScopeClearInterval1( 3378 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3379 ) 3380 3381 return 3382 } 3383 3384 // HasFuncQueueMicrotask returns true if the method "WorkerGlobalScope.queueMicrotask" exists. 3385 func (this WorkerGlobalScope) HasFuncQueueMicrotask() bool { 3386 return js.True == bindings.HasFuncWorkerGlobalScopeQueueMicrotask( 3387 this.ref, 3388 ) 3389 } 3390 3391 // FuncQueueMicrotask returns the method "WorkerGlobalScope.queueMicrotask". 3392 func (this WorkerGlobalScope) FuncQueueMicrotask() (fn js.Func[func(callback js.Func[func()])]) { 3393 bindings.FuncWorkerGlobalScopeQueueMicrotask( 3394 this.ref, js.Pointer(&fn), 3395 ) 3396 return 3397 } 3398 3399 // QueueMicrotask calls the method "WorkerGlobalScope.queueMicrotask". 3400 func (this WorkerGlobalScope) QueueMicrotask(callback js.Func[func()]) (ret js.Void) { 3401 bindings.CallWorkerGlobalScopeQueueMicrotask( 3402 this.ref, js.Pointer(&ret), 3403 callback.Ref(), 3404 ) 3405 3406 return 3407 } 3408 3409 // TryQueueMicrotask calls the method "WorkerGlobalScope.queueMicrotask" 3410 // in a try/catch block and returns (_, err, ok = false) when it went through 3411 // the catch clause. 3412 func (this WorkerGlobalScope) TryQueueMicrotask(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 3413 ok = js.True == bindings.TryWorkerGlobalScopeQueueMicrotask( 3414 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3415 callback.Ref(), 3416 ) 3417 3418 return 3419 } 3420 3421 // HasFuncCreateImageBitmap returns true if the method "WorkerGlobalScope.createImageBitmap" exists. 3422 func (this WorkerGlobalScope) HasFuncCreateImageBitmap() bool { 3423 return js.True == bindings.HasFuncWorkerGlobalScopeCreateImageBitmap( 3424 this.ref, 3425 ) 3426 } 3427 3428 // FuncCreateImageBitmap returns the method "WorkerGlobalScope.createImageBitmap". 3429 func (this WorkerGlobalScope) FuncCreateImageBitmap() (fn js.Func[func(image ImageBitmapSource, options ImageBitmapOptions) js.Promise[ImageBitmap]]) { 3430 bindings.FuncWorkerGlobalScopeCreateImageBitmap( 3431 this.ref, js.Pointer(&fn), 3432 ) 3433 return 3434 } 3435 3436 // CreateImageBitmap calls the method "WorkerGlobalScope.createImageBitmap". 3437 func (this WorkerGlobalScope) CreateImageBitmap(image ImageBitmapSource, options ImageBitmapOptions) (ret js.Promise[ImageBitmap]) { 3438 bindings.CallWorkerGlobalScopeCreateImageBitmap( 3439 this.ref, js.Pointer(&ret), 3440 image.Ref(), 3441 js.Pointer(&options), 3442 ) 3443 3444 return 3445 } 3446 3447 // TryCreateImageBitmap calls the method "WorkerGlobalScope.createImageBitmap" 3448 // in a try/catch block and returns (_, err, ok = false) when it went through 3449 // the catch clause. 3450 func (this WorkerGlobalScope) TryCreateImageBitmap(image ImageBitmapSource, options ImageBitmapOptions) (ret js.Promise[ImageBitmap], exception js.Any, ok bool) { 3451 ok = js.True == bindings.TryWorkerGlobalScopeCreateImageBitmap( 3452 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3453 image.Ref(), 3454 js.Pointer(&options), 3455 ) 3456 3457 return 3458 } 3459 3460 // HasFuncCreateImageBitmap1 returns true if the method "WorkerGlobalScope.createImageBitmap" exists. 3461 func (this WorkerGlobalScope) HasFuncCreateImageBitmap1() bool { 3462 return js.True == bindings.HasFuncWorkerGlobalScopeCreateImageBitmap1( 3463 this.ref, 3464 ) 3465 } 3466 3467 // FuncCreateImageBitmap1 returns the method "WorkerGlobalScope.createImageBitmap". 3468 func (this WorkerGlobalScope) FuncCreateImageBitmap1() (fn js.Func[func(image ImageBitmapSource) js.Promise[ImageBitmap]]) { 3469 bindings.FuncWorkerGlobalScopeCreateImageBitmap1( 3470 this.ref, js.Pointer(&fn), 3471 ) 3472 return 3473 } 3474 3475 // CreateImageBitmap1 calls the method "WorkerGlobalScope.createImageBitmap". 3476 func (this WorkerGlobalScope) CreateImageBitmap1(image ImageBitmapSource) (ret js.Promise[ImageBitmap]) { 3477 bindings.CallWorkerGlobalScopeCreateImageBitmap1( 3478 this.ref, js.Pointer(&ret), 3479 image.Ref(), 3480 ) 3481 3482 return 3483 } 3484 3485 // TryCreateImageBitmap1 calls the method "WorkerGlobalScope.createImageBitmap" 3486 // in a try/catch block and returns (_, err, ok = false) when it went through 3487 // the catch clause. 3488 func (this WorkerGlobalScope) TryCreateImageBitmap1(image ImageBitmapSource) (ret js.Promise[ImageBitmap], exception js.Any, ok bool) { 3489 ok = js.True == bindings.TryWorkerGlobalScopeCreateImageBitmap1( 3490 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3491 image.Ref(), 3492 ) 3493 3494 return 3495 } 3496 3497 // HasFuncCreateImageBitmap2 returns true if the method "WorkerGlobalScope.createImageBitmap" exists. 3498 func (this WorkerGlobalScope) HasFuncCreateImageBitmap2() bool { 3499 return js.True == bindings.HasFuncWorkerGlobalScopeCreateImageBitmap2( 3500 this.ref, 3501 ) 3502 } 3503 3504 // FuncCreateImageBitmap2 returns the method "WorkerGlobalScope.createImageBitmap". 3505 func (this WorkerGlobalScope) FuncCreateImageBitmap2() (fn js.Func[func(image ImageBitmapSource, sx int32, sy int32, sw int32, sh int32, options ImageBitmapOptions) js.Promise[ImageBitmap]]) { 3506 bindings.FuncWorkerGlobalScopeCreateImageBitmap2( 3507 this.ref, js.Pointer(&fn), 3508 ) 3509 return 3510 } 3511 3512 // CreateImageBitmap2 calls the method "WorkerGlobalScope.createImageBitmap". 3513 func (this WorkerGlobalScope) CreateImageBitmap2(image ImageBitmapSource, sx int32, sy int32, sw int32, sh int32, options ImageBitmapOptions) (ret js.Promise[ImageBitmap]) { 3514 bindings.CallWorkerGlobalScopeCreateImageBitmap2( 3515 this.ref, js.Pointer(&ret), 3516 image.Ref(), 3517 int32(sx), 3518 int32(sy), 3519 int32(sw), 3520 int32(sh), 3521 js.Pointer(&options), 3522 ) 3523 3524 return 3525 } 3526 3527 // TryCreateImageBitmap2 calls the method "WorkerGlobalScope.createImageBitmap" 3528 // in a try/catch block and returns (_, err, ok = false) when it went through 3529 // the catch clause. 3530 func (this WorkerGlobalScope) TryCreateImageBitmap2(image ImageBitmapSource, sx int32, sy int32, sw int32, sh int32, options ImageBitmapOptions) (ret js.Promise[ImageBitmap], exception js.Any, ok bool) { 3531 ok = js.True == bindings.TryWorkerGlobalScopeCreateImageBitmap2( 3532 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3533 image.Ref(), 3534 int32(sx), 3535 int32(sy), 3536 int32(sw), 3537 int32(sh), 3538 js.Pointer(&options), 3539 ) 3540 3541 return 3542 } 3543 3544 // HasFuncCreateImageBitmap3 returns true if the method "WorkerGlobalScope.createImageBitmap" exists. 3545 func (this WorkerGlobalScope) HasFuncCreateImageBitmap3() bool { 3546 return js.True == bindings.HasFuncWorkerGlobalScopeCreateImageBitmap3( 3547 this.ref, 3548 ) 3549 } 3550 3551 // FuncCreateImageBitmap3 returns the method "WorkerGlobalScope.createImageBitmap". 3552 func (this WorkerGlobalScope) FuncCreateImageBitmap3() (fn js.Func[func(image ImageBitmapSource, sx int32, sy int32, sw int32, sh int32) js.Promise[ImageBitmap]]) { 3553 bindings.FuncWorkerGlobalScopeCreateImageBitmap3( 3554 this.ref, js.Pointer(&fn), 3555 ) 3556 return 3557 } 3558 3559 // CreateImageBitmap3 calls the method "WorkerGlobalScope.createImageBitmap". 3560 func (this WorkerGlobalScope) CreateImageBitmap3(image ImageBitmapSource, sx int32, sy int32, sw int32, sh int32) (ret js.Promise[ImageBitmap]) { 3561 bindings.CallWorkerGlobalScopeCreateImageBitmap3( 3562 this.ref, js.Pointer(&ret), 3563 image.Ref(), 3564 int32(sx), 3565 int32(sy), 3566 int32(sw), 3567 int32(sh), 3568 ) 3569 3570 return 3571 } 3572 3573 // TryCreateImageBitmap3 calls the method "WorkerGlobalScope.createImageBitmap" 3574 // in a try/catch block and returns (_, err, ok = false) when it went through 3575 // the catch clause. 3576 func (this WorkerGlobalScope) TryCreateImageBitmap3(image ImageBitmapSource, sx int32, sy int32, sw int32, sh int32) (ret js.Promise[ImageBitmap], exception js.Any, ok bool) { 3577 ok = js.True == bindings.TryWorkerGlobalScopeCreateImageBitmap3( 3578 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3579 image.Ref(), 3580 int32(sx), 3581 int32(sy), 3582 int32(sw), 3583 int32(sh), 3584 ) 3585 3586 return 3587 } 3588 3589 // HasFuncStructuredClone returns true if the method "WorkerGlobalScope.structuredClone" exists. 3590 func (this WorkerGlobalScope) HasFuncStructuredClone() bool { 3591 return js.True == bindings.HasFuncWorkerGlobalScopeStructuredClone( 3592 this.ref, 3593 ) 3594 } 3595 3596 // FuncStructuredClone returns the method "WorkerGlobalScope.structuredClone". 3597 func (this WorkerGlobalScope) FuncStructuredClone() (fn js.Func[func(value js.Any, options StructuredSerializeOptions) js.Any]) { 3598 bindings.FuncWorkerGlobalScopeStructuredClone( 3599 this.ref, js.Pointer(&fn), 3600 ) 3601 return 3602 } 3603 3604 // StructuredClone calls the method "WorkerGlobalScope.structuredClone". 3605 func (this WorkerGlobalScope) StructuredClone(value js.Any, options StructuredSerializeOptions) (ret js.Any) { 3606 bindings.CallWorkerGlobalScopeStructuredClone( 3607 this.ref, js.Pointer(&ret), 3608 value.Ref(), 3609 js.Pointer(&options), 3610 ) 3611 3612 return 3613 } 3614 3615 // TryStructuredClone calls the method "WorkerGlobalScope.structuredClone" 3616 // in a try/catch block and returns (_, err, ok = false) when it went through 3617 // the catch clause. 3618 func (this WorkerGlobalScope) TryStructuredClone(value js.Any, options StructuredSerializeOptions) (ret js.Any, exception js.Any, ok bool) { 3619 ok = js.True == bindings.TryWorkerGlobalScopeStructuredClone( 3620 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3621 value.Ref(), 3622 js.Pointer(&options), 3623 ) 3624 3625 return 3626 } 3627 3628 // HasFuncStructuredClone1 returns true if the method "WorkerGlobalScope.structuredClone" exists. 3629 func (this WorkerGlobalScope) HasFuncStructuredClone1() bool { 3630 return js.True == bindings.HasFuncWorkerGlobalScopeStructuredClone1( 3631 this.ref, 3632 ) 3633 } 3634 3635 // FuncStructuredClone1 returns the method "WorkerGlobalScope.structuredClone". 3636 func (this WorkerGlobalScope) FuncStructuredClone1() (fn js.Func[func(value js.Any) js.Any]) { 3637 bindings.FuncWorkerGlobalScopeStructuredClone1( 3638 this.ref, js.Pointer(&fn), 3639 ) 3640 return 3641 } 3642 3643 // StructuredClone1 calls the method "WorkerGlobalScope.structuredClone". 3644 func (this WorkerGlobalScope) StructuredClone1(value js.Any) (ret js.Any) { 3645 bindings.CallWorkerGlobalScopeStructuredClone1( 3646 this.ref, js.Pointer(&ret), 3647 value.Ref(), 3648 ) 3649 3650 return 3651 } 3652 3653 // TryStructuredClone1 calls the method "WorkerGlobalScope.structuredClone" 3654 // in a try/catch block and returns (_, err, ok = false) when it went through 3655 // the catch clause. 3656 func (this WorkerGlobalScope) TryStructuredClone1(value js.Any) (ret js.Any, exception js.Any, ok bool) { 3657 ok = js.True == bindings.TryWorkerGlobalScopeStructuredClone1( 3658 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3659 value.Ref(), 3660 ) 3661 3662 return 3663 } 3664 3665 // HasFuncFetch returns true if the method "WorkerGlobalScope.fetch" exists. 3666 func (this WorkerGlobalScope) HasFuncFetch() bool { 3667 return js.True == bindings.HasFuncWorkerGlobalScopeFetch( 3668 this.ref, 3669 ) 3670 } 3671 3672 // FuncFetch returns the method "WorkerGlobalScope.fetch". 3673 func (this WorkerGlobalScope) FuncFetch() (fn js.Func[func(input RequestInfo, init RequestInit) js.Promise[Response]]) { 3674 bindings.FuncWorkerGlobalScopeFetch( 3675 this.ref, js.Pointer(&fn), 3676 ) 3677 return 3678 } 3679 3680 // Fetch calls the method "WorkerGlobalScope.fetch". 3681 func (this WorkerGlobalScope) Fetch(input RequestInfo, init RequestInit) (ret js.Promise[Response]) { 3682 bindings.CallWorkerGlobalScopeFetch( 3683 this.ref, js.Pointer(&ret), 3684 input.Ref(), 3685 js.Pointer(&init), 3686 ) 3687 3688 return 3689 } 3690 3691 // TryFetch calls the method "WorkerGlobalScope.fetch" 3692 // in a try/catch block and returns (_, err, ok = false) when it went through 3693 // the catch clause. 3694 func (this WorkerGlobalScope) TryFetch(input RequestInfo, init RequestInit) (ret js.Promise[Response], exception js.Any, ok bool) { 3695 ok = js.True == bindings.TryWorkerGlobalScopeFetch( 3696 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3697 input.Ref(), 3698 js.Pointer(&init), 3699 ) 3700 3701 return 3702 } 3703 3704 // HasFuncFetch1 returns true if the method "WorkerGlobalScope.fetch" exists. 3705 func (this WorkerGlobalScope) HasFuncFetch1() bool { 3706 return js.True == bindings.HasFuncWorkerGlobalScopeFetch1( 3707 this.ref, 3708 ) 3709 } 3710 3711 // FuncFetch1 returns the method "WorkerGlobalScope.fetch". 3712 func (this WorkerGlobalScope) FuncFetch1() (fn js.Func[func(input RequestInfo) js.Promise[Response]]) { 3713 bindings.FuncWorkerGlobalScopeFetch1( 3714 this.ref, js.Pointer(&fn), 3715 ) 3716 return 3717 } 3718 3719 // Fetch1 calls the method "WorkerGlobalScope.fetch". 3720 func (this WorkerGlobalScope) Fetch1(input RequestInfo) (ret js.Promise[Response]) { 3721 bindings.CallWorkerGlobalScopeFetch1( 3722 this.ref, js.Pointer(&ret), 3723 input.Ref(), 3724 ) 3725 3726 return 3727 } 3728 3729 // TryFetch1 calls the method "WorkerGlobalScope.fetch" 3730 // in a try/catch block and returns (_, err, ok = false) when it went through 3731 // the catch clause. 3732 func (this WorkerGlobalScope) TryFetch1(input RequestInfo) (ret js.Promise[Response], exception js.Any, ok bool) { 3733 ok = js.True == bindings.TryWorkerGlobalScopeFetch1( 3734 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3735 input.Ref(), 3736 ) 3737 3738 return 3739 } 3740 3741 type OneOf_AnimationEffect_ArrayAnimationEffect struct { 3742 ref js.Ref 3743 } 3744 3745 func (x OneOf_AnimationEffect_ArrayAnimationEffect) Ref() js.Ref { 3746 return x.ref 3747 } 3748 3749 func (x OneOf_AnimationEffect_ArrayAnimationEffect) Free() { 3750 x.ref.Free() 3751 } 3752 3753 func (x OneOf_AnimationEffect_ArrayAnimationEffect) FromRef(ref js.Ref) OneOf_AnimationEffect_ArrayAnimationEffect { 3754 return OneOf_AnimationEffect_ArrayAnimationEffect{ 3755 ref: ref, 3756 } 3757 } 3758 3759 func (x OneOf_AnimationEffect_ArrayAnimationEffect) AnimationEffect() AnimationEffect { 3760 return AnimationEffect{}.FromRef(x.ref) 3761 } 3762 3763 func (x OneOf_AnimationEffect_ArrayAnimationEffect) ArrayAnimationEffect() js.Array[AnimationEffect] { 3764 return js.Array[AnimationEffect]{}.FromRef(x.ref) 3765 } 3766 3767 func NewWorkletAnimation(animatorName js.String, effects OneOf_AnimationEffect_ArrayAnimationEffect, timeline AnimationTimeline, options js.Any) (ret WorkletAnimation) { 3768 ret.ref = bindings.NewWorkletAnimationByWorkletAnimation( 3769 animatorName.Ref(), 3770 effects.Ref(), 3771 timeline.Ref(), 3772 options.Ref()) 3773 return 3774 } 3775 3776 func NewWorkletAnimationByWorkletAnimation1(animatorName js.String, effects OneOf_AnimationEffect_ArrayAnimationEffect, timeline AnimationTimeline) (ret WorkletAnimation) { 3777 ret.ref = bindings.NewWorkletAnimationByWorkletAnimation1( 3778 animatorName.Ref(), 3779 effects.Ref(), 3780 timeline.Ref()) 3781 return 3782 } 3783 3784 func NewWorkletAnimationByWorkletAnimation2(animatorName js.String, effects OneOf_AnimationEffect_ArrayAnimationEffect) (ret WorkletAnimation) { 3785 ret.ref = bindings.NewWorkletAnimationByWorkletAnimation2( 3786 animatorName.Ref(), 3787 effects.Ref()) 3788 return 3789 } 3790 3791 func NewWorkletAnimationByWorkletAnimation3(animatorName js.String) (ret WorkletAnimation) { 3792 ret.ref = bindings.NewWorkletAnimationByWorkletAnimation3( 3793 animatorName.Ref()) 3794 return 3795 } 3796 3797 type WorkletAnimation struct { 3798 Animation 3799 } 3800 3801 func (this WorkletAnimation) Once() WorkletAnimation { 3802 this.ref.Once() 3803 return this 3804 } 3805 3806 func (this WorkletAnimation) Ref() js.Ref { 3807 return this.Animation.Ref() 3808 } 3809 3810 func (this WorkletAnimation) FromRef(ref js.Ref) WorkletAnimation { 3811 this.Animation = this.Animation.FromRef(ref) 3812 return this 3813 } 3814 3815 func (this WorkletAnimation) Free() { 3816 this.ref.Free() 3817 } 3818 3819 // AnimatorName returns the value of property "WorkletAnimation.animatorName". 3820 // 3821 // It returns ok=false if there is no such property. 3822 func (this WorkletAnimation) AnimatorName() (ret js.String, ok bool) { 3823 ok = js.True == bindings.GetWorkletAnimationAnimatorName( 3824 this.ref, js.Pointer(&ret), 3825 ) 3826 return 3827 } 3828 3829 type WorkletAnimationEffect struct { 3830 ref js.Ref 3831 } 3832 3833 func (this WorkletAnimationEffect) Once() WorkletAnimationEffect { 3834 this.ref.Once() 3835 return this 3836 } 3837 3838 func (this WorkletAnimationEffect) Ref() js.Ref { 3839 return this.ref 3840 } 3841 3842 func (this WorkletAnimationEffect) FromRef(ref js.Ref) WorkletAnimationEffect { 3843 this.ref = ref 3844 return this 3845 } 3846 3847 func (this WorkletAnimationEffect) Free() { 3848 this.ref.Free() 3849 } 3850 3851 // LocalTime returns the value of property "WorkletAnimationEffect.localTime". 3852 // 3853 // It returns ok=false if there is no such property. 3854 func (this WorkletAnimationEffect) LocalTime() (ret float64, ok bool) { 3855 ok = js.True == bindings.GetWorkletAnimationEffectLocalTime( 3856 this.ref, js.Pointer(&ret), 3857 ) 3858 return 3859 } 3860 3861 // SetLocalTime sets the value of property "WorkletAnimationEffect.localTime" to val. 3862 // 3863 // It returns false if the property cannot be set. 3864 func (this WorkletAnimationEffect) SetLocalTime(val float64) bool { 3865 return js.True == bindings.SetWorkletAnimationEffectLocalTime( 3866 this.ref, 3867 float64(val), 3868 ) 3869 } 3870 3871 // HasFuncGetTiming returns true if the method "WorkletAnimationEffect.getTiming" exists. 3872 func (this WorkletAnimationEffect) HasFuncGetTiming() bool { 3873 return js.True == bindings.HasFuncWorkletAnimationEffectGetTiming( 3874 this.ref, 3875 ) 3876 } 3877 3878 // FuncGetTiming returns the method "WorkletAnimationEffect.getTiming". 3879 func (this WorkletAnimationEffect) FuncGetTiming() (fn js.Func[func() EffectTiming]) { 3880 bindings.FuncWorkletAnimationEffectGetTiming( 3881 this.ref, js.Pointer(&fn), 3882 ) 3883 return 3884 } 3885 3886 // GetTiming calls the method "WorkletAnimationEffect.getTiming". 3887 func (this WorkletAnimationEffect) GetTiming() (ret EffectTiming) { 3888 bindings.CallWorkletAnimationEffectGetTiming( 3889 this.ref, js.Pointer(&ret), 3890 ) 3891 3892 return 3893 } 3894 3895 // TryGetTiming calls the method "WorkletAnimationEffect.getTiming" 3896 // in a try/catch block and returns (_, err, ok = false) when it went through 3897 // the catch clause. 3898 func (this WorkletAnimationEffect) TryGetTiming() (ret EffectTiming, exception js.Any, ok bool) { 3899 ok = js.True == bindings.TryWorkletAnimationEffectGetTiming( 3900 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3901 ) 3902 3903 return 3904 } 3905 3906 // HasFuncGetComputedTiming returns true if the method "WorkletAnimationEffect.getComputedTiming" exists. 3907 func (this WorkletAnimationEffect) HasFuncGetComputedTiming() bool { 3908 return js.True == bindings.HasFuncWorkletAnimationEffectGetComputedTiming( 3909 this.ref, 3910 ) 3911 } 3912 3913 // FuncGetComputedTiming returns the method "WorkletAnimationEffect.getComputedTiming". 3914 func (this WorkletAnimationEffect) FuncGetComputedTiming() (fn js.Func[func() ComputedEffectTiming]) { 3915 bindings.FuncWorkletAnimationEffectGetComputedTiming( 3916 this.ref, js.Pointer(&fn), 3917 ) 3918 return 3919 } 3920 3921 // GetComputedTiming calls the method "WorkletAnimationEffect.getComputedTiming". 3922 func (this WorkletAnimationEffect) GetComputedTiming() (ret ComputedEffectTiming) { 3923 bindings.CallWorkletAnimationEffectGetComputedTiming( 3924 this.ref, js.Pointer(&ret), 3925 ) 3926 3927 return 3928 } 3929 3930 // TryGetComputedTiming calls the method "WorkletAnimationEffect.getComputedTiming" 3931 // in a try/catch block and returns (_, err, ok = false) when it went through 3932 // the catch clause. 3933 func (this WorkletAnimationEffect) TryGetComputedTiming() (ret ComputedEffectTiming, exception js.Any, ok bool) { 3934 ok = js.True == bindings.TryWorkletAnimationEffectGetComputedTiming( 3935 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3936 ) 3937 3938 return 3939 } 3940 3941 type WorkletGlobalScope struct { 3942 ref js.Ref 3943 } 3944 3945 func (this WorkletGlobalScope) Once() WorkletGlobalScope { 3946 this.ref.Once() 3947 return this 3948 } 3949 3950 func (this WorkletGlobalScope) Ref() js.Ref { 3951 return this.ref 3952 } 3953 3954 func (this WorkletGlobalScope) FromRef(ref js.Ref) WorkletGlobalScope { 3955 this.ref = ref 3956 return this 3957 } 3958 3959 func (this WorkletGlobalScope) Free() { 3960 this.ref.Free() 3961 } 3962 3963 type WorkletGroupEffect struct { 3964 ref js.Ref 3965 } 3966 3967 func (this WorkletGroupEffect) Once() WorkletGroupEffect { 3968 this.ref.Once() 3969 return this 3970 } 3971 3972 func (this WorkletGroupEffect) Ref() js.Ref { 3973 return this.ref 3974 } 3975 3976 func (this WorkletGroupEffect) FromRef(ref js.Ref) WorkletGroupEffect { 3977 this.ref = ref 3978 return this 3979 } 3980 3981 func (this WorkletGroupEffect) Free() { 3982 this.ref.Free() 3983 } 3984 3985 // HasFuncGetChildren returns true if the method "WorkletGroupEffect.getChildren" exists. 3986 func (this WorkletGroupEffect) HasFuncGetChildren() bool { 3987 return js.True == bindings.HasFuncWorkletGroupEffectGetChildren( 3988 this.ref, 3989 ) 3990 } 3991 3992 // FuncGetChildren returns the method "WorkletGroupEffect.getChildren". 3993 func (this WorkletGroupEffect) FuncGetChildren() (fn js.Func[func() js.Array[WorkletAnimationEffect]]) { 3994 bindings.FuncWorkletGroupEffectGetChildren( 3995 this.ref, js.Pointer(&fn), 3996 ) 3997 return 3998 } 3999 4000 // GetChildren calls the method "WorkletGroupEffect.getChildren". 4001 func (this WorkletGroupEffect) GetChildren() (ret js.Array[WorkletAnimationEffect]) { 4002 bindings.CallWorkletGroupEffectGetChildren( 4003 this.ref, js.Pointer(&ret), 4004 ) 4005 4006 return 4007 } 4008 4009 // TryGetChildren calls the method "WorkletGroupEffect.getChildren" 4010 // in a try/catch block and returns (_, err, ok = false) when it went through 4011 // the catch clause. 4012 func (this WorkletGroupEffect) TryGetChildren() (ret js.Array[WorkletAnimationEffect], exception js.Any, ok bool) { 4013 ok = js.True == bindings.TryWorkletGroupEffectGetChildren( 4014 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4015 ) 4016 4017 return 4018 } 4019 4020 const ( 4021 XMLHttpRequest_UNSENT uint16 = 0 4022 XMLHttpRequest_OPENED uint16 = 1 4023 XMLHttpRequest_HEADERS_RECEIVED uint16 = 2 4024 XMLHttpRequest_LOADING uint16 = 3 4025 XMLHttpRequest_DONE uint16 = 4 4026 ) 4027 4028 type OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String struct { 4029 ref js.Ref 4030 } 4031 4032 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Ref() js.Ref { 4033 return x.ref 4034 } 4035 4036 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Free() { 4037 x.ref.Free() 4038 } 4039 4040 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) FromRef(ref js.Ref) OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String { 4041 return OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String{ 4042 ref: ref, 4043 } 4044 } 4045 4046 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Document() Document { 4047 return Document{}.FromRef(x.ref) 4048 } 4049 4050 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Blob() Blob { 4051 return Blob{}.FromRef(x.ref) 4052 } 4053 4054 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt8() js.TypedArray[int8] { 4055 return js.TypedArray[int8]{}.FromRef(x.ref) 4056 } 4057 4058 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt16() js.TypedArray[int16] { 4059 return js.TypedArray[int16]{}.FromRef(x.ref) 4060 } 4061 4062 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt32() js.TypedArray[int32] { 4063 return js.TypedArray[int32]{}.FromRef(x.ref) 4064 } 4065 4066 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint8() js.TypedArray[uint8] { 4067 return js.TypedArray[uint8]{}.FromRef(x.ref) 4068 } 4069 4070 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint16() js.TypedArray[uint16] { 4071 return js.TypedArray[uint16]{}.FromRef(x.ref) 4072 } 4073 4074 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint32() js.TypedArray[uint32] { 4075 return js.TypedArray[uint32]{}.FromRef(x.ref) 4076 } 4077 4078 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt64() js.TypedArray[int64] { 4079 return js.TypedArray[int64]{}.FromRef(x.ref) 4080 } 4081 4082 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint64() js.TypedArray[uint64] { 4083 return js.TypedArray[uint64]{}.FromRef(x.ref) 4084 } 4085 4086 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayFloat32() js.TypedArray[float32] { 4087 return js.TypedArray[float32]{}.FromRef(x.ref) 4088 } 4089 4090 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayFloat64() js.TypedArray[float64] { 4091 return js.TypedArray[float64]{}.FromRef(x.ref) 4092 } 4093 4094 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) DataView() js.DataView { 4095 return js.DataView{}.FromRef(x.ref) 4096 } 4097 4098 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) ArrayBuffer() js.ArrayBuffer { 4099 return js.ArrayBuffer{}.FromRef(x.ref) 4100 } 4101 4102 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) FormData() FormData { 4103 return FormData{}.FromRef(x.ref) 4104 } 4105 4106 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) URLSearchParams() URLSearchParams { 4107 return URLSearchParams{}.FromRef(x.ref) 4108 } 4109 4110 func (x OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) String() js.String { 4111 return js.String{}.FromRef(x.ref) 4112 } 4113 4114 type XMLHttpRequestUpload struct { 4115 XMLHttpRequestEventTarget 4116 } 4117 4118 func (this XMLHttpRequestUpload) Once() XMLHttpRequestUpload { 4119 this.ref.Once() 4120 return this 4121 } 4122 4123 func (this XMLHttpRequestUpload) Ref() js.Ref { 4124 return this.XMLHttpRequestEventTarget.Ref() 4125 } 4126 4127 func (this XMLHttpRequestUpload) FromRef(ref js.Ref) XMLHttpRequestUpload { 4128 this.XMLHttpRequestEventTarget = this.XMLHttpRequestEventTarget.FromRef(ref) 4129 return this 4130 } 4131 4132 func (this XMLHttpRequestUpload) Free() { 4133 this.ref.Free() 4134 } 4135 4136 type XMLHttpRequestResponseType uint32 4137 4138 const ( 4139 _ XMLHttpRequestResponseType = iota 4140 4141 XMLHttpRequestResponseType_ 4142 XMLHttpRequestResponseType_ARRAYBUFFER 4143 XMLHttpRequestResponseType_BLOB 4144 XMLHttpRequestResponseType_DOCUMENT 4145 XMLHttpRequestResponseType_JSON 4146 XMLHttpRequestResponseType_TEXT 4147 ) 4148 4149 func (XMLHttpRequestResponseType) FromRef(str js.Ref) XMLHttpRequestResponseType { 4150 return XMLHttpRequestResponseType(bindings.ConstOfXMLHttpRequestResponseType(str)) 4151 } 4152 4153 func (x XMLHttpRequestResponseType) String() (string, bool) { 4154 switch x { 4155 case XMLHttpRequestResponseType_: 4156 return "", true 4157 case XMLHttpRequestResponseType_ARRAYBUFFER: 4158 return "arraybuffer", true 4159 case XMLHttpRequestResponseType_BLOB: 4160 return "blob", true 4161 case XMLHttpRequestResponseType_DOCUMENT: 4162 return "document", true 4163 case XMLHttpRequestResponseType_JSON: 4164 return "json", true 4165 case XMLHttpRequestResponseType_TEXT: 4166 return "text", true 4167 default: 4168 return "", false 4169 } 4170 } 4171 4172 type XMLHttpRequest struct { 4173 XMLHttpRequestEventTarget 4174 } 4175 4176 func (this XMLHttpRequest) Once() XMLHttpRequest { 4177 this.ref.Once() 4178 return this 4179 } 4180 4181 func (this XMLHttpRequest) Ref() js.Ref { 4182 return this.XMLHttpRequestEventTarget.Ref() 4183 } 4184 4185 func (this XMLHttpRequest) FromRef(ref js.Ref) XMLHttpRequest { 4186 this.XMLHttpRequestEventTarget = this.XMLHttpRequestEventTarget.FromRef(ref) 4187 return this 4188 } 4189 4190 func (this XMLHttpRequest) Free() { 4191 this.ref.Free() 4192 } 4193 4194 // ReadyState returns the value of property "XMLHttpRequest.readyState". 4195 // 4196 // It returns ok=false if there is no such property. 4197 func (this XMLHttpRequest) ReadyState() (ret uint16, ok bool) { 4198 ok = js.True == bindings.GetXMLHttpRequestReadyState( 4199 this.ref, js.Pointer(&ret), 4200 ) 4201 return 4202 } 4203 4204 // Timeout returns the value of property "XMLHttpRequest.timeout". 4205 // 4206 // It returns ok=false if there is no such property. 4207 func (this XMLHttpRequest) Timeout() (ret uint32, ok bool) { 4208 ok = js.True == bindings.GetXMLHttpRequestTimeout( 4209 this.ref, js.Pointer(&ret), 4210 ) 4211 return 4212 } 4213 4214 // SetTimeout sets the value of property "XMLHttpRequest.timeout" to val. 4215 // 4216 // It returns false if the property cannot be set. 4217 func (this XMLHttpRequest) SetTimeout(val uint32) bool { 4218 return js.True == bindings.SetXMLHttpRequestTimeout( 4219 this.ref, 4220 uint32(val), 4221 ) 4222 } 4223 4224 // WithCredentials returns the value of property "XMLHttpRequest.withCredentials". 4225 // 4226 // It returns ok=false if there is no such property. 4227 func (this XMLHttpRequest) WithCredentials() (ret bool, ok bool) { 4228 ok = js.True == bindings.GetXMLHttpRequestWithCredentials( 4229 this.ref, js.Pointer(&ret), 4230 ) 4231 return 4232 } 4233 4234 // SetWithCredentials sets the value of property "XMLHttpRequest.withCredentials" to val. 4235 // 4236 // It returns false if the property cannot be set. 4237 func (this XMLHttpRequest) SetWithCredentials(val bool) bool { 4238 return js.True == bindings.SetXMLHttpRequestWithCredentials( 4239 this.ref, 4240 js.Bool(bool(val)), 4241 ) 4242 } 4243 4244 // Upload returns the value of property "XMLHttpRequest.upload". 4245 // 4246 // It returns ok=false if there is no such property. 4247 func (this XMLHttpRequest) Upload() (ret XMLHttpRequestUpload, ok bool) { 4248 ok = js.True == bindings.GetXMLHttpRequestUpload( 4249 this.ref, js.Pointer(&ret), 4250 ) 4251 return 4252 } 4253 4254 // ResponseURL returns the value of property "XMLHttpRequest.responseURL". 4255 // 4256 // It returns ok=false if there is no such property. 4257 func (this XMLHttpRequest) ResponseURL() (ret js.String, ok bool) { 4258 ok = js.True == bindings.GetXMLHttpRequestResponseURL( 4259 this.ref, js.Pointer(&ret), 4260 ) 4261 return 4262 } 4263 4264 // Status returns the value of property "XMLHttpRequest.status". 4265 // 4266 // It returns ok=false if there is no such property. 4267 func (this XMLHttpRequest) Status() (ret uint16, ok bool) { 4268 ok = js.True == bindings.GetXMLHttpRequestStatus( 4269 this.ref, js.Pointer(&ret), 4270 ) 4271 return 4272 } 4273 4274 // StatusText returns the value of property "XMLHttpRequest.statusText". 4275 // 4276 // It returns ok=false if there is no such property. 4277 func (this XMLHttpRequest) StatusText() (ret js.String, ok bool) { 4278 ok = js.True == bindings.GetXMLHttpRequestStatusText( 4279 this.ref, js.Pointer(&ret), 4280 ) 4281 return 4282 } 4283 4284 // ResponseType returns the value of property "XMLHttpRequest.responseType". 4285 // 4286 // It returns ok=false if there is no such property. 4287 func (this XMLHttpRequest) ResponseType() (ret XMLHttpRequestResponseType, ok bool) { 4288 ok = js.True == bindings.GetXMLHttpRequestResponseType( 4289 this.ref, js.Pointer(&ret), 4290 ) 4291 return 4292 } 4293 4294 // SetResponseType sets the value of property "XMLHttpRequest.responseType" to val. 4295 // 4296 // It returns false if the property cannot be set. 4297 func (this XMLHttpRequest) SetResponseType(val XMLHttpRequestResponseType) bool { 4298 return js.True == bindings.SetXMLHttpRequestResponseType( 4299 this.ref, 4300 uint32(val), 4301 ) 4302 } 4303 4304 // Response returns the value of property "XMLHttpRequest.response". 4305 // 4306 // It returns ok=false if there is no such property. 4307 func (this XMLHttpRequest) Response() (ret js.Any, ok bool) { 4308 ok = js.True == bindings.GetXMLHttpRequestResponse( 4309 this.ref, js.Pointer(&ret), 4310 ) 4311 return 4312 } 4313 4314 // ResponseText returns the value of property "XMLHttpRequest.responseText". 4315 // 4316 // It returns ok=false if there is no such property. 4317 func (this XMLHttpRequest) ResponseText() (ret js.String, ok bool) { 4318 ok = js.True == bindings.GetXMLHttpRequestResponseText( 4319 this.ref, js.Pointer(&ret), 4320 ) 4321 return 4322 } 4323 4324 // ResponseXML returns the value of property "XMLHttpRequest.responseXML". 4325 // 4326 // It returns ok=false if there is no such property. 4327 func (this XMLHttpRequest) ResponseXML() (ret Document, ok bool) { 4328 ok = js.True == bindings.GetXMLHttpRequestResponseXML( 4329 this.ref, js.Pointer(&ret), 4330 ) 4331 return 4332 } 4333 4334 // HasFuncOpen returns true if the method "XMLHttpRequest.open" exists. 4335 func (this XMLHttpRequest) HasFuncOpen() bool { 4336 return js.True == bindings.HasFuncXMLHttpRequestOpen( 4337 this.ref, 4338 ) 4339 } 4340 4341 // FuncOpen returns the method "XMLHttpRequest.open". 4342 func (this XMLHttpRequest) FuncOpen() (fn js.Func[func(method js.String, url js.String)]) { 4343 bindings.FuncXMLHttpRequestOpen( 4344 this.ref, js.Pointer(&fn), 4345 ) 4346 return 4347 } 4348 4349 // Open calls the method "XMLHttpRequest.open". 4350 func (this XMLHttpRequest) Open(method js.String, url js.String) (ret js.Void) { 4351 bindings.CallXMLHttpRequestOpen( 4352 this.ref, js.Pointer(&ret), 4353 method.Ref(), 4354 url.Ref(), 4355 ) 4356 4357 return 4358 } 4359 4360 // TryOpen calls the method "XMLHttpRequest.open" 4361 // in a try/catch block and returns (_, err, ok = false) when it went through 4362 // the catch clause. 4363 func (this XMLHttpRequest) TryOpen(method js.String, url js.String) (ret js.Void, exception js.Any, ok bool) { 4364 ok = js.True == bindings.TryXMLHttpRequestOpen( 4365 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4366 method.Ref(), 4367 url.Ref(), 4368 ) 4369 4370 return 4371 } 4372 4373 // HasFuncOpen1 returns true if the method "XMLHttpRequest.open" exists. 4374 func (this XMLHttpRequest) HasFuncOpen1() bool { 4375 return js.True == bindings.HasFuncXMLHttpRequestOpen1( 4376 this.ref, 4377 ) 4378 } 4379 4380 // FuncOpen1 returns the method "XMLHttpRequest.open". 4381 func (this XMLHttpRequest) FuncOpen1() (fn js.Func[func(method js.String, url js.String, async bool, username js.String, password js.String)]) { 4382 bindings.FuncXMLHttpRequestOpen1( 4383 this.ref, js.Pointer(&fn), 4384 ) 4385 return 4386 } 4387 4388 // Open1 calls the method "XMLHttpRequest.open". 4389 func (this XMLHttpRequest) Open1(method js.String, url js.String, async bool, username js.String, password js.String) (ret js.Void) { 4390 bindings.CallXMLHttpRequestOpen1( 4391 this.ref, js.Pointer(&ret), 4392 method.Ref(), 4393 url.Ref(), 4394 js.Bool(bool(async)), 4395 username.Ref(), 4396 password.Ref(), 4397 ) 4398 4399 return 4400 } 4401 4402 // TryOpen1 calls the method "XMLHttpRequest.open" 4403 // in a try/catch block and returns (_, err, ok = false) when it went through 4404 // the catch clause. 4405 func (this XMLHttpRequest) TryOpen1(method js.String, url js.String, async bool, username js.String, password js.String) (ret js.Void, exception js.Any, ok bool) { 4406 ok = js.True == bindings.TryXMLHttpRequestOpen1( 4407 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4408 method.Ref(), 4409 url.Ref(), 4410 js.Bool(bool(async)), 4411 username.Ref(), 4412 password.Ref(), 4413 ) 4414 4415 return 4416 } 4417 4418 // HasFuncOpen2 returns true if the method "XMLHttpRequest.open" exists. 4419 func (this XMLHttpRequest) HasFuncOpen2() bool { 4420 return js.True == bindings.HasFuncXMLHttpRequestOpen2( 4421 this.ref, 4422 ) 4423 } 4424 4425 // FuncOpen2 returns the method "XMLHttpRequest.open". 4426 func (this XMLHttpRequest) FuncOpen2() (fn js.Func[func(method js.String, url js.String, async bool, username js.String)]) { 4427 bindings.FuncXMLHttpRequestOpen2( 4428 this.ref, js.Pointer(&fn), 4429 ) 4430 return 4431 } 4432 4433 // Open2 calls the method "XMLHttpRequest.open". 4434 func (this XMLHttpRequest) Open2(method js.String, url js.String, async bool, username js.String) (ret js.Void) { 4435 bindings.CallXMLHttpRequestOpen2( 4436 this.ref, js.Pointer(&ret), 4437 method.Ref(), 4438 url.Ref(), 4439 js.Bool(bool(async)), 4440 username.Ref(), 4441 ) 4442 4443 return 4444 } 4445 4446 // TryOpen2 calls the method "XMLHttpRequest.open" 4447 // in a try/catch block and returns (_, err, ok = false) when it went through 4448 // the catch clause. 4449 func (this XMLHttpRequest) TryOpen2(method js.String, url js.String, async bool, username js.String) (ret js.Void, exception js.Any, ok bool) { 4450 ok = js.True == bindings.TryXMLHttpRequestOpen2( 4451 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4452 method.Ref(), 4453 url.Ref(), 4454 js.Bool(bool(async)), 4455 username.Ref(), 4456 ) 4457 4458 return 4459 } 4460 4461 // HasFuncOpen3 returns true if the method "XMLHttpRequest.open" exists. 4462 func (this XMLHttpRequest) HasFuncOpen3() bool { 4463 return js.True == bindings.HasFuncXMLHttpRequestOpen3( 4464 this.ref, 4465 ) 4466 } 4467 4468 // FuncOpen3 returns the method "XMLHttpRequest.open". 4469 func (this XMLHttpRequest) FuncOpen3() (fn js.Func[func(method js.String, url js.String, async bool)]) { 4470 bindings.FuncXMLHttpRequestOpen3( 4471 this.ref, js.Pointer(&fn), 4472 ) 4473 return 4474 } 4475 4476 // Open3 calls the method "XMLHttpRequest.open". 4477 func (this XMLHttpRequest) Open3(method js.String, url js.String, async bool) (ret js.Void) { 4478 bindings.CallXMLHttpRequestOpen3( 4479 this.ref, js.Pointer(&ret), 4480 method.Ref(), 4481 url.Ref(), 4482 js.Bool(bool(async)), 4483 ) 4484 4485 return 4486 } 4487 4488 // TryOpen3 calls the method "XMLHttpRequest.open" 4489 // in a try/catch block and returns (_, err, ok = false) when it went through 4490 // the catch clause. 4491 func (this XMLHttpRequest) TryOpen3(method js.String, url js.String, async bool) (ret js.Void, exception js.Any, ok bool) { 4492 ok = js.True == bindings.TryXMLHttpRequestOpen3( 4493 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4494 method.Ref(), 4495 url.Ref(), 4496 js.Bool(bool(async)), 4497 ) 4498 4499 return 4500 } 4501 4502 // HasFuncSetRequestHeader returns true if the method "XMLHttpRequest.setRequestHeader" exists. 4503 func (this XMLHttpRequest) HasFuncSetRequestHeader() bool { 4504 return js.True == bindings.HasFuncXMLHttpRequestSetRequestHeader( 4505 this.ref, 4506 ) 4507 } 4508 4509 // FuncSetRequestHeader returns the method "XMLHttpRequest.setRequestHeader". 4510 func (this XMLHttpRequest) FuncSetRequestHeader() (fn js.Func[func(name js.String, value js.String)]) { 4511 bindings.FuncXMLHttpRequestSetRequestHeader( 4512 this.ref, js.Pointer(&fn), 4513 ) 4514 return 4515 } 4516 4517 // SetRequestHeader calls the method "XMLHttpRequest.setRequestHeader". 4518 func (this XMLHttpRequest) SetRequestHeader(name js.String, value js.String) (ret js.Void) { 4519 bindings.CallXMLHttpRequestSetRequestHeader( 4520 this.ref, js.Pointer(&ret), 4521 name.Ref(), 4522 value.Ref(), 4523 ) 4524 4525 return 4526 } 4527 4528 // TrySetRequestHeader calls the method "XMLHttpRequest.setRequestHeader" 4529 // in a try/catch block and returns (_, err, ok = false) when it went through 4530 // the catch clause. 4531 func (this XMLHttpRequest) TrySetRequestHeader(name js.String, value js.String) (ret js.Void, exception js.Any, ok bool) { 4532 ok = js.True == bindings.TryXMLHttpRequestSetRequestHeader( 4533 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4534 name.Ref(), 4535 value.Ref(), 4536 ) 4537 4538 return 4539 } 4540 4541 // HasFuncSend returns true if the method "XMLHttpRequest.send" exists. 4542 func (this XMLHttpRequest) HasFuncSend() bool { 4543 return js.True == bindings.HasFuncXMLHttpRequestSend( 4544 this.ref, 4545 ) 4546 } 4547 4548 // FuncSend returns the method "XMLHttpRequest.send". 4549 func (this XMLHttpRequest) FuncSend() (fn js.Func[func(body OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String)]) { 4550 bindings.FuncXMLHttpRequestSend( 4551 this.ref, js.Pointer(&fn), 4552 ) 4553 return 4554 } 4555 4556 // Send calls the method "XMLHttpRequest.send". 4557 func (this XMLHttpRequest) Send(body OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) (ret js.Void) { 4558 bindings.CallXMLHttpRequestSend( 4559 this.ref, js.Pointer(&ret), 4560 body.Ref(), 4561 ) 4562 4563 return 4564 } 4565 4566 // TrySend calls the method "XMLHttpRequest.send" 4567 // in a try/catch block and returns (_, err, ok = false) when it went through 4568 // the catch clause. 4569 func (this XMLHttpRequest) TrySend(body OneOf_Document_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) (ret js.Void, exception js.Any, ok bool) { 4570 ok = js.True == bindings.TryXMLHttpRequestSend( 4571 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4572 body.Ref(), 4573 ) 4574 4575 return 4576 } 4577 4578 // HasFuncSend1 returns true if the method "XMLHttpRequest.send" exists. 4579 func (this XMLHttpRequest) HasFuncSend1() bool { 4580 return js.True == bindings.HasFuncXMLHttpRequestSend1( 4581 this.ref, 4582 ) 4583 } 4584 4585 // FuncSend1 returns the method "XMLHttpRequest.send". 4586 func (this XMLHttpRequest) FuncSend1() (fn js.Func[func()]) { 4587 bindings.FuncXMLHttpRequestSend1( 4588 this.ref, js.Pointer(&fn), 4589 ) 4590 return 4591 } 4592 4593 // Send1 calls the method "XMLHttpRequest.send". 4594 func (this XMLHttpRequest) Send1() (ret js.Void) { 4595 bindings.CallXMLHttpRequestSend1( 4596 this.ref, js.Pointer(&ret), 4597 ) 4598 4599 return 4600 } 4601 4602 // TrySend1 calls the method "XMLHttpRequest.send" 4603 // in a try/catch block and returns (_, err, ok = false) when it went through 4604 // the catch clause. 4605 func (this XMLHttpRequest) TrySend1() (ret js.Void, exception js.Any, ok bool) { 4606 ok = js.True == bindings.TryXMLHttpRequestSend1( 4607 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4608 ) 4609 4610 return 4611 } 4612 4613 // HasFuncAbort returns true if the method "XMLHttpRequest.abort" exists. 4614 func (this XMLHttpRequest) HasFuncAbort() bool { 4615 return js.True == bindings.HasFuncXMLHttpRequestAbort( 4616 this.ref, 4617 ) 4618 } 4619 4620 // FuncAbort returns the method "XMLHttpRequest.abort". 4621 func (this XMLHttpRequest) FuncAbort() (fn js.Func[func()]) { 4622 bindings.FuncXMLHttpRequestAbort( 4623 this.ref, js.Pointer(&fn), 4624 ) 4625 return 4626 } 4627 4628 // Abort calls the method "XMLHttpRequest.abort". 4629 func (this XMLHttpRequest) Abort() (ret js.Void) { 4630 bindings.CallXMLHttpRequestAbort( 4631 this.ref, js.Pointer(&ret), 4632 ) 4633 4634 return 4635 } 4636 4637 // TryAbort calls the method "XMLHttpRequest.abort" 4638 // in a try/catch block and returns (_, err, ok = false) when it went through 4639 // the catch clause. 4640 func (this XMLHttpRequest) TryAbort() (ret js.Void, exception js.Any, ok bool) { 4641 ok = js.True == bindings.TryXMLHttpRequestAbort( 4642 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4643 ) 4644 4645 return 4646 } 4647 4648 // HasFuncGetResponseHeader returns true if the method "XMLHttpRequest.getResponseHeader" exists. 4649 func (this XMLHttpRequest) HasFuncGetResponseHeader() bool { 4650 return js.True == bindings.HasFuncXMLHttpRequestGetResponseHeader( 4651 this.ref, 4652 ) 4653 } 4654 4655 // FuncGetResponseHeader returns the method "XMLHttpRequest.getResponseHeader". 4656 func (this XMLHttpRequest) FuncGetResponseHeader() (fn js.Func[func(name js.String) js.String]) { 4657 bindings.FuncXMLHttpRequestGetResponseHeader( 4658 this.ref, js.Pointer(&fn), 4659 ) 4660 return 4661 } 4662 4663 // GetResponseHeader calls the method "XMLHttpRequest.getResponseHeader". 4664 func (this XMLHttpRequest) GetResponseHeader(name js.String) (ret js.String) { 4665 bindings.CallXMLHttpRequestGetResponseHeader( 4666 this.ref, js.Pointer(&ret), 4667 name.Ref(), 4668 ) 4669 4670 return 4671 } 4672 4673 // TryGetResponseHeader calls the method "XMLHttpRequest.getResponseHeader" 4674 // in a try/catch block and returns (_, err, ok = false) when it went through 4675 // the catch clause. 4676 func (this XMLHttpRequest) TryGetResponseHeader(name js.String) (ret js.String, exception js.Any, ok bool) { 4677 ok = js.True == bindings.TryXMLHttpRequestGetResponseHeader( 4678 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4679 name.Ref(), 4680 ) 4681 4682 return 4683 } 4684 4685 // HasFuncGetAllResponseHeaders returns true if the method "XMLHttpRequest.getAllResponseHeaders" exists. 4686 func (this XMLHttpRequest) HasFuncGetAllResponseHeaders() bool { 4687 return js.True == bindings.HasFuncXMLHttpRequestGetAllResponseHeaders( 4688 this.ref, 4689 ) 4690 } 4691 4692 // FuncGetAllResponseHeaders returns the method "XMLHttpRequest.getAllResponseHeaders". 4693 func (this XMLHttpRequest) FuncGetAllResponseHeaders() (fn js.Func[func() js.String]) { 4694 bindings.FuncXMLHttpRequestGetAllResponseHeaders( 4695 this.ref, js.Pointer(&fn), 4696 ) 4697 return 4698 } 4699 4700 // GetAllResponseHeaders calls the method "XMLHttpRequest.getAllResponseHeaders". 4701 func (this XMLHttpRequest) GetAllResponseHeaders() (ret js.String) { 4702 bindings.CallXMLHttpRequestGetAllResponseHeaders( 4703 this.ref, js.Pointer(&ret), 4704 ) 4705 4706 return 4707 } 4708 4709 // TryGetAllResponseHeaders calls the method "XMLHttpRequest.getAllResponseHeaders" 4710 // in a try/catch block and returns (_, err, ok = false) when it went through 4711 // the catch clause. 4712 func (this XMLHttpRequest) TryGetAllResponseHeaders() (ret js.String, exception js.Any, ok bool) { 4713 ok = js.True == bindings.TryXMLHttpRequestGetAllResponseHeaders( 4714 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4715 ) 4716 4717 return 4718 } 4719 4720 // HasFuncOverrideMimeType returns true if the method "XMLHttpRequest.overrideMimeType" exists. 4721 func (this XMLHttpRequest) HasFuncOverrideMimeType() bool { 4722 return js.True == bindings.HasFuncXMLHttpRequestOverrideMimeType( 4723 this.ref, 4724 ) 4725 } 4726 4727 // FuncOverrideMimeType returns the method "XMLHttpRequest.overrideMimeType". 4728 func (this XMLHttpRequest) FuncOverrideMimeType() (fn js.Func[func(mime js.String)]) { 4729 bindings.FuncXMLHttpRequestOverrideMimeType( 4730 this.ref, js.Pointer(&fn), 4731 ) 4732 return 4733 } 4734 4735 // OverrideMimeType calls the method "XMLHttpRequest.overrideMimeType". 4736 func (this XMLHttpRequest) OverrideMimeType(mime js.String) (ret js.Void) { 4737 bindings.CallXMLHttpRequestOverrideMimeType( 4738 this.ref, js.Pointer(&ret), 4739 mime.Ref(), 4740 ) 4741 4742 return 4743 } 4744 4745 // TryOverrideMimeType calls the method "XMLHttpRequest.overrideMimeType" 4746 // in a try/catch block and returns (_, err, ok = false) when it went through 4747 // the catch clause. 4748 func (this XMLHttpRequest) TryOverrideMimeType(mime js.String) (ret js.Void, exception js.Any, ok bool) { 4749 ok = js.True == bindings.TryXMLHttpRequestOverrideMimeType( 4750 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4751 mime.Ref(), 4752 ) 4753 4754 return 4755 } 4756 4757 // HasFuncSetAttributionReporting returns true if the method "XMLHttpRequest.setAttributionReporting" exists. 4758 func (this XMLHttpRequest) HasFuncSetAttributionReporting() bool { 4759 return js.True == bindings.HasFuncXMLHttpRequestSetAttributionReporting( 4760 this.ref, 4761 ) 4762 } 4763 4764 // FuncSetAttributionReporting returns the method "XMLHttpRequest.setAttributionReporting". 4765 func (this XMLHttpRequest) FuncSetAttributionReporting() (fn js.Func[func(options AttributionReportingRequestOptions)]) { 4766 bindings.FuncXMLHttpRequestSetAttributionReporting( 4767 this.ref, js.Pointer(&fn), 4768 ) 4769 return 4770 } 4771 4772 // SetAttributionReporting calls the method "XMLHttpRequest.setAttributionReporting". 4773 func (this XMLHttpRequest) SetAttributionReporting(options AttributionReportingRequestOptions) (ret js.Void) { 4774 bindings.CallXMLHttpRequestSetAttributionReporting( 4775 this.ref, js.Pointer(&ret), 4776 js.Pointer(&options), 4777 ) 4778 4779 return 4780 } 4781 4782 // TrySetAttributionReporting calls the method "XMLHttpRequest.setAttributionReporting" 4783 // in a try/catch block and returns (_, err, ok = false) when it went through 4784 // the catch clause. 4785 func (this XMLHttpRequest) TrySetAttributionReporting(options AttributionReportingRequestOptions) (ret js.Void, exception js.Any, ok bool) { 4786 ok = js.True == bindings.TryXMLHttpRequestSetAttributionReporting( 4787 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4788 js.Pointer(&options), 4789 ) 4790 4791 return 4792 } 4793 4794 // HasFuncSetPrivateToken returns true if the method "XMLHttpRequest.setPrivateToken" exists. 4795 func (this XMLHttpRequest) HasFuncSetPrivateToken() bool { 4796 return js.True == bindings.HasFuncXMLHttpRequestSetPrivateToken( 4797 this.ref, 4798 ) 4799 } 4800 4801 // FuncSetPrivateToken returns the method "XMLHttpRequest.setPrivateToken". 4802 func (this XMLHttpRequest) FuncSetPrivateToken() (fn js.Func[func(privateToken PrivateToken)]) { 4803 bindings.FuncXMLHttpRequestSetPrivateToken( 4804 this.ref, js.Pointer(&fn), 4805 ) 4806 return 4807 } 4808 4809 // SetPrivateToken calls the method "XMLHttpRequest.setPrivateToken". 4810 func (this XMLHttpRequest) SetPrivateToken(privateToken PrivateToken) (ret js.Void) { 4811 bindings.CallXMLHttpRequestSetPrivateToken( 4812 this.ref, js.Pointer(&ret), 4813 js.Pointer(&privateToken), 4814 ) 4815 4816 return 4817 } 4818 4819 // TrySetPrivateToken calls the method "XMLHttpRequest.setPrivateToken" 4820 // in a try/catch block and returns (_, err, ok = false) when it went through 4821 // the catch clause. 4822 func (this XMLHttpRequest) TrySetPrivateToken(privateToken PrivateToken) (ret js.Void, exception js.Any, ok bool) { 4823 ok = js.True == bindings.TryXMLHttpRequestSetPrivateToken( 4824 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4825 js.Pointer(&privateToken), 4826 ) 4827 4828 return 4829 } 4830 4831 type OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String struct { 4832 ref js.Ref 4833 } 4834 4835 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Ref() js.Ref { 4836 return x.ref 4837 } 4838 4839 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Free() { 4840 x.ref.Free() 4841 } 4842 4843 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) FromRef(ref js.Ref) OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String { 4844 return OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String{ 4845 ref: ref, 4846 } 4847 } 4848 4849 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) Blob() Blob { 4850 return Blob{}.FromRef(x.ref) 4851 } 4852 4853 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt8() js.TypedArray[int8] { 4854 return js.TypedArray[int8]{}.FromRef(x.ref) 4855 } 4856 4857 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt16() js.TypedArray[int16] { 4858 return js.TypedArray[int16]{}.FromRef(x.ref) 4859 } 4860 4861 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt32() js.TypedArray[int32] { 4862 return js.TypedArray[int32]{}.FromRef(x.ref) 4863 } 4864 4865 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint8() js.TypedArray[uint8] { 4866 return js.TypedArray[uint8]{}.FromRef(x.ref) 4867 } 4868 4869 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint16() js.TypedArray[uint16] { 4870 return js.TypedArray[uint16]{}.FromRef(x.ref) 4871 } 4872 4873 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint32() js.TypedArray[uint32] { 4874 return js.TypedArray[uint32]{}.FromRef(x.ref) 4875 } 4876 4877 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayInt64() js.TypedArray[int64] { 4878 return js.TypedArray[int64]{}.FromRef(x.ref) 4879 } 4880 4881 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayUint64() js.TypedArray[uint64] { 4882 return js.TypedArray[uint64]{}.FromRef(x.ref) 4883 } 4884 4885 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayFloat32() js.TypedArray[float32] { 4886 return js.TypedArray[float32]{}.FromRef(x.ref) 4887 } 4888 4889 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) TypedArrayFloat64() js.TypedArray[float64] { 4890 return js.TypedArray[float64]{}.FromRef(x.ref) 4891 } 4892 4893 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) DataView() js.DataView { 4894 return js.DataView{}.FromRef(x.ref) 4895 } 4896 4897 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) ArrayBuffer() js.ArrayBuffer { 4898 return js.ArrayBuffer{}.FromRef(x.ref) 4899 } 4900 4901 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) FormData() FormData { 4902 return FormData{}.FromRef(x.ref) 4903 } 4904 4905 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) URLSearchParams() URLSearchParams { 4906 return URLSearchParams{}.FromRef(x.ref) 4907 } 4908 4909 func (x OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String) String() js.String { 4910 return js.String{}.FromRef(x.ref) 4911 } 4912 4913 type XMLHttpRequestBodyInit = OneOf_Blob_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_FormData_URLSearchParams_String 4914 4915 type XMLHttpRequestEventTarget struct { 4916 EventTarget 4917 } 4918 4919 func (this XMLHttpRequestEventTarget) Once() XMLHttpRequestEventTarget { 4920 this.ref.Once() 4921 return this 4922 } 4923 4924 func (this XMLHttpRequestEventTarget) Ref() js.Ref { 4925 return this.EventTarget.Ref() 4926 } 4927 4928 func (this XMLHttpRequestEventTarget) FromRef(ref js.Ref) XMLHttpRequestEventTarget { 4929 this.EventTarget = this.EventTarget.FromRef(ref) 4930 return this 4931 } 4932 4933 func (this XMLHttpRequestEventTarget) Free() { 4934 this.ref.Free() 4935 } 4936 4937 type XMLSerializer struct { 4938 ref js.Ref 4939 } 4940 4941 func (this XMLSerializer) Once() XMLSerializer { 4942 this.ref.Once() 4943 return this 4944 } 4945 4946 func (this XMLSerializer) Ref() js.Ref { 4947 return this.ref 4948 } 4949 4950 func (this XMLSerializer) FromRef(ref js.Ref) XMLSerializer { 4951 this.ref = ref 4952 return this 4953 } 4954 4955 func (this XMLSerializer) Free() { 4956 this.ref.Free() 4957 } 4958 4959 // HasFuncSerializeToString returns true if the method "XMLSerializer.serializeToString" exists. 4960 func (this XMLSerializer) HasFuncSerializeToString() bool { 4961 return js.True == bindings.HasFuncXMLSerializerSerializeToString( 4962 this.ref, 4963 ) 4964 } 4965 4966 // FuncSerializeToString returns the method "XMLSerializer.serializeToString". 4967 func (this XMLSerializer) FuncSerializeToString() (fn js.Func[func(root Node) js.String]) { 4968 bindings.FuncXMLSerializerSerializeToString( 4969 this.ref, js.Pointer(&fn), 4970 ) 4971 return 4972 } 4973 4974 // SerializeToString calls the method "XMLSerializer.serializeToString". 4975 func (this XMLSerializer) SerializeToString(root Node) (ret js.String) { 4976 bindings.CallXMLSerializerSerializeToString( 4977 this.ref, js.Pointer(&ret), 4978 root.Ref(), 4979 ) 4980 4981 return 4982 } 4983 4984 // TrySerializeToString calls the method "XMLSerializer.serializeToString" 4985 // in a try/catch block and returns (_, err, ok = false) when it went through 4986 // the catch clause. 4987 func (this XMLSerializer) TrySerializeToString(root Node) (ret js.String, exception js.Any, ok bool) { 4988 ok = js.True == bindings.TryXMLSerializerSerializeToString( 4989 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4990 root.Ref(), 4991 ) 4992 4993 return 4994 } 4995 4996 type XPathEvaluator struct { 4997 ref js.Ref 4998 } 4999 5000 func (this XPathEvaluator) Once() XPathEvaluator { 5001 this.ref.Once() 5002 return this 5003 } 5004 5005 func (this XPathEvaluator) Ref() js.Ref { 5006 return this.ref 5007 } 5008 5009 func (this XPathEvaluator) FromRef(ref js.Ref) XPathEvaluator { 5010 this.ref = ref 5011 return this 5012 } 5013 5014 func (this XPathEvaluator) Free() { 5015 this.ref.Free() 5016 } 5017 5018 // HasFuncCreateExpression returns true if the method "XPathEvaluator.createExpression" exists. 5019 func (this XPathEvaluator) HasFuncCreateExpression() bool { 5020 return js.True == bindings.HasFuncXPathEvaluatorCreateExpression( 5021 this.ref, 5022 ) 5023 } 5024 5025 // FuncCreateExpression returns the method "XPathEvaluator.createExpression". 5026 func (this XPathEvaluator) FuncCreateExpression() (fn js.Func[func(expression js.String, resolver js.Func[func(prefix js.String) js.String]) XPathExpression]) { 5027 bindings.FuncXPathEvaluatorCreateExpression( 5028 this.ref, js.Pointer(&fn), 5029 ) 5030 return 5031 } 5032 5033 // CreateExpression calls the method "XPathEvaluator.createExpression". 5034 func (this XPathEvaluator) CreateExpression(expression js.String, resolver js.Func[func(prefix js.String) js.String]) (ret XPathExpression) { 5035 bindings.CallXPathEvaluatorCreateExpression( 5036 this.ref, js.Pointer(&ret), 5037 expression.Ref(), 5038 resolver.Ref(), 5039 ) 5040 5041 return 5042 } 5043 5044 // TryCreateExpression calls the method "XPathEvaluator.createExpression" 5045 // in a try/catch block and returns (_, err, ok = false) when it went through 5046 // the catch clause. 5047 func (this XPathEvaluator) TryCreateExpression(expression js.String, resolver js.Func[func(prefix js.String) js.String]) (ret XPathExpression, exception js.Any, ok bool) { 5048 ok = js.True == bindings.TryXPathEvaluatorCreateExpression( 5049 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5050 expression.Ref(), 5051 resolver.Ref(), 5052 ) 5053 5054 return 5055 } 5056 5057 // HasFuncCreateExpression1 returns true if the method "XPathEvaluator.createExpression" exists. 5058 func (this XPathEvaluator) HasFuncCreateExpression1() bool { 5059 return js.True == bindings.HasFuncXPathEvaluatorCreateExpression1( 5060 this.ref, 5061 ) 5062 } 5063 5064 // FuncCreateExpression1 returns the method "XPathEvaluator.createExpression". 5065 func (this XPathEvaluator) FuncCreateExpression1() (fn js.Func[func(expression js.String) XPathExpression]) { 5066 bindings.FuncXPathEvaluatorCreateExpression1( 5067 this.ref, js.Pointer(&fn), 5068 ) 5069 return 5070 } 5071 5072 // CreateExpression1 calls the method "XPathEvaluator.createExpression". 5073 func (this XPathEvaluator) CreateExpression1(expression js.String) (ret XPathExpression) { 5074 bindings.CallXPathEvaluatorCreateExpression1( 5075 this.ref, js.Pointer(&ret), 5076 expression.Ref(), 5077 ) 5078 5079 return 5080 } 5081 5082 // TryCreateExpression1 calls the method "XPathEvaluator.createExpression" 5083 // in a try/catch block and returns (_, err, ok = false) when it went through 5084 // the catch clause. 5085 func (this XPathEvaluator) TryCreateExpression1(expression js.String) (ret XPathExpression, exception js.Any, ok bool) { 5086 ok = js.True == bindings.TryXPathEvaluatorCreateExpression1( 5087 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5088 expression.Ref(), 5089 ) 5090 5091 return 5092 } 5093 5094 // HasFuncCreateNSResolver returns true if the method "XPathEvaluator.createNSResolver" exists. 5095 func (this XPathEvaluator) HasFuncCreateNSResolver() bool { 5096 return js.True == bindings.HasFuncXPathEvaluatorCreateNSResolver( 5097 this.ref, 5098 ) 5099 } 5100 5101 // FuncCreateNSResolver returns the method "XPathEvaluator.createNSResolver". 5102 func (this XPathEvaluator) FuncCreateNSResolver() (fn js.Func[func(nodeResolver Node) Node]) { 5103 bindings.FuncXPathEvaluatorCreateNSResolver( 5104 this.ref, js.Pointer(&fn), 5105 ) 5106 return 5107 } 5108 5109 // CreateNSResolver calls the method "XPathEvaluator.createNSResolver". 5110 func (this XPathEvaluator) CreateNSResolver(nodeResolver Node) (ret Node) { 5111 bindings.CallXPathEvaluatorCreateNSResolver( 5112 this.ref, js.Pointer(&ret), 5113 nodeResolver.Ref(), 5114 ) 5115 5116 return 5117 } 5118 5119 // TryCreateNSResolver calls the method "XPathEvaluator.createNSResolver" 5120 // in a try/catch block and returns (_, err, ok = false) when it went through 5121 // the catch clause. 5122 func (this XPathEvaluator) TryCreateNSResolver(nodeResolver Node) (ret Node, exception js.Any, ok bool) { 5123 ok = js.True == bindings.TryXPathEvaluatorCreateNSResolver( 5124 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5125 nodeResolver.Ref(), 5126 ) 5127 5128 return 5129 } 5130 5131 // HasFuncEvaluate returns true if the method "XPathEvaluator.evaluate" exists. 5132 func (this XPathEvaluator) HasFuncEvaluate() bool { 5133 return js.True == bindings.HasFuncXPathEvaluatorEvaluate( 5134 this.ref, 5135 ) 5136 } 5137 5138 // FuncEvaluate returns the method "XPathEvaluator.evaluate". 5139 func (this XPathEvaluator) FuncEvaluate() (fn js.Func[func(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String], typ uint16, result XPathResult) XPathResult]) { 5140 bindings.FuncXPathEvaluatorEvaluate( 5141 this.ref, js.Pointer(&fn), 5142 ) 5143 return 5144 } 5145 5146 // Evaluate calls the method "XPathEvaluator.evaluate". 5147 func (this XPathEvaluator) Evaluate(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String], typ uint16, result XPathResult) (ret XPathResult) { 5148 bindings.CallXPathEvaluatorEvaluate( 5149 this.ref, js.Pointer(&ret), 5150 expression.Ref(), 5151 contextNode.Ref(), 5152 resolver.Ref(), 5153 uint32(typ), 5154 result.Ref(), 5155 ) 5156 5157 return 5158 } 5159 5160 // TryEvaluate calls the method "XPathEvaluator.evaluate" 5161 // in a try/catch block and returns (_, err, ok = false) when it went through 5162 // the catch clause. 5163 func (this XPathEvaluator) TryEvaluate(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String], typ uint16, result XPathResult) (ret XPathResult, exception js.Any, ok bool) { 5164 ok = js.True == bindings.TryXPathEvaluatorEvaluate( 5165 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5166 expression.Ref(), 5167 contextNode.Ref(), 5168 resolver.Ref(), 5169 uint32(typ), 5170 result.Ref(), 5171 ) 5172 5173 return 5174 } 5175 5176 // HasFuncEvaluate1 returns true if the method "XPathEvaluator.evaluate" exists. 5177 func (this XPathEvaluator) HasFuncEvaluate1() bool { 5178 return js.True == bindings.HasFuncXPathEvaluatorEvaluate1( 5179 this.ref, 5180 ) 5181 } 5182 5183 // FuncEvaluate1 returns the method "XPathEvaluator.evaluate". 5184 func (this XPathEvaluator) FuncEvaluate1() (fn js.Func[func(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String], typ uint16) XPathResult]) { 5185 bindings.FuncXPathEvaluatorEvaluate1( 5186 this.ref, js.Pointer(&fn), 5187 ) 5188 return 5189 } 5190 5191 // Evaluate1 calls the method "XPathEvaluator.evaluate". 5192 func (this XPathEvaluator) Evaluate1(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String], typ uint16) (ret XPathResult) { 5193 bindings.CallXPathEvaluatorEvaluate1( 5194 this.ref, js.Pointer(&ret), 5195 expression.Ref(), 5196 contextNode.Ref(), 5197 resolver.Ref(), 5198 uint32(typ), 5199 ) 5200 5201 return 5202 } 5203 5204 // TryEvaluate1 calls the method "XPathEvaluator.evaluate" 5205 // in a try/catch block and returns (_, err, ok = false) when it went through 5206 // the catch clause. 5207 func (this XPathEvaluator) TryEvaluate1(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String], typ uint16) (ret XPathResult, exception js.Any, ok bool) { 5208 ok = js.True == bindings.TryXPathEvaluatorEvaluate1( 5209 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5210 expression.Ref(), 5211 contextNode.Ref(), 5212 resolver.Ref(), 5213 uint32(typ), 5214 ) 5215 5216 return 5217 } 5218 5219 // HasFuncEvaluate2 returns true if the method "XPathEvaluator.evaluate" exists. 5220 func (this XPathEvaluator) HasFuncEvaluate2() bool { 5221 return js.True == bindings.HasFuncXPathEvaluatorEvaluate2( 5222 this.ref, 5223 ) 5224 } 5225 5226 // FuncEvaluate2 returns the method "XPathEvaluator.evaluate". 5227 func (this XPathEvaluator) FuncEvaluate2() (fn js.Func[func(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String]) XPathResult]) { 5228 bindings.FuncXPathEvaluatorEvaluate2( 5229 this.ref, js.Pointer(&fn), 5230 ) 5231 return 5232 } 5233 5234 // Evaluate2 calls the method "XPathEvaluator.evaluate". 5235 func (this XPathEvaluator) Evaluate2(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String]) (ret XPathResult) { 5236 bindings.CallXPathEvaluatorEvaluate2( 5237 this.ref, js.Pointer(&ret), 5238 expression.Ref(), 5239 contextNode.Ref(), 5240 resolver.Ref(), 5241 ) 5242 5243 return 5244 } 5245 5246 // TryEvaluate2 calls the method "XPathEvaluator.evaluate" 5247 // in a try/catch block and returns (_, err, ok = false) when it went through 5248 // the catch clause. 5249 func (this XPathEvaluator) TryEvaluate2(expression js.String, contextNode Node, resolver js.Func[func(prefix js.String) js.String]) (ret XPathResult, exception js.Any, ok bool) { 5250 ok = js.True == bindings.TryXPathEvaluatorEvaluate2( 5251 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5252 expression.Ref(), 5253 contextNode.Ref(), 5254 resolver.Ref(), 5255 ) 5256 5257 return 5258 } 5259 5260 // HasFuncEvaluate3 returns true if the method "XPathEvaluator.evaluate" exists. 5261 func (this XPathEvaluator) HasFuncEvaluate3() bool { 5262 return js.True == bindings.HasFuncXPathEvaluatorEvaluate3( 5263 this.ref, 5264 ) 5265 } 5266 5267 // FuncEvaluate3 returns the method "XPathEvaluator.evaluate". 5268 func (this XPathEvaluator) FuncEvaluate3() (fn js.Func[func(expression js.String, contextNode Node) XPathResult]) { 5269 bindings.FuncXPathEvaluatorEvaluate3( 5270 this.ref, js.Pointer(&fn), 5271 ) 5272 return 5273 } 5274 5275 // Evaluate3 calls the method "XPathEvaluator.evaluate". 5276 func (this XPathEvaluator) Evaluate3(expression js.String, contextNode Node) (ret XPathResult) { 5277 bindings.CallXPathEvaluatorEvaluate3( 5278 this.ref, js.Pointer(&ret), 5279 expression.Ref(), 5280 contextNode.Ref(), 5281 ) 5282 5283 return 5284 } 5285 5286 // TryEvaluate3 calls the method "XPathEvaluator.evaluate" 5287 // in a try/catch block and returns (_, err, ok = false) when it went through 5288 // the catch clause. 5289 func (this XPathEvaluator) TryEvaluate3(expression js.String, contextNode Node) (ret XPathResult, exception js.Any, ok bool) { 5290 ok = js.True == bindings.TryXPathEvaluatorEvaluate3( 5291 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5292 expression.Ref(), 5293 contextNode.Ref(), 5294 ) 5295 5296 return 5297 } 5298 5299 type XRBoundedReferenceSpace struct { 5300 XRReferenceSpace 5301 } 5302 5303 func (this XRBoundedReferenceSpace) Once() XRBoundedReferenceSpace { 5304 this.ref.Once() 5305 return this 5306 } 5307 5308 func (this XRBoundedReferenceSpace) Ref() js.Ref { 5309 return this.XRReferenceSpace.Ref() 5310 } 5311 5312 func (this XRBoundedReferenceSpace) FromRef(ref js.Ref) XRBoundedReferenceSpace { 5313 this.XRReferenceSpace = this.XRReferenceSpace.FromRef(ref) 5314 return this 5315 } 5316 5317 func (this XRBoundedReferenceSpace) Free() { 5318 this.ref.Free() 5319 } 5320 5321 // BoundsGeometry returns the value of property "XRBoundedReferenceSpace.boundsGeometry". 5322 // 5323 // It returns ok=false if there is no such property. 5324 func (this XRBoundedReferenceSpace) BoundsGeometry() (ret js.FrozenArray[DOMPointReadOnly], ok bool) { 5325 ok = js.True == bindings.GetXRBoundedReferenceSpaceBoundsGeometry( 5326 this.ref, js.Pointer(&ret), 5327 ) 5328 return 5329 }