github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis04_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/core/abi" 8 "github.com/primecitizens/pcz/std/ffi/js" 9 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 10 ) 11 12 type OneOf_HTMLCollection_Element struct { 13 ref js.Ref 14 } 15 16 func (x OneOf_HTMLCollection_Element) Ref() js.Ref { 17 return x.ref 18 } 19 20 func (x OneOf_HTMLCollection_Element) Free() { 21 x.ref.Free() 22 } 23 24 func (x OneOf_HTMLCollection_Element) FromRef(ref js.Ref) OneOf_HTMLCollection_Element { 25 return OneOf_HTMLCollection_Element{ 26 ref: ref, 27 } 28 } 29 30 func (x OneOf_HTMLCollection_Element) HTMLCollection() HTMLCollection { 31 return HTMLCollection{}.FromRef(x.ref) 32 } 33 34 func (x OneOf_HTMLCollection_Element) Element() Element { 35 return Element{}.FromRef(x.ref) 36 } 37 38 type HTMLAllCollection struct { 39 ref js.Ref 40 } 41 42 func (this HTMLAllCollection) Once() HTMLAllCollection { 43 this.ref.Once() 44 return this 45 } 46 47 func (this HTMLAllCollection) Ref() js.Ref { 48 return this.ref 49 } 50 51 func (this HTMLAllCollection) FromRef(ref js.Ref) HTMLAllCollection { 52 this.ref = ref 53 return this 54 } 55 56 func (this HTMLAllCollection) Free() { 57 this.ref.Free() 58 } 59 60 // Length returns the value of property "HTMLAllCollection.length". 61 // 62 // It returns ok=false if there is no such property. 63 func (this HTMLAllCollection) Length() (ret uint32, ok bool) { 64 ok = js.True == bindings.GetHTMLAllCollectionLength( 65 this.ref, js.Pointer(&ret), 66 ) 67 return 68 } 69 70 // HasFuncGet returns true if the method "HTMLAllCollection." exists. 71 func (this HTMLAllCollection) HasFuncGet() bool { 72 return js.True == bindings.HasFuncHTMLAllCollectionGet( 73 this.ref, 74 ) 75 } 76 77 // FuncGet returns the method "HTMLAllCollection.". 78 func (this HTMLAllCollection) FuncGet() (fn js.Func[func(index uint32) Element]) { 79 bindings.FuncHTMLAllCollectionGet( 80 this.ref, js.Pointer(&fn), 81 ) 82 return 83 } 84 85 // Get calls the method "HTMLAllCollection.". 86 func (this HTMLAllCollection) Get(index uint32) (ret Element) { 87 bindings.CallHTMLAllCollectionGet( 88 this.ref, js.Pointer(&ret), 89 uint32(index), 90 ) 91 92 return 93 } 94 95 // TryGet calls the method "HTMLAllCollection." 96 // in a try/catch block and returns (_, err, ok = false) when it went through 97 // the catch clause. 98 func (this HTMLAllCollection) TryGet(index uint32) (ret Element, exception js.Any, ok bool) { 99 ok = js.True == bindings.TryHTMLAllCollectionGet( 100 this.ref, js.Pointer(&ret), js.Pointer(&exception), 101 uint32(index), 102 ) 103 104 return 105 } 106 107 // HasFuncNamedItem returns true if the method "HTMLAllCollection.namedItem" exists. 108 func (this HTMLAllCollection) HasFuncNamedItem() bool { 109 return js.True == bindings.HasFuncHTMLAllCollectionNamedItem( 110 this.ref, 111 ) 112 } 113 114 // FuncNamedItem returns the method "HTMLAllCollection.namedItem". 115 func (this HTMLAllCollection) FuncNamedItem() (fn js.Func[func(name js.String) OneOf_HTMLCollection_Element]) { 116 bindings.FuncHTMLAllCollectionNamedItem( 117 this.ref, js.Pointer(&fn), 118 ) 119 return 120 } 121 122 // NamedItem calls the method "HTMLAllCollection.namedItem". 123 func (this HTMLAllCollection) NamedItem(name js.String) (ret OneOf_HTMLCollection_Element) { 124 bindings.CallHTMLAllCollectionNamedItem( 125 this.ref, js.Pointer(&ret), 126 name.Ref(), 127 ) 128 129 return 130 } 131 132 // TryNamedItem calls the method "HTMLAllCollection.namedItem" 133 // in a try/catch block and returns (_, err, ok = false) when it went through 134 // the catch clause. 135 func (this HTMLAllCollection) TryNamedItem(name js.String) (ret OneOf_HTMLCollection_Element, exception js.Any, ok bool) { 136 ok = js.True == bindings.TryHTMLAllCollectionNamedItem( 137 this.ref, js.Pointer(&ret), js.Pointer(&exception), 138 name.Ref(), 139 ) 140 141 return 142 } 143 144 // HasFuncItem returns true if the method "HTMLAllCollection.item" exists. 145 func (this HTMLAllCollection) HasFuncItem() bool { 146 return js.True == bindings.HasFuncHTMLAllCollectionItem( 147 this.ref, 148 ) 149 } 150 151 // FuncItem returns the method "HTMLAllCollection.item". 152 func (this HTMLAllCollection) FuncItem() (fn js.Func[func(nameOrIndex js.String) OneOf_HTMLCollection_Element]) { 153 bindings.FuncHTMLAllCollectionItem( 154 this.ref, js.Pointer(&fn), 155 ) 156 return 157 } 158 159 // Item calls the method "HTMLAllCollection.item". 160 func (this HTMLAllCollection) Item(nameOrIndex js.String) (ret OneOf_HTMLCollection_Element) { 161 bindings.CallHTMLAllCollectionItem( 162 this.ref, js.Pointer(&ret), 163 nameOrIndex.Ref(), 164 ) 165 166 return 167 } 168 169 // TryItem calls the method "HTMLAllCollection.item" 170 // in a try/catch block and returns (_, err, ok = false) when it went through 171 // the catch clause. 172 func (this HTMLAllCollection) TryItem(nameOrIndex js.String) (ret OneOf_HTMLCollection_Element, exception js.Any, ok bool) { 173 ok = js.True == bindings.TryHTMLAllCollectionItem( 174 this.ref, js.Pointer(&ret), js.Pointer(&exception), 175 nameOrIndex.Ref(), 176 ) 177 178 return 179 } 180 181 // HasFuncItem1 returns true if the method "HTMLAllCollection.item" exists. 182 func (this HTMLAllCollection) HasFuncItem1() bool { 183 return js.True == bindings.HasFuncHTMLAllCollectionItem1( 184 this.ref, 185 ) 186 } 187 188 // FuncItem1 returns the method "HTMLAllCollection.item". 189 func (this HTMLAllCollection) FuncItem1() (fn js.Func[func() OneOf_HTMLCollection_Element]) { 190 bindings.FuncHTMLAllCollectionItem1( 191 this.ref, js.Pointer(&fn), 192 ) 193 return 194 } 195 196 // Item1 calls the method "HTMLAllCollection.item". 197 func (this HTMLAllCollection) Item1() (ret OneOf_HTMLCollection_Element) { 198 bindings.CallHTMLAllCollectionItem1( 199 this.ref, js.Pointer(&ret), 200 ) 201 202 return 203 } 204 205 // TryItem1 calls the method "HTMLAllCollection.item" 206 // in a try/catch block and returns (_, err, ok = false) when it went through 207 // the catch clause. 208 func (this HTMLAllCollection) TryItem1() (ret OneOf_HTMLCollection_Element, exception js.Any, ok bool) { 209 ok = js.True == bindings.TryHTMLAllCollectionItem1( 210 this.ref, js.Pointer(&ret), js.Pointer(&exception), 211 ) 212 213 return 214 } 215 216 type DOMStringList struct { 217 ref js.Ref 218 } 219 220 func (this DOMStringList) Once() DOMStringList { 221 this.ref.Once() 222 return this 223 } 224 225 func (this DOMStringList) Ref() js.Ref { 226 return this.ref 227 } 228 229 func (this DOMStringList) FromRef(ref js.Ref) DOMStringList { 230 this.ref = ref 231 return this 232 } 233 234 func (this DOMStringList) Free() { 235 this.ref.Free() 236 } 237 238 // Length returns the value of property "DOMStringList.length". 239 // 240 // It returns ok=false if there is no such property. 241 func (this DOMStringList) Length() (ret uint32, ok bool) { 242 ok = js.True == bindings.GetDOMStringListLength( 243 this.ref, js.Pointer(&ret), 244 ) 245 return 246 } 247 248 // HasFuncItem returns true if the method "DOMStringList.item" exists. 249 func (this DOMStringList) HasFuncItem() bool { 250 return js.True == bindings.HasFuncDOMStringListItem( 251 this.ref, 252 ) 253 } 254 255 // FuncItem returns the method "DOMStringList.item". 256 func (this DOMStringList) FuncItem() (fn js.Func[func(index uint32) js.String]) { 257 bindings.FuncDOMStringListItem( 258 this.ref, js.Pointer(&fn), 259 ) 260 return 261 } 262 263 // Item calls the method "DOMStringList.item". 264 func (this DOMStringList) Item(index uint32) (ret js.String) { 265 bindings.CallDOMStringListItem( 266 this.ref, js.Pointer(&ret), 267 uint32(index), 268 ) 269 270 return 271 } 272 273 // TryItem calls the method "DOMStringList.item" 274 // in a try/catch block and returns (_, err, ok = false) when it went through 275 // the catch clause. 276 func (this DOMStringList) TryItem(index uint32) (ret js.String, exception js.Any, ok bool) { 277 ok = js.True == bindings.TryDOMStringListItem( 278 this.ref, js.Pointer(&ret), js.Pointer(&exception), 279 uint32(index), 280 ) 281 282 return 283 } 284 285 // HasFuncContains returns true if the method "DOMStringList.contains" exists. 286 func (this DOMStringList) HasFuncContains() bool { 287 return js.True == bindings.HasFuncDOMStringListContains( 288 this.ref, 289 ) 290 } 291 292 // FuncContains returns the method "DOMStringList.contains". 293 func (this DOMStringList) FuncContains() (fn js.Func[func(string js.String) bool]) { 294 bindings.FuncDOMStringListContains( 295 this.ref, js.Pointer(&fn), 296 ) 297 return 298 } 299 300 // Contains calls the method "DOMStringList.contains". 301 func (this DOMStringList) Contains(string js.String) (ret bool) { 302 bindings.CallDOMStringListContains( 303 this.ref, js.Pointer(&ret), 304 string.Ref(), 305 ) 306 307 return 308 } 309 310 // TryContains calls the method "DOMStringList.contains" 311 // in a try/catch block and returns (_, err, ok = false) when it went through 312 // the catch clause. 313 func (this DOMStringList) TryContains(string js.String) (ret bool, exception js.Any, ok bool) { 314 ok = js.True == bindings.TryDOMStringListContains( 315 this.ref, js.Pointer(&ret), js.Pointer(&exception), 316 string.Ref(), 317 ) 318 319 return 320 } 321 322 type Location struct { 323 ref js.Ref 324 } 325 326 func (this Location) Once() Location { 327 this.ref.Once() 328 return this 329 } 330 331 func (this Location) Ref() js.Ref { 332 return this.ref 333 } 334 335 func (this Location) FromRef(ref js.Ref) Location { 336 this.ref = ref 337 return this 338 } 339 340 func (this Location) Free() { 341 this.ref.Free() 342 } 343 344 // Href returns the value of property "Location.href". 345 // 346 // It returns ok=false if there is no such property. 347 func (this Location) Href() (ret js.String, ok bool) { 348 ok = js.True == bindings.GetLocationHref( 349 this.ref, js.Pointer(&ret), 350 ) 351 return 352 } 353 354 // SetHref sets the value of property "Location.href" to val. 355 // 356 // It returns false if the property cannot be set. 357 func (this Location) SetHref(val js.String) bool { 358 return js.True == bindings.SetLocationHref( 359 this.ref, 360 val.Ref(), 361 ) 362 } 363 364 // Origin returns the value of property "Location.origin". 365 // 366 // It returns ok=false if there is no such property. 367 func (this Location) Origin() (ret js.String, ok bool) { 368 ok = js.True == bindings.GetLocationOrigin( 369 this.ref, js.Pointer(&ret), 370 ) 371 return 372 } 373 374 // Protocol returns the value of property "Location.protocol". 375 // 376 // It returns ok=false if there is no such property. 377 func (this Location) Protocol() (ret js.String, ok bool) { 378 ok = js.True == bindings.GetLocationProtocol( 379 this.ref, js.Pointer(&ret), 380 ) 381 return 382 } 383 384 // SetProtocol sets the value of property "Location.protocol" to val. 385 // 386 // It returns false if the property cannot be set. 387 func (this Location) SetProtocol(val js.String) bool { 388 return js.True == bindings.SetLocationProtocol( 389 this.ref, 390 val.Ref(), 391 ) 392 } 393 394 // Host returns the value of property "Location.host". 395 // 396 // It returns ok=false if there is no such property. 397 func (this Location) Host() (ret js.String, ok bool) { 398 ok = js.True == bindings.GetLocationHost( 399 this.ref, js.Pointer(&ret), 400 ) 401 return 402 } 403 404 // SetHost sets the value of property "Location.host" to val. 405 // 406 // It returns false if the property cannot be set. 407 func (this Location) SetHost(val js.String) bool { 408 return js.True == bindings.SetLocationHost( 409 this.ref, 410 val.Ref(), 411 ) 412 } 413 414 // Hostname returns the value of property "Location.hostname". 415 // 416 // It returns ok=false if there is no such property. 417 func (this Location) Hostname() (ret js.String, ok bool) { 418 ok = js.True == bindings.GetLocationHostname( 419 this.ref, js.Pointer(&ret), 420 ) 421 return 422 } 423 424 // SetHostname sets the value of property "Location.hostname" to val. 425 // 426 // It returns false if the property cannot be set. 427 func (this Location) SetHostname(val js.String) bool { 428 return js.True == bindings.SetLocationHostname( 429 this.ref, 430 val.Ref(), 431 ) 432 } 433 434 // Port returns the value of property "Location.port". 435 // 436 // It returns ok=false if there is no such property. 437 func (this Location) Port() (ret js.String, ok bool) { 438 ok = js.True == bindings.GetLocationPort( 439 this.ref, js.Pointer(&ret), 440 ) 441 return 442 } 443 444 // SetPort sets the value of property "Location.port" to val. 445 // 446 // It returns false if the property cannot be set. 447 func (this Location) SetPort(val js.String) bool { 448 return js.True == bindings.SetLocationPort( 449 this.ref, 450 val.Ref(), 451 ) 452 } 453 454 // Pathname returns the value of property "Location.pathname". 455 // 456 // It returns ok=false if there is no such property. 457 func (this Location) Pathname() (ret js.String, ok bool) { 458 ok = js.True == bindings.GetLocationPathname( 459 this.ref, js.Pointer(&ret), 460 ) 461 return 462 } 463 464 // SetPathname sets the value of property "Location.pathname" to val. 465 // 466 // It returns false if the property cannot be set. 467 func (this Location) SetPathname(val js.String) bool { 468 return js.True == bindings.SetLocationPathname( 469 this.ref, 470 val.Ref(), 471 ) 472 } 473 474 // Search returns the value of property "Location.search". 475 // 476 // It returns ok=false if there is no such property. 477 func (this Location) Search() (ret js.String, ok bool) { 478 ok = js.True == bindings.GetLocationSearch( 479 this.ref, js.Pointer(&ret), 480 ) 481 return 482 } 483 484 // SetSearch sets the value of property "Location.search" to val. 485 // 486 // It returns false if the property cannot be set. 487 func (this Location) SetSearch(val js.String) bool { 488 return js.True == bindings.SetLocationSearch( 489 this.ref, 490 val.Ref(), 491 ) 492 } 493 494 // Hash returns the value of property "Location.hash". 495 // 496 // It returns ok=false if there is no such property. 497 func (this Location) Hash() (ret js.String, ok bool) { 498 ok = js.True == bindings.GetLocationHash( 499 this.ref, js.Pointer(&ret), 500 ) 501 return 502 } 503 504 // SetHash sets the value of property "Location.hash" to val. 505 // 506 // It returns false if the property cannot be set. 507 func (this Location) SetHash(val js.String) bool { 508 return js.True == bindings.SetLocationHash( 509 this.ref, 510 val.Ref(), 511 ) 512 } 513 514 // AncestorOrigins returns the value of property "Location.ancestorOrigins". 515 // 516 // It returns ok=false if there is no such property. 517 func (this Location) AncestorOrigins() (ret DOMStringList, ok bool) { 518 ok = js.True == bindings.GetLocationAncestorOrigins( 519 this.ref, js.Pointer(&ret), 520 ) 521 return 522 } 523 524 // HasFuncAssign returns true if the method "Location.assign" exists. 525 func (this Location) HasFuncAssign() bool { 526 return js.True == bindings.HasFuncLocationAssign( 527 this.ref, 528 ) 529 } 530 531 // FuncAssign returns the method "Location.assign". 532 func (this Location) FuncAssign() (fn js.Func[func(url js.String)]) { 533 bindings.FuncLocationAssign( 534 this.ref, js.Pointer(&fn), 535 ) 536 return 537 } 538 539 // Assign calls the method "Location.assign". 540 func (this Location) Assign(url js.String) (ret js.Void) { 541 bindings.CallLocationAssign( 542 this.ref, js.Pointer(&ret), 543 url.Ref(), 544 ) 545 546 return 547 } 548 549 // TryAssign calls the method "Location.assign" 550 // in a try/catch block and returns (_, err, ok = false) when it went through 551 // the catch clause. 552 func (this Location) TryAssign(url js.String) (ret js.Void, exception js.Any, ok bool) { 553 ok = js.True == bindings.TryLocationAssign( 554 this.ref, js.Pointer(&ret), js.Pointer(&exception), 555 url.Ref(), 556 ) 557 558 return 559 } 560 561 // HasFuncReplace returns true if the method "Location.replace" exists. 562 func (this Location) HasFuncReplace() bool { 563 return js.True == bindings.HasFuncLocationReplace( 564 this.ref, 565 ) 566 } 567 568 // FuncReplace returns the method "Location.replace". 569 func (this Location) FuncReplace() (fn js.Func[func(url js.String)]) { 570 bindings.FuncLocationReplace( 571 this.ref, js.Pointer(&fn), 572 ) 573 return 574 } 575 576 // Replace calls the method "Location.replace". 577 func (this Location) Replace(url js.String) (ret js.Void) { 578 bindings.CallLocationReplace( 579 this.ref, js.Pointer(&ret), 580 url.Ref(), 581 ) 582 583 return 584 } 585 586 // TryReplace calls the method "Location.replace" 587 // in a try/catch block and returns (_, err, ok = false) when it went through 588 // the catch clause. 589 func (this Location) TryReplace(url js.String) (ret js.Void, exception js.Any, ok bool) { 590 ok = js.True == bindings.TryLocationReplace( 591 this.ref, js.Pointer(&ret), js.Pointer(&exception), 592 url.Ref(), 593 ) 594 595 return 596 } 597 598 // HasFuncReload returns true if the method "Location.reload" exists. 599 func (this Location) HasFuncReload() bool { 600 return js.True == bindings.HasFuncLocationReload( 601 this.ref, 602 ) 603 } 604 605 // FuncReload returns the method "Location.reload". 606 func (this Location) FuncReload() (fn js.Func[func()]) { 607 bindings.FuncLocationReload( 608 this.ref, js.Pointer(&fn), 609 ) 610 return 611 } 612 613 // Reload calls the method "Location.reload". 614 func (this Location) Reload() (ret js.Void) { 615 bindings.CallLocationReload( 616 this.ref, js.Pointer(&ret), 617 ) 618 619 return 620 } 621 622 // TryReload calls the method "Location.reload" 623 // in a try/catch block and returns (_, err, ok = false) when it went through 624 // the catch clause. 625 func (this Location) TryReload() (ret js.Void, exception js.Any, ok bool) { 626 ok = js.True == bindings.TryLocationReload( 627 this.ref, js.Pointer(&ret), js.Pointer(&exception), 628 ) 629 630 return 631 } 632 633 type DocumentReadyState uint32 634 635 const ( 636 _ DocumentReadyState = iota 637 638 DocumentReadyState_LOADING 639 DocumentReadyState_INTERACTIVE 640 DocumentReadyState_COMPLETE 641 ) 642 643 func (DocumentReadyState) FromRef(str js.Ref) DocumentReadyState { 644 return DocumentReadyState(bindings.ConstOfDocumentReadyState(str)) 645 } 646 647 func (x DocumentReadyState) String() (string, bool) { 648 switch x { 649 case DocumentReadyState_LOADING: 650 return "loading", true 651 case DocumentReadyState_INTERACTIVE: 652 return "interactive", true 653 case DocumentReadyState_COMPLETE: 654 return "complete", true 655 default: 656 return "", false 657 } 658 } 659 660 type EndingType uint32 661 662 const ( 663 _ EndingType = iota 664 665 EndingType_TRANSPARENT 666 EndingType_NATIVE 667 ) 668 669 func (EndingType) FromRef(str js.Ref) EndingType { 670 return EndingType(bindings.ConstOfEndingType(str)) 671 } 672 673 func (x EndingType) String() (string, bool) { 674 switch x { 675 case EndingType_TRANSPARENT: 676 return "transparent", true 677 case EndingType_NATIVE: 678 return "native", true 679 default: 680 return "", false 681 } 682 } 683 684 type BlobPropertyBag struct { 685 // Type is "BlobPropertyBag.type" 686 // 687 // Optional, defaults to "". 688 Type js.String 689 // Endings is "BlobPropertyBag.endings" 690 // 691 // Optional, defaults to "transparent". 692 Endings EndingType 693 694 FFI_USE bool 695 } 696 697 // FromRef calls UpdateFrom and returns a BlobPropertyBag with all fields set. 698 func (p BlobPropertyBag) FromRef(ref js.Ref) BlobPropertyBag { 699 p.UpdateFrom(ref) 700 return p 701 } 702 703 // New creates a new BlobPropertyBag in the application heap. 704 func (p BlobPropertyBag) New() js.Ref { 705 return bindings.BlobPropertyBagJSLoad( 706 js.Pointer(&p), js.True, 0, 707 ) 708 } 709 710 // UpdateFrom copies value of all fields of the heap object to p. 711 func (p *BlobPropertyBag) UpdateFrom(ref js.Ref) { 712 bindings.BlobPropertyBagJSStore( 713 js.Pointer(p), ref, 714 ) 715 } 716 717 // Update writes all fields of the p to the heap object referenced by ref. 718 func (p *BlobPropertyBag) Update(ref js.Ref) { 719 bindings.BlobPropertyBagJSLoad( 720 js.Pointer(p), js.False, ref, 721 ) 722 } 723 724 // FreeMembers frees fields with heap reference, if recursive is true 725 // free all heap references reachable from p. 726 func (p *BlobPropertyBag) FreeMembers(recursive bool) { 727 js.Free( 728 p.Type.Ref(), 729 ) 730 p.Type = p.Type.FromRef(js.Undefined) 731 } 732 733 type QueuingStrategySizeFunc func(this js.Ref, chunk js.Any) js.Ref 734 735 func (fn QueuingStrategySizeFunc) Register() js.Func[func(chunk js.Any) float64] { 736 return js.RegisterCallback[func(chunk js.Any) float64]( 737 fn, abi.FuncPCABIInternal(fn), 738 ) 739 } 740 741 func (fn QueuingStrategySizeFunc) DispatchCallback( 742 targetPC uintptr, ctx *js.CallbackContext, 743 ) { 744 args := ctx.Args() 745 if len(args) != 1+1 /* js this */ || 746 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 747 js.ThrowInvalidCallbackInvocation() 748 } 749 750 if ctx.Return(fn( 751 args[0], 752 753 js.Any{}.FromRef(args[0+1]), 754 )) { 755 return 756 } 757 758 js.ThrowCallbackValueNotReturned() 759 } 760 761 type QueuingStrategySize[T any] struct { 762 Fn func(arg T, this js.Ref, chunk js.Any) js.Ref 763 Arg T 764 } 765 766 func (cb *QueuingStrategySize[T]) Register() js.Func[func(chunk js.Any) float64] { 767 return js.RegisterCallback[func(chunk js.Any) float64]( 768 cb, abi.FuncPCABIInternal(cb.Fn), 769 ) 770 } 771 772 func (cb *QueuingStrategySize[T]) DispatchCallback( 773 targetPC uintptr, ctx *js.CallbackContext, 774 ) { 775 args := ctx.Args() 776 if len(args) != 1+1 /* js this */ || 777 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 778 js.ThrowInvalidCallbackInvocation() 779 } 780 781 if ctx.Return(cb.Fn( 782 cb.Arg, 783 args[0], 784 785 js.Any{}.FromRef(args[0+1]), 786 )) { 787 return 788 } 789 790 js.ThrowCallbackValueNotReturned() 791 } 792 793 type QueuingStrategy struct { 794 // HighWaterMark is "QueuingStrategy.highWaterMark" 795 // 796 // Optional 797 // 798 // NOTE: FFI_USE_HighWaterMark MUST be set to true to make this field effective. 799 HighWaterMark float64 800 // Size is "QueuingStrategy.size" 801 // 802 // Optional 803 Size js.Func[func(chunk js.Any) float64] 804 805 FFI_USE_HighWaterMark bool // for HighWaterMark. 806 807 FFI_USE bool 808 } 809 810 // FromRef calls UpdateFrom and returns a QueuingStrategy with all fields set. 811 func (p QueuingStrategy) FromRef(ref js.Ref) QueuingStrategy { 812 p.UpdateFrom(ref) 813 return p 814 } 815 816 // New creates a new QueuingStrategy in the application heap. 817 func (p QueuingStrategy) New() js.Ref { 818 return bindings.QueuingStrategyJSLoad( 819 js.Pointer(&p), js.True, 0, 820 ) 821 } 822 823 // UpdateFrom copies value of all fields of the heap object to p. 824 func (p *QueuingStrategy) UpdateFrom(ref js.Ref) { 825 bindings.QueuingStrategyJSStore( 826 js.Pointer(p), ref, 827 ) 828 } 829 830 // Update writes all fields of the p to the heap object referenced by ref. 831 func (p *QueuingStrategy) Update(ref js.Ref) { 832 bindings.QueuingStrategyJSLoad( 833 js.Pointer(p), js.False, ref, 834 ) 835 } 836 837 // FreeMembers frees fields with heap reference, if recursive is true 838 // free all heap references reachable from p. 839 func (p *QueuingStrategy) FreeMembers(recursive bool) { 840 js.Free( 841 p.Size.Ref(), 842 ) 843 p.Size = p.Size.FromRef(js.Undefined) 844 } 845 846 type ReadableStreamReadResult struct { 847 // Value is "ReadableStreamReadResult.value" 848 // 849 // Optional 850 Value js.Any 851 // Done is "ReadableStreamReadResult.done" 852 // 853 // Optional 854 // 855 // NOTE: FFI_USE_Done MUST be set to true to make this field effective. 856 Done bool 857 858 FFI_USE_Done bool // for Done. 859 860 FFI_USE bool 861 } 862 863 // FromRef calls UpdateFrom and returns a ReadableStreamReadResult with all fields set. 864 func (p ReadableStreamReadResult) FromRef(ref js.Ref) ReadableStreamReadResult { 865 p.UpdateFrom(ref) 866 return p 867 } 868 869 // New creates a new ReadableStreamReadResult in the application heap. 870 func (p ReadableStreamReadResult) New() js.Ref { 871 return bindings.ReadableStreamReadResultJSLoad( 872 js.Pointer(&p), js.True, 0, 873 ) 874 } 875 876 // UpdateFrom copies value of all fields of the heap object to p. 877 func (p *ReadableStreamReadResult) UpdateFrom(ref js.Ref) { 878 bindings.ReadableStreamReadResultJSStore( 879 js.Pointer(p), ref, 880 ) 881 } 882 883 // Update writes all fields of the p to the heap object referenced by ref. 884 func (p *ReadableStreamReadResult) Update(ref js.Ref) { 885 bindings.ReadableStreamReadResultJSLoad( 886 js.Pointer(p), js.False, ref, 887 ) 888 } 889 890 // FreeMembers frees fields with heap reference, if recursive is true 891 // free all heap references reachable from p. 892 func (p *ReadableStreamReadResult) FreeMembers(recursive bool) { 893 js.Free( 894 p.Value.Ref(), 895 ) 896 p.Value = p.Value.FromRef(js.Undefined) 897 } 898 899 func NewReadableStreamDefaultReader(stream ReadableStream) (ret ReadableStreamDefaultReader) { 900 ret.ref = bindings.NewReadableStreamDefaultReaderByReadableStreamDefaultReader( 901 stream.Ref()) 902 return 903 } 904 905 type ReadableStreamDefaultReader struct { 906 ref js.Ref 907 } 908 909 func (this ReadableStreamDefaultReader) Once() ReadableStreamDefaultReader { 910 this.ref.Once() 911 return this 912 } 913 914 func (this ReadableStreamDefaultReader) Ref() js.Ref { 915 return this.ref 916 } 917 918 func (this ReadableStreamDefaultReader) FromRef(ref js.Ref) ReadableStreamDefaultReader { 919 this.ref = ref 920 return this 921 } 922 923 func (this ReadableStreamDefaultReader) Free() { 924 this.ref.Free() 925 } 926 927 // Closed returns the value of property "ReadableStreamDefaultReader.closed". 928 // 929 // It returns ok=false if there is no such property. 930 func (this ReadableStreamDefaultReader) Closed() (ret js.Promise[js.Void], ok bool) { 931 ok = js.True == bindings.GetReadableStreamDefaultReaderClosed( 932 this.ref, js.Pointer(&ret), 933 ) 934 return 935 } 936 937 // HasFuncRead returns true if the method "ReadableStreamDefaultReader.read" exists. 938 func (this ReadableStreamDefaultReader) HasFuncRead() bool { 939 return js.True == bindings.HasFuncReadableStreamDefaultReaderRead( 940 this.ref, 941 ) 942 } 943 944 // FuncRead returns the method "ReadableStreamDefaultReader.read". 945 func (this ReadableStreamDefaultReader) FuncRead() (fn js.Func[func() js.Promise[ReadableStreamReadResult]]) { 946 bindings.FuncReadableStreamDefaultReaderRead( 947 this.ref, js.Pointer(&fn), 948 ) 949 return 950 } 951 952 // Read calls the method "ReadableStreamDefaultReader.read". 953 func (this ReadableStreamDefaultReader) Read() (ret js.Promise[ReadableStreamReadResult]) { 954 bindings.CallReadableStreamDefaultReaderRead( 955 this.ref, js.Pointer(&ret), 956 ) 957 958 return 959 } 960 961 // TryRead calls the method "ReadableStreamDefaultReader.read" 962 // in a try/catch block and returns (_, err, ok = false) when it went through 963 // the catch clause. 964 func (this ReadableStreamDefaultReader) TryRead() (ret js.Promise[ReadableStreamReadResult], exception js.Any, ok bool) { 965 ok = js.True == bindings.TryReadableStreamDefaultReaderRead( 966 this.ref, js.Pointer(&ret), js.Pointer(&exception), 967 ) 968 969 return 970 } 971 972 // HasFuncReleaseLock returns true if the method "ReadableStreamDefaultReader.releaseLock" exists. 973 func (this ReadableStreamDefaultReader) HasFuncReleaseLock() bool { 974 return js.True == bindings.HasFuncReadableStreamDefaultReaderReleaseLock( 975 this.ref, 976 ) 977 } 978 979 // FuncReleaseLock returns the method "ReadableStreamDefaultReader.releaseLock". 980 func (this ReadableStreamDefaultReader) FuncReleaseLock() (fn js.Func[func()]) { 981 bindings.FuncReadableStreamDefaultReaderReleaseLock( 982 this.ref, js.Pointer(&fn), 983 ) 984 return 985 } 986 987 // ReleaseLock calls the method "ReadableStreamDefaultReader.releaseLock". 988 func (this ReadableStreamDefaultReader) ReleaseLock() (ret js.Void) { 989 bindings.CallReadableStreamDefaultReaderReleaseLock( 990 this.ref, js.Pointer(&ret), 991 ) 992 993 return 994 } 995 996 // TryReleaseLock calls the method "ReadableStreamDefaultReader.releaseLock" 997 // in a try/catch block and returns (_, err, ok = false) when it went through 998 // the catch clause. 999 func (this ReadableStreamDefaultReader) TryReleaseLock() (ret js.Void, exception js.Any, ok bool) { 1000 ok = js.True == bindings.TryReadableStreamDefaultReaderReleaseLock( 1001 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1002 ) 1003 1004 return 1005 } 1006 1007 // HasFuncCancel returns true if the method "ReadableStreamDefaultReader.cancel" exists. 1008 func (this ReadableStreamDefaultReader) HasFuncCancel() bool { 1009 return js.True == bindings.HasFuncReadableStreamDefaultReaderCancel( 1010 this.ref, 1011 ) 1012 } 1013 1014 // FuncCancel returns the method "ReadableStreamDefaultReader.cancel". 1015 func (this ReadableStreamDefaultReader) FuncCancel() (fn js.Func[func(reason js.Any) js.Promise[js.Void]]) { 1016 bindings.FuncReadableStreamDefaultReaderCancel( 1017 this.ref, js.Pointer(&fn), 1018 ) 1019 return 1020 } 1021 1022 // Cancel calls the method "ReadableStreamDefaultReader.cancel". 1023 func (this ReadableStreamDefaultReader) Cancel(reason js.Any) (ret js.Promise[js.Void]) { 1024 bindings.CallReadableStreamDefaultReaderCancel( 1025 this.ref, js.Pointer(&ret), 1026 reason.Ref(), 1027 ) 1028 1029 return 1030 } 1031 1032 // TryCancel calls the method "ReadableStreamDefaultReader.cancel" 1033 // in a try/catch block and returns (_, err, ok = false) when it went through 1034 // the catch clause. 1035 func (this ReadableStreamDefaultReader) TryCancel(reason js.Any) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1036 ok = js.True == bindings.TryReadableStreamDefaultReaderCancel( 1037 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1038 reason.Ref(), 1039 ) 1040 1041 return 1042 } 1043 1044 // HasFuncCancel1 returns true if the method "ReadableStreamDefaultReader.cancel" exists. 1045 func (this ReadableStreamDefaultReader) HasFuncCancel1() bool { 1046 return js.True == bindings.HasFuncReadableStreamDefaultReaderCancel1( 1047 this.ref, 1048 ) 1049 } 1050 1051 // FuncCancel1 returns the method "ReadableStreamDefaultReader.cancel". 1052 func (this ReadableStreamDefaultReader) FuncCancel1() (fn js.Func[func() js.Promise[js.Void]]) { 1053 bindings.FuncReadableStreamDefaultReaderCancel1( 1054 this.ref, js.Pointer(&fn), 1055 ) 1056 return 1057 } 1058 1059 // Cancel1 calls the method "ReadableStreamDefaultReader.cancel". 1060 func (this ReadableStreamDefaultReader) Cancel1() (ret js.Promise[js.Void]) { 1061 bindings.CallReadableStreamDefaultReaderCancel1( 1062 this.ref, js.Pointer(&ret), 1063 ) 1064 1065 return 1066 } 1067 1068 // TryCancel1 calls the method "ReadableStreamDefaultReader.cancel" 1069 // in a try/catch block and returns (_, err, ok = false) when it went through 1070 // the catch clause. 1071 func (this ReadableStreamDefaultReader) TryCancel1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1072 ok = js.True == bindings.TryReadableStreamDefaultReaderCancel1( 1073 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1074 ) 1075 1076 return 1077 } 1078 1079 func NewReadableStreamBYOBReader(stream ReadableStream) (ret ReadableStreamBYOBReader) { 1080 ret.ref = bindings.NewReadableStreamBYOBReaderByReadableStreamBYOBReader( 1081 stream.Ref()) 1082 return 1083 } 1084 1085 type ReadableStreamBYOBReader struct { 1086 ref js.Ref 1087 } 1088 1089 func (this ReadableStreamBYOBReader) Once() ReadableStreamBYOBReader { 1090 this.ref.Once() 1091 return this 1092 } 1093 1094 func (this ReadableStreamBYOBReader) Ref() js.Ref { 1095 return this.ref 1096 } 1097 1098 func (this ReadableStreamBYOBReader) FromRef(ref js.Ref) ReadableStreamBYOBReader { 1099 this.ref = ref 1100 return this 1101 } 1102 1103 func (this ReadableStreamBYOBReader) Free() { 1104 this.ref.Free() 1105 } 1106 1107 // Closed returns the value of property "ReadableStreamBYOBReader.closed". 1108 // 1109 // It returns ok=false if there is no such property. 1110 func (this ReadableStreamBYOBReader) Closed() (ret js.Promise[js.Void], ok bool) { 1111 ok = js.True == bindings.GetReadableStreamBYOBReaderClosed( 1112 this.ref, js.Pointer(&ret), 1113 ) 1114 return 1115 } 1116 1117 // HasFuncRead returns true if the method "ReadableStreamBYOBReader.read" exists. 1118 func (this ReadableStreamBYOBReader) HasFuncRead() bool { 1119 return js.True == bindings.HasFuncReadableStreamBYOBReaderRead( 1120 this.ref, 1121 ) 1122 } 1123 1124 // FuncRead returns the method "ReadableStreamBYOBReader.read". 1125 func (this ReadableStreamBYOBReader) FuncRead() (fn js.Func[func(view js.ArrayBufferView) js.Promise[ReadableStreamReadResult]]) { 1126 bindings.FuncReadableStreamBYOBReaderRead( 1127 this.ref, js.Pointer(&fn), 1128 ) 1129 return 1130 } 1131 1132 // Read calls the method "ReadableStreamBYOBReader.read". 1133 func (this ReadableStreamBYOBReader) Read(view js.ArrayBufferView) (ret js.Promise[ReadableStreamReadResult]) { 1134 bindings.CallReadableStreamBYOBReaderRead( 1135 this.ref, js.Pointer(&ret), 1136 view.Ref(), 1137 ) 1138 1139 return 1140 } 1141 1142 // TryRead calls the method "ReadableStreamBYOBReader.read" 1143 // in a try/catch block and returns (_, err, ok = false) when it went through 1144 // the catch clause. 1145 func (this ReadableStreamBYOBReader) TryRead(view js.ArrayBufferView) (ret js.Promise[ReadableStreamReadResult], exception js.Any, ok bool) { 1146 ok = js.True == bindings.TryReadableStreamBYOBReaderRead( 1147 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1148 view.Ref(), 1149 ) 1150 1151 return 1152 } 1153 1154 // HasFuncReleaseLock returns true if the method "ReadableStreamBYOBReader.releaseLock" exists. 1155 func (this ReadableStreamBYOBReader) HasFuncReleaseLock() bool { 1156 return js.True == bindings.HasFuncReadableStreamBYOBReaderReleaseLock( 1157 this.ref, 1158 ) 1159 } 1160 1161 // FuncReleaseLock returns the method "ReadableStreamBYOBReader.releaseLock". 1162 func (this ReadableStreamBYOBReader) FuncReleaseLock() (fn js.Func[func()]) { 1163 bindings.FuncReadableStreamBYOBReaderReleaseLock( 1164 this.ref, js.Pointer(&fn), 1165 ) 1166 return 1167 } 1168 1169 // ReleaseLock calls the method "ReadableStreamBYOBReader.releaseLock". 1170 func (this ReadableStreamBYOBReader) ReleaseLock() (ret js.Void) { 1171 bindings.CallReadableStreamBYOBReaderReleaseLock( 1172 this.ref, js.Pointer(&ret), 1173 ) 1174 1175 return 1176 } 1177 1178 // TryReleaseLock calls the method "ReadableStreamBYOBReader.releaseLock" 1179 // in a try/catch block and returns (_, err, ok = false) when it went through 1180 // the catch clause. 1181 func (this ReadableStreamBYOBReader) TryReleaseLock() (ret js.Void, exception js.Any, ok bool) { 1182 ok = js.True == bindings.TryReadableStreamBYOBReaderReleaseLock( 1183 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1184 ) 1185 1186 return 1187 } 1188 1189 // HasFuncCancel returns true if the method "ReadableStreamBYOBReader.cancel" exists. 1190 func (this ReadableStreamBYOBReader) HasFuncCancel() bool { 1191 return js.True == bindings.HasFuncReadableStreamBYOBReaderCancel( 1192 this.ref, 1193 ) 1194 } 1195 1196 // FuncCancel returns the method "ReadableStreamBYOBReader.cancel". 1197 func (this ReadableStreamBYOBReader) FuncCancel() (fn js.Func[func(reason js.Any) js.Promise[js.Void]]) { 1198 bindings.FuncReadableStreamBYOBReaderCancel( 1199 this.ref, js.Pointer(&fn), 1200 ) 1201 return 1202 } 1203 1204 // Cancel calls the method "ReadableStreamBYOBReader.cancel". 1205 func (this ReadableStreamBYOBReader) Cancel(reason js.Any) (ret js.Promise[js.Void]) { 1206 bindings.CallReadableStreamBYOBReaderCancel( 1207 this.ref, js.Pointer(&ret), 1208 reason.Ref(), 1209 ) 1210 1211 return 1212 } 1213 1214 // TryCancel calls the method "ReadableStreamBYOBReader.cancel" 1215 // in a try/catch block and returns (_, err, ok = false) when it went through 1216 // the catch clause. 1217 func (this ReadableStreamBYOBReader) TryCancel(reason js.Any) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1218 ok = js.True == bindings.TryReadableStreamBYOBReaderCancel( 1219 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1220 reason.Ref(), 1221 ) 1222 1223 return 1224 } 1225 1226 // HasFuncCancel1 returns true if the method "ReadableStreamBYOBReader.cancel" exists. 1227 func (this ReadableStreamBYOBReader) HasFuncCancel1() bool { 1228 return js.True == bindings.HasFuncReadableStreamBYOBReaderCancel1( 1229 this.ref, 1230 ) 1231 } 1232 1233 // FuncCancel1 returns the method "ReadableStreamBYOBReader.cancel". 1234 func (this ReadableStreamBYOBReader) FuncCancel1() (fn js.Func[func() js.Promise[js.Void]]) { 1235 bindings.FuncReadableStreamBYOBReaderCancel1( 1236 this.ref, js.Pointer(&fn), 1237 ) 1238 return 1239 } 1240 1241 // Cancel1 calls the method "ReadableStreamBYOBReader.cancel". 1242 func (this ReadableStreamBYOBReader) Cancel1() (ret js.Promise[js.Void]) { 1243 bindings.CallReadableStreamBYOBReaderCancel1( 1244 this.ref, js.Pointer(&ret), 1245 ) 1246 1247 return 1248 } 1249 1250 // TryCancel1 calls the method "ReadableStreamBYOBReader.cancel" 1251 // in a try/catch block and returns (_, err, ok = false) when it went through 1252 // the catch clause. 1253 func (this ReadableStreamBYOBReader) TryCancel1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1254 ok = js.True == bindings.TryReadableStreamBYOBReaderCancel1( 1255 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1256 ) 1257 1258 return 1259 } 1260 1261 type OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader struct { 1262 ref js.Ref 1263 } 1264 1265 func (x OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader) Ref() js.Ref { 1266 return x.ref 1267 } 1268 1269 func (x OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader) Free() { 1270 x.ref.Free() 1271 } 1272 1273 func (x OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader) FromRef(ref js.Ref) OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader { 1274 return OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader{ 1275 ref: ref, 1276 } 1277 } 1278 1279 func (x OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader) ReadableStreamDefaultReader() ReadableStreamDefaultReader { 1280 return ReadableStreamDefaultReader{}.FromRef(x.ref) 1281 } 1282 1283 func (x OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader) ReadableStreamBYOBReader() ReadableStreamBYOBReader { 1284 return ReadableStreamBYOBReader{}.FromRef(x.ref) 1285 } 1286 1287 type ReadableStreamReader = OneOf_ReadableStreamDefaultReader_ReadableStreamBYOBReader 1288 1289 type ReadableStreamReaderMode uint32 1290 1291 const ( 1292 _ ReadableStreamReaderMode = iota 1293 1294 ReadableStreamReaderMode_BYOB 1295 ) 1296 1297 func (ReadableStreamReaderMode) FromRef(str js.Ref) ReadableStreamReaderMode { 1298 return ReadableStreamReaderMode(bindings.ConstOfReadableStreamReaderMode(str)) 1299 } 1300 1301 func (x ReadableStreamReaderMode) String() (string, bool) { 1302 switch x { 1303 case ReadableStreamReaderMode_BYOB: 1304 return "byob", true 1305 default: 1306 return "", false 1307 } 1308 } 1309 1310 type ReadableStreamGetReaderOptions struct { 1311 // Mode is "ReadableStreamGetReaderOptions.mode" 1312 // 1313 // Optional 1314 Mode ReadableStreamReaderMode 1315 1316 FFI_USE bool 1317 } 1318 1319 // FromRef calls UpdateFrom and returns a ReadableStreamGetReaderOptions with all fields set. 1320 func (p ReadableStreamGetReaderOptions) FromRef(ref js.Ref) ReadableStreamGetReaderOptions { 1321 p.UpdateFrom(ref) 1322 return p 1323 } 1324 1325 // New creates a new ReadableStreamGetReaderOptions in the application heap. 1326 func (p ReadableStreamGetReaderOptions) New() js.Ref { 1327 return bindings.ReadableStreamGetReaderOptionsJSLoad( 1328 js.Pointer(&p), js.True, 0, 1329 ) 1330 } 1331 1332 // UpdateFrom copies value of all fields of the heap object to p. 1333 func (p *ReadableStreamGetReaderOptions) UpdateFrom(ref js.Ref) { 1334 bindings.ReadableStreamGetReaderOptionsJSStore( 1335 js.Pointer(p), ref, 1336 ) 1337 } 1338 1339 // Update writes all fields of the p to the heap object referenced by ref. 1340 func (p *ReadableStreamGetReaderOptions) Update(ref js.Ref) { 1341 bindings.ReadableStreamGetReaderOptionsJSLoad( 1342 js.Pointer(p), js.False, ref, 1343 ) 1344 } 1345 1346 // FreeMembers frees fields with heap reference, if recursive is true 1347 // free all heap references reachable from p. 1348 func (p *ReadableStreamGetReaderOptions) FreeMembers(recursive bool) { 1349 } 1350 1351 func NewWritableStreamDefaultWriter(stream WritableStream) (ret WritableStreamDefaultWriter) { 1352 ret.ref = bindings.NewWritableStreamDefaultWriterByWritableStreamDefaultWriter( 1353 stream.Ref()) 1354 return 1355 } 1356 1357 type WritableStreamDefaultWriter struct { 1358 ref js.Ref 1359 } 1360 1361 func (this WritableStreamDefaultWriter) Once() WritableStreamDefaultWriter { 1362 this.ref.Once() 1363 return this 1364 } 1365 1366 func (this WritableStreamDefaultWriter) Ref() js.Ref { 1367 return this.ref 1368 } 1369 1370 func (this WritableStreamDefaultWriter) FromRef(ref js.Ref) WritableStreamDefaultWriter { 1371 this.ref = ref 1372 return this 1373 } 1374 1375 func (this WritableStreamDefaultWriter) Free() { 1376 this.ref.Free() 1377 } 1378 1379 // Closed returns the value of property "WritableStreamDefaultWriter.closed". 1380 // 1381 // It returns ok=false if there is no such property. 1382 func (this WritableStreamDefaultWriter) Closed() (ret js.Promise[js.Void], ok bool) { 1383 ok = js.True == bindings.GetWritableStreamDefaultWriterClosed( 1384 this.ref, js.Pointer(&ret), 1385 ) 1386 return 1387 } 1388 1389 // DesiredSize returns the value of property "WritableStreamDefaultWriter.desiredSize". 1390 // 1391 // It returns ok=false if there is no such property. 1392 func (this WritableStreamDefaultWriter) DesiredSize() (ret float64, ok bool) { 1393 ok = js.True == bindings.GetWritableStreamDefaultWriterDesiredSize( 1394 this.ref, js.Pointer(&ret), 1395 ) 1396 return 1397 } 1398 1399 // Ready returns the value of property "WritableStreamDefaultWriter.ready". 1400 // 1401 // It returns ok=false if there is no such property. 1402 func (this WritableStreamDefaultWriter) Ready() (ret js.Promise[js.Void], ok bool) { 1403 ok = js.True == bindings.GetWritableStreamDefaultWriterReady( 1404 this.ref, js.Pointer(&ret), 1405 ) 1406 return 1407 } 1408 1409 // HasFuncAbort returns true if the method "WritableStreamDefaultWriter.abort" exists. 1410 func (this WritableStreamDefaultWriter) HasFuncAbort() bool { 1411 return js.True == bindings.HasFuncWritableStreamDefaultWriterAbort( 1412 this.ref, 1413 ) 1414 } 1415 1416 // FuncAbort returns the method "WritableStreamDefaultWriter.abort". 1417 func (this WritableStreamDefaultWriter) FuncAbort() (fn js.Func[func(reason js.Any) js.Promise[js.Void]]) { 1418 bindings.FuncWritableStreamDefaultWriterAbort( 1419 this.ref, js.Pointer(&fn), 1420 ) 1421 return 1422 } 1423 1424 // Abort calls the method "WritableStreamDefaultWriter.abort". 1425 func (this WritableStreamDefaultWriter) Abort(reason js.Any) (ret js.Promise[js.Void]) { 1426 bindings.CallWritableStreamDefaultWriterAbort( 1427 this.ref, js.Pointer(&ret), 1428 reason.Ref(), 1429 ) 1430 1431 return 1432 } 1433 1434 // TryAbort calls the method "WritableStreamDefaultWriter.abort" 1435 // in a try/catch block and returns (_, err, ok = false) when it went through 1436 // the catch clause. 1437 func (this WritableStreamDefaultWriter) TryAbort(reason js.Any) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1438 ok = js.True == bindings.TryWritableStreamDefaultWriterAbort( 1439 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1440 reason.Ref(), 1441 ) 1442 1443 return 1444 } 1445 1446 // HasFuncAbort1 returns true if the method "WritableStreamDefaultWriter.abort" exists. 1447 func (this WritableStreamDefaultWriter) HasFuncAbort1() bool { 1448 return js.True == bindings.HasFuncWritableStreamDefaultWriterAbort1( 1449 this.ref, 1450 ) 1451 } 1452 1453 // FuncAbort1 returns the method "WritableStreamDefaultWriter.abort". 1454 func (this WritableStreamDefaultWriter) FuncAbort1() (fn js.Func[func() js.Promise[js.Void]]) { 1455 bindings.FuncWritableStreamDefaultWriterAbort1( 1456 this.ref, js.Pointer(&fn), 1457 ) 1458 return 1459 } 1460 1461 // Abort1 calls the method "WritableStreamDefaultWriter.abort". 1462 func (this WritableStreamDefaultWriter) Abort1() (ret js.Promise[js.Void]) { 1463 bindings.CallWritableStreamDefaultWriterAbort1( 1464 this.ref, js.Pointer(&ret), 1465 ) 1466 1467 return 1468 } 1469 1470 // TryAbort1 calls the method "WritableStreamDefaultWriter.abort" 1471 // in a try/catch block and returns (_, err, ok = false) when it went through 1472 // the catch clause. 1473 func (this WritableStreamDefaultWriter) TryAbort1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1474 ok = js.True == bindings.TryWritableStreamDefaultWriterAbort1( 1475 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1476 ) 1477 1478 return 1479 } 1480 1481 // HasFuncClose returns true if the method "WritableStreamDefaultWriter.close" exists. 1482 func (this WritableStreamDefaultWriter) HasFuncClose() bool { 1483 return js.True == bindings.HasFuncWritableStreamDefaultWriterClose( 1484 this.ref, 1485 ) 1486 } 1487 1488 // FuncClose returns the method "WritableStreamDefaultWriter.close". 1489 func (this WritableStreamDefaultWriter) FuncClose() (fn js.Func[func() js.Promise[js.Void]]) { 1490 bindings.FuncWritableStreamDefaultWriterClose( 1491 this.ref, js.Pointer(&fn), 1492 ) 1493 return 1494 } 1495 1496 // Close calls the method "WritableStreamDefaultWriter.close". 1497 func (this WritableStreamDefaultWriter) Close() (ret js.Promise[js.Void]) { 1498 bindings.CallWritableStreamDefaultWriterClose( 1499 this.ref, js.Pointer(&ret), 1500 ) 1501 1502 return 1503 } 1504 1505 // TryClose calls the method "WritableStreamDefaultWriter.close" 1506 // in a try/catch block and returns (_, err, ok = false) when it went through 1507 // the catch clause. 1508 func (this WritableStreamDefaultWriter) TryClose() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1509 ok = js.True == bindings.TryWritableStreamDefaultWriterClose( 1510 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1511 ) 1512 1513 return 1514 } 1515 1516 // HasFuncReleaseLock returns true if the method "WritableStreamDefaultWriter.releaseLock" exists. 1517 func (this WritableStreamDefaultWriter) HasFuncReleaseLock() bool { 1518 return js.True == bindings.HasFuncWritableStreamDefaultWriterReleaseLock( 1519 this.ref, 1520 ) 1521 } 1522 1523 // FuncReleaseLock returns the method "WritableStreamDefaultWriter.releaseLock". 1524 func (this WritableStreamDefaultWriter) FuncReleaseLock() (fn js.Func[func()]) { 1525 bindings.FuncWritableStreamDefaultWriterReleaseLock( 1526 this.ref, js.Pointer(&fn), 1527 ) 1528 return 1529 } 1530 1531 // ReleaseLock calls the method "WritableStreamDefaultWriter.releaseLock". 1532 func (this WritableStreamDefaultWriter) ReleaseLock() (ret js.Void) { 1533 bindings.CallWritableStreamDefaultWriterReleaseLock( 1534 this.ref, js.Pointer(&ret), 1535 ) 1536 1537 return 1538 } 1539 1540 // TryReleaseLock calls the method "WritableStreamDefaultWriter.releaseLock" 1541 // in a try/catch block and returns (_, err, ok = false) when it went through 1542 // the catch clause. 1543 func (this WritableStreamDefaultWriter) TryReleaseLock() (ret js.Void, exception js.Any, ok bool) { 1544 ok = js.True == bindings.TryWritableStreamDefaultWriterReleaseLock( 1545 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1546 ) 1547 1548 return 1549 } 1550 1551 // HasFuncWrite returns true if the method "WritableStreamDefaultWriter.write" exists. 1552 func (this WritableStreamDefaultWriter) HasFuncWrite() bool { 1553 return js.True == bindings.HasFuncWritableStreamDefaultWriterWrite( 1554 this.ref, 1555 ) 1556 } 1557 1558 // FuncWrite returns the method "WritableStreamDefaultWriter.write". 1559 func (this WritableStreamDefaultWriter) FuncWrite() (fn js.Func[func(chunk js.Any) js.Promise[js.Void]]) { 1560 bindings.FuncWritableStreamDefaultWriterWrite( 1561 this.ref, js.Pointer(&fn), 1562 ) 1563 return 1564 } 1565 1566 // Write calls the method "WritableStreamDefaultWriter.write". 1567 func (this WritableStreamDefaultWriter) Write(chunk js.Any) (ret js.Promise[js.Void]) { 1568 bindings.CallWritableStreamDefaultWriterWrite( 1569 this.ref, js.Pointer(&ret), 1570 chunk.Ref(), 1571 ) 1572 1573 return 1574 } 1575 1576 // TryWrite calls the method "WritableStreamDefaultWriter.write" 1577 // in a try/catch block and returns (_, err, ok = false) when it went through 1578 // the catch clause. 1579 func (this WritableStreamDefaultWriter) TryWrite(chunk js.Any) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1580 ok = js.True == bindings.TryWritableStreamDefaultWriterWrite( 1581 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1582 chunk.Ref(), 1583 ) 1584 1585 return 1586 } 1587 1588 // HasFuncWrite1 returns true if the method "WritableStreamDefaultWriter.write" exists. 1589 func (this WritableStreamDefaultWriter) HasFuncWrite1() bool { 1590 return js.True == bindings.HasFuncWritableStreamDefaultWriterWrite1( 1591 this.ref, 1592 ) 1593 } 1594 1595 // FuncWrite1 returns the method "WritableStreamDefaultWriter.write". 1596 func (this WritableStreamDefaultWriter) FuncWrite1() (fn js.Func[func() js.Promise[js.Void]]) { 1597 bindings.FuncWritableStreamDefaultWriterWrite1( 1598 this.ref, js.Pointer(&fn), 1599 ) 1600 return 1601 } 1602 1603 // Write1 calls the method "WritableStreamDefaultWriter.write". 1604 func (this WritableStreamDefaultWriter) Write1() (ret js.Promise[js.Void]) { 1605 bindings.CallWritableStreamDefaultWriterWrite1( 1606 this.ref, js.Pointer(&ret), 1607 ) 1608 1609 return 1610 } 1611 1612 // TryWrite1 calls the method "WritableStreamDefaultWriter.write" 1613 // in a try/catch block and returns (_, err, ok = false) when it went through 1614 // the catch clause. 1615 func (this WritableStreamDefaultWriter) TryWrite1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1616 ok = js.True == bindings.TryWritableStreamDefaultWriterWrite1( 1617 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1618 ) 1619 1620 return 1621 } 1622 1623 func NewWritableStream(underlyingSink js.Object, strategy QueuingStrategy) (ret WritableStream) { 1624 ret.ref = bindings.NewWritableStreamByWritableStream( 1625 underlyingSink.Ref(), 1626 js.Pointer(&strategy)) 1627 return 1628 } 1629 1630 func NewWritableStreamByWritableStream1(underlyingSink js.Object) (ret WritableStream) { 1631 ret.ref = bindings.NewWritableStreamByWritableStream1( 1632 underlyingSink.Ref()) 1633 return 1634 } 1635 1636 func NewWritableStreamByWritableStream2() (ret WritableStream) { 1637 ret.ref = bindings.NewWritableStreamByWritableStream2() 1638 return 1639 } 1640 1641 type WritableStream struct { 1642 ref js.Ref 1643 } 1644 1645 func (this WritableStream) Once() WritableStream { 1646 this.ref.Once() 1647 return this 1648 } 1649 1650 func (this WritableStream) Ref() js.Ref { 1651 return this.ref 1652 } 1653 1654 func (this WritableStream) FromRef(ref js.Ref) WritableStream { 1655 this.ref = ref 1656 return this 1657 } 1658 1659 func (this WritableStream) Free() { 1660 this.ref.Free() 1661 } 1662 1663 // Locked returns the value of property "WritableStream.locked". 1664 // 1665 // It returns ok=false if there is no such property. 1666 func (this WritableStream) Locked() (ret bool, ok bool) { 1667 ok = js.True == bindings.GetWritableStreamLocked( 1668 this.ref, js.Pointer(&ret), 1669 ) 1670 return 1671 } 1672 1673 // HasFuncAbort returns true if the method "WritableStream.abort" exists. 1674 func (this WritableStream) HasFuncAbort() bool { 1675 return js.True == bindings.HasFuncWritableStreamAbort( 1676 this.ref, 1677 ) 1678 } 1679 1680 // FuncAbort returns the method "WritableStream.abort". 1681 func (this WritableStream) FuncAbort() (fn js.Func[func(reason js.Any) js.Promise[js.Void]]) { 1682 bindings.FuncWritableStreamAbort( 1683 this.ref, js.Pointer(&fn), 1684 ) 1685 return 1686 } 1687 1688 // Abort calls the method "WritableStream.abort". 1689 func (this WritableStream) Abort(reason js.Any) (ret js.Promise[js.Void]) { 1690 bindings.CallWritableStreamAbort( 1691 this.ref, js.Pointer(&ret), 1692 reason.Ref(), 1693 ) 1694 1695 return 1696 } 1697 1698 // TryAbort calls the method "WritableStream.abort" 1699 // in a try/catch block and returns (_, err, ok = false) when it went through 1700 // the catch clause. 1701 func (this WritableStream) TryAbort(reason js.Any) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1702 ok = js.True == bindings.TryWritableStreamAbort( 1703 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1704 reason.Ref(), 1705 ) 1706 1707 return 1708 } 1709 1710 // HasFuncAbort1 returns true if the method "WritableStream.abort" exists. 1711 func (this WritableStream) HasFuncAbort1() bool { 1712 return js.True == bindings.HasFuncWritableStreamAbort1( 1713 this.ref, 1714 ) 1715 } 1716 1717 // FuncAbort1 returns the method "WritableStream.abort". 1718 func (this WritableStream) FuncAbort1() (fn js.Func[func() js.Promise[js.Void]]) { 1719 bindings.FuncWritableStreamAbort1( 1720 this.ref, js.Pointer(&fn), 1721 ) 1722 return 1723 } 1724 1725 // Abort1 calls the method "WritableStream.abort". 1726 func (this WritableStream) Abort1() (ret js.Promise[js.Void]) { 1727 bindings.CallWritableStreamAbort1( 1728 this.ref, js.Pointer(&ret), 1729 ) 1730 1731 return 1732 } 1733 1734 // TryAbort1 calls the method "WritableStream.abort" 1735 // in a try/catch block and returns (_, err, ok = false) when it went through 1736 // the catch clause. 1737 func (this WritableStream) TryAbort1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1738 ok = js.True == bindings.TryWritableStreamAbort1( 1739 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1740 ) 1741 1742 return 1743 } 1744 1745 // HasFuncClose returns true if the method "WritableStream.close" exists. 1746 func (this WritableStream) HasFuncClose() bool { 1747 return js.True == bindings.HasFuncWritableStreamClose( 1748 this.ref, 1749 ) 1750 } 1751 1752 // FuncClose returns the method "WritableStream.close". 1753 func (this WritableStream) FuncClose() (fn js.Func[func() js.Promise[js.Void]]) { 1754 bindings.FuncWritableStreamClose( 1755 this.ref, js.Pointer(&fn), 1756 ) 1757 return 1758 } 1759 1760 // Close calls the method "WritableStream.close". 1761 func (this WritableStream) Close() (ret js.Promise[js.Void]) { 1762 bindings.CallWritableStreamClose( 1763 this.ref, js.Pointer(&ret), 1764 ) 1765 1766 return 1767 } 1768 1769 // TryClose calls the method "WritableStream.close" 1770 // in a try/catch block and returns (_, err, ok = false) when it went through 1771 // the catch clause. 1772 func (this WritableStream) TryClose() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1773 ok = js.True == bindings.TryWritableStreamClose( 1774 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1775 ) 1776 1777 return 1778 } 1779 1780 // HasFuncGetWriter returns true if the method "WritableStream.getWriter" exists. 1781 func (this WritableStream) HasFuncGetWriter() bool { 1782 return js.True == bindings.HasFuncWritableStreamGetWriter( 1783 this.ref, 1784 ) 1785 } 1786 1787 // FuncGetWriter returns the method "WritableStream.getWriter". 1788 func (this WritableStream) FuncGetWriter() (fn js.Func[func() WritableStreamDefaultWriter]) { 1789 bindings.FuncWritableStreamGetWriter( 1790 this.ref, js.Pointer(&fn), 1791 ) 1792 return 1793 } 1794 1795 // GetWriter calls the method "WritableStream.getWriter". 1796 func (this WritableStream) GetWriter() (ret WritableStreamDefaultWriter) { 1797 bindings.CallWritableStreamGetWriter( 1798 this.ref, js.Pointer(&ret), 1799 ) 1800 1801 return 1802 } 1803 1804 // TryGetWriter calls the method "WritableStream.getWriter" 1805 // in a try/catch block and returns (_, err, ok = false) when it went through 1806 // the catch clause. 1807 func (this WritableStream) TryGetWriter() (ret WritableStreamDefaultWriter, exception js.Any, ok bool) { 1808 ok = js.True == bindings.TryWritableStreamGetWriter( 1809 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1810 ) 1811 1812 return 1813 } 1814 1815 type ReadableWritablePair struct { 1816 // Readable is "ReadableWritablePair.readable" 1817 // 1818 // Required 1819 Readable ReadableStream 1820 // Writable is "ReadableWritablePair.writable" 1821 // 1822 // Required 1823 Writable WritableStream 1824 1825 FFI_USE bool 1826 } 1827 1828 // FromRef calls UpdateFrom and returns a ReadableWritablePair with all fields set. 1829 func (p ReadableWritablePair) FromRef(ref js.Ref) ReadableWritablePair { 1830 p.UpdateFrom(ref) 1831 return p 1832 } 1833 1834 // New creates a new ReadableWritablePair in the application heap. 1835 func (p ReadableWritablePair) New() js.Ref { 1836 return bindings.ReadableWritablePairJSLoad( 1837 js.Pointer(&p), js.True, 0, 1838 ) 1839 } 1840 1841 // UpdateFrom copies value of all fields of the heap object to p. 1842 func (p *ReadableWritablePair) UpdateFrom(ref js.Ref) { 1843 bindings.ReadableWritablePairJSStore( 1844 js.Pointer(p), ref, 1845 ) 1846 } 1847 1848 // Update writes all fields of the p to the heap object referenced by ref. 1849 func (p *ReadableWritablePair) Update(ref js.Ref) { 1850 bindings.ReadableWritablePairJSLoad( 1851 js.Pointer(p), js.False, ref, 1852 ) 1853 } 1854 1855 // FreeMembers frees fields with heap reference, if recursive is true 1856 // free all heap references reachable from p. 1857 func (p *ReadableWritablePair) FreeMembers(recursive bool) { 1858 js.Free( 1859 p.Readable.Ref(), 1860 p.Writable.Ref(), 1861 ) 1862 p.Readable = p.Readable.FromRef(js.Undefined) 1863 p.Writable = p.Writable.FromRef(js.Undefined) 1864 } 1865 1866 type StreamPipeOptions struct { 1867 // PreventClose is "StreamPipeOptions.preventClose" 1868 // 1869 // Optional, defaults to false. 1870 // 1871 // NOTE: FFI_USE_PreventClose MUST be set to true to make this field effective. 1872 PreventClose bool 1873 // PreventAbort is "StreamPipeOptions.preventAbort" 1874 // 1875 // Optional, defaults to false. 1876 // 1877 // NOTE: FFI_USE_PreventAbort MUST be set to true to make this field effective. 1878 PreventAbort bool 1879 // PreventCancel is "StreamPipeOptions.preventCancel" 1880 // 1881 // Optional, defaults to false. 1882 // 1883 // NOTE: FFI_USE_PreventCancel MUST be set to true to make this field effective. 1884 PreventCancel bool 1885 // Signal is "StreamPipeOptions.signal" 1886 // 1887 // Optional 1888 Signal AbortSignal 1889 1890 FFI_USE_PreventClose bool // for PreventClose. 1891 FFI_USE_PreventAbort bool // for PreventAbort. 1892 FFI_USE_PreventCancel bool // for PreventCancel. 1893 1894 FFI_USE bool 1895 } 1896 1897 // FromRef calls UpdateFrom and returns a StreamPipeOptions with all fields set. 1898 func (p StreamPipeOptions) FromRef(ref js.Ref) StreamPipeOptions { 1899 p.UpdateFrom(ref) 1900 return p 1901 } 1902 1903 // New creates a new StreamPipeOptions in the application heap. 1904 func (p StreamPipeOptions) New() js.Ref { 1905 return bindings.StreamPipeOptionsJSLoad( 1906 js.Pointer(&p), js.True, 0, 1907 ) 1908 } 1909 1910 // UpdateFrom copies value of all fields of the heap object to p. 1911 func (p *StreamPipeOptions) UpdateFrom(ref js.Ref) { 1912 bindings.StreamPipeOptionsJSStore( 1913 js.Pointer(p), ref, 1914 ) 1915 } 1916 1917 // Update writes all fields of the p to the heap object referenced by ref. 1918 func (p *StreamPipeOptions) Update(ref js.Ref) { 1919 bindings.StreamPipeOptionsJSLoad( 1920 js.Pointer(p), js.False, ref, 1921 ) 1922 } 1923 1924 // FreeMembers frees fields with heap reference, if recursive is true 1925 // free all heap references reachable from p. 1926 func (p *StreamPipeOptions) FreeMembers(recursive bool) { 1927 js.Free( 1928 p.Signal.Ref(), 1929 ) 1930 p.Signal = p.Signal.FromRef(js.Undefined) 1931 } 1932 1933 func NewReadableStream(underlyingSource js.Object, strategy QueuingStrategy) (ret ReadableStream) { 1934 ret.ref = bindings.NewReadableStreamByReadableStream( 1935 underlyingSource.Ref(), 1936 js.Pointer(&strategy)) 1937 return 1938 } 1939 1940 func NewReadableStreamByReadableStream1(underlyingSource js.Object) (ret ReadableStream) { 1941 ret.ref = bindings.NewReadableStreamByReadableStream1( 1942 underlyingSource.Ref()) 1943 return 1944 } 1945 1946 func NewReadableStreamByReadableStream2() (ret ReadableStream) { 1947 ret.ref = bindings.NewReadableStreamByReadableStream2() 1948 return 1949 } 1950 1951 type ReadableStream struct { 1952 ref js.Ref 1953 } 1954 1955 func (this ReadableStream) Once() ReadableStream { 1956 this.ref.Once() 1957 return this 1958 } 1959 1960 func (this ReadableStream) Ref() js.Ref { 1961 return this.ref 1962 } 1963 1964 func (this ReadableStream) FromRef(ref js.Ref) ReadableStream { 1965 this.ref = ref 1966 return this 1967 } 1968 1969 func (this ReadableStream) Free() { 1970 this.ref.Free() 1971 } 1972 1973 // Locked returns the value of property "ReadableStream.locked". 1974 // 1975 // It returns ok=false if there is no such property. 1976 func (this ReadableStream) Locked() (ret bool, ok bool) { 1977 ok = js.True == bindings.GetReadableStreamLocked( 1978 this.ref, js.Pointer(&ret), 1979 ) 1980 return 1981 } 1982 1983 // HasFuncFrom returns true if the static method "ReadableStream.from" exists. 1984 func (this ReadableStream) HasFuncFrom() bool { 1985 return js.True == bindings.HasFuncReadableStreamFrom( 1986 this.ref, 1987 ) 1988 } 1989 1990 // FuncFrom returns the static method "ReadableStream.from". 1991 func (this ReadableStream) FuncFrom() (fn js.Func[func(asyncIterable js.Any) ReadableStream]) { 1992 bindings.FuncReadableStreamFrom( 1993 this.ref, js.Pointer(&fn), 1994 ) 1995 return 1996 } 1997 1998 // From calls the static method "ReadableStream.from". 1999 func (this ReadableStream) From(asyncIterable js.Any) (ret ReadableStream) { 2000 bindings.CallReadableStreamFrom( 2001 this.ref, js.Pointer(&ret), 2002 asyncIterable.Ref(), 2003 ) 2004 2005 return 2006 } 2007 2008 // TryFrom calls the static method "ReadableStream.from" 2009 // in a try/catch block and returns (_, err, ok = false) when it went through 2010 // the catch clause. 2011 func (this ReadableStream) TryFrom(asyncIterable js.Any) (ret ReadableStream, exception js.Any, ok bool) { 2012 ok = js.True == bindings.TryReadableStreamFrom( 2013 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2014 asyncIterable.Ref(), 2015 ) 2016 2017 return 2018 } 2019 2020 // HasFuncCancel returns true if the method "ReadableStream.cancel" exists. 2021 func (this ReadableStream) HasFuncCancel() bool { 2022 return js.True == bindings.HasFuncReadableStreamCancel( 2023 this.ref, 2024 ) 2025 } 2026 2027 // FuncCancel returns the method "ReadableStream.cancel". 2028 func (this ReadableStream) FuncCancel() (fn js.Func[func(reason js.Any) js.Promise[js.Void]]) { 2029 bindings.FuncReadableStreamCancel( 2030 this.ref, js.Pointer(&fn), 2031 ) 2032 return 2033 } 2034 2035 // Cancel calls the method "ReadableStream.cancel". 2036 func (this ReadableStream) Cancel(reason js.Any) (ret js.Promise[js.Void]) { 2037 bindings.CallReadableStreamCancel( 2038 this.ref, js.Pointer(&ret), 2039 reason.Ref(), 2040 ) 2041 2042 return 2043 } 2044 2045 // TryCancel calls the method "ReadableStream.cancel" 2046 // in a try/catch block and returns (_, err, ok = false) when it went through 2047 // the catch clause. 2048 func (this ReadableStream) TryCancel(reason js.Any) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2049 ok = js.True == bindings.TryReadableStreamCancel( 2050 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2051 reason.Ref(), 2052 ) 2053 2054 return 2055 } 2056 2057 // HasFuncCancel1 returns true if the method "ReadableStream.cancel" exists. 2058 func (this ReadableStream) HasFuncCancel1() bool { 2059 return js.True == bindings.HasFuncReadableStreamCancel1( 2060 this.ref, 2061 ) 2062 } 2063 2064 // FuncCancel1 returns the method "ReadableStream.cancel". 2065 func (this ReadableStream) FuncCancel1() (fn js.Func[func() js.Promise[js.Void]]) { 2066 bindings.FuncReadableStreamCancel1( 2067 this.ref, js.Pointer(&fn), 2068 ) 2069 return 2070 } 2071 2072 // Cancel1 calls the method "ReadableStream.cancel". 2073 func (this ReadableStream) Cancel1() (ret js.Promise[js.Void]) { 2074 bindings.CallReadableStreamCancel1( 2075 this.ref, js.Pointer(&ret), 2076 ) 2077 2078 return 2079 } 2080 2081 // TryCancel1 calls the method "ReadableStream.cancel" 2082 // in a try/catch block and returns (_, err, ok = false) when it went through 2083 // the catch clause. 2084 func (this ReadableStream) TryCancel1() (ret js.Promise[js.Void], exception js.Any, ok bool) { 2085 ok = js.True == bindings.TryReadableStreamCancel1( 2086 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2087 ) 2088 2089 return 2090 } 2091 2092 // HasFuncGetReader returns true if the method "ReadableStream.getReader" exists. 2093 func (this ReadableStream) HasFuncGetReader() bool { 2094 return js.True == bindings.HasFuncReadableStreamGetReader( 2095 this.ref, 2096 ) 2097 } 2098 2099 // FuncGetReader returns the method "ReadableStream.getReader". 2100 func (this ReadableStream) FuncGetReader() (fn js.Func[func(options ReadableStreamGetReaderOptions) ReadableStreamReader]) { 2101 bindings.FuncReadableStreamGetReader( 2102 this.ref, js.Pointer(&fn), 2103 ) 2104 return 2105 } 2106 2107 // GetReader calls the method "ReadableStream.getReader". 2108 func (this ReadableStream) GetReader(options ReadableStreamGetReaderOptions) (ret ReadableStreamReader) { 2109 bindings.CallReadableStreamGetReader( 2110 this.ref, js.Pointer(&ret), 2111 js.Pointer(&options), 2112 ) 2113 2114 return 2115 } 2116 2117 // TryGetReader calls the method "ReadableStream.getReader" 2118 // in a try/catch block and returns (_, err, ok = false) when it went through 2119 // the catch clause. 2120 func (this ReadableStream) TryGetReader(options ReadableStreamGetReaderOptions) (ret ReadableStreamReader, exception js.Any, ok bool) { 2121 ok = js.True == bindings.TryReadableStreamGetReader( 2122 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2123 js.Pointer(&options), 2124 ) 2125 2126 return 2127 } 2128 2129 // HasFuncGetReader1 returns true if the method "ReadableStream.getReader" exists. 2130 func (this ReadableStream) HasFuncGetReader1() bool { 2131 return js.True == bindings.HasFuncReadableStreamGetReader1( 2132 this.ref, 2133 ) 2134 } 2135 2136 // FuncGetReader1 returns the method "ReadableStream.getReader". 2137 func (this ReadableStream) FuncGetReader1() (fn js.Func[func() ReadableStreamReader]) { 2138 bindings.FuncReadableStreamGetReader1( 2139 this.ref, js.Pointer(&fn), 2140 ) 2141 return 2142 } 2143 2144 // GetReader1 calls the method "ReadableStream.getReader". 2145 func (this ReadableStream) GetReader1() (ret ReadableStreamReader) { 2146 bindings.CallReadableStreamGetReader1( 2147 this.ref, js.Pointer(&ret), 2148 ) 2149 2150 return 2151 } 2152 2153 // TryGetReader1 calls the method "ReadableStream.getReader" 2154 // in a try/catch block and returns (_, err, ok = false) when it went through 2155 // the catch clause. 2156 func (this ReadableStream) TryGetReader1() (ret ReadableStreamReader, exception js.Any, ok bool) { 2157 ok = js.True == bindings.TryReadableStreamGetReader1( 2158 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2159 ) 2160 2161 return 2162 } 2163 2164 // HasFuncPipeThrough returns true if the method "ReadableStream.pipeThrough" exists. 2165 func (this ReadableStream) HasFuncPipeThrough() bool { 2166 return js.True == bindings.HasFuncReadableStreamPipeThrough( 2167 this.ref, 2168 ) 2169 } 2170 2171 // FuncPipeThrough returns the method "ReadableStream.pipeThrough". 2172 func (this ReadableStream) FuncPipeThrough() (fn js.Func[func(transform ReadableWritablePair, options StreamPipeOptions) ReadableStream]) { 2173 bindings.FuncReadableStreamPipeThrough( 2174 this.ref, js.Pointer(&fn), 2175 ) 2176 return 2177 } 2178 2179 // PipeThrough calls the method "ReadableStream.pipeThrough". 2180 func (this ReadableStream) PipeThrough(transform ReadableWritablePair, options StreamPipeOptions) (ret ReadableStream) { 2181 bindings.CallReadableStreamPipeThrough( 2182 this.ref, js.Pointer(&ret), 2183 js.Pointer(&transform), 2184 js.Pointer(&options), 2185 ) 2186 2187 return 2188 } 2189 2190 // TryPipeThrough calls the method "ReadableStream.pipeThrough" 2191 // in a try/catch block and returns (_, err, ok = false) when it went through 2192 // the catch clause. 2193 func (this ReadableStream) TryPipeThrough(transform ReadableWritablePair, options StreamPipeOptions) (ret ReadableStream, exception js.Any, ok bool) { 2194 ok = js.True == bindings.TryReadableStreamPipeThrough( 2195 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2196 js.Pointer(&transform), 2197 js.Pointer(&options), 2198 ) 2199 2200 return 2201 } 2202 2203 // HasFuncPipeThrough1 returns true if the method "ReadableStream.pipeThrough" exists. 2204 func (this ReadableStream) HasFuncPipeThrough1() bool { 2205 return js.True == bindings.HasFuncReadableStreamPipeThrough1( 2206 this.ref, 2207 ) 2208 } 2209 2210 // FuncPipeThrough1 returns the method "ReadableStream.pipeThrough". 2211 func (this ReadableStream) FuncPipeThrough1() (fn js.Func[func(transform ReadableWritablePair) ReadableStream]) { 2212 bindings.FuncReadableStreamPipeThrough1( 2213 this.ref, js.Pointer(&fn), 2214 ) 2215 return 2216 } 2217 2218 // PipeThrough1 calls the method "ReadableStream.pipeThrough". 2219 func (this ReadableStream) PipeThrough1(transform ReadableWritablePair) (ret ReadableStream) { 2220 bindings.CallReadableStreamPipeThrough1( 2221 this.ref, js.Pointer(&ret), 2222 js.Pointer(&transform), 2223 ) 2224 2225 return 2226 } 2227 2228 // TryPipeThrough1 calls the method "ReadableStream.pipeThrough" 2229 // in a try/catch block and returns (_, err, ok = false) when it went through 2230 // the catch clause. 2231 func (this ReadableStream) TryPipeThrough1(transform ReadableWritablePair) (ret ReadableStream, exception js.Any, ok bool) { 2232 ok = js.True == bindings.TryReadableStreamPipeThrough1( 2233 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2234 js.Pointer(&transform), 2235 ) 2236 2237 return 2238 } 2239 2240 // HasFuncPipeTo returns true if the method "ReadableStream.pipeTo" exists. 2241 func (this ReadableStream) HasFuncPipeTo() bool { 2242 return js.True == bindings.HasFuncReadableStreamPipeTo( 2243 this.ref, 2244 ) 2245 } 2246 2247 // FuncPipeTo returns the method "ReadableStream.pipeTo". 2248 func (this ReadableStream) FuncPipeTo() (fn js.Func[func(destination WritableStream, options StreamPipeOptions) js.Promise[js.Void]]) { 2249 bindings.FuncReadableStreamPipeTo( 2250 this.ref, js.Pointer(&fn), 2251 ) 2252 return 2253 } 2254 2255 // PipeTo calls the method "ReadableStream.pipeTo". 2256 func (this ReadableStream) PipeTo(destination WritableStream, options StreamPipeOptions) (ret js.Promise[js.Void]) { 2257 bindings.CallReadableStreamPipeTo( 2258 this.ref, js.Pointer(&ret), 2259 destination.Ref(), 2260 js.Pointer(&options), 2261 ) 2262 2263 return 2264 } 2265 2266 // TryPipeTo calls the method "ReadableStream.pipeTo" 2267 // in a try/catch block and returns (_, err, ok = false) when it went through 2268 // the catch clause. 2269 func (this ReadableStream) TryPipeTo(destination WritableStream, options StreamPipeOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2270 ok = js.True == bindings.TryReadableStreamPipeTo( 2271 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2272 destination.Ref(), 2273 js.Pointer(&options), 2274 ) 2275 2276 return 2277 } 2278 2279 // HasFuncPipeTo1 returns true if the method "ReadableStream.pipeTo" exists. 2280 func (this ReadableStream) HasFuncPipeTo1() bool { 2281 return js.True == bindings.HasFuncReadableStreamPipeTo1( 2282 this.ref, 2283 ) 2284 } 2285 2286 // FuncPipeTo1 returns the method "ReadableStream.pipeTo". 2287 func (this ReadableStream) FuncPipeTo1() (fn js.Func[func(destination WritableStream) js.Promise[js.Void]]) { 2288 bindings.FuncReadableStreamPipeTo1( 2289 this.ref, js.Pointer(&fn), 2290 ) 2291 return 2292 } 2293 2294 // PipeTo1 calls the method "ReadableStream.pipeTo". 2295 func (this ReadableStream) PipeTo1(destination WritableStream) (ret js.Promise[js.Void]) { 2296 bindings.CallReadableStreamPipeTo1( 2297 this.ref, js.Pointer(&ret), 2298 destination.Ref(), 2299 ) 2300 2301 return 2302 } 2303 2304 // TryPipeTo1 calls the method "ReadableStream.pipeTo" 2305 // in a try/catch block and returns (_, err, ok = false) when it went through 2306 // the catch clause. 2307 func (this ReadableStream) TryPipeTo1(destination WritableStream) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2308 ok = js.True == bindings.TryReadableStreamPipeTo1( 2309 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2310 destination.Ref(), 2311 ) 2312 2313 return 2314 } 2315 2316 // HasFuncTee returns true if the method "ReadableStream.tee" exists. 2317 func (this ReadableStream) HasFuncTee() bool { 2318 return js.True == bindings.HasFuncReadableStreamTee( 2319 this.ref, 2320 ) 2321 } 2322 2323 // FuncTee returns the method "ReadableStream.tee". 2324 func (this ReadableStream) FuncTee() (fn js.Func[func() js.Array[ReadableStream]]) { 2325 bindings.FuncReadableStreamTee( 2326 this.ref, js.Pointer(&fn), 2327 ) 2328 return 2329 } 2330 2331 // Tee calls the method "ReadableStream.tee". 2332 func (this ReadableStream) Tee() (ret js.Array[ReadableStream]) { 2333 bindings.CallReadableStreamTee( 2334 this.ref, js.Pointer(&ret), 2335 ) 2336 2337 return 2338 } 2339 2340 // TryTee calls the method "ReadableStream.tee" 2341 // in a try/catch block and returns (_, err, ok = false) when it went through 2342 // the catch clause. 2343 func (this ReadableStream) TryTee() (ret js.Array[ReadableStream], exception js.Any, ok bool) { 2344 ok = js.True == bindings.TryReadableStreamTee( 2345 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2346 ) 2347 2348 return 2349 } 2350 2351 func NewBlob(blobParts js.Array[BlobPart], options BlobPropertyBag) (ret Blob) { 2352 ret.ref = bindings.NewBlobByBlob( 2353 blobParts.Ref(), 2354 js.Pointer(&options)) 2355 return 2356 } 2357 2358 func NewBlobByBlob1(blobParts js.Array[BlobPart]) (ret Blob) { 2359 ret.ref = bindings.NewBlobByBlob1( 2360 blobParts.Ref()) 2361 return 2362 } 2363 2364 func NewBlobByBlob2() (ret Blob) { 2365 ret.ref = bindings.NewBlobByBlob2() 2366 return 2367 } 2368 2369 type Blob struct { 2370 ref js.Ref 2371 } 2372 2373 func (this Blob) Once() Blob { 2374 this.ref.Once() 2375 return this 2376 } 2377 2378 func (this Blob) Ref() js.Ref { 2379 return this.ref 2380 } 2381 2382 func (this Blob) FromRef(ref js.Ref) Blob { 2383 this.ref = ref 2384 return this 2385 } 2386 2387 func (this Blob) Free() { 2388 this.ref.Free() 2389 } 2390 2391 // Size returns the value of property "Blob.size". 2392 // 2393 // It returns ok=false if there is no such property. 2394 func (this Blob) Size() (ret uint64, ok bool) { 2395 ok = js.True == bindings.GetBlobSize( 2396 this.ref, js.Pointer(&ret), 2397 ) 2398 return 2399 } 2400 2401 // Type returns the value of property "Blob.type". 2402 // 2403 // It returns ok=false if there is no such property. 2404 func (this Blob) Type() (ret js.String, ok bool) { 2405 ok = js.True == bindings.GetBlobType( 2406 this.ref, js.Pointer(&ret), 2407 ) 2408 return 2409 } 2410 2411 // HasFuncSlice returns true if the method "Blob.slice" exists. 2412 func (this Blob) HasFuncSlice() bool { 2413 return js.True == bindings.HasFuncBlobSlice( 2414 this.ref, 2415 ) 2416 } 2417 2418 // FuncSlice returns the method "Blob.slice". 2419 func (this Blob) FuncSlice() (fn js.Func[func(start int64, end int64, contentType js.String) Blob]) { 2420 bindings.FuncBlobSlice( 2421 this.ref, js.Pointer(&fn), 2422 ) 2423 return 2424 } 2425 2426 // Slice calls the method "Blob.slice". 2427 func (this Blob) Slice(start int64, end int64, contentType js.String) (ret Blob) { 2428 bindings.CallBlobSlice( 2429 this.ref, js.Pointer(&ret), 2430 float64(start), 2431 float64(end), 2432 contentType.Ref(), 2433 ) 2434 2435 return 2436 } 2437 2438 // TrySlice calls the method "Blob.slice" 2439 // in a try/catch block and returns (_, err, ok = false) when it went through 2440 // the catch clause. 2441 func (this Blob) TrySlice(start int64, end int64, contentType js.String) (ret Blob, exception js.Any, ok bool) { 2442 ok = js.True == bindings.TryBlobSlice( 2443 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2444 float64(start), 2445 float64(end), 2446 contentType.Ref(), 2447 ) 2448 2449 return 2450 } 2451 2452 // HasFuncSlice1 returns true if the method "Blob.slice" exists. 2453 func (this Blob) HasFuncSlice1() bool { 2454 return js.True == bindings.HasFuncBlobSlice1( 2455 this.ref, 2456 ) 2457 } 2458 2459 // FuncSlice1 returns the method "Blob.slice". 2460 func (this Blob) FuncSlice1() (fn js.Func[func(start int64, end int64) Blob]) { 2461 bindings.FuncBlobSlice1( 2462 this.ref, js.Pointer(&fn), 2463 ) 2464 return 2465 } 2466 2467 // Slice1 calls the method "Blob.slice". 2468 func (this Blob) Slice1(start int64, end int64) (ret Blob) { 2469 bindings.CallBlobSlice1( 2470 this.ref, js.Pointer(&ret), 2471 float64(start), 2472 float64(end), 2473 ) 2474 2475 return 2476 } 2477 2478 // TrySlice1 calls the method "Blob.slice" 2479 // in a try/catch block and returns (_, err, ok = false) when it went through 2480 // the catch clause. 2481 func (this Blob) TrySlice1(start int64, end int64) (ret Blob, exception js.Any, ok bool) { 2482 ok = js.True == bindings.TryBlobSlice1( 2483 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2484 float64(start), 2485 float64(end), 2486 ) 2487 2488 return 2489 } 2490 2491 // HasFuncSlice2 returns true if the method "Blob.slice" exists. 2492 func (this Blob) HasFuncSlice2() bool { 2493 return js.True == bindings.HasFuncBlobSlice2( 2494 this.ref, 2495 ) 2496 } 2497 2498 // FuncSlice2 returns the method "Blob.slice". 2499 func (this Blob) FuncSlice2() (fn js.Func[func(start int64) Blob]) { 2500 bindings.FuncBlobSlice2( 2501 this.ref, js.Pointer(&fn), 2502 ) 2503 return 2504 } 2505 2506 // Slice2 calls the method "Blob.slice". 2507 func (this Blob) Slice2(start int64) (ret Blob) { 2508 bindings.CallBlobSlice2( 2509 this.ref, js.Pointer(&ret), 2510 float64(start), 2511 ) 2512 2513 return 2514 } 2515 2516 // TrySlice2 calls the method "Blob.slice" 2517 // in a try/catch block and returns (_, err, ok = false) when it went through 2518 // the catch clause. 2519 func (this Blob) TrySlice2(start int64) (ret Blob, exception js.Any, ok bool) { 2520 ok = js.True == bindings.TryBlobSlice2( 2521 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2522 float64(start), 2523 ) 2524 2525 return 2526 } 2527 2528 // HasFuncSlice3 returns true if the method "Blob.slice" exists. 2529 func (this Blob) HasFuncSlice3() bool { 2530 return js.True == bindings.HasFuncBlobSlice3( 2531 this.ref, 2532 ) 2533 } 2534 2535 // FuncSlice3 returns the method "Blob.slice". 2536 func (this Blob) FuncSlice3() (fn js.Func[func() Blob]) { 2537 bindings.FuncBlobSlice3( 2538 this.ref, js.Pointer(&fn), 2539 ) 2540 return 2541 } 2542 2543 // Slice3 calls the method "Blob.slice". 2544 func (this Blob) Slice3() (ret Blob) { 2545 bindings.CallBlobSlice3( 2546 this.ref, js.Pointer(&ret), 2547 ) 2548 2549 return 2550 } 2551 2552 // TrySlice3 calls the method "Blob.slice" 2553 // in a try/catch block and returns (_, err, ok = false) when it went through 2554 // the catch clause. 2555 func (this Blob) TrySlice3() (ret Blob, exception js.Any, ok bool) { 2556 ok = js.True == bindings.TryBlobSlice3( 2557 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2558 ) 2559 2560 return 2561 } 2562 2563 // HasFuncStream returns true if the method "Blob.stream" exists. 2564 func (this Blob) HasFuncStream() bool { 2565 return js.True == bindings.HasFuncBlobStream( 2566 this.ref, 2567 ) 2568 } 2569 2570 // FuncStream returns the method "Blob.stream". 2571 func (this Blob) FuncStream() (fn js.Func[func() ReadableStream]) { 2572 bindings.FuncBlobStream( 2573 this.ref, js.Pointer(&fn), 2574 ) 2575 return 2576 } 2577 2578 // Stream calls the method "Blob.stream". 2579 func (this Blob) Stream() (ret ReadableStream) { 2580 bindings.CallBlobStream( 2581 this.ref, js.Pointer(&ret), 2582 ) 2583 2584 return 2585 } 2586 2587 // TryStream calls the method "Blob.stream" 2588 // in a try/catch block and returns (_, err, ok = false) when it went through 2589 // the catch clause. 2590 func (this Blob) TryStream() (ret ReadableStream, exception js.Any, ok bool) { 2591 ok = js.True == bindings.TryBlobStream( 2592 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2593 ) 2594 2595 return 2596 } 2597 2598 // HasFuncText returns true if the method "Blob.text" exists. 2599 func (this Blob) HasFuncText() bool { 2600 return js.True == bindings.HasFuncBlobText( 2601 this.ref, 2602 ) 2603 } 2604 2605 // FuncText returns the method "Blob.text". 2606 func (this Blob) FuncText() (fn js.Func[func() js.Promise[js.String]]) { 2607 bindings.FuncBlobText( 2608 this.ref, js.Pointer(&fn), 2609 ) 2610 return 2611 } 2612 2613 // Text calls the method "Blob.text". 2614 func (this Blob) Text() (ret js.Promise[js.String]) { 2615 bindings.CallBlobText( 2616 this.ref, js.Pointer(&ret), 2617 ) 2618 2619 return 2620 } 2621 2622 // TryText calls the method "Blob.text" 2623 // in a try/catch block and returns (_, err, ok = false) when it went through 2624 // the catch clause. 2625 func (this Blob) TryText() (ret js.Promise[js.String], exception js.Any, ok bool) { 2626 ok = js.True == bindings.TryBlobText( 2627 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2628 ) 2629 2630 return 2631 } 2632 2633 // HasFuncArrayBuffer returns true if the method "Blob.arrayBuffer" exists. 2634 func (this Blob) HasFuncArrayBuffer() bool { 2635 return js.True == bindings.HasFuncBlobArrayBuffer( 2636 this.ref, 2637 ) 2638 } 2639 2640 // FuncArrayBuffer returns the method "Blob.arrayBuffer". 2641 func (this Blob) FuncArrayBuffer() (fn js.Func[func() js.Promise[js.ArrayBuffer]]) { 2642 bindings.FuncBlobArrayBuffer( 2643 this.ref, js.Pointer(&fn), 2644 ) 2645 return 2646 } 2647 2648 // ArrayBuffer calls the method "Blob.arrayBuffer". 2649 func (this Blob) ArrayBuffer() (ret js.Promise[js.ArrayBuffer]) { 2650 bindings.CallBlobArrayBuffer( 2651 this.ref, js.Pointer(&ret), 2652 ) 2653 2654 return 2655 } 2656 2657 // TryArrayBuffer calls the method "Blob.arrayBuffer" 2658 // in a try/catch block and returns (_, err, ok = false) when it went through 2659 // the catch clause. 2660 func (this Blob) TryArrayBuffer() (ret js.Promise[js.ArrayBuffer], exception js.Any, ok bool) { 2661 ok = js.True == bindings.TryBlobArrayBuffer( 2662 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2663 ) 2664 2665 return 2666 } 2667 2668 type OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String struct { 2669 ref js.Ref 2670 } 2671 2672 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) Ref() js.Ref { 2673 return x.ref 2674 } 2675 2676 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) Free() { 2677 x.ref.Free() 2678 } 2679 2680 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) FromRef(ref js.Ref) OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String { 2681 return OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String{ 2682 ref: ref, 2683 } 2684 } 2685 2686 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayInt8() js.TypedArray[int8] { 2687 return js.TypedArray[int8]{}.FromRef(x.ref) 2688 } 2689 2690 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayInt16() js.TypedArray[int16] { 2691 return js.TypedArray[int16]{}.FromRef(x.ref) 2692 } 2693 2694 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayInt32() js.TypedArray[int32] { 2695 return js.TypedArray[int32]{}.FromRef(x.ref) 2696 } 2697 2698 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayUint8() js.TypedArray[uint8] { 2699 return js.TypedArray[uint8]{}.FromRef(x.ref) 2700 } 2701 2702 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayUint16() js.TypedArray[uint16] { 2703 return js.TypedArray[uint16]{}.FromRef(x.ref) 2704 } 2705 2706 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayUint32() js.TypedArray[uint32] { 2707 return js.TypedArray[uint32]{}.FromRef(x.ref) 2708 } 2709 2710 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayInt64() js.TypedArray[int64] { 2711 return js.TypedArray[int64]{}.FromRef(x.ref) 2712 } 2713 2714 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayUint64() js.TypedArray[uint64] { 2715 return js.TypedArray[uint64]{}.FromRef(x.ref) 2716 } 2717 2718 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayFloat32() js.TypedArray[float32] { 2719 return js.TypedArray[float32]{}.FromRef(x.ref) 2720 } 2721 2722 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) TypedArrayFloat64() js.TypedArray[float64] { 2723 return js.TypedArray[float64]{}.FromRef(x.ref) 2724 } 2725 2726 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) DataView() js.DataView { 2727 return js.DataView{}.FromRef(x.ref) 2728 } 2729 2730 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) ArrayBuffer() js.ArrayBuffer { 2731 return js.ArrayBuffer{}.FromRef(x.ref) 2732 } 2733 2734 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) Blob() Blob { 2735 return Blob{}.FromRef(x.ref) 2736 } 2737 2738 func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String) String() js.String { 2739 return js.String{}.FromRef(x.ref) 2740 } 2741 2742 type BlobPart = OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_Blob_String 2743 2744 type FilePropertyBag struct { 2745 // LastModified is "FilePropertyBag.lastModified" 2746 // 2747 // Optional 2748 // 2749 // NOTE: FFI_USE_LastModified MUST be set to true to make this field effective. 2750 LastModified int64 2751 // Type is "FilePropertyBag.type" 2752 // 2753 // Optional, defaults to "". 2754 Type js.String 2755 // Endings is "FilePropertyBag.endings" 2756 // 2757 // Optional, defaults to "transparent". 2758 Endings EndingType 2759 2760 FFI_USE_LastModified bool // for LastModified. 2761 2762 FFI_USE bool 2763 } 2764 2765 // FromRef calls UpdateFrom and returns a FilePropertyBag with all fields set. 2766 func (p FilePropertyBag) FromRef(ref js.Ref) FilePropertyBag { 2767 p.UpdateFrom(ref) 2768 return p 2769 } 2770 2771 // New creates a new FilePropertyBag in the application heap. 2772 func (p FilePropertyBag) New() js.Ref { 2773 return bindings.FilePropertyBagJSLoad( 2774 js.Pointer(&p), js.True, 0, 2775 ) 2776 } 2777 2778 // UpdateFrom copies value of all fields of the heap object to p. 2779 func (p *FilePropertyBag) UpdateFrom(ref js.Ref) { 2780 bindings.FilePropertyBagJSStore( 2781 js.Pointer(p), ref, 2782 ) 2783 } 2784 2785 // Update writes all fields of the p to the heap object referenced by ref. 2786 func (p *FilePropertyBag) Update(ref js.Ref) { 2787 bindings.FilePropertyBagJSLoad( 2788 js.Pointer(p), js.False, ref, 2789 ) 2790 } 2791 2792 // FreeMembers frees fields with heap reference, if recursive is true 2793 // free all heap references reachable from p. 2794 func (p *FilePropertyBag) FreeMembers(recursive bool) { 2795 js.Free( 2796 p.Type.Ref(), 2797 ) 2798 p.Type = p.Type.FromRef(js.Undefined) 2799 } 2800 2801 func NewFile(fileBits js.Array[BlobPart], fileName js.String, options FilePropertyBag) (ret File) { 2802 ret.ref = bindings.NewFileByFile( 2803 fileBits.Ref(), 2804 fileName.Ref(), 2805 js.Pointer(&options)) 2806 return 2807 } 2808 2809 func NewFileByFile1(fileBits js.Array[BlobPart], fileName js.String) (ret File) { 2810 ret.ref = bindings.NewFileByFile1( 2811 fileBits.Ref(), 2812 fileName.Ref()) 2813 return 2814 } 2815 2816 type File struct { 2817 Blob 2818 } 2819 2820 func (this File) Once() File { 2821 this.ref.Once() 2822 return this 2823 } 2824 2825 func (this File) Ref() js.Ref { 2826 return this.Blob.Ref() 2827 } 2828 2829 func (this File) FromRef(ref js.Ref) File { 2830 this.Blob = this.Blob.FromRef(ref) 2831 return this 2832 } 2833 2834 func (this File) Free() { 2835 this.ref.Free() 2836 } 2837 2838 // Name returns the value of property "File.name". 2839 // 2840 // It returns ok=false if there is no such property. 2841 func (this File) Name() (ret js.String, ok bool) { 2842 ok = js.True == bindings.GetFileName( 2843 this.ref, js.Pointer(&ret), 2844 ) 2845 return 2846 } 2847 2848 // LastModified returns the value of property "File.lastModified". 2849 // 2850 // It returns ok=false if there is no such property. 2851 func (this File) LastModified() (ret int64, ok bool) { 2852 ok = js.True == bindings.GetFileLastModified( 2853 this.ref, js.Pointer(&ret), 2854 ) 2855 return 2856 } 2857 2858 // WebkitRelativePath returns the value of property "File.webkitRelativePath". 2859 // 2860 // It returns ok=false if there is no such property. 2861 func (this File) WebkitRelativePath() (ret js.String, ok bool) { 2862 ok = js.True == bindings.GetFileWebkitRelativePath( 2863 this.ref, js.Pointer(&ret), 2864 ) 2865 return 2866 } 2867 2868 type RadioNodeList struct { 2869 NodeList 2870 } 2871 2872 func (this RadioNodeList) Once() RadioNodeList { 2873 this.ref.Once() 2874 return this 2875 } 2876 2877 func (this RadioNodeList) Ref() js.Ref { 2878 return this.NodeList.Ref() 2879 } 2880 2881 func (this RadioNodeList) FromRef(ref js.Ref) RadioNodeList { 2882 this.NodeList = this.NodeList.FromRef(ref) 2883 return this 2884 } 2885 2886 func (this RadioNodeList) Free() { 2887 this.ref.Free() 2888 } 2889 2890 // Value returns the value of property "RadioNodeList.value". 2891 // 2892 // It returns ok=false if there is no such property. 2893 func (this RadioNodeList) Value() (ret js.String, ok bool) { 2894 ok = js.True == bindings.GetRadioNodeListValue( 2895 this.ref, js.Pointer(&ret), 2896 ) 2897 return 2898 } 2899 2900 // SetValue sets the value of property "RadioNodeList.value" to val. 2901 // 2902 // It returns false if the property cannot be set. 2903 func (this RadioNodeList) SetValue(val js.String) bool { 2904 return js.True == bindings.SetRadioNodeListValue( 2905 this.ref, 2906 val.Ref(), 2907 ) 2908 } 2909 2910 type OneOf_RadioNodeList_Element struct { 2911 ref js.Ref 2912 } 2913 2914 func (x OneOf_RadioNodeList_Element) Ref() js.Ref { 2915 return x.ref 2916 } 2917 2918 func (x OneOf_RadioNodeList_Element) Free() { 2919 x.ref.Free() 2920 } 2921 2922 func (x OneOf_RadioNodeList_Element) FromRef(ref js.Ref) OneOf_RadioNodeList_Element { 2923 return OneOf_RadioNodeList_Element{ 2924 ref: ref, 2925 } 2926 } 2927 2928 func (x OneOf_RadioNodeList_Element) RadioNodeList() RadioNodeList { 2929 return RadioNodeList{}.FromRef(x.ref) 2930 } 2931 2932 func (x OneOf_RadioNodeList_Element) Element() Element { 2933 return Element{}.FromRef(x.ref) 2934 } 2935 2936 type HTMLFormControlsCollection struct { 2937 HTMLCollection 2938 } 2939 2940 func (this HTMLFormControlsCollection) Once() HTMLFormControlsCollection { 2941 this.ref.Once() 2942 return this 2943 } 2944 2945 func (this HTMLFormControlsCollection) Ref() js.Ref { 2946 return this.HTMLCollection.Ref() 2947 } 2948 2949 func (this HTMLFormControlsCollection) FromRef(ref js.Ref) HTMLFormControlsCollection { 2950 this.HTMLCollection = this.HTMLCollection.FromRef(ref) 2951 return this 2952 } 2953 2954 func (this HTMLFormControlsCollection) Free() { 2955 this.ref.Free() 2956 } 2957 2958 // HasFuncNamedItem returns true if the method "HTMLFormControlsCollection.namedItem" exists. 2959 func (this HTMLFormControlsCollection) HasFuncNamedItem() bool { 2960 return js.True == bindings.HasFuncHTMLFormControlsCollectionNamedItem( 2961 this.ref, 2962 ) 2963 } 2964 2965 // FuncNamedItem returns the method "HTMLFormControlsCollection.namedItem". 2966 func (this HTMLFormControlsCollection) FuncNamedItem() (fn js.Func[func(name js.String) OneOf_RadioNodeList_Element]) { 2967 bindings.FuncHTMLFormControlsCollectionNamedItem( 2968 this.ref, js.Pointer(&fn), 2969 ) 2970 return 2971 } 2972 2973 // NamedItem calls the method "HTMLFormControlsCollection.namedItem". 2974 func (this HTMLFormControlsCollection) NamedItem(name js.String) (ret OneOf_RadioNodeList_Element) { 2975 bindings.CallHTMLFormControlsCollectionNamedItem( 2976 this.ref, js.Pointer(&ret), 2977 name.Ref(), 2978 ) 2979 2980 return 2981 } 2982 2983 // TryNamedItem calls the method "HTMLFormControlsCollection.namedItem" 2984 // in a try/catch block and returns (_, err, ok = false) when it went through 2985 // the catch clause. 2986 func (this HTMLFormControlsCollection) TryNamedItem(name js.String) (ret OneOf_RadioNodeList_Element, exception js.Any, ok bool) { 2987 ok = js.True == bindings.TryHTMLFormControlsCollectionNamedItem( 2988 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2989 name.Ref(), 2990 ) 2991 2992 return 2993 } 2994 2995 type HTMLFormElement struct { 2996 HTMLElement 2997 } 2998 2999 func (this HTMLFormElement) Once() HTMLFormElement { 3000 this.ref.Once() 3001 return this 3002 } 3003 3004 func (this HTMLFormElement) Ref() js.Ref { 3005 return this.HTMLElement.Ref() 3006 } 3007 3008 func (this HTMLFormElement) FromRef(ref js.Ref) HTMLFormElement { 3009 this.HTMLElement = this.HTMLElement.FromRef(ref) 3010 return this 3011 } 3012 3013 func (this HTMLFormElement) Free() { 3014 this.ref.Free() 3015 } 3016 3017 // AcceptCharset returns the value of property "HTMLFormElement.acceptCharset". 3018 // 3019 // It returns ok=false if there is no such property. 3020 func (this HTMLFormElement) AcceptCharset() (ret js.String, ok bool) { 3021 ok = js.True == bindings.GetHTMLFormElementAcceptCharset( 3022 this.ref, js.Pointer(&ret), 3023 ) 3024 return 3025 } 3026 3027 // SetAcceptCharset sets the value of property "HTMLFormElement.acceptCharset" to val. 3028 // 3029 // It returns false if the property cannot be set. 3030 func (this HTMLFormElement) SetAcceptCharset(val js.String) bool { 3031 return js.True == bindings.SetHTMLFormElementAcceptCharset( 3032 this.ref, 3033 val.Ref(), 3034 ) 3035 } 3036 3037 // Action returns the value of property "HTMLFormElement.action". 3038 // 3039 // It returns ok=false if there is no such property. 3040 func (this HTMLFormElement) Action() (ret js.String, ok bool) { 3041 ok = js.True == bindings.GetHTMLFormElementAction( 3042 this.ref, js.Pointer(&ret), 3043 ) 3044 return 3045 } 3046 3047 // SetAction sets the value of property "HTMLFormElement.action" to val. 3048 // 3049 // It returns false if the property cannot be set. 3050 func (this HTMLFormElement) SetAction(val js.String) bool { 3051 return js.True == bindings.SetHTMLFormElementAction( 3052 this.ref, 3053 val.Ref(), 3054 ) 3055 } 3056 3057 // Autocomplete returns the value of property "HTMLFormElement.autocomplete". 3058 // 3059 // It returns ok=false if there is no such property. 3060 func (this HTMLFormElement) Autocomplete() (ret js.String, ok bool) { 3061 ok = js.True == bindings.GetHTMLFormElementAutocomplete( 3062 this.ref, js.Pointer(&ret), 3063 ) 3064 return 3065 } 3066 3067 // SetAutocomplete sets the value of property "HTMLFormElement.autocomplete" to val. 3068 // 3069 // It returns false if the property cannot be set. 3070 func (this HTMLFormElement) SetAutocomplete(val js.String) bool { 3071 return js.True == bindings.SetHTMLFormElementAutocomplete( 3072 this.ref, 3073 val.Ref(), 3074 ) 3075 } 3076 3077 // Enctype returns the value of property "HTMLFormElement.enctype". 3078 // 3079 // It returns ok=false if there is no such property. 3080 func (this HTMLFormElement) Enctype() (ret js.String, ok bool) { 3081 ok = js.True == bindings.GetHTMLFormElementEnctype( 3082 this.ref, js.Pointer(&ret), 3083 ) 3084 return 3085 } 3086 3087 // SetEnctype sets the value of property "HTMLFormElement.enctype" to val. 3088 // 3089 // It returns false if the property cannot be set. 3090 func (this HTMLFormElement) SetEnctype(val js.String) bool { 3091 return js.True == bindings.SetHTMLFormElementEnctype( 3092 this.ref, 3093 val.Ref(), 3094 ) 3095 } 3096 3097 // Encoding returns the value of property "HTMLFormElement.encoding". 3098 // 3099 // It returns ok=false if there is no such property. 3100 func (this HTMLFormElement) Encoding() (ret js.String, ok bool) { 3101 ok = js.True == bindings.GetHTMLFormElementEncoding( 3102 this.ref, js.Pointer(&ret), 3103 ) 3104 return 3105 } 3106 3107 // SetEncoding sets the value of property "HTMLFormElement.encoding" to val. 3108 // 3109 // It returns false if the property cannot be set. 3110 func (this HTMLFormElement) SetEncoding(val js.String) bool { 3111 return js.True == bindings.SetHTMLFormElementEncoding( 3112 this.ref, 3113 val.Ref(), 3114 ) 3115 } 3116 3117 // Method returns the value of property "HTMLFormElement.method". 3118 // 3119 // It returns ok=false if there is no such property. 3120 func (this HTMLFormElement) Method() (ret js.String, ok bool) { 3121 ok = js.True == bindings.GetHTMLFormElementMethod( 3122 this.ref, js.Pointer(&ret), 3123 ) 3124 return 3125 } 3126 3127 // SetMethod sets the value of property "HTMLFormElement.method" to val. 3128 // 3129 // It returns false if the property cannot be set. 3130 func (this HTMLFormElement) SetMethod(val js.String) bool { 3131 return js.True == bindings.SetHTMLFormElementMethod( 3132 this.ref, 3133 val.Ref(), 3134 ) 3135 } 3136 3137 // Name returns the value of property "HTMLFormElement.name". 3138 // 3139 // It returns ok=false if there is no such property. 3140 func (this HTMLFormElement) Name() (ret js.String, ok bool) { 3141 ok = js.True == bindings.GetHTMLFormElementName( 3142 this.ref, js.Pointer(&ret), 3143 ) 3144 return 3145 } 3146 3147 // SetName sets the value of property "HTMLFormElement.name" to val. 3148 // 3149 // It returns false if the property cannot be set. 3150 func (this HTMLFormElement) SetName(val js.String) bool { 3151 return js.True == bindings.SetHTMLFormElementName( 3152 this.ref, 3153 val.Ref(), 3154 ) 3155 } 3156 3157 // NoValidate returns the value of property "HTMLFormElement.noValidate". 3158 // 3159 // It returns ok=false if there is no such property. 3160 func (this HTMLFormElement) NoValidate() (ret bool, ok bool) { 3161 ok = js.True == bindings.GetHTMLFormElementNoValidate( 3162 this.ref, js.Pointer(&ret), 3163 ) 3164 return 3165 } 3166 3167 // SetNoValidate sets the value of property "HTMLFormElement.noValidate" to val. 3168 // 3169 // It returns false if the property cannot be set. 3170 func (this HTMLFormElement) SetNoValidate(val bool) bool { 3171 return js.True == bindings.SetHTMLFormElementNoValidate( 3172 this.ref, 3173 js.Bool(bool(val)), 3174 ) 3175 } 3176 3177 // Target returns the value of property "HTMLFormElement.target". 3178 // 3179 // It returns ok=false if there is no such property. 3180 func (this HTMLFormElement) Target() (ret js.String, ok bool) { 3181 ok = js.True == bindings.GetHTMLFormElementTarget( 3182 this.ref, js.Pointer(&ret), 3183 ) 3184 return 3185 } 3186 3187 // SetTarget sets the value of property "HTMLFormElement.target" to val. 3188 // 3189 // It returns false if the property cannot be set. 3190 func (this HTMLFormElement) SetTarget(val js.String) bool { 3191 return js.True == bindings.SetHTMLFormElementTarget( 3192 this.ref, 3193 val.Ref(), 3194 ) 3195 } 3196 3197 // Rel returns the value of property "HTMLFormElement.rel". 3198 // 3199 // It returns ok=false if there is no such property. 3200 func (this HTMLFormElement) Rel() (ret js.String, ok bool) { 3201 ok = js.True == bindings.GetHTMLFormElementRel( 3202 this.ref, js.Pointer(&ret), 3203 ) 3204 return 3205 } 3206 3207 // SetRel sets the value of property "HTMLFormElement.rel" to val. 3208 // 3209 // It returns false if the property cannot be set. 3210 func (this HTMLFormElement) SetRel(val js.String) bool { 3211 return js.True == bindings.SetHTMLFormElementRel( 3212 this.ref, 3213 val.Ref(), 3214 ) 3215 } 3216 3217 // RelList returns the value of property "HTMLFormElement.relList". 3218 // 3219 // It returns ok=false if there is no such property. 3220 func (this HTMLFormElement) RelList() (ret DOMTokenList, ok bool) { 3221 ok = js.True == bindings.GetHTMLFormElementRelList( 3222 this.ref, js.Pointer(&ret), 3223 ) 3224 return 3225 } 3226 3227 // Elements returns the value of property "HTMLFormElement.elements". 3228 // 3229 // It returns ok=false if there is no such property. 3230 func (this HTMLFormElement) Elements() (ret HTMLFormControlsCollection, ok bool) { 3231 ok = js.True == bindings.GetHTMLFormElementElements( 3232 this.ref, js.Pointer(&ret), 3233 ) 3234 return 3235 } 3236 3237 // Length returns the value of property "HTMLFormElement.length". 3238 // 3239 // It returns ok=false if there is no such property. 3240 func (this HTMLFormElement) Length() (ret uint32, ok bool) { 3241 ok = js.True == bindings.GetHTMLFormElementLength( 3242 this.ref, js.Pointer(&ret), 3243 ) 3244 return 3245 } 3246 3247 // HasFuncGet returns true if the method "HTMLFormElement." exists. 3248 func (this HTMLFormElement) HasFuncGet() bool { 3249 return js.True == bindings.HasFuncHTMLFormElementGet( 3250 this.ref, 3251 ) 3252 } 3253 3254 // FuncGet returns the method "HTMLFormElement.". 3255 func (this HTMLFormElement) FuncGet() (fn js.Func[func(index uint32) Element]) { 3256 bindings.FuncHTMLFormElementGet( 3257 this.ref, js.Pointer(&fn), 3258 ) 3259 return 3260 } 3261 3262 // Get calls the method "HTMLFormElement.". 3263 func (this HTMLFormElement) Get(index uint32) (ret Element) { 3264 bindings.CallHTMLFormElementGet( 3265 this.ref, js.Pointer(&ret), 3266 uint32(index), 3267 ) 3268 3269 return 3270 } 3271 3272 // TryGet calls the method "HTMLFormElement." 3273 // in a try/catch block and returns (_, err, ok = false) when it went through 3274 // the catch clause. 3275 func (this HTMLFormElement) TryGet(index uint32) (ret Element, exception js.Any, ok bool) { 3276 ok = js.True == bindings.TryHTMLFormElementGet( 3277 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3278 uint32(index), 3279 ) 3280 3281 return 3282 } 3283 3284 // HasFuncGet1 returns true if the method "HTMLFormElement." exists. 3285 func (this HTMLFormElement) HasFuncGet1() bool { 3286 return js.True == bindings.HasFuncHTMLFormElementGet1( 3287 this.ref, 3288 ) 3289 } 3290 3291 // FuncGet1 returns the method "HTMLFormElement.". 3292 func (this HTMLFormElement) FuncGet1() (fn js.Func[func(name js.String) OneOf_RadioNodeList_Element]) { 3293 bindings.FuncHTMLFormElementGet1( 3294 this.ref, js.Pointer(&fn), 3295 ) 3296 return 3297 } 3298 3299 // Get1 calls the method "HTMLFormElement.". 3300 func (this HTMLFormElement) Get1(name js.String) (ret OneOf_RadioNodeList_Element) { 3301 bindings.CallHTMLFormElementGet1( 3302 this.ref, js.Pointer(&ret), 3303 name.Ref(), 3304 ) 3305 3306 return 3307 } 3308 3309 // TryGet1 calls the method "HTMLFormElement." 3310 // in a try/catch block and returns (_, err, ok = false) when it went through 3311 // the catch clause. 3312 func (this HTMLFormElement) TryGet1(name js.String) (ret OneOf_RadioNodeList_Element, exception js.Any, ok bool) { 3313 ok = js.True == bindings.TryHTMLFormElementGet1( 3314 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3315 name.Ref(), 3316 ) 3317 3318 return 3319 } 3320 3321 // HasFuncSubmit returns true if the method "HTMLFormElement.submit" exists. 3322 func (this HTMLFormElement) HasFuncSubmit() bool { 3323 return js.True == bindings.HasFuncHTMLFormElementSubmit( 3324 this.ref, 3325 ) 3326 } 3327 3328 // FuncSubmit returns the method "HTMLFormElement.submit". 3329 func (this HTMLFormElement) FuncSubmit() (fn js.Func[func()]) { 3330 bindings.FuncHTMLFormElementSubmit( 3331 this.ref, js.Pointer(&fn), 3332 ) 3333 return 3334 } 3335 3336 // Submit calls the method "HTMLFormElement.submit". 3337 func (this HTMLFormElement) Submit() (ret js.Void) { 3338 bindings.CallHTMLFormElementSubmit( 3339 this.ref, js.Pointer(&ret), 3340 ) 3341 3342 return 3343 } 3344 3345 // TrySubmit calls the method "HTMLFormElement.submit" 3346 // in a try/catch block and returns (_, err, ok = false) when it went through 3347 // the catch clause. 3348 func (this HTMLFormElement) TrySubmit() (ret js.Void, exception js.Any, ok bool) { 3349 ok = js.True == bindings.TryHTMLFormElementSubmit( 3350 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3351 ) 3352 3353 return 3354 } 3355 3356 // HasFuncRequestSubmit returns true if the method "HTMLFormElement.requestSubmit" exists. 3357 func (this HTMLFormElement) HasFuncRequestSubmit() bool { 3358 return js.True == bindings.HasFuncHTMLFormElementRequestSubmit( 3359 this.ref, 3360 ) 3361 } 3362 3363 // FuncRequestSubmit returns the method "HTMLFormElement.requestSubmit". 3364 func (this HTMLFormElement) FuncRequestSubmit() (fn js.Func[func(submitter HTMLElement)]) { 3365 bindings.FuncHTMLFormElementRequestSubmit( 3366 this.ref, js.Pointer(&fn), 3367 ) 3368 return 3369 } 3370 3371 // RequestSubmit calls the method "HTMLFormElement.requestSubmit". 3372 func (this HTMLFormElement) RequestSubmit(submitter HTMLElement) (ret js.Void) { 3373 bindings.CallHTMLFormElementRequestSubmit( 3374 this.ref, js.Pointer(&ret), 3375 submitter.Ref(), 3376 ) 3377 3378 return 3379 } 3380 3381 // TryRequestSubmit calls the method "HTMLFormElement.requestSubmit" 3382 // in a try/catch block and returns (_, err, ok = false) when it went through 3383 // the catch clause. 3384 func (this HTMLFormElement) TryRequestSubmit(submitter HTMLElement) (ret js.Void, exception js.Any, ok bool) { 3385 ok = js.True == bindings.TryHTMLFormElementRequestSubmit( 3386 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3387 submitter.Ref(), 3388 ) 3389 3390 return 3391 } 3392 3393 // HasFuncRequestSubmit1 returns true if the method "HTMLFormElement.requestSubmit" exists. 3394 func (this HTMLFormElement) HasFuncRequestSubmit1() bool { 3395 return js.True == bindings.HasFuncHTMLFormElementRequestSubmit1( 3396 this.ref, 3397 ) 3398 } 3399 3400 // FuncRequestSubmit1 returns the method "HTMLFormElement.requestSubmit". 3401 func (this HTMLFormElement) FuncRequestSubmit1() (fn js.Func[func()]) { 3402 bindings.FuncHTMLFormElementRequestSubmit1( 3403 this.ref, js.Pointer(&fn), 3404 ) 3405 return 3406 } 3407 3408 // RequestSubmit1 calls the method "HTMLFormElement.requestSubmit". 3409 func (this HTMLFormElement) RequestSubmit1() (ret js.Void) { 3410 bindings.CallHTMLFormElementRequestSubmit1( 3411 this.ref, js.Pointer(&ret), 3412 ) 3413 3414 return 3415 } 3416 3417 // TryRequestSubmit1 calls the method "HTMLFormElement.requestSubmit" 3418 // in a try/catch block and returns (_, err, ok = false) when it went through 3419 // the catch clause. 3420 func (this HTMLFormElement) TryRequestSubmit1() (ret js.Void, exception js.Any, ok bool) { 3421 ok = js.True == bindings.TryHTMLFormElementRequestSubmit1( 3422 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3423 ) 3424 3425 return 3426 } 3427 3428 // HasFuncReset returns true if the method "HTMLFormElement.reset" exists. 3429 func (this HTMLFormElement) HasFuncReset() bool { 3430 return js.True == bindings.HasFuncHTMLFormElementReset( 3431 this.ref, 3432 ) 3433 } 3434 3435 // FuncReset returns the method "HTMLFormElement.reset". 3436 func (this HTMLFormElement) FuncReset() (fn js.Func[func()]) { 3437 bindings.FuncHTMLFormElementReset( 3438 this.ref, js.Pointer(&fn), 3439 ) 3440 return 3441 } 3442 3443 // Reset calls the method "HTMLFormElement.reset". 3444 func (this HTMLFormElement) Reset() (ret js.Void) { 3445 bindings.CallHTMLFormElementReset( 3446 this.ref, js.Pointer(&ret), 3447 ) 3448 3449 return 3450 } 3451 3452 // TryReset calls the method "HTMLFormElement.reset" 3453 // in a try/catch block and returns (_, err, ok = false) when it went through 3454 // the catch clause. 3455 func (this HTMLFormElement) TryReset() (ret js.Void, exception js.Any, ok bool) { 3456 ok = js.True == bindings.TryHTMLFormElementReset( 3457 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3458 ) 3459 3460 return 3461 } 3462 3463 // HasFuncCheckValidity returns true if the method "HTMLFormElement.checkValidity" exists. 3464 func (this HTMLFormElement) HasFuncCheckValidity() bool { 3465 return js.True == bindings.HasFuncHTMLFormElementCheckValidity( 3466 this.ref, 3467 ) 3468 } 3469 3470 // FuncCheckValidity returns the method "HTMLFormElement.checkValidity". 3471 func (this HTMLFormElement) FuncCheckValidity() (fn js.Func[func() bool]) { 3472 bindings.FuncHTMLFormElementCheckValidity( 3473 this.ref, js.Pointer(&fn), 3474 ) 3475 return 3476 } 3477 3478 // CheckValidity calls the method "HTMLFormElement.checkValidity". 3479 func (this HTMLFormElement) CheckValidity() (ret bool) { 3480 bindings.CallHTMLFormElementCheckValidity( 3481 this.ref, js.Pointer(&ret), 3482 ) 3483 3484 return 3485 } 3486 3487 // TryCheckValidity calls the method "HTMLFormElement.checkValidity" 3488 // in a try/catch block and returns (_, err, ok = false) when it went through 3489 // the catch clause. 3490 func (this HTMLFormElement) TryCheckValidity() (ret bool, exception js.Any, ok bool) { 3491 ok = js.True == bindings.TryHTMLFormElementCheckValidity( 3492 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3493 ) 3494 3495 return 3496 } 3497 3498 // HasFuncReportValidity returns true if the method "HTMLFormElement.reportValidity" exists. 3499 func (this HTMLFormElement) HasFuncReportValidity() bool { 3500 return js.True == bindings.HasFuncHTMLFormElementReportValidity( 3501 this.ref, 3502 ) 3503 } 3504 3505 // FuncReportValidity returns the method "HTMLFormElement.reportValidity". 3506 func (this HTMLFormElement) FuncReportValidity() (fn js.Func[func() bool]) { 3507 bindings.FuncHTMLFormElementReportValidity( 3508 this.ref, js.Pointer(&fn), 3509 ) 3510 return 3511 } 3512 3513 // ReportValidity calls the method "HTMLFormElement.reportValidity". 3514 func (this HTMLFormElement) ReportValidity() (ret bool) { 3515 bindings.CallHTMLFormElementReportValidity( 3516 this.ref, js.Pointer(&ret), 3517 ) 3518 3519 return 3520 } 3521 3522 // TryReportValidity calls the method "HTMLFormElement.reportValidity" 3523 // in a try/catch block and returns (_, err, ok = false) when it went through 3524 // the catch clause. 3525 func (this HTMLFormElement) TryReportValidity() (ret bool, exception js.Any, ok bool) { 3526 ok = js.True == bindings.TryHTMLFormElementReportValidity( 3527 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3528 ) 3529 3530 return 3531 } 3532 3533 type OneOf_File_String struct { 3534 ref js.Ref 3535 } 3536 3537 func (x OneOf_File_String) Ref() js.Ref { 3538 return x.ref 3539 } 3540 3541 func (x OneOf_File_String) Free() { 3542 x.ref.Free() 3543 } 3544 3545 func (x OneOf_File_String) FromRef(ref js.Ref) OneOf_File_String { 3546 return OneOf_File_String{ 3547 ref: ref, 3548 } 3549 } 3550 3551 func (x OneOf_File_String) File() File { 3552 return File{}.FromRef(x.ref) 3553 } 3554 3555 func (x OneOf_File_String) String() js.String { 3556 return js.String{}.FromRef(x.ref) 3557 } 3558 3559 type FormDataEntryValue = OneOf_File_String 3560 3561 func NewFormData(form HTMLFormElement, submitter HTMLElement) (ret FormData) { 3562 ret.ref = bindings.NewFormDataByFormData( 3563 form.Ref(), 3564 submitter.Ref()) 3565 return 3566 } 3567 3568 func NewFormDataByFormData1(form HTMLFormElement) (ret FormData) { 3569 ret.ref = bindings.NewFormDataByFormData1( 3570 form.Ref()) 3571 return 3572 } 3573 3574 func NewFormDataByFormData2() (ret FormData) { 3575 ret.ref = bindings.NewFormDataByFormData2() 3576 return 3577 } 3578 3579 type FormData struct { 3580 ref js.Ref 3581 } 3582 3583 func (this FormData) Once() FormData { 3584 this.ref.Once() 3585 return this 3586 } 3587 3588 func (this FormData) Ref() js.Ref { 3589 return this.ref 3590 } 3591 3592 func (this FormData) FromRef(ref js.Ref) FormData { 3593 this.ref = ref 3594 return this 3595 } 3596 3597 func (this FormData) Free() { 3598 this.ref.Free() 3599 } 3600 3601 // HasFuncAppend returns true if the method "FormData.append" exists. 3602 func (this FormData) HasFuncAppend() bool { 3603 return js.True == bindings.HasFuncFormDataAppend( 3604 this.ref, 3605 ) 3606 } 3607 3608 // FuncAppend returns the method "FormData.append". 3609 func (this FormData) FuncAppend() (fn js.Func[func(name js.String, value js.String)]) { 3610 bindings.FuncFormDataAppend( 3611 this.ref, js.Pointer(&fn), 3612 ) 3613 return 3614 } 3615 3616 // Append calls the method "FormData.append". 3617 func (this FormData) Append(name js.String, value js.String) (ret js.Void) { 3618 bindings.CallFormDataAppend( 3619 this.ref, js.Pointer(&ret), 3620 name.Ref(), 3621 value.Ref(), 3622 ) 3623 3624 return 3625 } 3626 3627 // TryAppend calls the method "FormData.append" 3628 // in a try/catch block and returns (_, err, ok = false) when it went through 3629 // the catch clause. 3630 func (this FormData) TryAppend(name js.String, value js.String) (ret js.Void, exception js.Any, ok bool) { 3631 ok = js.True == bindings.TryFormDataAppend( 3632 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3633 name.Ref(), 3634 value.Ref(), 3635 ) 3636 3637 return 3638 } 3639 3640 // HasFuncAppend1 returns true if the method "FormData.append" exists. 3641 func (this FormData) HasFuncAppend1() bool { 3642 return js.True == bindings.HasFuncFormDataAppend1( 3643 this.ref, 3644 ) 3645 } 3646 3647 // FuncAppend1 returns the method "FormData.append". 3648 func (this FormData) FuncAppend1() (fn js.Func[func(name js.String, blobValue Blob, filename js.String)]) { 3649 bindings.FuncFormDataAppend1( 3650 this.ref, js.Pointer(&fn), 3651 ) 3652 return 3653 } 3654 3655 // Append1 calls the method "FormData.append". 3656 func (this FormData) Append1(name js.String, blobValue Blob, filename js.String) (ret js.Void) { 3657 bindings.CallFormDataAppend1( 3658 this.ref, js.Pointer(&ret), 3659 name.Ref(), 3660 blobValue.Ref(), 3661 filename.Ref(), 3662 ) 3663 3664 return 3665 } 3666 3667 // TryAppend1 calls the method "FormData.append" 3668 // in a try/catch block and returns (_, err, ok = false) when it went through 3669 // the catch clause. 3670 func (this FormData) TryAppend1(name js.String, blobValue Blob, filename js.String) (ret js.Void, exception js.Any, ok bool) { 3671 ok = js.True == bindings.TryFormDataAppend1( 3672 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3673 name.Ref(), 3674 blobValue.Ref(), 3675 filename.Ref(), 3676 ) 3677 3678 return 3679 } 3680 3681 // HasFuncAppend2 returns true if the method "FormData.append" exists. 3682 func (this FormData) HasFuncAppend2() bool { 3683 return js.True == bindings.HasFuncFormDataAppend2( 3684 this.ref, 3685 ) 3686 } 3687 3688 // FuncAppend2 returns the method "FormData.append". 3689 func (this FormData) FuncAppend2() (fn js.Func[func(name js.String, blobValue Blob)]) { 3690 bindings.FuncFormDataAppend2( 3691 this.ref, js.Pointer(&fn), 3692 ) 3693 return 3694 } 3695 3696 // Append2 calls the method "FormData.append". 3697 func (this FormData) Append2(name js.String, blobValue Blob) (ret js.Void) { 3698 bindings.CallFormDataAppend2( 3699 this.ref, js.Pointer(&ret), 3700 name.Ref(), 3701 blobValue.Ref(), 3702 ) 3703 3704 return 3705 } 3706 3707 // TryAppend2 calls the method "FormData.append" 3708 // in a try/catch block and returns (_, err, ok = false) when it went through 3709 // the catch clause. 3710 func (this FormData) TryAppend2(name js.String, blobValue Blob) (ret js.Void, exception js.Any, ok bool) { 3711 ok = js.True == bindings.TryFormDataAppend2( 3712 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3713 name.Ref(), 3714 blobValue.Ref(), 3715 ) 3716 3717 return 3718 } 3719 3720 // HasFuncDelete returns true if the method "FormData.delete" exists. 3721 func (this FormData) HasFuncDelete() bool { 3722 return js.True == bindings.HasFuncFormDataDelete( 3723 this.ref, 3724 ) 3725 } 3726 3727 // FuncDelete returns the method "FormData.delete". 3728 func (this FormData) FuncDelete() (fn js.Func[func(name js.String)]) { 3729 bindings.FuncFormDataDelete( 3730 this.ref, js.Pointer(&fn), 3731 ) 3732 return 3733 } 3734 3735 // Delete calls the method "FormData.delete". 3736 func (this FormData) Delete(name js.String) (ret js.Void) { 3737 bindings.CallFormDataDelete( 3738 this.ref, js.Pointer(&ret), 3739 name.Ref(), 3740 ) 3741 3742 return 3743 } 3744 3745 // TryDelete calls the method "FormData.delete" 3746 // in a try/catch block and returns (_, err, ok = false) when it went through 3747 // the catch clause. 3748 func (this FormData) TryDelete(name js.String) (ret js.Void, exception js.Any, ok bool) { 3749 ok = js.True == bindings.TryFormDataDelete( 3750 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3751 name.Ref(), 3752 ) 3753 3754 return 3755 } 3756 3757 // HasFuncGet returns true if the method "FormData.get" exists. 3758 func (this FormData) HasFuncGet() bool { 3759 return js.True == bindings.HasFuncFormDataGet( 3760 this.ref, 3761 ) 3762 } 3763 3764 // FuncGet returns the method "FormData.get". 3765 func (this FormData) FuncGet() (fn js.Func[func(name js.String) FormDataEntryValue]) { 3766 bindings.FuncFormDataGet( 3767 this.ref, js.Pointer(&fn), 3768 ) 3769 return 3770 } 3771 3772 // Get calls the method "FormData.get". 3773 func (this FormData) Get(name js.String) (ret FormDataEntryValue) { 3774 bindings.CallFormDataGet( 3775 this.ref, js.Pointer(&ret), 3776 name.Ref(), 3777 ) 3778 3779 return 3780 } 3781 3782 // TryGet calls the method "FormData.get" 3783 // in a try/catch block and returns (_, err, ok = false) when it went through 3784 // the catch clause. 3785 func (this FormData) TryGet(name js.String) (ret FormDataEntryValue, exception js.Any, ok bool) { 3786 ok = js.True == bindings.TryFormDataGet( 3787 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3788 name.Ref(), 3789 ) 3790 3791 return 3792 } 3793 3794 // HasFuncGetAll returns true if the method "FormData.getAll" exists. 3795 func (this FormData) HasFuncGetAll() bool { 3796 return js.True == bindings.HasFuncFormDataGetAll( 3797 this.ref, 3798 ) 3799 } 3800 3801 // FuncGetAll returns the method "FormData.getAll". 3802 func (this FormData) FuncGetAll() (fn js.Func[func(name js.String) js.Array[FormDataEntryValue]]) { 3803 bindings.FuncFormDataGetAll( 3804 this.ref, js.Pointer(&fn), 3805 ) 3806 return 3807 } 3808 3809 // GetAll calls the method "FormData.getAll". 3810 func (this FormData) GetAll(name js.String) (ret js.Array[FormDataEntryValue]) { 3811 bindings.CallFormDataGetAll( 3812 this.ref, js.Pointer(&ret), 3813 name.Ref(), 3814 ) 3815 3816 return 3817 } 3818 3819 // TryGetAll calls the method "FormData.getAll" 3820 // in a try/catch block and returns (_, err, ok = false) when it went through 3821 // the catch clause. 3822 func (this FormData) TryGetAll(name js.String) (ret js.Array[FormDataEntryValue], exception js.Any, ok bool) { 3823 ok = js.True == bindings.TryFormDataGetAll( 3824 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3825 name.Ref(), 3826 ) 3827 3828 return 3829 } 3830 3831 // HasFuncHas returns true if the method "FormData.has" exists. 3832 func (this FormData) HasFuncHas() bool { 3833 return js.True == bindings.HasFuncFormDataHas( 3834 this.ref, 3835 ) 3836 } 3837 3838 // FuncHas returns the method "FormData.has". 3839 func (this FormData) FuncHas() (fn js.Func[func(name js.String) bool]) { 3840 bindings.FuncFormDataHas( 3841 this.ref, js.Pointer(&fn), 3842 ) 3843 return 3844 } 3845 3846 // Has calls the method "FormData.has". 3847 func (this FormData) Has(name js.String) (ret bool) { 3848 bindings.CallFormDataHas( 3849 this.ref, js.Pointer(&ret), 3850 name.Ref(), 3851 ) 3852 3853 return 3854 } 3855 3856 // TryHas calls the method "FormData.has" 3857 // in a try/catch block and returns (_, err, ok = false) when it went through 3858 // the catch clause. 3859 func (this FormData) TryHas(name js.String) (ret bool, exception js.Any, ok bool) { 3860 ok = js.True == bindings.TryFormDataHas( 3861 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3862 name.Ref(), 3863 ) 3864 3865 return 3866 } 3867 3868 // HasFuncSet returns true if the method "FormData.set" exists. 3869 func (this FormData) HasFuncSet() bool { 3870 return js.True == bindings.HasFuncFormDataSet( 3871 this.ref, 3872 ) 3873 } 3874 3875 // FuncSet returns the method "FormData.set". 3876 func (this FormData) FuncSet() (fn js.Func[func(name js.String, value js.String)]) { 3877 bindings.FuncFormDataSet( 3878 this.ref, js.Pointer(&fn), 3879 ) 3880 return 3881 } 3882 3883 // Set calls the method "FormData.set". 3884 func (this FormData) Set(name js.String, value js.String) (ret js.Void) { 3885 bindings.CallFormDataSet( 3886 this.ref, js.Pointer(&ret), 3887 name.Ref(), 3888 value.Ref(), 3889 ) 3890 3891 return 3892 } 3893 3894 // TrySet calls the method "FormData.set" 3895 // in a try/catch block and returns (_, err, ok = false) when it went through 3896 // the catch clause. 3897 func (this FormData) TrySet(name js.String, value js.String) (ret js.Void, exception js.Any, ok bool) { 3898 ok = js.True == bindings.TryFormDataSet( 3899 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3900 name.Ref(), 3901 value.Ref(), 3902 ) 3903 3904 return 3905 } 3906 3907 // HasFuncSet1 returns true if the method "FormData.set" exists. 3908 func (this FormData) HasFuncSet1() bool { 3909 return js.True == bindings.HasFuncFormDataSet1( 3910 this.ref, 3911 ) 3912 } 3913 3914 // FuncSet1 returns the method "FormData.set". 3915 func (this FormData) FuncSet1() (fn js.Func[func(name js.String, blobValue Blob, filename js.String)]) { 3916 bindings.FuncFormDataSet1( 3917 this.ref, js.Pointer(&fn), 3918 ) 3919 return 3920 } 3921 3922 // Set1 calls the method "FormData.set". 3923 func (this FormData) Set1(name js.String, blobValue Blob, filename js.String) (ret js.Void) { 3924 bindings.CallFormDataSet1( 3925 this.ref, js.Pointer(&ret), 3926 name.Ref(), 3927 blobValue.Ref(), 3928 filename.Ref(), 3929 ) 3930 3931 return 3932 } 3933 3934 // TrySet1 calls the method "FormData.set" 3935 // in a try/catch block and returns (_, err, ok = false) when it went through 3936 // the catch clause. 3937 func (this FormData) TrySet1(name js.String, blobValue Blob, filename js.String) (ret js.Void, exception js.Any, ok bool) { 3938 ok = js.True == bindings.TryFormDataSet1( 3939 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3940 name.Ref(), 3941 blobValue.Ref(), 3942 filename.Ref(), 3943 ) 3944 3945 return 3946 } 3947 3948 // HasFuncSet2 returns true if the method "FormData.set" exists. 3949 func (this FormData) HasFuncSet2() bool { 3950 return js.True == bindings.HasFuncFormDataSet2( 3951 this.ref, 3952 ) 3953 } 3954 3955 // FuncSet2 returns the method "FormData.set". 3956 func (this FormData) FuncSet2() (fn js.Func[func(name js.String, blobValue Blob)]) { 3957 bindings.FuncFormDataSet2( 3958 this.ref, js.Pointer(&fn), 3959 ) 3960 return 3961 } 3962 3963 // Set2 calls the method "FormData.set". 3964 func (this FormData) Set2(name js.String, blobValue Blob) (ret js.Void) { 3965 bindings.CallFormDataSet2( 3966 this.ref, js.Pointer(&ret), 3967 name.Ref(), 3968 blobValue.Ref(), 3969 ) 3970 3971 return 3972 } 3973 3974 // TrySet2 calls the method "FormData.set" 3975 // in a try/catch block and returns (_, err, ok = false) when it went through 3976 // the catch clause. 3977 func (this FormData) TrySet2(name js.String, blobValue Blob) (ret js.Void, exception js.Any, ok bool) { 3978 ok = js.True == bindings.TryFormDataSet2( 3979 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3980 name.Ref(), 3981 blobValue.Ref(), 3982 ) 3983 3984 return 3985 } 3986 3987 type OneOf_File_String_FormData struct { 3988 ref js.Ref 3989 } 3990 3991 func (x OneOf_File_String_FormData) Ref() js.Ref { 3992 return x.ref 3993 } 3994 3995 func (x OneOf_File_String_FormData) Free() { 3996 x.ref.Free() 3997 } 3998 3999 func (x OneOf_File_String_FormData) FromRef(ref js.Ref) OneOf_File_String_FormData { 4000 return OneOf_File_String_FormData{ 4001 ref: ref, 4002 } 4003 } 4004 4005 func (x OneOf_File_String_FormData) File() File { 4006 return File{}.FromRef(x.ref) 4007 } 4008 4009 func (x OneOf_File_String_FormData) String() js.String { 4010 return js.String{}.FromRef(x.ref) 4011 } 4012 4013 func (x OneOf_File_String_FormData) FormData() FormData { 4014 return FormData{}.FromRef(x.ref) 4015 } 4016 4017 type ValidityStateFlags struct { 4018 // ValueMissing is "ValidityStateFlags.valueMissing" 4019 // 4020 // Optional, defaults to false. 4021 // 4022 // NOTE: FFI_USE_ValueMissing MUST be set to true to make this field effective. 4023 ValueMissing bool 4024 // TypeMismatch is "ValidityStateFlags.typeMismatch" 4025 // 4026 // Optional, defaults to false. 4027 // 4028 // NOTE: FFI_USE_TypeMismatch MUST be set to true to make this field effective. 4029 TypeMismatch bool 4030 // PatternMismatch is "ValidityStateFlags.patternMismatch" 4031 // 4032 // Optional, defaults to false. 4033 // 4034 // NOTE: FFI_USE_PatternMismatch MUST be set to true to make this field effective. 4035 PatternMismatch bool 4036 // TooLong is "ValidityStateFlags.tooLong" 4037 // 4038 // Optional, defaults to false. 4039 // 4040 // NOTE: FFI_USE_TooLong MUST be set to true to make this field effective. 4041 TooLong bool 4042 // TooShort is "ValidityStateFlags.tooShort" 4043 // 4044 // Optional, defaults to false. 4045 // 4046 // NOTE: FFI_USE_TooShort MUST be set to true to make this field effective. 4047 TooShort bool 4048 // RangeUnderflow is "ValidityStateFlags.rangeUnderflow" 4049 // 4050 // Optional, defaults to false. 4051 // 4052 // NOTE: FFI_USE_RangeUnderflow MUST be set to true to make this field effective. 4053 RangeUnderflow bool 4054 // RangeOverflow is "ValidityStateFlags.rangeOverflow" 4055 // 4056 // Optional, defaults to false. 4057 // 4058 // NOTE: FFI_USE_RangeOverflow MUST be set to true to make this field effective. 4059 RangeOverflow bool 4060 // StepMismatch is "ValidityStateFlags.stepMismatch" 4061 // 4062 // Optional, defaults to false. 4063 // 4064 // NOTE: FFI_USE_StepMismatch MUST be set to true to make this field effective. 4065 StepMismatch bool 4066 // BadInput is "ValidityStateFlags.badInput" 4067 // 4068 // Optional, defaults to false. 4069 // 4070 // NOTE: FFI_USE_BadInput MUST be set to true to make this field effective. 4071 BadInput bool 4072 // CustomError is "ValidityStateFlags.customError" 4073 // 4074 // Optional, defaults to false. 4075 // 4076 // NOTE: FFI_USE_CustomError MUST be set to true to make this field effective. 4077 CustomError bool 4078 4079 FFI_USE_ValueMissing bool // for ValueMissing. 4080 FFI_USE_TypeMismatch bool // for TypeMismatch. 4081 FFI_USE_PatternMismatch bool // for PatternMismatch. 4082 FFI_USE_TooLong bool // for TooLong. 4083 FFI_USE_TooShort bool // for TooShort. 4084 FFI_USE_RangeUnderflow bool // for RangeUnderflow. 4085 FFI_USE_RangeOverflow bool // for RangeOverflow. 4086 FFI_USE_StepMismatch bool // for StepMismatch. 4087 FFI_USE_BadInput bool // for BadInput. 4088 FFI_USE_CustomError bool // for CustomError. 4089 4090 FFI_USE bool 4091 } 4092 4093 // FromRef calls UpdateFrom and returns a ValidityStateFlags with all fields set. 4094 func (p ValidityStateFlags) FromRef(ref js.Ref) ValidityStateFlags { 4095 p.UpdateFrom(ref) 4096 return p 4097 } 4098 4099 // New creates a new ValidityStateFlags in the application heap. 4100 func (p ValidityStateFlags) New() js.Ref { 4101 return bindings.ValidityStateFlagsJSLoad( 4102 js.Pointer(&p), js.True, 0, 4103 ) 4104 } 4105 4106 // UpdateFrom copies value of all fields of the heap object to p. 4107 func (p *ValidityStateFlags) UpdateFrom(ref js.Ref) { 4108 bindings.ValidityStateFlagsJSStore( 4109 js.Pointer(p), ref, 4110 ) 4111 } 4112 4113 // Update writes all fields of the p to the heap object referenced by ref. 4114 func (p *ValidityStateFlags) Update(ref js.Ref) { 4115 bindings.ValidityStateFlagsJSLoad( 4116 js.Pointer(p), js.False, ref, 4117 ) 4118 } 4119 4120 // FreeMembers frees fields with heap reference, if recursive is true 4121 // free all heap references reachable from p. 4122 func (p *ValidityStateFlags) FreeMembers(recursive bool) { 4123 } 4124 4125 type ValidityState struct { 4126 ref js.Ref 4127 } 4128 4129 func (this ValidityState) Once() ValidityState { 4130 this.ref.Once() 4131 return this 4132 } 4133 4134 func (this ValidityState) Ref() js.Ref { 4135 return this.ref 4136 } 4137 4138 func (this ValidityState) FromRef(ref js.Ref) ValidityState { 4139 this.ref = ref 4140 return this 4141 } 4142 4143 func (this ValidityState) Free() { 4144 this.ref.Free() 4145 } 4146 4147 // ValueMissing returns the value of property "ValidityState.valueMissing". 4148 // 4149 // It returns ok=false if there is no such property. 4150 func (this ValidityState) ValueMissing() (ret bool, ok bool) { 4151 ok = js.True == bindings.GetValidityStateValueMissing( 4152 this.ref, js.Pointer(&ret), 4153 ) 4154 return 4155 } 4156 4157 // TypeMismatch returns the value of property "ValidityState.typeMismatch". 4158 // 4159 // It returns ok=false if there is no such property. 4160 func (this ValidityState) TypeMismatch() (ret bool, ok bool) { 4161 ok = js.True == bindings.GetValidityStateTypeMismatch( 4162 this.ref, js.Pointer(&ret), 4163 ) 4164 return 4165 } 4166 4167 // PatternMismatch returns the value of property "ValidityState.patternMismatch". 4168 // 4169 // It returns ok=false if there is no such property. 4170 func (this ValidityState) PatternMismatch() (ret bool, ok bool) { 4171 ok = js.True == bindings.GetValidityStatePatternMismatch( 4172 this.ref, js.Pointer(&ret), 4173 ) 4174 return 4175 } 4176 4177 // TooLong returns the value of property "ValidityState.tooLong". 4178 // 4179 // It returns ok=false if there is no such property. 4180 func (this ValidityState) TooLong() (ret bool, ok bool) { 4181 ok = js.True == bindings.GetValidityStateTooLong( 4182 this.ref, js.Pointer(&ret), 4183 ) 4184 return 4185 } 4186 4187 // TooShort returns the value of property "ValidityState.tooShort". 4188 // 4189 // It returns ok=false if there is no such property. 4190 func (this ValidityState) TooShort() (ret bool, ok bool) { 4191 ok = js.True == bindings.GetValidityStateTooShort( 4192 this.ref, js.Pointer(&ret), 4193 ) 4194 return 4195 } 4196 4197 // RangeUnderflow returns the value of property "ValidityState.rangeUnderflow". 4198 // 4199 // It returns ok=false if there is no such property. 4200 func (this ValidityState) RangeUnderflow() (ret bool, ok bool) { 4201 ok = js.True == bindings.GetValidityStateRangeUnderflow( 4202 this.ref, js.Pointer(&ret), 4203 ) 4204 return 4205 } 4206 4207 // RangeOverflow returns the value of property "ValidityState.rangeOverflow". 4208 // 4209 // It returns ok=false if there is no such property. 4210 func (this ValidityState) RangeOverflow() (ret bool, ok bool) { 4211 ok = js.True == bindings.GetValidityStateRangeOverflow( 4212 this.ref, js.Pointer(&ret), 4213 ) 4214 return 4215 } 4216 4217 // StepMismatch returns the value of property "ValidityState.stepMismatch". 4218 // 4219 // It returns ok=false if there is no such property. 4220 func (this ValidityState) StepMismatch() (ret bool, ok bool) { 4221 ok = js.True == bindings.GetValidityStateStepMismatch( 4222 this.ref, js.Pointer(&ret), 4223 ) 4224 return 4225 } 4226 4227 // BadInput returns the value of property "ValidityState.badInput". 4228 // 4229 // It returns ok=false if there is no such property. 4230 func (this ValidityState) BadInput() (ret bool, ok bool) { 4231 ok = js.True == bindings.GetValidityStateBadInput( 4232 this.ref, js.Pointer(&ret), 4233 ) 4234 return 4235 } 4236 4237 // CustomError returns the value of property "ValidityState.customError". 4238 // 4239 // It returns ok=false if there is no such property. 4240 func (this ValidityState) CustomError() (ret bool, ok bool) { 4241 ok = js.True == bindings.GetValidityStateCustomError( 4242 this.ref, js.Pointer(&ret), 4243 ) 4244 return 4245 } 4246 4247 // Valid returns the value of property "ValidityState.valid". 4248 // 4249 // It returns ok=false if there is no such property. 4250 func (this ValidityState) Valid() (ret bool, ok bool) { 4251 ok = js.True == bindings.GetValidityStateValid( 4252 this.ref, js.Pointer(&ret), 4253 ) 4254 return 4255 } 4256 4257 type CustomStateSet struct { 4258 ref js.Ref 4259 } 4260 4261 func (this CustomStateSet) Once() CustomStateSet { 4262 this.ref.Once() 4263 return this 4264 } 4265 4266 func (this CustomStateSet) Ref() js.Ref { 4267 return this.ref 4268 } 4269 4270 func (this CustomStateSet) FromRef(ref js.Ref) CustomStateSet { 4271 this.ref = ref 4272 return this 4273 } 4274 4275 func (this CustomStateSet) Free() { 4276 this.ref.Free() 4277 } 4278 4279 // HasFuncAdd returns true if the method "CustomStateSet.add" exists. 4280 func (this CustomStateSet) HasFuncAdd() bool { 4281 return js.True == bindings.HasFuncCustomStateSetAdd( 4282 this.ref, 4283 ) 4284 } 4285 4286 // FuncAdd returns the method "CustomStateSet.add". 4287 func (this CustomStateSet) FuncAdd() (fn js.Func[func(value js.String)]) { 4288 bindings.FuncCustomStateSetAdd( 4289 this.ref, js.Pointer(&fn), 4290 ) 4291 return 4292 } 4293 4294 // Add calls the method "CustomStateSet.add". 4295 func (this CustomStateSet) Add(value js.String) (ret js.Void) { 4296 bindings.CallCustomStateSetAdd( 4297 this.ref, js.Pointer(&ret), 4298 value.Ref(), 4299 ) 4300 4301 return 4302 } 4303 4304 // TryAdd calls the method "CustomStateSet.add" 4305 // in a try/catch block and returns (_, err, ok = false) when it went through 4306 // the catch clause. 4307 func (this CustomStateSet) TryAdd(value js.String) (ret js.Void, exception js.Any, ok bool) { 4308 ok = js.True == bindings.TryCustomStateSetAdd( 4309 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4310 value.Ref(), 4311 ) 4312 4313 return 4314 } 4315 4316 type ElementInternals struct { 4317 ref js.Ref 4318 } 4319 4320 func (this ElementInternals) Once() ElementInternals { 4321 this.ref.Once() 4322 return this 4323 } 4324 4325 func (this ElementInternals) Ref() js.Ref { 4326 return this.ref 4327 } 4328 4329 func (this ElementInternals) FromRef(ref js.Ref) ElementInternals { 4330 this.ref = ref 4331 return this 4332 } 4333 4334 func (this ElementInternals) Free() { 4335 this.ref.Free() 4336 } 4337 4338 // ShadowRoot returns the value of property "ElementInternals.shadowRoot". 4339 // 4340 // It returns ok=false if there is no such property. 4341 func (this ElementInternals) ShadowRoot() (ret ShadowRoot, ok bool) { 4342 ok = js.True == bindings.GetElementInternalsShadowRoot( 4343 this.ref, js.Pointer(&ret), 4344 ) 4345 return 4346 } 4347 4348 // Form returns the value of property "ElementInternals.form". 4349 // 4350 // It returns ok=false if there is no such property. 4351 func (this ElementInternals) Form() (ret HTMLFormElement, ok bool) { 4352 ok = js.True == bindings.GetElementInternalsForm( 4353 this.ref, js.Pointer(&ret), 4354 ) 4355 return 4356 } 4357 4358 // WillValidate returns the value of property "ElementInternals.willValidate". 4359 // 4360 // It returns ok=false if there is no such property. 4361 func (this ElementInternals) WillValidate() (ret bool, ok bool) { 4362 ok = js.True == bindings.GetElementInternalsWillValidate( 4363 this.ref, js.Pointer(&ret), 4364 ) 4365 return 4366 } 4367 4368 // Validity returns the value of property "ElementInternals.validity". 4369 // 4370 // It returns ok=false if there is no such property. 4371 func (this ElementInternals) Validity() (ret ValidityState, ok bool) { 4372 ok = js.True == bindings.GetElementInternalsValidity( 4373 this.ref, js.Pointer(&ret), 4374 ) 4375 return 4376 } 4377 4378 // ValidationMessage returns the value of property "ElementInternals.validationMessage". 4379 // 4380 // It returns ok=false if there is no such property. 4381 func (this ElementInternals) ValidationMessage() (ret js.String, ok bool) { 4382 ok = js.True == bindings.GetElementInternalsValidationMessage( 4383 this.ref, js.Pointer(&ret), 4384 ) 4385 return 4386 } 4387 4388 // Labels returns the value of property "ElementInternals.labels". 4389 // 4390 // It returns ok=false if there is no such property. 4391 func (this ElementInternals) Labels() (ret NodeList, ok bool) { 4392 ok = js.True == bindings.GetElementInternalsLabels( 4393 this.ref, js.Pointer(&ret), 4394 ) 4395 return 4396 } 4397 4398 // States returns the value of property "ElementInternals.states". 4399 // 4400 // It returns ok=false if there is no such property. 4401 func (this ElementInternals) States() (ret CustomStateSet, ok bool) { 4402 ok = js.True == bindings.GetElementInternalsStates( 4403 this.ref, js.Pointer(&ret), 4404 ) 4405 return 4406 } 4407 4408 // Role returns the value of property "ElementInternals.role". 4409 // 4410 // It returns ok=false if there is no such property. 4411 func (this ElementInternals) Role() (ret js.String, ok bool) { 4412 ok = js.True == bindings.GetElementInternalsRole( 4413 this.ref, js.Pointer(&ret), 4414 ) 4415 return 4416 } 4417 4418 // SetRole sets the value of property "ElementInternals.role" to val. 4419 // 4420 // It returns false if the property cannot be set. 4421 func (this ElementInternals) SetRole(val js.String) bool { 4422 return js.True == bindings.SetElementInternalsRole( 4423 this.ref, 4424 val.Ref(), 4425 ) 4426 } 4427 4428 // AriaActiveDescendantElement returns the value of property "ElementInternals.ariaActiveDescendantElement". 4429 // 4430 // It returns ok=false if there is no such property. 4431 func (this ElementInternals) AriaActiveDescendantElement() (ret Element, ok bool) { 4432 ok = js.True == bindings.GetElementInternalsAriaActiveDescendantElement( 4433 this.ref, js.Pointer(&ret), 4434 ) 4435 return 4436 } 4437 4438 // SetAriaActiveDescendantElement sets the value of property "ElementInternals.ariaActiveDescendantElement" to val. 4439 // 4440 // It returns false if the property cannot be set. 4441 func (this ElementInternals) SetAriaActiveDescendantElement(val Element) bool { 4442 return js.True == bindings.SetElementInternalsAriaActiveDescendantElement( 4443 this.ref, 4444 val.Ref(), 4445 ) 4446 } 4447 4448 // AriaAtomic returns the value of property "ElementInternals.ariaAtomic". 4449 // 4450 // It returns ok=false if there is no such property. 4451 func (this ElementInternals) AriaAtomic() (ret js.String, ok bool) { 4452 ok = js.True == bindings.GetElementInternalsAriaAtomic( 4453 this.ref, js.Pointer(&ret), 4454 ) 4455 return 4456 } 4457 4458 // SetAriaAtomic sets the value of property "ElementInternals.ariaAtomic" to val. 4459 // 4460 // It returns false if the property cannot be set. 4461 func (this ElementInternals) SetAriaAtomic(val js.String) bool { 4462 return js.True == bindings.SetElementInternalsAriaAtomic( 4463 this.ref, 4464 val.Ref(), 4465 ) 4466 } 4467 4468 // AriaAutoComplete returns the value of property "ElementInternals.ariaAutoComplete". 4469 // 4470 // It returns ok=false if there is no such property. 4471 func (this ElementInternals) AriaAutoComplete() (ret js.String, ok bool) { 4472 ok = js.True == bindings.GetElementInternalsAriaAutoComplete( 4473 this.ref, js.Pointer(&ret), 4474 ) 4475 return 4476 } 4477 4478 // SetAriaAutoComplete sets the value of property "ElementInternals.ariaAutoComplete" to val. 4479 // 4480 // It returns false if the property cannot be set. 4481 func (this ElementInternals) SetAriaAutoComplete(val js.String) bool { 4482 return js.True == bindings.SetElementInternalsAriaAutoComplete( 4483 this.ref, 4484 val.Ref(), 4485 ) 4486 } 4487 4488 // AriaBusy returns the value of property "ElementInternals.ariaBusy". 4489 // 4490 // It returns ok=false if there is no such property. 4491 func (this ElementInternals) AriaBusy() (ret js.String, ok bool) { 4492 ok = js.True == bindings.GetElementInternalsAriaBusy( 4493 this.ref, js.Pointer(&ret), 4494 ) 4495 return 4496 } 4497 4498 // SetAriaBusy sets the value of property "ElementInternals.ariaBusy" to val. 4499 // 4500 // It returns false if the property cannot be set. 4501 func (this ElementInternals) SetAriaBusy(val js.String) bool { 4502 return js.True == bindings.SetElementInternalsAriaBusy( 4503 this.ref, 4504 val.Ref(), 4505 ) 4506 } 4507 4508 // AriaChecked returns the value of property "ElementInternals.ariaChecked". 4509 // 4510 // It returns ok=false if there is no such property. 4511 func (this ElementInternals) AriaChecked() (ret js.String, ok bool) { 4512 ok = js.True == bindings.GetElementInternalsAriaChecked( 4513 this.ref, js.Pointer(&ret), 4514 ) 4515 return 4516 } 4517 4518 // SetAriaChecked sets the value of property "ElementInternals.ariaChecked" to val. 4519 // 4520 // It returns false if the property cannot be set. 4521 func (this ElementInternals) SetAriaChecked(val js.String) bool { 4522 return js.True == bindings.SetElementInternalsAriaChecked( 4523 this.ref, 4524 val.Ref(), 4525 ) 4526 } 4527 4528 // AriaColCount returns the value of property "ElementInternals.ariaColCount". 4529 // 4530 // It returns ok=false if there is no such property. 4531 func (this ElementInternals) AriaColCount() (ret js.String, ok bool) { 4532 ok = js.True == bindings.GetElementInternalsAriaColCount( 4533 this.ref, js.Pointer(&ret), 4534 ) 4535 return 4536 } 4537 4538 // SetAriaColCount sets the value of property "ElementInternals.ariaColCount" to val. 4539 // 4540 // It returns false if the property cannot be set. 4541 func (this ElementInternals) SetAriaColCount(val js.String) bool { 4542 return js.True == bindings.SetElementInternalsAriaColCount( 4543 this.ref, 4544 val.Ref(), 4545 ) 4546 } 4547 4548 // AriaColIndex returns the value of property "ElementInternals.ariaColIndex". 4549 // 4550 // It returns ok=false if there is no such property. 4551 func (this ElementInternals) AriaColIndex() (ret js.String, ok bool) { 4552 ok = js.True == bindings.GetElementInternalsAriaColIndex( 4553 this.ref, js.Pointer(&ret), 4554 ) 4555 return 4556 } 4557 4558 // SetAriaColIndex sets the value of property "ElementInternals.ariaColIndex" to val. 4559 // 4560 // It returns false if the property cannot be set. 4561 func (this ElementInternals) SetAriaColIndex(val js.String) bool { 4562 return js.True == bindings.SetElementInternalsAriaColIndex( 4563 this.ref, 4564 val.Ref(), 4565 ) 4566 } 4567 4568 // AriaColIndexText returns the value of property "ElementInternals.ariaColIndexText". 4569 // 4570 // It returns ok=false if there is no such property. 4571 func (this ElementInternals) AriaColIndexText() (ret js.String, ok bool) { 4572 ok = js.True == bindings.GetElementInternalsAriaColIndexText( 4573 this.ref, js.Pointer(&ret), 4574 ) 4575 return 4576 } 4577 4578 // SetAriaColIndexText sets the value of property "ElementInternals.ariaColIndexText" to val. 4579 // 4580 // It returns false if the property cannot be set. 4581 func (this ElementInternals) SetAriaColIndexText(val js.String) bool { 4582 return js.True == bindings.SetElementInternalsAriaColIndexText( 4583 this.ref, 4584 val.Ref(), 4585 ) 4586 } 4587 4588 // AriaColSpan returns the value of property "ElementInternals.ariaColSpan". 4589 // 4590 // It returns ok=false if there is no such property. 4591 func (this ElementInternals) AriaColSpan() (ret js.String, ok bool) { 4592 ok = js.True == bindings.GetElementInternalsAriaColSpan( 4593 this.ref, js.Pointer(&ret), 4594 ) 4595 return 4596 } 4597 4598 // SetAriaColSpan sets the value of property "ElementInternals.ariaColSpan" to val. 4599 // 4600 // It returns false if the property cannot be set. 4601 func (this ElementInternals) SetAriaColSpan(val js.String) bool { 4602 return js.True == bindings.SetElementInternalsAriaColSpan( 4603 this.ref, 4604 val.Ref(), 4605 ) 4606 } 4607 4608 // AriaControlsElements returns the value of property "ElementInternals.ariaControlsElements". 4609 // 4610 // It returns ok=false if there is no such property. 4611 func (this ElementInternals) AriaControlsElements() (ret js.FrozenArray[Element], ok bool) { 4612 ok = js.True == bindings.GetElementInternalsAriaControlsElements( 4613 this.ref, js.Pointer(&ret), 4614 ) 4615 return 4616 } 4617 4618 // SetAriaControlsElements sets the value of property "ElementInternals.ariaControlsElements" to val. 4619 // 4620 // It returns false if the property cannot be set. 4621 func (this ElementInternals) SetAriaControlsElements(val js.FrozenArray[Element]) bool { 4622 return js.True == bindings.SetElementInternalsAriaControlsElements( 4623 this.ref, 4624 val.Ref(), 4625 ) 4626 } 4627 4628 // AriaCurrent returns the value of property "ElementInternals.ariaCurrent". 4629 // 4630 // It returns ok=false if there is no such property. 4631 func (this ElementInternals) AriaCurrent() (ret js.String, ok bool) { 4632 ok = js.True == bindings.GetElementInternalsAriaCurrent( 4633 this.ref, js.Pointer(&ret), 4634 ) 4635 return 4636 } 4637 4638 // SetAriaCurrent sets the value of property "ElementInternals.ariaCurrent" to val. 4639 // 4640 // It returns false if the property cannot be set. 4641 func (this ElementInternals) SetAriaCurrent(val js.String) bool { 4642 return js.True == bindings.SetElementInternalsAriaCurrent( 4643 this.ref, 4644 val.Ref(), 4645 ) 4646 } 4647 4648 // AriaDescribedByElements returns the value of property "ElementInternals.ariaDescribedByElements". 4649 // 4650 // It returns ok=false if there is no such property. 4651 func (this ElementInternals) AriaDescribedByElements() (ret js.FrozenArray[Element], ok bool) { 4652 ok = js.True == bindings.GetElementInternalsAriaDescribedByElements( 4653 this.ref, js.Pointer(&ret), 4654 ) 4655 return 4656 } 4657 4658 // SetAriaDescribedByElements sets the value of property "ElementInternals.ariaDescribedByElements" to val. 4659 // 4660 // It returns false if the property cannot be set. 4661 func (this ElementInternals) SetAriaDescribedByElements(val js.FrozenArray[Element]) bool { 4662 return js.True == bindings.SetElementInternalsAriaDescribedByElements( 4663 this.ref, 4664 val.Ref(), 4665 ) 4666 } 4667 4668 // AriaDescription returns the value of property "ElementInternals.ariaDescription". 4669 // 4670 // It returns ok=false if there is no such property. 4671 func (this ElementInternals) AriaDescription() (ret js.String, ok bool) { 4672 ok = js.True == bindings.GetElementInternalsAriaDescription( 4673 this.ref, js.Pointer(&ret), 4674 ) 4675 return 4676 } 4677 4678 // SetAriaDescription sets the value of property "ElementInternals.ariaDescription" to val. 4679 // 4680 // It returns false if the property cannot be set. 4681 func (this ElementInternals) SetAriaDescription(val js.String) bool { 4682 return js.True == bindings.SetElementInternalsAriaDescription( 4683 this.ref, 4684 val.Ref(), 4685 ) 4686 } 4687 4688 // AriaDetailsElements returns the value of property "ElementInternals.ariaDetailsElements". 4689 // 4690 // It returns ok=false if there is no such property. 4691 func (this ElementInternals) AriaDetailsElements() (ret js.FrozenArray[Element], ok bool) { 4692 ok = js.True == bindings.GetElementInternalsAriaDetailsElements( 4693 this.ref, js.Pointer(&ret), 4694 ) 4695 return 4696 } 4697 4698 // SetAriaDetailsElements sets the value of property "ElementInternals.ariaDetailsElements" to val. 4699 // 4700 // It returns false if the property cannot be set. 4701 func (this ElementInternals) SetAriaDetailsElements(val js.FrozenArray[Element]) bool { 4702 return js.True == bindings.SetElementInternalsAriaDetailsElements( 4703 this.ref, 4704 val.Ref(), 4705 ) 4706 } 4707 4708 // AriaDisabled returns the value of property "ElementInternals.ariaDisabled". 4709 // 4710 // It returns ok=false if there is no such property. 4711 func (this ElementInternals) AriaDisabled() (ret js.String, ok bool) { 4712 ok = js.True == bindings.GetElementInternalsAriaDisabled( 4713 this.ref, js.Pointer(&ret), 4714 ) 4715 return 4716 } 4717 4718 // SetAriaDisabled sets the value of property "ElementInternals.ariaDisabled" to val. 4719 // 4720 // It returns false if the property cannot be set. 4721 func (this ElementInternals) SetAriaDisabled(val js.String) bool { 4722 return js.True == bindings.SetElementInternalsAriaDisabled( 4723 this.ref, 4724 val.Ref(), 4725 ) 4726 } 4727 4728 // AriaErrorMessageElements returns the value of property "ElementInternals.ariaErrorMessageElements". 4729 // 4730 // It returns ok=false if there is no such property. 4731 func (this ElementInternals) AriaErrorMessageElements() (ret js.FrozenArray[Element], ok bool) { 4732 ok = js.True == bindings.GetElementInternalsAriaErrorMessageElements( 4733 this.ref, js.Pointer(&ret), 4734 ) 4735 return 4736 } 4737 4738 // SetAriaErrorMessageElements sets the value of property "ElementInternals.ariaErrorMessageElements" to val. 4739 // 4740 // It returns false if the property cannot be set. 4741 func (this ElementInternals) SetAriaErrorMessageElements(val js.FrozenArray[Element]) bool { 4742 return js.True == bindings.SetElementInternalsAriaErrorMessageElements( 4743 this.ref, 4744 val.Ref(), 4745 ) 4746 } 4747 4748 // AriaExpanded returns the value of property "ElementInternals.ariaExpanded". 4749 // 4750 // It returns ok=false if there is no such property. 4751 func (this ElementInternals) AriaExpanded() (ret js.String, ok bool) { 4752 ok = js.True == bindings.GetElementInternalsAriaExpanded( 4753 this.ref, js.Pointer(&ret), 4754 ) 4755 return 4756 } 4757 4758 // SetAriaExpanded sets the value of property "ElementInternals.ariaExpanded" to val. 4759 // 4760 // It returns false if the property cannot be set. 4761 func (this ElementInternals) SetAriaExpanded(val js.String) bool { 4762 return js.True == bindings.SetElementInternalsAriaExpanded( 4763 this.ref, 4764 val.Ref(), 4765 ) 4766 } 4767 4768 // AriaFlowToElements returns the value of property "ElementInternals.ariaFlowToElements". 4769 // 4770 // It returns ok=false if there is no such property. 4771 func (this ElementInternals) AriaFlowToElements() (ret js.FrozenArray[Element], ok bool) { 4772 ok = js.True == bindings.GetElementInternalsAriaFlowToElements( 4773 this.ref, js.Pointer(&ret), 4774 ) 4775 return 4776 } 4777 4778 // SetAriaFlowToElements sets the value of property "ElementInternals.ariaFlowToElements" to val. 4779 // 4780 // It returns false if the property cannot be set. 4781 func (this ElementInternals) SetAriaFlowToElements(val js.FrozenArray[Element]) bool { 4782 return js.True == bindings.SetElementInternalsAriaFlowToElements( 4783 this.ref, 4784 val.Ref(), 4785 ) 4786 } 4787 4788 // AriaHasPopup returns the value of property "ElementInternals.ariaHasPopup". 4789 // 4790 // It returns ok=false if there is no such property. 4791 func (this ElementInternals) AriaHasPopup() (ret js.String, ok bool) { 4792 ok = js.True == bindings.GetElementInternalsAriaHasPopup( 4793 this.ref, js.Pointer(&ret), 4794 ) 4795 return 4796 } 4797 4798 // SetAriaHasPopup sets the value of property "ElementInternals.ariaHasPopup" to val. 4799 // 4800 // It returns false if the property cannot be set. 4801 func (this ElementInternals) SetAriaHasPopup(val js.String) bool { 4802 return js.True == bindings.SetElementInternalsAriaHasPopup( 4803 this.ref, 4804 val.Ref(), 4805 ) 4806 } 4807 4808 // AriaHidden returns the value of property "ElementInternals.ariaHidden". 4809 // 4810 // It returns ok=false if there is no such property. 4811 func (this ElementInternals) AriaHidden() (ret js.String, ok bool) { 4812 ok = js.True == bindings.GetElementInternalsAriaHidden( 4813 this.ref, js.Pointer(&ret), 4814 ) 4815 return 4816 } 4817 4818 // SetAriaHidden sets the value of property "ElementInternals.ariaHidden" to val. 4819 // 4820 // It returns false if the property cannot be set. 4821 func (this ElementInternals) SetAriaHidden(val js.String) bool { 4822 return js.True == bindings.SetElementInternalsAriaHidden( 4823 this.ref, 4824 val.Ref(), 4825 ) 4826 } 4827 4828 // AriaInvalid returns the value of property "ElementInternals.ariaInvalid". 4829 // 4830 // It returns ok=false if there is no such property. 4831 func (this ElementInternals) AriaInvalid() (ret js.String, ok bool) { 4832 ok = js.True == bindings.GetElementInternalsAriaInvalid( 4833 this.ref, js.Pointer(&ret), 4834 ) 4835 return 4836 } 4837 4838 // SetAriaInvalid sets the value of property "ElementInternals.ariaInvalid" to val. 4839 // 4840 // It returns false if the property cannot be set. 4841 func (this ElementInternals) SetAriaInvalid(val js.String) bool { 4842 return js.True == bindings.SetElementInternalsAriaInvalid( 4843 this.ref, 4844 val.Ref(), 4845 ) 4846 } 4847 4848 // AriaKeyShortcuts returns the value of property "ElementInternals.ariaKeyShortcuts". 4849 // 4850 // It returns ok=false if there is no such property. 4851 func (this ElementInternals) AriaKeyShortcuts() (ret js.String, ok bool) { 4852 ok = js.True == bindings.GetElementInternalsAriaKeyShortcuts( 4853 this.ref, js.Pointer(&ret), 4854 ) 4855 return 4856 } 4857 4858 // SetAriaKeyShortcuts sets the value of property "ElementInternals.ariaKeyShortcuts" to val. 4859 // 4860 // It returns false if the property cannot be set. 4861 func (this ElementInternals) SetAriaKeyShortcuts(val js.String) bool { 4862 return js.True == bindings.SetElementInternalsAriaKeyShortcuts( 4863 this.ref, 4864 val.Ref(), 4865 ) 4866 } 4867 4868 // AriaLabel returns the value of property "ElementInternals.ariaLabel". 4869 // 4870 // It returns ok=false if there is no such property. 4871 func (this ElementInternals) AriaLabel() (ret js.String, ok bool) { 4872 ok = js.True == bindings.GetElementInternalsAriaLabel( 4873 this.ref, js.Pointer(&ret), 4874 ) 4875 return 4876 } 4877 4878 // SetAriaLabel sets the value of property "ElementInternals.ariaLabel" to val. 4879 // 4880 // It returns false if the property cannot be set. 4881 func (this ElementInternals) SetAriaLabel(val js.String) bool { 4882 return js.True == bindings.SetElementInternalsAriaLabel( 4883 this.ref, 4884 val.Ref(), 4885 ) 4886 } 4887 4888 // AriaLabelledByElements returns the value of property "ElementInternals.ariaLabelledByElements". 4889 // 4890 // It returns ok=false if there is no such property. 4891 func (this ElementInternals) AriaLabelledByElements() (ret js.FrozenArray[Element], ok bool) { 4892 ok = js.True == bindings.GetElementInternalsAriaLabelledByElements( 4893 this.ref, js.Pointer(&ret), 4894 ) 4895 return 4896 } 4897 4898 // SetAriaLabelledByElements sets the value of property "ElementInternals.ariaLabelledByElements" to val. 4899 // 4900 // It returns false if the property cannot be set. 4901 func (this ElementInternals) SetAriaLabelledByElements(val js.FrozenArray[Element]) bool { 4902 return js.True == bindings.SetElementInternalsAriaLabelledByElements( 4903 this.ref, 4904 val.Ref(), 4905 ) 4906 } 4907 4908 // AriaLevel returns the value of property "ElementInternals.ariaLevel". 4909 // 4910 // It returns ok=false if there is no such property. 4911 func (this ElementInternals) AriaLevel() (ret js.String, ok bool) { 4912 ok = js.True == bindings.GetElementInternalsAriaLevel( 4913 this.ref, js.Pointer(&ret), 4914 ) 4915 return 4916 } 4917 4918 // SetAriaLevel sets the value of property "ElementInternals.ariaLevel" to val. 4919 // 4920 // It returns false if the property cannot be set. 4921 func (this ElementInternals) SetAriaLevel(val js.String) bool { 4922 return js.True == bindings.SetElementInternalsAriaLevel( 4923 this.ref, 4924 val.Ref(), 4925 ) 4926 } 4927 4928 // AriaLive returns the value of property "ElementInternals.ariaLive". 4929 // 4930 // It returns ok=false if there is no such property. 4931 func (this ElementInternals) AriaLive() (ret js.String, ok bool) { 4932 ok = js.True == bindings.GetElementInternalsAriaLive( 4933 this.ref, js.Pointer(&ret), 4934 ) 4935 return 4936 } 4937 4938 // SetAriaLive sets the value of property "ElementInternals.ariaLive" to val. 4939 // 4940 // It returns false if the property cannot be set. 4941 func (this ElementInternals) SetAriaLive(val js.String) bool { 4942 return js.True == bindings.SetElementInternalsAriaLive( 4943 this.ref, 4944 val.Ref(), 4945 ) 4946 } 4947 4948 // AriaModal returns the value of property "ElementInternals.ariaModal". 4949 // 4950 // It returns ok=false if there is no such property. 4951 func (this ElementInternals) AriaModal() (ret js.String, ok bool) { 4952 ok = js.True == bindings.GetElementInternalsAriaModal( 4953 this.ref, js.Pointer(&ret), 4954 ) 4955 return 4956 } 4957 4958 // SetAriaModal sets the value of property "ElementInternals.ariaModal" to val. 4959 // 4960 // It returns false if the property cannot be set. 4961 func (this ElementInternals) SetAriaModal(val js.String) bool { 4962 return js.True == bindings.SetElementInternalsAriaModal( 4963 this.ref, 4964 val.Ref(), 4965 ) 4966 } 4967 4968 // AriaMultiLine returns the value of property "ElementInternals.ariaMultiLine". 4969 // 4970 // It returns ok=false if there is no such property. 4971 func (this ElementInternals) AriaMultiLine() (ret js.String, ok bool) { 4972 ok = js.True == bindings.GetElementInternalsAriaMultiLine( 4973 this.ref, js.Pointer(&ret), 4974 ) 4975 return 4976 } 4977 4978 // SetAriaMultiLine sets the value of property "ElementInternals.ariaMultiLine" to val. 4979 // 4980 // It returns false if the property cannot be set. 4981 func (this ElementInternals) SetAriaMultiLine(val js.String) bool { 4982 return js.True == bindings.SetElementInternalsAriaMultiLine( 4983 this.ref, 4984 val.Ref(), 4985 ) 4986 } 4987 4988 // AriaMultiSelectable returns the value of property "ElementInternals.ariaMultiSelectable". 4989 // 4990 // It returns ok=false if there is no such property. 4991 func (this ElementInternals) AriaMultiSelectable() (ret js.String, ok bool) { 4992 ok = js.True == bindings.GetElementInternalsAriaMultiSelectable( 4993 this.ref, js.Pointer(&ret), 4994 ) 4995 return 4996 } 4997 4998 // SetAriaMultiSelectable sets the value of property "ElementInternals.ariaMultiSelectable" to val. 4999 // 5000 // It returns false if the property cannot be set. 5001 func (this ElementInternals) SetAriaMultiSelectable(val js.String) bool { 5002 return js.True == bindings.SetElementInternalsAriaMultiSelectable( 5003 this.ref, 5004 val.Ref(), 5005 ) 5006 } 5007 5008 // AriaOrientation returns the value of property "ElementInternals.ariaOrientation". 5009 // 5010 // It returns ok=false if there is no such property. 5011 func (this ElementInternals) AriaOrientation() (ret js.String, ok bool) { 5012 ok = js.True == bindings.GetElementInternalsAriaOrientation( 5013 this.ref, js.Pointer(&ret), 5014 ) 5015 return 5016 } 5017 5018 // SetAriaOrientation sets the value of property "ElementInternals.ariaOrientation" to val. 5019 // 5020 // It returns false if the property cannot be set. 5021 func (this ElementInternals) SetAriaOrientation(val js.String) bool { 5022 return js.True == bindings.SetElementInternalsAriaOrientation( 5023 this.ref, 5024 val.Ref(), 5025 ) 5026 } 5027 5028 // AriaOwnsElements returns the value of property "ElementInternals.ariaOwnsElements". 5029 // 5030 // It returns ok=false if there is no such property. 5031 func (this ElementInternals) AriaOwnsElements() (ret js.FrozenArray[Element], ok bool) { 5032 ok = js.True == bindings.GetElementInternalsAriaOwnsElements( 5033 this.ref, js.Pointer(&ret), 5034 ) 5035 return 5036 } 5037 5038 // SetAriaOwnsElements sets the value of property "ElementInternals.ariaOwnsElements" to val. 5039 // 5040 // It returns false if the property cannot be set. 5041 func (this ElementInternals) SetAriaOwnsElements(val js.FrozenArray[Element]) bool { 5042 return js.True == bindings.SetElementInternalsAriaOwnsElements( 5043 this.ref, 5044 val.Ref(), 5045 ) 5046 } 5047 5048 // AriaPlaceholder returns the value of property "ElementInternals.ariaPlaceholder". 5049 // 5050 // It returns ok=false if there is no such property. 5051 func (this ElementInternals) AriaPlaceholder() (ret js.String, ok bool) { 5052 ok = js.True == bindings.GetElementInternalsAriaPlaceholder( 5053 this.ref, js.Pointer(&ret), 5054 ) 5055 return 5056 } 5057 5058 // SetAriaPlaceholder sets the value of property "ElementInternals.ariaPlaceholder" to val. 5059 // 5060 // It returns false if the property cannot be set. 5061 func (this ElementInternals) SetAriaPlaceholder(val js.String) bool { 5062 return js.True == bindings.SetElementInternalsAriaPlaceholder( 5063 this.ref, 5064 val.Ref(), 5065 ) 5066 } 5067 5068 // AriaPosInSet returns the value of property "ElementInternals.ariaPosInSet". 5069 // 5070 // It returns ok=false if there is no such property. 5071 func (this ElementInternals) AriaPosInSet() (ret js.String, ok bool) { 5072 ok = js.True == bindings.GetElementInternalsAriaPosInSet( 5073 this.ref, js.Pointer(&ret), 5074 ) 5075 return 5076 } 5077 5078 // SetAriaPosInSet sets the value of property "ElementInternals.ariaPosInSet" to val. 5079 // 5080 // It returns false if the property cannot be set. 5081 func (this ElementInternals) SetAriaPosInSet(val js.String) bool { 5082 return js.True == bindings.SetElementInternalsAriaPosInSet( 5083 this.ref, 5084 val.Ref(), 5085 ) 5086 } 5087 5088 // AriaPressed returns the value of property "ElementInternals.ariaPressed". 5089 // 5090 // It returns ok=false if there is no such property. 5091 func (this ElementInternals) AriaPressed() (ret js.String, ok bool) { 5092 ok = js.True == bindings.GetElementInternalsAriaPressed( 5093 this.ref, js.Pointer(&ret), 5094 ) 5095 return 5096 } 5097 5098 // SetAriaPressed sets the value of property "ElementInternals.ariaPressed" to val. 5099 // 5100 // It returns false if the property cannot be set. 5101 func (this ElementInternals) SetAriaPressed(val js.String) bool { 5102 return js.True == bindings.SetElementInternalsAriaPressed( 5103 this.ref, 5104 val.Ref(), 5105 ) 5106 } 5107 5108 // AriaReadOnly returns the value of property "ElementInternals.ariaReadOnly". 5109 // 5110 // It returns ok=false if there is no such property. 5111 func (this ElementInternals) AriaReadOnly() (ret js.String, ok bool) { 5112 ok = js.True == bindings.GetElementInternalsAriaReadOnly( 5113 this.ref, js.Pointer(&ret), 5114 ) 5115 return 5116 } 5117 5118 // SetAriaReadOnly sets the value of property "ElementInternals.ariaReadOnly" to val. 5119 // 5120 // It returns false if the property cannot be set. 5121 func (this ElementInternals) SetAriaReadOnly(val js.String) bool { 5122 return js.True == bindings.SetElementInternalsAriaReadOnly( 5123 this.ref, 5124 val.Ref(), 5125 ) 5126 } 5127 5128 // AriaRequired returns the value of property "ElementInternals.ariaRequired". 5129 // 5130 // It returns ok=false if there is no such property. 5131 func (this ElementInternals) AriaRequired() (ret js.String, ok bool) { 5132 ok = js.True == bindings.GetElementInternalsAriaRequired( 5133 this.ref, js.Pointer(&ret), 5134 ) 5135 return 5136 } 5137 5138 // SetAriaRequired sets the value of property "ElementInternals.ariaRequired" to val. 5139 // 5140 // It returns false if the property cannot be set. 5141 func (this ElementInternals) SetAriaRequired(val js.String) bool { 5142 return js.True == bindings.SetElementInternalsAriaRequired( 5143 this.ref, 5144 val.Ref(), 5145 ) 5146 } 5147 5148 // AriaRoleDescription returns the value of property "ElementInternals.ariaRoleDescription". 5149 // 5150 // It returns ok=false if there is no such property. 5151 func (this ElementInternals) AriaRoleDescription() (ret js.String, ok bool) { 5152 ok = js.True == bindings.GetElementInternalsAriaRoleDescription( 5153 this.ref, js.Pointer(&ret), 5154 ) 5155 return 5156 } 5157 5158 // SetAriaRoleDescription sets the value of property "ElementInternals.ariaRoleDescription" to val. 5159 // 5160 // It returns false if the property cannot be set. 5161 func (this ElementInternals) SetAriaRoleDescription(val js.String) bool { 5162 return js.True == bindings.SetElementInternalsAriaRoleDescription( 5163 this.ref, 5164 val.Ref(), 5165 ) 5166 } 5167 5168 // AriaRowCount returns the value of property "ElementInternals.ariaRowCount". 5169 // 5170 // It returns ok=false if there is no such property. 5171 func (this ElementInternals) AriaRowCount() (ret js.String, ok bool) { 5172 ok = js.True == bindings.GetElementInternalsAriaRowCount( 5173 this.ref, js.Pointer(&ret), 5174 ) 5175 return 5176 } 5177 5178 // SetAriaRowCount sets the value of property "ElementInternals.ariaRowCount" to val. 5179 // 5180 // It returns false if the property cannot be set. 5181 func (this ElementInternals) SetAriaRowCount(val js.String) bool { 5182 return js.True == bindings.SetElementInternalsAriaRowCount( 5183 this.ref, 5184 val.Ref(), 5185 ) 5186 } 5187 5188 // AriaRowIndex returns the value of property "ElementInternals.ariaRowIndex". 5189 // 5190 // It returns ok=false if there is no such property. 5191 func (this ElementInternals) AriaRowIndex() (ret js.String, ok bool) { 5192 ok = js.True == bindings.GetElementInternalsAriaRowIndex( 5193 this.ref, js.Pointer(&ret), 5194 ) 5195 return 5196 } 5197 5198 // SetAriaRowIndex sets the value of property "ElementInternals.ariaRowIndex" to val. 5199 // 5200 // It returns false if the property cannot be set. 5201 func (this ElementInternals) SetAriaRowIndex(val js.String) bool { 5202 return js.True == bindings.SetElementInternalsAriaRowIndex( 5203 this.ref, 5204 val.Ref(), 5205 ) 5206 } 5207 5208 // AriaRowIndexText returns the value of property "ElementInternals.ariaRowIndexText". 5209 // 5210 // It returns ok=false if there is no such property. 5211 func (this ElementInternals) AriaRowIndexText() (ret js.String, ok bool) { 5212 ok = js.True == bindings.GetElementInternalsAriaRowIndexText( 5213 this.ref, js.Pointer(&ret), 5214 ) 5215 return 5216 } 5217 5218 // SetAriaRowIndexText sets the value of property "ElementInternals.ariaRowIndexText" to val. 5219 // 5220 // It returns false if the property cannot be set. 5221 func (this ElementInternals) SetAriaRowIndexText(val js.String) bool { 5222 return js.True == bindings.SetElementInternalsAriaRowIndexText( 5223 this.ref, 5224 val.Ref(), 5225 ) 5226 } 5227 5228 // AriaRowSpan returns the value of property "ElementInternals.ariaRowSpan". 5229 // 5230 // It returns ok=false if there is no such property. 5231 func (this ElementInternals) AriaRowSpan() (ret js.String, ok bool) { 5232 ok = js.True == bindings.GetElementInternalsAriaRowSpan( 5233 this.ref, js.Pointer(&ret), 5234 ) 5235 return 5236 } 5237 5238 // SetAriaRowSpan sets the value of property "ElementInternals.ariaRowSpan" to val. 5239 // 5240 // It returns false if the property cannot be set. 5241 func (this ElementInternals) SetAriaRowSpan(val js.String) bool { 5242 return js.True == bindings.SetElementInternalsAriaRowSpan( 5243 this.ref, 5244 val.Ref(), 5245 ) 5246 } 5247 5248 // AriaSelected returns the value of property "ElementInternals.ariaSelected". 5249 // 5250 // It returns ok=false if there is no such property. 5251 func (this ElementInternals) AriaSelected() (ret js.String, ok bool) { 5252 ok = js.True == bindings.GetElementInternalsAriaSelected( 5253 this.ref, js.Pointer(&ret), 5254 ) 5255 return 5256 } 5257 5258 // SetAriaSelected sets the value of property "ElementInternals.ariaSelected" to val. 5259 // 5260 // It returns false if the property cannot be set. 5261 func (this ElementInternals) SetAriaSelected(val js.String) bool { 5262 return js.True == bindings.SetElementInternalsAriaSelected( 5263 this.ref, 5264 val.Ref(), 5265 ) 5266 } 5267 5268 // AriaSetSize returns the value of property "ElementInternals.ariaSetSize". 5269 // 5270 // It returns ok=false if there is no such property. 5271 func (this ElementInternals) AriaSetSize() (ret js.String, ok bool) { 5272 ok = js.True == bindings.GetElementInternalsAriaSetSize( 5273 this.ref, js.Pointer(&ret), 5274 ) 5275 return 5276 } 5277 5278 // SetAriaSetSize sets the value of property "ElementInternals.ariaSetSize" to val. 5279 // 5280 // It returns false if the property cannot be set. 5281 func (this ElementInternals) SetAriaSetSize(val js.String) bool { 5282 return js.True == bindings.SetElementInternalsAriaSetSize( 5283 this.ref, 5284 val.Ref(), 5285 ) 5286 } 5287 5288 // AriaSort returns the value of property "ElementInternals.ariaSort". 5289 // 5290 // It returns ok=false if there is no such property. 5291 func (this ElementInternals) AriaSort() (ret js.String, ok bool) { 5292 ok = js.True == bindings.GetElementInternalsAriaSort( 5293 this.ref, js.Pointer(&ret), 5294 ) 5295 return 5296 } 5297 5298 // SetAriaSort sets the value of property "ElementInternals.ariaSort" to val. 5299 // 5300 // It returns false if the property cannot be set. 5301 func (this ElementInternals) SetAriaSort(val js.String) bool { 5302 return js.True == bindings.SetElementInternalsAriaSort( 5303 this.ref, 5304 val.Ref(), 5305 ) 5306 } 5307 5308 // AriaValueMax returns the value of property "ElementInternals.ariaValueMax". 5309 // 5310 // It returns ok=false if there is no such property. 5311 func (this ElementInternals) AriaValueMax() (ret js.String, ok bool) { 5312 ok = js.True == bindings.GetElementInternalsAriaValueMax( 5313 this.ref, js.Pointer(&ret), 5314 ) 5315 return 5316 } 5317 5318 // SetAriaValueMax sets the value of property "ElementInternals.ariaValueMax" to val. 5319 // 5320 // It returns false if the property cannot be set. 5321 func (this ElementInternals) SetAriaValueMax(val js.String) bool { 5322 return js.True == bindings.SetElementInternalsAriaValueMax( 5323 this.ref, 5324 val.Ref(), 5325 ) 5326 } 5327 5328 // AriaValueMin returns the value of property "ElementInternals.ariaValueMin". 5329 // 5330 // It returns ok=false if there is no such property. 5331 func (this ElementInternals) AriaValueMin() (ret js.String, ok bool) { 5332 ok = js.True == bindings.GetElementInternalsAriaValueMin( 5333 this.ref, js.Pointer(&ret), 5334 ) 5335 return 5336 } 5337 5338 // SetAriaValueMin sets the value of property "ElementInternals.ariaValueMin" to val. 5339 // 5340 // It returns false if the property cannot be set. 5341 func (this ElementInternals) SetAriaValueMin(val js.String) bool { 5342 return js.True == bindings.SetElementInternalsAriaValueMin( 5343 this.ref, 5344 val.Ref(), 5345 ) 5346 } 5347 5348 // AriaValueNow returns the value of property "ElementInternals.ariaValueNow". 5349 // 5350 // It returns ok=false if there is no such property. 5351 func (this ElementInternals) AriaValueNow() (ret js.String, ok bool) { 5352 ok = js.True == bindings.GetElementInternalsAriaValueNow( 5353 this.ref, js.Pointer(&ret), 5354 ) 5355 return 5356 } 5357 5358 // SetAriaValueNow sets the value of property "ElementInternals.ariaValueNow" to val. 5359 // 5360 // It returns false if the property cannot be set. 5361 func (this ElementInternals) SetAriaValueNow(val js.String) bool { 5362 return js.True == bindings.SetElementInternalsAriaValueNow( 5363 this.ref, 5364 val.Ref(), 5365 ) 5366 } 5367 5368 // AriaValueText returns the value of property "ElementInternals.ariaValueText". 5369 // 5370 // It returns ok=false if there is no such property. 5371 func (this ElementInternals) AriaValueText() (ret js.String, ok bool) { 5372 ok = js.True == bindings.GetElementInternalsAriaValueText( 5373 this.ref, js.Pointer(&ret), 5374 ) 5375 return 5376 } 5377 5378 // SetAriaValueText sets the value of property "ElementInternals.ariaValueText" to val. 5379 // 5380 // It returns false if the property cannot be set. 5381 func (this ElementInternals) SetAriaValueText(val js.String) bool { 5382 return js.True == bindings.SetElementInternalsAriaValueText( 5383 this.ref, 5384 val.Ref(), 5385 ) 5386 } 5387 5388 // HasFuncSetFormValue returns true if the method "ElementInternals.setFormValue" exists. 5389 func (this ElementInternals) HasFuncSetFormValue() bool { 5390 return js.True == bindings.HasFuncElementInternalsSetFormValue( 5391 this.ref, 5392 ) 5393 } 5394 5395 // FuncSetFormValue returns the method "ElementInternals.setFormValue". 5396 func (this ElementInternals) FuncSetFormValue() (fn js.Func[func(value OneOf_File_String_FormData, state OneOf_File_String_FormData)]) { 5397 bindings.FuncElementInternalsSetFormValue( 5398 this.ref, js.Pointer(&fn), 5399 ) 5400 return 5401 } 5402 5403 // SetFormValue calls the method "ElementInternals.setFormValue". 5404 func (this ElementInternals) SetFormValue(value OneOf_File_String_FormData, state OneOf_File_String_FormData) (ret js.Void) { 5405 bindings.CallElementInternalsSetFormValue( 5406 this.ref, js.Pointer(&ret), 5407 value.Ref(), 5408 state.Ref(), 5409 ) 5410 5411 return 5412 } 5413 5414 // TrySetFormValue calls the method "ElementInternals.setFormValue" 5415 // in a try/catch block and returns (_, err, ok = false) when it went through 5416 // the catch clause. 5417 func (this ElementInternals) TrySetFormValue(value OneOf_File_String_FormData, state OneOf_File_String_FormData) (ret js.Void, exception js.Any, ok bool) { 5418 ok = js.True == bindings.TryElementInternalsSetFormValue( 5419 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5420 value.Ref(), 5421 state.Ref(), 5422 ) 5423 5424 return 5425 } 5426 5427 // HasFuncSetFormValue1 returns true if the method "ElementInternals.setFormValue" exists. 5428 func (this ElementInternals) HasFuncSetFormValue1() bool { 5429 return js.True == bindings.HasFuncElementInternalsSetFormValue1( 5430 this.ref, 5431 ) 5432 } 5433 5434 // FuncSetFormValue1 returns the method "ElementInternals.setFormValue". 5435 func (this ElementInternals) FuncSetFormValue1() (fn js.Func[func(value OneOf_File_String_FormData)]) { 5436 bindings.FuncElementInternalsSetFormValue1( 5437 this.ref, js.Pointer(&fn), 5438 ) 5439 return 5440 } 5441 5442 // SetFormValue1 calls the method "ElementInternals.setFormValue". 5443 func (this ElementInternals) SetFormValue1(value OneOf_File_String_FormData) (ret js.Void) { 5444 bindings.CallElementInternalsSetFormValue1( 5445 this.ref, js.Pointer(&ret), 5446 value.Ref(), 5447 ) 5448 5449 return 5450 } 5451 5452 // TrySetFormValue1 calls the method "ElementInternals.setFormValue" 5453 // in a try/catch block and returns (_, err, ok = false) when it went through 5454 // the catch clause. 5455 func (this ElementInternals) TrySetFormValue1(value OneOf_File_String_FormData) (ret js.Void, exception js.Any, ok bool) { 5456 ok = js.True == bindings.TryElementInternalsSetFormValue1( 5457 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5458 value.Ref(), 5459 ) 5460 5461 return 5462 } 5463 5464 // HasFuncSetValidity returns true if the method "ElementInternals.setValidity" exists. 5465 func (this ElementInternals) HasFuncSetValidity() bool { 5466 return js.True == bindings.HasFuncElementInternalsSetValidity( 5467 this.ref, 5468 ) 5469 } 5470 5471 // FuncSetValidity returns the method "ElementInternals.setValidity". 5472 func (this ElementInternals) FuncSetValidity() (fn js.Func[func(flags ValidityStateFlags, message js.String, anchor HTMLElement)]) { 5473 bindings.FuncElementInternalsSetValidity( 5474 this.ref, js.Pointer(&fn), 5475 ) 5476 return 5477 } 5478 5479 // SetValidity calls the method "ElementInternals.setValidity". 5480 func (this ElementInternals) SetValidity(flags ValidityStateFlags, message js.String, anchor HTMLElement) (ret js.Void) { 5481 bindings.CallElementInternalsSetValidity( 5482 this.ref, js.Pointer(&ret), 5483 js.Pointer(&flags), 5484 message.Ref(), 5485 anchor.Ref(), 5486 ) 5487 5488 return 5489 } 5490 5491 // TrySetValidity calls the method "ElementInternals.setValidity" 5492 // in a try/catch block and returns (_, err, ok = false) when it went through 5493 // the catch clause. 5494 func (this ElementInternals) TrySetValidity(flags ValidityStateFlags, message js.String, anchor HTMLElement) (ret js.Void, exception js.Any, ok bool) { 5495 ok = js.True == bindings.TryElementInternalsSetValidity( 5496 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5497 js.Pointer(&flags), 5498 message.Ref(), 5499 anchor.Ref(), 5500 ) 5501 5502 return 5503 } 5504 5505 // HasFuncSetValidity1 returns true if the method "ElementInternals.setValidity" exists. 5506 func (this ElementInternals) HasFuncSetValidity1() bool { 5507 return js.True == bindings.HasFuncElementInternalsSetValidity1( 5508 this.ref, 5509 ) 5510 } 5511 5512 // FuncSetValidity1 returns the method "ElementInternals.setValidity". 5513 func (this ElementInternals) FuncSetValidity1() (fn js.Func[func(flags ValidityStateFlags, message js.String)]) { 5514 bindings.FuncElementInternalsSetValidity1( 5515 this.ref, js.Pointer(&fn), 5516 ) 5517 return 5518 } 5519 5520 // SetValidity1 calls the method "ElementInternals.setValidity". 5521 func (this ElementInternals) SetValidity1(flags ValidityStateFlags, message js.String) (ret js.Void) { 5522 bindings.CallElementInternalsSetValidity1( 5523 this.ref, js.Pointer(&ret), 5524 js.Pointer(&flags), 5525 message.Ref(), 5526 ) 5527 5528 return 5529 } 5530 5531 // TrySetValidity1 calls the method "ElementInternals.setValidity" 5532 // in a try/catch block and returns (_, err, ok = false) when it went through 5533 // the catch clause. 5534 func (this ElementInternals) TrySetValidity1(flags ValidityStateFlags, message js.String) (ret js.Void, exception js.Any, ok bool) { 5535 ok = js.True == bindings.TryElementInternalsSetValidity1( 5536 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5537 js.Pointer(&flags), 5538 message.Ref(), 5539 ) 5540 5541 return 5542 } 5543 5544 // HasFuncSetValidity2 returns true if the method "ElementInternals.setValidity" exists. 5545 func (this ElementInternals) HasFuncSetValidity2() bool { 5546 return js.True == bindings.HasFuncElementInternalsSetValidity2( 5547 this.ref, 5548 ) 5549 } 5550 5551 // FuncSetValidity2 returns the method "ElementInternals.setValidity". 5552 func (this ElementInternals) FuncSetValidity2() (fn js.Func[func(flags ValidityStateFlags)]) { 5553 bindings.FuncElementInternalsSetValidity2( 5554 this.ref, js.Pointer(&fn), 5555 ) 5556 return 5557 } 5558 5559 // SetValidity2 calls the method "ElementInternals.setValidity". 5560 func (this ElementInternals) SetValidity2(flags ValidityStateFlags) (ret js.Void) { 5561 bindings.CallElementInternalsSetValidity2( 5562 this.ref, js.Pointer(&ret), 5563 js.Pointer(&flags), 5564 ) 5565 5566 return 5567 } 5568 5569 // TrySetValidity2 calls the method "ElementInternals.setValidity" 5570 // in a try/catch block and returns (_, err, ok = false) when it went through 5571 // the catch clause. 5572 func (this ElementInternals) TrySetValidity2(flags ValidityStateFlags) (ret js.Void, exception js.Any, ok bool) { 5573 ok = js.True == bindings.TryElementInternalsSetValidity2( 5574 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5575 js.Pointer(&flags), 5576 ) 5577 5578 return 5579 } 5580 5581 // HasFuncSetValidity3 returns true if the method "ElementInternals.setValidity" exists. 5582 func (this ElementInternals) HasFuncSetValidity3() bool { 5583 return js.True == bindings.HasFuncElementInternalsSetValidity3( 5584 this.ref, 5585 ) 5586 } 5587 5588 // FuncSetValidity3 returns the method "ElementInternals.setValidity". 5589 func (this ElementInternals) FuncSetValidity3() (fn js.Func[func()]) { 5590 bindings.FuncElementInternalsSetValidity3( 5591 this.ref, js.Pointer(&fn), 5592 ) 5593 return 5594 } 5595 5596 // SetValidity3 calls the method "ElementInternals.setValidity". 5597 func (this ElementInternals) SetValidity3() (ret js.Void) { 5598 bindings.CallElementInternalsSetValidity3( 5599 this.ref, js.Pointer(&ret), 5600 ) 5601 5602 return 5603 } 5604 5605 // TrySetValidity3 calls the method "ElementInternals.setValidity" 5606 // in a try/catch block and returns (_, err, ok = false) when it went through 5607 // the catch clause. 5608 func (this ElementInternals) TrySetValidity3() (ret js.Void, exception js.Any, ok bool) { 5609 ok = js.True == bindings.TryElementInternalsSetValidity3( 5610 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5611 ) 5612 5613 return 5614 } 5615 5616 // HasFuncCheckValidity returns true if the method "ElementInternals.checkValidity" exists. 5617 func (this ElementInternals) HasFuncCheckValidity() bool { 5618 return js.True == bindings.HasFuncElementInternalsCheckValidity( 5619 this.ref, 5620 ) 5621 } 5622 5623 // FuncCheckValidity returns the method "ElementInternals.checkValidity". 5624 func (this ElementInternals) FuncCheckValidity() (fn js.Func[func() bool]) { 5625 bindings.FuncElementInternalsCheckValidity( 5626 this.ref, js.Pointer(&fn), 5627 ) 5628 return 5629 } 5630 5631 // CheckValidity calls the method "ElementInternals.checkValidity". 5632 func (this ElementInternals) CheckValidity() (ret bool) { 5633 bindings.CallElementInternalsCheckValidity( 5634 this.ref, js.Pointer(&ret), 5635 ) 5636 5637 return 5638 } 5639 5640 // TryCheckValidity calls the method "ElementInternals.checkValidity" 5641 // in a try/catch block and returns (_, err, ok = false) when it went through 5642 // the catch clause. 5643 func (this ElementInternals) TryCheckValidity() (ret bool, exception js.Any, ok bool) { 5644 ok = js.True == bindings.TryElementInternalsCheckValidity( 5645 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5646 ) 5647 5648 return 5649 } 5650 5651 // HasFuncReportValidity returns true if the method "ElementInternals.reportValidity" exists. 5652 func (this ElementInternals) HasFuncReportValidity() bool { 5653 return js.True == bindings.HasFuncElementInternalsReportValidity( 5654 this.ref, 5655 ) 5656 } 5657 5658 // FuncReportValidity returns the method "ElementInternals.reportValidity". 5659 func (this ElementInternals) FuncReportValidity() (fn js.Func[func() bool]) { 5660 bindings.FuncElementInternalsReportValidity( 5661 this.ref, js.Pointer(&fn), 5662 ) 5663 return 5664 } 5665 5666 // ReportValidity calls the method "ElementInternals.reportValidity". 5667 func (this ElementInternals) ReportValidity() (ret bool) { 5668 bindings.CallElementInternalsReportValidity( 5669 this.ref, js.Pointer(&ret), 5670 ) 5671 5672 return 5673 } 5674 5675 // TryReportValidity calls the method "ElementInternals.reportValidity" 5676 // in a try/catch block and returns (_, err, ok = false) when it went through 5677 // the catch clause. 5678 func (this ElementInternals) TryReportValidity() (ret bool, exception js.Any, ok bool) { 5679 ok = js.True == bindings.TryElementInternalsReportValidity( 5680 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5681 ) 5682 5683 return 5684 } 5685 5686 type OneOf_Bool_Float64_String struct { 5687 ref js.Ref 5688 } 5689 5690 func (x OneOf_Bool_Float64_String) Ref() js.Ref { 5691 return x.ref 5692 } 5693 5694 func (x OneOf_Bool_Float64_String) Free() { 5695 x.ref.Free() 5696 } 5697 5698 func (x OneOf_Bool_Float64_String) FromRef(ref js.Ref) OneOf_Bool_Float64_String { 5699 return OneOf_Bool_Float64_String{ 5700 ref: ref, 5701 } 5702 } 5703 5704 func (x OneOf_Bool_Float64_String) Bool() bool { 5705 return x.ref == js.True 5706 } 5707 5708 func (x OneOf_Bool_Float64_String) Float64() float64 { 5709 return js.Number[float64]{}.FromRef(x.ref).Get() 5710 } 5711 5712 func (x OneOf_Bool_Float64_String) String() js.String { 5713 return js.String{}.FromRef(x.ref) 5714 } 5715 5716 type EditContextInit struct { 5717 // Text is "EditContextInit.text" 5718 // 5719 // Optional 5720 Text js.String 5721 // SelectionStart is "EditContextInit.selectionStart" 5722 // 5723 // Optional 5724 // 5725 // NOTE: FFI_USE_SelectionStart MUST be set to true to make this field effective. 5726 SelectionStart uint32 5727 // SelectionEnd is "EditContextInit.selectionEnd" 5728 // 5729 // Optional 5730 // 5731 // NOTE: FFI_USE_SelectionEnd MUST be set to true to make this field effective. 5732 SelectionEnd uint32 5733 5734 FFI_USE_SelectionStart bool // for SelectionStart. 5735 FFI_USE_SelectionEnd bool // for SelectionEnd. 5736 5737 FFI_USE bool 5738 } 5739 5740 // FromRef calls UpdateFrom and returns a EditContextInit with all fields set. 5741 func (p EditContextInit) FromRef(ref js.Ref) EditContextInit { 5742 p.UpdateFrom(ref) 5743 return p 5744 } 5745 5746 // New creates a new EditContextInit in the application heap. 5747 func (p EditContextInit) New() js.Ref { 5748 return bindings.EditContextInitJSLoad( 5749 js.Pointer(&p), js.True, 0, 5750 ) 5751 } 5752 5753 // UpdateFrom copies value of all fields of the heap object to p. 5754 func (p *EditContextInit) UpdateFrom(ref js.Ref) { 5755 bindings.EditContextInitJSStore( 5756 js.Pointer(p), ref, 5757 ) 5758 } 5759 5760 // Update writes all fields of the p to the heap object referenced by ref. 5761 func (p *EditContextInit) Update(ref js.Ref) { 5762 bindings.EditContextInitJSLoad( 5763 js.Pointer(p), js.False, ref, 5764 ) 5765 } 5766 5767 // FreeMembers frees fields with heap reference, if recursive is true 5768 // free all heap references reachable from p. 5769 func (p *EditContextInit) FreeMembers(recursive bool) { 5770 js.Free( 5771 p.Text.Ref(), 5772 ) 5773 p.Text = p.Text.FromRef(js.Undefined) 5774 } 5775 5776 func NewEditContext(options EditContextInit) (ret EditContext) { 5777 ret.ref = bindings.NewEditContextByEditContext( 5778 js.Pointer(&options)) 5779 return 5780 } 5781 5782 func NewEditContextByEditContext1() (ret EditContext) { 5783 ret.ref = bindings.NewEditContextByEditContext1() 5784 return 5785 } 5786 5787 type EditContext struct { 5788 EventTarget 5789 } 5790 5791 func (this EditContext) Once() EditContext { 5792 this.ref.Once() 5793 return this 5794 } 5795 5796 func (this EditContext) Ref() js.Ref { 5797 return this.EventTarget.Ref() 5798 } 5799 5800 func (this EditContext) FromRef(ref js.Ref) EditContext { 5801 this.EventTarget = this.EventTarget.FromRef(ref) 5802 return this 5803 } 5804 5805 func (this EditContext) Free() { 5806 this.ref.Free() 5807 } 5808 5809 // Text returns the value of property "EditContext.text". 5810 // 5811 // It returns ok=false if there is no such property. 5812 func (this EditContext) Text() (ret js.String, ok bool) { 5813 ok = js.True == bindings.GetEditContextText( 5814 this.ref, js.Pointer(&ret), 5815 ) 5816 return 5817 } 5818 5819 // SelectionStart returns the value of property "EditContext.selectionStart". 5820 // 5821 // It returns ok=false if there is no such property. 5822 func (this EditContext) SelectionStart() (ret uint32, ok bool) { 5823 ok = js.True == bindings.GetEditContextSelectionStart( 5824 this.ref, js.Pointer(&ret), 5825 ) 5826 return 5827 } 5828 5829 // SelectionEnd returns the value of property "EditContext.selectionEnd". 5830 // 5831 // It returns ok=false if there is no such property. 5832 func (this EditContext) SelectionEnd() (ret uint32, ok bool) { 5833 ok = js.True == bindings.GetEditContextSelectionEnd( 5834 this.ref, js.Pointer(&ret), 5835 ) 5836 return 5837 } 5838 5839 // CompositionRangeStart returns the value of property "EditContext.compositionRangeStart". 5840 // 5841 // It returns ok=false if there is no such property. 5842 func (this EditContext) CompositionRangeStart() (ret uint32, ok bool) { 5843 ok = js.True == bindings.GetEditContextCompositionRangeStart( 5844 this.ref, js.Pointer(&ret), 5845 ) 5846 return 5847 } 5848 5849 // CompositionRangeEnd returns the value of property "EditContext.compositionRangeEnd". 5850 // 5851 // It returns ok=false if there is no such property. 5852 func (this EditContext) CompositionRangeEnd() (ret uint32, ok bool) { 5853 ok = js.True == bindings.GetEditContextCompositionRangeEnd( 5854 this.ref, js.Pointer(&ret), 5855 ) 5856 return 5857 } 5858 5859 // IsComposing returns the value of property "EditContext.isComposing". 5860 // 5861 // It returns ok=false if there is no such property. 5862 func (this EditContext) IsComposing() (ret bool, ok bool) { 5863 ok = js.True == bindings.GetEditContextIsComposing( 5864 this.ref, js.Pointer(&ret), 5865 ) 5866 return 5867 } 5868 5869 // ControlBounds returns the value of property "EditContext.controlBounds". 5870 // 5871 // It returns ok=false if there is no such property. 5872 func (this EditContext) ControlBounds() (ret DOMRect, ok bool) { 5873 ok = js.True == bindings.GetEditContextControlBounds( 5874 this.ref, js.Pointer(&ret), 5875 ) 5876 return 5877 } 5878 5879 // SelectionBounds returns the value of property "EditContext.selectionBounds". 5880 // 5881 // It returns ok=false if there is no such property. 5882 func (this EditContext) SelectionBounds() (ret DOMRect, ok bool) { 5883 ok = js.True == bindings.GetEditContextSelectionBounds( 5884 this.ref, js.Pointer(&ret), 5885 ) 5886 return 5887 } 5888 5889 // CharacterBoundsRangeStart returns the value of property "EditContext.characterBoundsRangeStart". 5890 // 5891 // It returns ok=false if there is no such property. 5892 func (this EditContext) CharacterBoundsRangeStart() (ret uint32, ok bool) { 5893 ok = js.True == bindings.GetEditContextCharacterBoundsRangeStart( 5894 this.ref, js.Pointer(&ret), 5895 ) 5896 return 5897 } 5898 5899 // HasFuncUpdateText returns true if the method "EditContext.updateText" exists. 5900 func (this EditContext) HasFuncUpdateText() bool { 5901 return js.True == bindings.HasFuncEditContextUpdateText( 5902 this.ref, 5903 ) 5904 } 5905 5906 // FuncUpdateText returns the method "EditContext.updateText". 5907 func (this EditContext) FuncUpdateText() (fn js.Func[func(rangeStart uint32, rangeEnd uint32, text js.String)]) { 5908 bindings.FuncEditContextUpdateText( 5909 this.ref, js.Pointer(&fn), 5910 ) 5911 return 5912 } 5913 5914 // UpdateText calls the method "EditContext.updateText". 5915 func (this EditContext) UpdateText(rangeStart uint32, rangeEnd uint32, text js.String) (ret js.Void) { 5916 bindings.CallEditContextUpdateText( 5917 this.ref, js.Pointer(&ret), 5918 uint32(rangeStart), 5919 uint32(rangeEnd), 5920 text.Ref(), 5921 ) 5922 5923 return 5924 } 5925 5926 // TryUpdateText calls the method "EditContext.updateText" 5927 // in a try/catch block and returns (_, err, ok = false) when it went through 5928 // the catch clause. 5929 func (this EditContext) TryUpdateText(rangeStart uint32, rangeEnd uint32, text js.String) (ret js.Void, exception js.Any, ok bool) { 5930 ok = js.True == bindings.TryEditContextUpdateText( 5931 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5932 uint32(rangeStart), 5933 uint32(rangeEnd), 5934 text.Ref(), 5935 ) 5936 5937 return 5938 } 5939 5940 // HasFuncUpdateSelection returns true if the method "EditContext.updateSelection" exists. 5941 func (this EditContext) HasFuncUpdateSelection() bool { 5942 return js.True == bindings.HasFuncEditContextUpdateSelection( 5943 this.ref, 5944 ) 5945 } 5946 5947 // FuncUpdateSelection returns the method "EditContext.updateSelection". 5948 func (this EditContext) FuncUpdateSelection() (fn js.Func[func(start uint32, end uint32)]) { 5949 bindings.FuncEditContextUpdateSelection( 5950 this.ref, js.Pointer(&fn), 5951 ) 5952 return 5953 } 5954 5955 // UpdateSelection calls the method "EditContext.updateSelection". 5956 func (this EditContext) UpdateSelection(start uint32, end uint32) (ret js.Void) { 5957 bindings.CallEditContextUpdateSelection( 5958 this.ref, js.Pointer(&ret), 5959 uint32(start), 5960 uint32(end), 5961 ) 5962 5963 return 5964 } 5965 5966 // TryUpdateSelection calls the method "EditContext.updateSelection" 5967 // in a try/catch block and returns (_, err, ok = false) when it went through 5968 // the catch clause. 5969 func (this EditContext) TryUpdateSelection(start uint32, end uint32) (ret js.Void, exception js.Any, ok bool) { 5970 ok = js.True == bindings.TryEditContextUpdateSelection( 5971 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5972 uint32(start), 5973 uint32(end), 5974 ) 5975 5976 return 5977 } 5978 5979 // HasFuncUpdateControlBounds returns true if the method "EditContext.updateControlBounds" exists. 5980 func (this EditContext) HasFuncUpdateControlBounds() bool { 5981 return js.True == bindings.HasFuncEditContextUpdateControlBounds( 5982 this.ref, 5983 ) 5984 } 5985 5986 // FuncUpdateControlBounds returns the method "EditContext.updateControlBounds". 5987 func (this EditContext) FuncUpdateControlBounds() (fn js.Func[func(controlBounds DOMRect)]) { 5988 bindings.FuncEditContextUpdateControlBounds( 5989 this.ref, js.Pointer(&fn), 5990 ) 5991 return 5992 } 5993 5994 // UpdateControlBounds calls the method "EditContext.updateControlBounds". 5995 func (this EditContext) UpdateControlBounds(controlBounds DOMRect) (ret js.Void) { 5996 bindings.CallEditContextUpdateControlBounds( 5997 this.ref, js.Pointer(&ret), 5998 controlBounds.Ref(), 5999 ) 6000 6001 return 6002 } 6003 6004 // TryUpdateControlBounds calls the method "EditContext.updateControlBounds" 6005 // in a try/catch block and returns (_, err, ok = false) when it went through 6006 // the catch clause. 6007 func (this EditContext) TryUpdateControlBounds(controlBounds DOMRect) (ret js.Void, exception js.Any, ok bool) { 6008 ok = js.True == bindings.TryEditContextUpdateControlBounds( 6009 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6010 controlBounds.Ref(), 6011 ) 6012 6013 return 6014 } 6015 6016 // HasFuncUpdateSelectionBounds returns true if the method "EditContext.updateSelectionBounds" exists. 6017 func (this EditContext) HasFuncUpdateSelectionBounds() bool { 6018 return js.True == bindings.HasFuncEditContextUpdateSelectionBounds( 6019 this.ref, 6020 ) 6021 } 6022 6023 // FuncUpdateSelectionBounds returns the method "EditContext.updateSelectionBounds". 6024 func (this EditContext) FuncUpdateSelectionBounds() (fn js.Func[func(selectionBounds DOMRect)]) { 6025 bindings.FuncEditContextUpdateSelectionBounds( 6026 this.ref, js.Pointer(&fn), 6027 ) 6028 return 6029 } 6030 6031 // UpdateSelectionBounds calls the method "EditContext.updateSelectionBounds". 6032 func (this EditContext) UpdateSelectionBounds(selectionBounds DOMRect) (ret js.Void) { 6033 bindings.CallEditContextUpdateSelectionBounds( 6034 this.ref, js.Pointer(&ret), 6035 selectionBounds.Ref(), 6036 ) 6037 6038 return 6039 } 6040 6041 // TryUpdateSelectionBounds calls the method "EditContext.updateSelectionBounds" 6042 // in a try/catch block and returns (_, err, ok = false) when it went through 6043 // the catch clause. 6044 func (this EditContext) TryUpdateSelectionBounds(selectionBounds DOMRect) (ret js.Void, exception js.Any, ok bool) { 6045 ok = js.True == bindings.TryEditContextUpdateSelectionBounds( 6046 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6047 selectionBounds.Ref(), 6048 ) 6049 6050 return 6051 } 6052 6053 // HasFuncUpdateCharacterBounds returns true if the method "EditContext.updateCharacterBounds" exists. 6054 func (this EditContext) HasFuncUpdateCharacterBounds() bool { 6055 return js.True == bindings.HasFuncEditContextUpdateCharacterBounds( 6056 this.ref, 6057 ) 6058 } 6059 6060 // FuncUpdateCharacterBounds returns the method "EditContext.updateCharacterBounds". 6061 func (this EditContext) FuncUpdateCharacterBounds() (fn js.Func[func(rangeStart uint32, characterBounds js.Array[DOMRect])]) { 6062 bindings.FuncEditContextUpdateCharacterBounds( 6063 this.ref, js.Pointer(&fn), 6064 ) 6065 return 6066 } 6067 6068 // UpdateCharacterBounds calls the method "EditContext.updateCharacterBounds". 6069 func (this EditContext) UpdateCharacterBounds(rangeStart uint32, characterBounds js.Array[DOMRect]) (ret js.Void) { 6070 bindings.CallEditContextUpdateCharacterBounds( 6071 this.ref, js.Pointer(&ret), 6072 uint32(rangeStart), 6073 characterBounds.Ref(), 6074 ) 6075 6076 return 6077 } 6078 6079 // TryUpdateCharacterBounds calls the method "EditContext.updateCharacterBounds" 6080 // in a try/catch block and returns (_, err, ok = false) when it went through 6081 // the catch clause. 6082 func (this EditContext) TryUpdateCharacterBounds(rangeStart uint32, characterBounds js.Array[DOMRect]) (ret js.Void, exception js.Any, ok bool) { 6083 ok = js.True == bindings.TryEditContextUpdateCharacterBounds( 6084 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6085 uint32(rangeStart), 6086 characterBounds.Ref(), 6087 ) 6088 6089 return 6090 } 6091 6092 // HasFuncAttachedElements returns true if the method "EditContext.attachedElements" exists. 6093 func (this EditContext) HasFuncAttachedElements() bool { 6094 return js.True == bindings.HasFuncEditContextAttachedElements( 6095 this.ref, 6096 ) 6097 } 6098 6099 // FuncAttachedElements returns the method "EditContext.attachedElements". 6100 func (this EditContext) FuncAttachedElements() (fn js.Func[func() js.Array[Element]]) { 6101 bindings.FuncEditContextAttachedElements( 6102 this.ref, js.Pointer(&fn), 6103 ) 6104 return 6105 } 6106 6107 // AttachedElements calls the method "EditContext.attachedElements". 6108 func (this EditContext) AttachedElements() (ret js.Array[Element]) { 6109 bindings.CallEditContextAttachedElements( 6110 this.ref, js.Pointer(&ret), 6111 ) 6112 6113 return 6114 } 6115 6116 // TryAttachedElements calls the method "EditContext.attachedElements" 6117 // in a try/catch block and returns (_, err, ok = false) when it went through 6118 // the catch clause. 6119 func (this EditContext) TryAttachedElements() (ret js.Array[Element], exception js.Any, ok bool) { 6120 ok = js.True == bindings.TryEditContextAttachedElements( 6121 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6122 ) 6123 6124 return 6125 } 6126 6127 // HasFuncCharacterBounds returns true if the method "EditContext.characterBounds" exists. 6128 func (this EditContext) HasFuncCharacterBounds() bool { 6129 return js.True == bindings.HasFuncEditContextCharacterBounds( 6130 this.ref, 6131 ) 6132 } 6133 6134 // FuncCharacterBounds returns the method "EditContext.characterBounds". 6135 func (this EditContext) FuncCharacterBounds() (fn js.Func[func() js.Array[DOMRect]]) { 6136 bindings.FuncEditContextCharacterBounds( 6137 this.ref, js.Pointer(&fn), 6138 ) 6139 return 6140 } 6141 6142 // CharacterBounds calls the method "EditContext.characterBounds". 6143 func (this EditContext) CharacterBounds() (ret js.Array[DOMRect]) { 6144 bindings.CallEditContextCharacterBounds( 6145 this.ref, js.Pointer(&ret), 6146 ) 6147 6148 return 6149 } 6150 6151 // TryCharacterBounds calls the method "EditContext.characterBounds" 6152 // in a try/catch block and returns (_, err, ok = false) when it went through 6153 // the catch clause. 6154 func (this EditContext) TryCharacterBounds() (ret js.Array[DOMRect], exception js.Any, ok bool) { 6155 ok = js.True == bindings.TryEditContextCharacterBounds( 6156 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6157 ) 6158 6159 return 6160 } 6161 6162 type HTMLElement struct { 6163 Element 6164 } 6165 6166 func (this HTMLElement) Once() HTMLElement { 6167 this.ref.Once() 6168 return this 6169 } 6170 6171 func (this HTMLElement) Ref() js.Ref { 6172 return this.Element.Ref() 6173 } 6174 6175 func (this HTMLElement) FromRef(ref js.Ref) HTMLElement { 6176 this.Element = this.Element.FromRef(ref) 6177 return this 6178 } 6179 6180 func (this HTMLElement) Free() { 6181 this.ref.Free() 6182 } 6183 6184 // Title returns the value of property "HTMLElement.title". 6185 // 6186 // It returns ok=false if there is no such property. 6187 func (this HTMLElement) Title() (ret js.String, ok bool) { 6188 ok = js.True == bindings.GetHTMLElementTitle( 6189 this.ref, js.Pointer(&ret), 6190 ) 6191 return 6192 } 6193 6194 // SetTitle sets the value of property "HTMLElement.title" to val. 6195 // 6196 // It returns false if the property cannot be set. 6197 func (this HTMLElement) SetTitle(val js.String) bool { 6198 return js.True == bindings.SetHTMLElementTitle( 6199 this.ref, 6200 val.Ref(), 6201 ) 6202 } 6203 6204 // Lang returns the value of property "HTMLElement.lang". 6205 // 6206 // It returns ok=false if there is no such property. 6207 func (this HTMLElement) Lang() (ret js.String, ok bool) { 6208 ok = js.True == bindings.GetHTMLElementLang( 6209 this.ref, js.Pointer(&ret), 6210 ) 6211 return 6212 } 6213 6214 // SetLang sets the value of property "HTMLElement.lang" to val. 6215 // 6216 // It returns false if the property cannot be set. 6217 func (this HTMLElement) SetLang(val js.String) bool { 6218 return js.True == bindings.SetHTMLElementLang( 6219 this.ref, 6220 val.Ref(), 6221 ) 6222 } 6223 6224 // Translate returns the value of property "HTMLElement.translate". 6225 // 6226 // It returns ok=false if there is no such property. 6227 func (this HTMLElement) Translate() (ret bool, ok bool) { 6228 ok = js.True == bindings.GetHTMLElementTranslate( 6229 this.ref, js.Pointer(&ret), 6230 ) 6231 return 6232 } 6233 6234 // SetTranslate sets the value of property "HTMLElement.translate" to val. 6235 // 6236 // It returns false if the property cannot be set. 6237 func (this HTMLElement) SetTranslate(val bool) bool { 6238 return js.True == bindings.SetHTMLElementTranslate( 6239 this.ref, 6240 js.Bool(bool(val)), 6241 ) 6242 } 6243 6244 // Dir returns the value of property "HTMLElement.dir". 6245 // 6246 // It returns ok=false if there is no such property. 6247 func (this HTMLElement) Dir() (ret js.String, ok bool) { 6248 ok = js.True == bindings.GetHTMLElementDir( 6249 this.ref, js.Pointer(&ret), 6250 ) 6251 return 6252 } 6253 6254 // SetDir sets the value of property "HTMLElement.dir" to val. 6255 // 6256 // It returns false if the property cannot be set. 6257 func (this HTMLElement) SetDir(val js.String) bool { 6258 return js.True == bindings.SetHTMLElementDir( 6259 this.ref, 6260 val.Ref(), 6261 ) 6262 } 6263 6264 // Hidden returns the value of property "HTMLElement.hidden". 6265 // 6266 // It returns ok=false if there is no such property. 6267 func (this HTMLElement) Hidden() (ret OneOf_Bool_Float64_String, ok bool) { 6268 ok = js.True == bindings.GetHTMLElementHidden( 6269 this.ref, js.Pointer(&ret), 6270 ) 6271 return 6272 } 6273 6274 // SetHidden sets the value of property "HTMLElement.hidden" to val. 6275 // 6276 // It returns false if the property cannot be set. 6277 func (this HTMLElement) SetHidden(val OneOf_Bool_Float64_String) bool { 6278 return js.True == bindings.SetHTMLElementHidden( 6279 this.ref, 6280 val.Ref(), 6281 ) 6282 } 6283 6284 // Inert returns the value of property "HTMLElement.inert". 6285 // 6286 // It returns ok=false if there is no such property. 6287 func (this HTMLElement) Inert() (ret bool, ok bool) { 6288 ok = js.True == bindings.GetHTMLElementInert( 6289 this.ref, js.Pointer(&ret), 6290 ) 6291 return 6292 } 6293 6294 // SetInert sets the value of property "HTMLElement.inert" to val. 6295 // 6296 // It returns false if the property cannot be set. 6297 func (this HTMLElement) SetInert(val bool) bool { 6298 return js.True == bindings.SetHTMLElementInert( 6299 this.ref, 6300 js.Bool(bool(val)), 6301 ) 6302 } 6303 6304 // AccessKey returns the value of property "HTMLElement.accessKey". 6305 // 6306 // It returns ok=false if there is no such property. 6307 func (this HTMLElement) AccessKey() (ret js.String, ok bool) { 6308 ok = js.True == bindings.GetHTMLElementAccessKey( 6309 this.ref, js.Pointer(&ret), 6310 ) 6311 return 6312 } 6313 6314 // SetAccessKey sets the value of property "HTMLElement.accessKey" to val. 6315 // 6316 // It returns false if the property cannot be set. 6317 func (this HTMLElement) SetAccessKey(val js.String) bool { 6318 return js.True == bindings.SetHTMLElementAccessKey( 6319 this.ref, 6320 val.Ref(), 6321 ) 6322 } 6323 6324 // AccessKeyLabel returns the value of property "HTMLElement.accessKeyLabel". 6325 // 6326 // It returns ok=false if there is no such property. 6327 func (this HTMLElement) AccessKeyLabel() (ret js.String, ok bool) { 6328 ok = js.True == bindings.GetHTMLElementAccessKeyLabel( 6329 this.ref, js.Pointer(&ret), 6330 ) 6331 return 6332 } 6333 6334 // Draggable returns the value of property "HTMLElement.draggable". 6335 // 6336 // It returns ok=false if there is no such property. 6337 func (this HTMLElement) Draggable() (ret bool, ok bool) { 6338 ok = js.True == bindings.GetHTMLElementDraggable( 6339 this.ref, js.Pointer(&ret), 6340 ) 6341 return 6342 } 6343 6344 // SetDraggable sets the value of property "HTMLElement.draggable" to val. 6345 // 6346 // It returns false if the property cannot be set. 6347 func (this HTMLElement) SetDraggable(val bool) bool { 6348 return js.True == bindings.SetHTMLElementDraggable( 6349 this.ref, 6350 js.Bool(bool(val)), 6351 ) 6352 } 6353 6354 // Spellcheck returns the value of property "HTMLElement.spellcheck". 6355 // 6356 // It returns ok=false if there is no such property. 6357 func (this HTMLElement) Spellcheck() (ret bool, ok bool) { 6358 ok = js.True == bindings.GetHTMLElementSpellcheck( 6359 this.ref, js.Pointer(&ret), 6360 ) 6361 return 6362 } 6363 6364 // SetSpellcheck sets the value of property "HTMLElement.spellcheck" to val. 6365 // 6366 // It returns false if the property cannot be set. 6367 func (this HTMLElement) SetSpellcheck(val bool) bool { 6368 return js.True == bindings.SetHTMLElementSpellcheck( 6369 this.ref, 6370 js.Bool(bool(val)), 6371 ) 6372 } 6373 6374 // Autocapitalize returns the value of property "HTMLElement.autocapitalize". 6375 // 6376 // It returns ok=false if there is no such property. 6377 func (this HTMLElement) Autocapitalize() (ret js.String, ok bool) { 6378 ok = js.True == bindings.GetHTMLElementAutocapitalize( 6379 this.ref, js.Pointer(&ret), 6380 ) 6381 return 6382 } 6383 6384 // SetAutocapitalize sets the value of property "HTMLElement.autocapitalize" to val. 6385 // 6386 // It returns false if the property cannot be set. 6387 func (this HTMLElement) SetAutocapitalize(val js.String) bool { 6388 return js.True == bindings.SetHTMLElementAutocapitalize( 6389 this.ref, 6390 val.Ref(), 6391 ) 6392 } 6393 6394 // InnerText returns the value of property "HTMLElement.innerText". 6395 // 6396 // It returns ok=false if there is no such property. 6397 func (this HTMLElement) InnerText() (ret js.String, ok bool) { 6398 ok = js.True == bindings.GetHTMLElementInnerText( 6399 this.ref, js.Pointer(&ret), 6400 ) 6401 return 6402 } 6403 6404 // SetInnerText sets the value of property "HTMLElement.innerText" to val. 6405 // 6406 // It returns false if the property cannot be set. 6407 func (this HTMLElement) SetInnerText(val js.String) bool { 6408 return js.True == bindings.SetHTMLElementInnerText( 6409 this.ref, 6410 val.Ref(), 6411 ) 6412 } 6413 6414 // OuterText returns the value of property "HTMLElement.outerText". 6415 // 6416 // It returns ok=false if there is no such property. 6417 func (this HTMLElement) OuterText() (ret js.String, ok bool) { 6418 ok = js.True == bindings.GetHTMLElementOuterText( 6419 this.ref, js.Pointer(&ret), 6420 ) 6421 return 6422 } 6423 6424 // SetOuterText sets the value of property "HTMLElement.outerText" to val. 6425 // 6426 // It returns false if the property cannot be set. 6427 func (this HTMLElement) SetOuterText(val js.String) bool { 6428 return js.True == bindings.SetHTMLElementOuterText( 6429 this.ref, 6430 val.Ref(), 6431 ) 6432 } 6433 6434 // Popover returns the value of property "HTMLElement.popover". 6435 // 6436 // It returns ok=false if there is no such property. 6437 func (this HTMLElement) Popover() (ret js.String, ok bool) { 6438 ok = js.True == bindings.GetHTMLElementPopover( 6439 this.ref, js.Pointer(&ret), 6440 ) 6441 return 6442 } 6443 6444 // SetPopover sets the value of property "HTMLElement.popover" to val. 6445 // 6446 // It returns false if the property cannot be set. 6447 func (this HTMLElement) SetPopover(val js.String) bool { 6448 return js.True == bindings.SetHTMLElementPopover( 6449 this.ref, 6450 val.Ref(), 6451 ) 6452 } 6453 6454 // OffsetParent returns the value of property "HTMLElement.offsetParent". 6455 // 6456 // It returns ok=false if there is no such property. 6457 func (this HTMLElement) OffsetParent() (ret Element, ok bool) { 6458 ok = js.True == bindings.GetHTMLElementOffsetParent( 6459 this.ref, js.Pointer(&ret), 6460 ) 6461 return 6462 } 6463 6464 // OffsetTop returns the value of property "HTMLElement.offsetTop". 6465 // 6466 // It returns ok=false if there is no such property. 6467 func (this HTMLElement) OffsetTop() (ret int32, ok bool) { 6468 ok = js.True == bindings.GetHTMLElementOffsetTop( 6469 this.ref, js.Pointer(&ret), 6470 ) 6471 return 6472 } 6473 6474 // OffsetLeft returns the value of property "HTMLElement.offsetLeft". 6475 // 6476 // It returns ok=false if there is no such property. 6477 func (this HTMLElement) OffsetLeft() (ret int32, ok bool) { 6478 ok = js.True == bindings.GetHTMLElementOffsetLeft( 6479 this.ref, js.Pointer(&ret), 6480 ) 6481 return 6482 } 6483 6484 // OffsetWidth returns the value of property "HTMLElement.offsetWidth". 6485 // 6486 // It returns ok=false if there is no such property. 6487 func (this HTMLElement) OffsetWidth() (ret int32, ok bool) { 6488 ok = js.True == bindings.GetHTMLElementOffsetWidth( 6489 this.ref, js.Pointer(&ret), 6490 ) 6491 return 6492 } 6493 6494 // OffsetHeight returns the value of property "HTMLElement.offsetHeight". 6495 // 6496 // It returns ok=false if there is no such property. 6497 func (this HTMLElement) OffsetHeight() (ret int32, ok bool) { 6498 ok = js.True == bindings.GetHTMLElementOffsetHeight( 6499 this.ref, js.Pointer(&ret), 6500 ) 6501 return 6502 } 6503 6504 // EditContext returns the value of property "HTMLElement.editContext". 6505 // 6506 // It returns ok=false if there is no such property. 6507 func (this HTMLElement) EditContext() (ret EditContext, ok bool) { 6508 ok = js.True == bindings.GetHTMLElementEditContext( 6509 this.ref, js.Pointer(&ret), 6510 ) 6511 return 6512 } 6513 6514 // SetEditContext sets the value of property "HTMLElement.editContext" to val. 6515 // 6516 // It returns false if the property cannot be set. 6517 func (this HTMLElement) SetEditContext(val EditContext) bool { 6518 return js.True == bindings.SetHTMLElementEditContext( 6519 this.ref, 6520 val.Ref(), 6521 ) 6522 } 6523 6524 // Style returns the value of property "HTMLElement.style". 6525 // 6526 // It returns ok=false if there is no such property. 6527 func (this HTMLElement) Style() (ret CSSStyleDeclaration, ok bool) { 6528 ok = js.True == bindings.GetHTMLElementStyle( 6529 this.ref, js.Pointer(&ret), 6530 ) 6531 return 6532 } 6533 6534 // AttributeStyleMap returns the value of property "HTMLElement.attributeStyleMap". 6535 // 6536 // It returns ok=false if there is no such property. 6537 func (this HTMLElement) AttributeStyleMap() (ret StylePropertyMap, ok bool) { 6538 ok = js.True == bindings.GetHTMLElementAttributeStyleMap( 6539 this.ref, js.Pointer(&ret), 6540 ) 6541 return 6542 } 6543 6544 // Dataset returns the value of property "HTMLElement.dataset". 6545 // 6546 // It returns ok=false if there is no such property. 6547 func (this HTMLElement) Dataset() (ret DOMStringMap, ok bool) { 6548 ok = js.True == bindings.GetHTMLElementDataset( 6549 this.ref, js.Pointer(&ret), 6550 ) 6551 return 6552 } 6553 6554 // Nonce returns the value of property "HTMLElement.nonce". 6555 // 6556 // It returns ok=false if there is no such property. 6557 func (this HTMLElement) Nonce() (ret js.String, ok bool) { 6558 ok = js.True == bindings.GetHTMLElementNonce( 6559 this.ref, js.Pointer(&ret), 6560 ) 6561 return 6562 } 6563 6564 // SetNonce sets the value of property "HTMLElement.nonce" to val. 6565 // 6566 // It returns false if the property cannot be set. 6567 func (this HTMLElement) SetNonce(val js.String) bool { 6568 return js.True == bindings.SetHTMLElementNonce( 6569 this.ref, 6570 val.Ref(), 6571 ) 6572 } 6573 6574 // Autofocus returns the value of property "HTMLElement.autofocus". 6575 // 6576 // It returns ok=false if there is no such property. 6577 func (this HTMLElement) Autofocus() (ret bool, ok bool) { 6578 ok = js.True == bindings.GetHTMLElementAutofocus( 6579 this.ref, js.Pointer(&ret), 6580 ) 6581 return 6582 } 6583 6584 // SetAutofocus sets the value of property "HTMLElement.autofocus" to val. 6585 // 6586 // It returns false if the property cannot be set. 6587 func (this HTMLElement) SetAutofocus(val bool) bool { 6588 return js.True == bindings.SetHTMLElementAutofocus( 6589 this.ref, 6590 js.Bool(bool(val)), 6591 ) 6592 } 6593 6594 // TabIndex returns the value of property "HTMLElement.tabIndex". 6595 // 6596 // It returns ok=false if there is no such property. 6597 func (this HTMLElement) TabIndex() (ret int32, ok bool) { 6598 ok = js.True == bindings.GetHTMLElementTabIndex( 6599 this.ref, js.Pointer(&ret), 6600 ) 6601 return 6602 } 6603 6604 // SetTabIndex sets the value of property "HTMLElement.tabIndex" to val. 6605 // 6606 // It returns false if the property cannot be set. 6607 func (this HTMLElement) SetTabIndex(val int32) bool { 6608 return js.True == bindings.SetHTMLElementTabIndex( 6609 this.ref, 6610 int32(val), 6611 ) 6612 } 6613 6614 // ContentEditable returns the value of property "HTMLElement.contentEditable". 6615 // 6616 // It returns ok=false if there is no such property. 6617 func (this HTMLElement) ContentEditable() (ret js.String, ok bool) { 6618 ok = js.True == bindings.GetHTMLElementContentEditable( 6619 this.ref, js.Pointer(&ret), 6620 ) 6621 return 6622 } 6623 6624 // SetContentEditable sets the value of property "HTMLElement.contentEditable" to val. 6625 // 6626 // It returns false if the property cannot be set. 6627 func (this HTMLElement) SetContentEditable(val js.String) bool { 6628 return js.True == bindings.SetHTMLElementContentEditable( 6629 this.ref, 6630 val.Ref(), 6631 ) 6632 } 6633 6634 // EnterKeyHint returns the value of property "HTMLElement.enterKeyHint". 6635 // 6636 // It returns ok=false if there is no such property. 6637 func (this HTMLElement) EnterKeyHint() (ret js.String, ok bool) { 6638 ok = js.True == bindings.GetHTMLElementEnterKeyHint( 6639 this.ref, js.Pointer(&ret), 6640 ) 6641 return 6642 } 6643 6644 // SetEnterKeyHint sets the value of property "HTMLElement.enterKeyHint" to val. 6645 // 6646 // It returns false if the property cannot be set. 6647 func (this HTMLElement) SetEnterKeyHint(val js.String) bool { 6648 return js.True == bindings.SetHTMLElementEnterKeyHint( 6649 this.ref, 6650 val.Ref(), 6651 ) 6652 } 6653 6654 // IsContentEditable returns the value of property "HTMLElement.isContentEditable". 6655 // 6656 // It returns ok=false if there is no such property. 6657 func (this HTMLElement) IsContentEditable() (ret bool, ok bool) { 6658 ok = js.True == bindings.GetHTMLElementIsContentEditable( 6659 this.ref, js.Pointer(&ret), 6660 ) 6661 return 6662 } 6663 6664 // InputMode returns the value of property "HTMLElement.inputMode". 6665 // 6666 // It returns ok=false if there is no such property. 6667 func (this HTMLElement) InputMode() (ret js.String, ok bool) { 6668 ok = js.True == bindings.GetHTMLElementInputMode( 6669 this.ref, js.Pointer(&ret), 6670 ) 6671 return 6672 } 6673 6674 // SetInputMode sets the value of property "HTMLElement.inputMode" to val. 6675 // 6676 // It returns false if the property cannot be set. 6677 func (this HTMLElement) SetInputMode(val js.String) bool { 6678 return js.True == bindings.SetHTMLElementInputMode( 6679 this.ref, 6680 val.Ref(), 6681 ) 6682 } 6683 6684 // VirtualKeyboardPolicy returns the value of property "HTMLElement.virtualKeyboardPolicy". 6685 // 6686 // It returns ok=false if there is no such property. 6687 func (this HTMLElement) VirtualKeyboardPolicy() (ret js.String, ok bool) { 6688 ok = js.True == bindings.GetHTMLElementVirtualKeyboardPolicy( 6689 this.ref, js.Pointer(&ret), 6690 ) 6691 return 6692 } 6693 6694 // SetVirtualKeyboardPolicy sets the value of property "HTMLElement.virtualKeyboardPolicy" to val. 6695 // 6696 // It returns false if the property cannot be set. 6697 func (this HTMLElement) SetVirtualKeyboardPolicy(val js.String) bool { 6698 return js.True == bindings.SetHTMLElementVirtualKeyboardPolicy( 6699 this.ref, 6700 val.Ref(), 6701 ) 6702 } 6703 6704 // HasFuncClick returns true if the method "HTMLElement.click" exists. 6705 func (this HTMLElement) HasFuncClick() bool { 6706 return js.True == bindings.HasFuncHTMLElementClick( 6707 this.ref, 6708 ) 6709 } 6710 6711 // FuncClick returns the method "HTMLElement.click". 6712 func (this HTMLElement) FuncClick() (fn js.Func[func()]) { 6713 bindings.FuncHTMLElementClick( 6714 this.ref, js.Pointer(&fn), 6715 ) 6716 return 6717 } 6718 6719 // Click calls the method "HTMLElement.click". 6720 func (this HTMLElement) Click() (ret js.Void) { 6721 bindings.CallHTMLElementClick( 6722 this.ref, js.Pointer(&ret), 6723 ) 6724 6725 return 6726 } 6727 6728 // TryClick calls the method "HTMLElement.click" 6729 // in a try/catch block and returns (_, err, ok = false) when it went through 6730 // the catch clause. 6731 func (this HTMLElement) TryClick() (ret js.Void, exception js.Any, ok bool) { 6732 ok = js.True == bindings.TryHTMLElementClick( 6733 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6734 ) 6735 6736 return 6737 } 6738 6739 // HasFuncAttachInternals returns true if the method "HTMLElement.attachInternals" exists. 6740 func (this HTMLElement) HasFuncAttachInternals() bool { 6741 return js.True == bindings.HasFuncHTMLElementAttachInternals( 6742 this.ref, 6743 ) 6744 } 6745 6746 // FuncAttachInternals returns the method "HTMLElement.attachInternals". 6747 func (this HTMLElement) FuncAttachInternals() (fn js.Func[func() ElementInternals]) { 6748 bindings.FuncHTMLElementAttachInternals( 6749 this.ref, js.Pointer(&fn), 6750 ) 6751 return 6752 } 6753 6754 // AttachInternals calls the method "HTMLElement.attachInternals". 6755 func (this HTMLElement) AttachInternals() (ret ElementInternals) { 6756 bindings.CallHTMLElementAttachInternals( 6757 this.ref, js.Pointer(&ret), 6758 ) 6759 6760 return 6761 } 6762 6763 // TryAttachInternals calls the method "HTMLElement.attachInternals" 6764 // in a try/catch block and returns (_, err, ok = false) when it went through 6765 // the catch clause. 6766 func (this HTMLElement) TryAttachInternals() (ret ElementInternals, exception js.Any, ok bool) { 6767 ok = js.True == bindings.TryHTMLElementAttachInternals( 6768 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6769 ) 6770 6771 return 6772 } 6773 6774 // HasFuncShowPopover returns true if the method "HTMLElement.showPopover" exists. 6775 func (this HTMLElement) HasFuncShowPopover() bool { 6776 return js.True == bindings.HasFuncHTMLElementShowPopover( 6777 this.ref, 6778 ) 6779 } 6780 6781 // FuncShowPopover returns the method "HTMLElement.showPopover". 6782 func (this HTMLElement) FuncShowPopover() (fn js.Func[func()]) { 6783 bindings.FuncHTMLElementShowPopover( 6784 this.ref, js.Pointer(&fn), 6785 ) 6786 return 6787 } 6788 6789 // ShowPopover calls the method "HTMLElement.showPopover". 6790 func (this HTMLElement) ShowPopover() (ret js.Void) { 6791 bindings.CallHTMLElementShowPopover( 6792 this.ref, js.Pointer(&ret), 6793 ) 6794 6795 return 6796 } 6797 6798 // TryShowPopover calls the method "HTMLElement.showPopover" 6799 // in a try/catch block and returns (_, err, ok = false) when it went through 6800 // the catch clause. 6801 func (this HTMLElement) TryShowPopover() (ret js.Void, exception js.Any, ok bool) { 6802 ok = js.True == bindings.TryHTMLElementShowPopover( 6803 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6804 ) 6805 6806 return 6807 } 6808 6809 // HasFuncHidePopover returns true if the method "HTMLElement.hidePopover" exists. 6810 func (this HTMLElement) HasFuncHidePopover() bool { 6811 return js.True == bindings.HasFuncHTMLElementHidePopover( 6812 this.ref, 6813 ) 6814 } 6815 6816 // FuncHidePopover returns the method "HTMLElement.hidePopover". 6817 func (this HTMLElement) FuncHidePopover() (fn js.Func[func()]) { 6818 bindings.FuncHTMLElementHidePopover( 6819 this.ref, js.Pointer(&fn), 6820 ) 6821 return 6822 } 6823 6824 // HidePopover calls the method "HTMLElement.hidePopover". 6825 func (this HTMLElement) HidePopover() (ret js.Void) { 6826 bindings.CallHTMLElementHidePopover( 6827 this.ref, js.Pointer(&ret), 6828 ) 6829 6830 return 6831 } 6832 6833 // TryHidePopover calls the method "HTMLElement.hidePopover" 6834 // in a try/catch block and returns (_, err, ok = false) when it went through 6835 // the catch clause. 6836 func (this HTMLElement) TryHidePopover() (ret js.Void, exception js.Any, ok bool) { 6837 ok = js.True == bindings.TryHTMLElementHidePopover( 6838 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6839 ) 6840 6841 return 6842 } 6843 6844 // HasFuncTogglePopover returns true if the method "HTMLElement.togglePopover" exists. 6845 func (this HTMLElement) HasFuncTogglePopover() bool { 6846 return js.True == bindings.HasFuncHTMLElementTogglePopover( 6847 this.ref, 6848 ) 6849 } 6850 6851 // FuncTogglePopover returns the method "HTMLElement.togglePopover". 6852 func (this HTMLElement) FuncTogglePopover() (fn js.Func[func(force bool) bool]) { 6853 bindings.FuncHTMLElementTogglePopover( 6854 this.ref, js.Pointer(&fn), 6855 ) 6856 return 6857 } 6858 6859 // TogglePopover calls the method "HTMLElement.togglePopover". 6860 func (this HTMLElement) TogglePopover(force bool) (ret bool) { 6861 bindings.CallHTMLElementTogglePopover( 6862 this.ref, js.Pointer(&ret), 6863 js.Bool(bool(force)), 6864 ) 6865 6866 return 6867 } 6868 6869 // TryTogglePopover calls the method "HTMLElement.togglePopover" 6870 // in a try/catch block and returns (_, err, ok = false) when it went through 6871 // the catch clause. 6872 func (this HTMLElement) TryTogglePopover(force bool) (ret bool, exception js.Any, ok bool) { 6873 ok = js.True == bindings.TryHTMLElementTogglePopover( 6874 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6875 js.Bool(bool(force)), 6876 ) 6877 6878 return 6879 } 6880 6881 // HasFuncTogglePopover1 returns true if the method "HTMLElement.togglePopover" exists. 6882 func (this HTMLElement) HasFuncTogglePopover1() bool { 6883 return js.True == bindings.HasFuncHTMLElementTogglePopover1( 6884 this.ref, 6885 ) 6886 } 6887 6888 // FuncTogglePopover1 returns the method "HTMLElement.togglePopover". 6889 func (this HTMLElement) FuncTogglePopover1() (fn js.Func[func() bool]) { 6890 bindings.FuncHTMLElementTogglePopover1( 6891 this.ref, js.Pointer(&fn), 6892 ) 6893 return 6894 } 6895 6896 // TogglePopover1 calls the method "HTMLElement.togglePopover". 6897 func (this HTMLElement) TogglePopover1() (ret bool) { 6898 bindings.CallHTMLElementTogglePopover1( 6899 this.ref, js.Pointer(&ret), 6900 ) 6901 6902 return 6903 } 6904 6905 // TryTogglePopover1 calls the method "HTMLElement.togglePopover" 6906 // in a try/catch block and returns (_, err, ok = false) when it went through 6907 // the catch clause. 6908 func (this HTMLElement) TryTogglePopover1() (ret bool, exception js.Any, ok bool) { 6909 ok = js.True == bindings.TryHTMLElementTogglePopover1( 6910 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6911 ) 6912 6913 return 6914 } 6915 6916 // HasFuncFocus returns true if the method "HTMLElement.focus" exists. 6917 func (this HTMLElement) HasFuncFocus() bool { 6918 return js.True == bindings.HasFuncHTMLElementFocus( 6919 this.ref, 6920 ) 6921 } 6922 6923 // FuncFocus returns the method "HTMLElement.focus". 6924 func (this HTMLElement) FuncFocus() (fn js.Func[func(options FocusOptions)]) { 6925 bindings.FuncHTMLElementFocus( 6926 this.ref, js.Pointer(&fn), 6927 ) 6928 return 6929 } 6930 6931 // Focus calls the method "HTMLElement.focus". 6932 func (this HTMLElement) Focus(options FocusOptions) (ret js.Void) { 6933 bindings.CallHTMLElementFocus( 6934 this.ref, js.Pointer(&ret), 6935 js.Pointer(&options), 6936 ) 6937 6938 return 6939 } 6940 6941 // TryFocus calls the method "HTMLElement.focus" 6942 // in a try/catch block and returns (_, err, ok = false) when it went through 6943 // the catch clause. 6944 func (this HTMLElement) TryFocus(options FocusOptions) (ret js.Void, exception js.Any, ok bool) { 6945 ok = js.True == bindings.TryHTMLElementFocus( 6946 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6947 js.Pointer(&options), 6948 ) 6949 6950 return 6951 } 6952 6953 // HasFuncFocus1 returns true if the method "HTMLElement.focus" exists. 6954 func (this HTMLElement) HasFuncFocus1() bool { 6955 return js.True == bindings.HasFuncHTMLElementFocus1( 6956 this.ref, 6957 ) 6958 } 6959 6960 // FuncFocus1 returns the method "HTMLElement.focus". 6961 func (this HTMLElement) FuncFocus1() (fn js.Func[func()]) { 6962 bindings.FuncHTMLElementFocus1( 6963 this.ref, js.Pointer(&fn), 6964 ) 6965 return 6966 } 6967 6968 // Focus1 calls the method "HTMLElement.focus". 6969 func (this HTMLElement) Focus1() (ret js.Void) { 6970 bindings.CallHTMLElementFocus1( 6971 this.ref, js.Pointer(&ret), 6972 ) 6973 6974 return 6975 } 6976 6977 // TryFocus1 calls the method "HTMLElement.focus" 6978 // in a try/catch block and returns (_, err, ok = false) when it went through 6979 // the catch clause. 6980 func (this HTMLElement) TryFocus1() (ret js.Void, exception js.Any, ok bool) { 6981 ok = js.True == bindings.TryHTMLElementFocus1( 6982 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6983 ) 6984 6985 return 6986 } 6987 6988 // HasFuncBlur returns true if the method "HTMLElement.blur" exists. 6989 func (this HTMLElement) HasFuncBlur() bool { 6990 return js.True == bindings.HasFuncHTMLElementBlur( 6991 this.ref, 6992 ) 6993 } 6994 6995 // FuncBlur returns the method "HTMLElement.blur". 6996 func (this HTMLElement) FuncBlur() (fn js.Func[func()]) { 6997 bindings.FuncHTMLElementBlur( 6998 this.ref, js.Pointer(&fn), 6999 ) 7000 return 7001 } 7002 7003 // Blur calls the method "HTMLElement.blur". 7004 func (this HTMLElement) Blur() (ret js.Void) { 7005 bindings.CallHTMLElementBlur( 7006 this.ref, js.Pointer(&ret), 7007 ) 7008 7009 return 7010 } 7011 7012 // TryBlur calls the method "HTMLElement.blur" 7013 // in a try/catch block and returns (_, err, ok = false) when it went through 7014 // the catch clause. 7015 func (this HTMLElement) TryBlur() (ret js.Void, exception js.Any, ok bool) { 7016 ok = js.True == bindings.TryHTMLElementBlur( 7017 this.ref, js.Pointer(&ret), js.Pointer(&exception), 7018 ) 7019 7020 return 7021 } 7022 7023 type HTMLHeadElement struct { 7024 HTMLElement 7025 } 7026 7027 func (this HTMLHeadElement) Once() HTMLHeadElement { 7028 this.ref.Once() 7029 return this 7030 } 7031 7032 func (this HTMLHeadElement) Ref() js.Ref { 7033 return this.HTMLElement.Ref() 7034 } 7035 7036 func (this HTMLHeadElement) FromRef(ref js.Ref) HTMLHeadElement { 7037 this.HTMLElement = this.HTMLElement.FromRef(ref) 7038 return this 7039 } 7040 7041 func (this HTMLHeadElement) Free() { 7042 this.ref.Free() 7043 } 7044 7045 type HTMLScriptElement struct { 7046 HTMLElement 7047 } 7048 7049 func (this HTMLScriptElement) Once() HTMLScriptElement { 7050 this.ref.Once() 7051 return this 7052 } 7053 7054 func (this HTMLScriptElement) Ref() js.Ref { 7055 return this.HTMLElement.Ref() 7056 } 7057 7058 func (this HTMLScriptElement) FromRef(ref js.Ref) HTMLScriptElement { 7059 this.HTMLElement = this.HTMLElement.FromRef(ref) 7060 return this 7061 } 7062 7063 func (this HTMLScriptElement) Free() { 7064 this.ref.Free() 7065 } 7066 7067 // Src returns the value of property "HTMLScriptElement.src". 7068 // 7069 // It returns ok=false if there is no such property. 7070 func (this HTMLScriptElement) Src() (ret js.String, ok bool) { 7071 ok = js.True == bindings.GetHTMLScriptElementSrc( 7072 this.ref, js.Pointer(&ret), 7073 ) 7074 return 7075 } 7076 7077 // SetSrc sets the value of property "HTMLScriptElement.src" to val. 7078 // 7079 // It returns false if the property cannot be set. 7080 func (this HTMLScriptElement) SetSrc(val js.String) bool { 7081 return js.True == bindings.SetHTMLScriptElementSrc( 7082 this.ref, 7083 val.Ref(), 7084 ) 7085 } 7086 7087 // Type returns the value of property "HTMLScriptElement.type". 7088 // 7089 // It returns ok=false if there is no such property. 7090 func (this HTMLScriptElement) Type() (ret js.String, ok bool) { 7091 ok = js.True == bindings.GetHTMLScriptElementType( 7092 this.ref, js.Pointer(&ret), 7093 ) 7094 return 7095 } 7096 7097 // SetType sets the value of property "HTMLScriptElement.type" to val. 7098 // 7099 // It returns false if the property cannot be set. 7100 func (this HTMLScriptElement) SetType(val js.String) bool { 7101 return js.True == bindings.SetHTMLScriptElementType( 7102 this.ref, 7103 val.Ref(), 7104 ) 7105 } 7106 7107 // NoModule returns the value of property "HTMLScriptElement.noModule". 7108 // 7109 // It returns ok=false if there is no such property. 7110 func (this HTMLScriptElement) NoModule() (ret bool, ok bool) { 7111 ok = js.True == bindings.GetHTMLScriptElementNoModule( 7112 this.ref, js.Pointer(&ret), 7113 ) 7114 return 7115 } 7116 7117 // SetNoModule sets the value of property "HTMLScriptElement.noModule" to val. 7118 // 7119 // It returns false if the property cannot be set. 7120 func (this HTMLScriptElement) SetNoModule(val bool) bool { 7121 return js.True == bindings.SetHTMLScriptElementNoModule( 7122 this.ref, 7123 js.Bool(bool(val)), 7124 ) 7125 } 7126 7127 // Async returns the value of property "HTMLScriptElement.async". 7128 // 7129 // It returns ok=false if there is no such property. 7130 func (this HTMLScriptElement) Async() (ret bool, ok bool) { 7131 ok = js.True == bindings.GetHTMLScriptElementAsync( 7132 this.ref, js.Pointer(&ret), 7133 ) 7134 return 7135 } 7136 7137 // SetAsync sets the value of property "HTMLScriptElement.async" to val. 7138 // 7139 // It returns false if the property cannot be set. 7140 func (this HTMLScriptElement) SetAsync(val bool) bool { 7141 return js.True == bindings.SetHTMLScriptElementAsync( 7142 this.ref, 7143 js.Bool(bool(val)), 7144 ) 7145 } 7146 7147 // Defer returns the value of property "HTMLScriptElement.defer". 7148 // 7149 // It returns ok=false if there is no such property. 7150 func (this HTMLScriptElement) Defer() (ret bool, ok bool) { 7151 ok = js.True == bindings.GetHTMLScriptElementDefer( 7152 this.ref, js.Pointer(&ret), 7153 ) 7154 return 7155 } 7156 7157 // SetDefer sets the value of property "HTMLScriptElement.defer" to val. 7158 // 7159 // It returns false if the property cannot be set. 7160 func (this HTMLScriptElement) SetDefer(val bool) bool { 7161 return js.True == bindings.SetHTMLScriptElementDefer( 7162 this.ref, 7163 js.Bool(bool(val)), 7164 ) 7165 } 7166 7167 // CrossOrigin returns the value of property "HTMLScriptElement.crossOrigin". 7168 // 7169 // It returns ok=false if there is no such property. 7170 func (this HTMLScriptElement) CrossOrigin() (ret js.String, ok bool) { 7171 ok = js.True == bindings.GetHTMLScriptElementCrossOrigin( 7172 this.ref, js.Pointer(&ret), 7173 ) 7174 return 7175 } 7176 7177 // SetCrossOrigin sets the value of property "HTMLScriptElement.crossOrigin" to val. 7178 // 7179 // It returns false if the property cannot be set. 7180 func (this HTMLScriptElement) SetCrossOrigin(val js.String) bool { 7181 return js.True == bindings.SetHTMLScriptElementCrossOrigin( 7182 this.ref, 7183 val.Ref(), 7184 ) 7185 } 7186 7187 // Text returns the value of property "HTMLScriptElement.text". 7188 // 7189 // It returns ok=false if there is no such property. 7190 func (this HTMLScriptElement) Text() (ret js.String, ok bool) { 7191 ok = js.True == bindings.GetHTMLScriptElementText( 7192 this.ref, js.Pointer(&ret), 7193 ) 7194 return 7195 } 7196 7197 // SetText sets the value of property "HTMLScriptElement.text" to val. 7198 // 7199 // It returns false if the property cannot be set. 7200 func (this HTMLScriptElement) SetText(val js.String) bool { 7201 return js.True == bindings.SetHTMLScriptElementText( 7202 this.ref, 7203 val.Ref(), 7204 ) 7205 } 7206 7207 // Integrity returns the value of property "HTMLScriptElement.integrity". 7208 // 7209 // It returns ok=false if there is no such property. 7210 func (this HTMLScriptElement) Integrity() (ret js.String, ok bool) { 7211 ok = js.True == bindings.GetHTMLScriptElementIntegrity( 7212 this.ref, js.Pointer(&ret), 7213 ) 7214 return 7215 } 7216 7217 // SetIntegrity sets the value of property "HTMLScriptElement.integrity" to val. 7218 // 7219 // It returns false if the property cannot be set. 7220 func (this HTMLScriptElement) SetIntegrity(val js.String) bool { 7221 return js.True == bindings.SetHTMLScriptElementIntegrity( 7222 this.ref, 7223 val.Ref(), 7224 ) 7225 } 7226 7227 // ReferrerPolicy returns the value of property "HTMLScriptElement.referrerPolicy". 7228 // 7229 // It returns ok=false if there is no such property. 7230 func (this HTMLScriptElement) ReferrerPolicy() (ret js.String, ok bool) { 7231 ok = js.True == bindings.GetHTMLScriptElementReferrerPolicy( 7232 this.ref, js.Pointer(&ret), 7233 ) 7234 return 7235 } 7236 7237 // SetReferrerPolicy sets the value of property "HTMLScriptElement.referrerPolicy" to val. 7238 // 7239 // It returns false if the property cannot be set. 7240 func (this HTMLScriptElement) SetReferrerPolicy(val js.String) bool { 7241 return js.True == bindings.SetHTMLScriptElementReferrerPolicy( 7242 this.ref, 7243 val.Ref(), 7244 ) 7245 } 7246 7247 // Blocking returns the value of property "HTMLScriptElement.blocking". 7248 // 7249 // It returns ok=false if there is no such property. 7250 func (this HTMLScriptElement) Blocking() (ret DOMTokenList, ok bool) { 7251 ok = js.True == bindings.GetHTMLScriptElementBlocking( 7252 this.ref, js.Pointer(&ret), 7253 ) 7254 return 7255 } 7256 7257 // FetchPriority returns the value of property "HTMLScriptElement.fetchPriority". 7258 // 7259 // It returns ok=false if there is no such property. 7260 func (this HTMLScriptElement) FetchPriority() (ret js.String, ok bool) { 7261 ok = js.True == bindings.GetHTMLScriptElementFetchPriority( 7262 this.ref, js.Pointer(&ret), 7263 ) 7264 return 7265 } 7266 7267 // SetFetchPriority sets the value of property "HTMLScriptElement.fetchPriority" to val. 7268 // 7269 // It returns false if the property cannot be set. 7270 func (this HTMLScriptElement) SetFetchPriority(val js.String) bool { 7271 return js.True == bindings.SetHTMLScriptElementFetchPriority( 7272 this.ref, 7273 val.Ref(), 7274 ) 7275 } 7276 7277 // Charset returns the value of property "HTMLScriptElement.charset". 7278 // 7279 // It returns ok=false if there is no such property. 7280 func (this HTMLScriptElement) Charset() (ret js.String, ok bool) { 7281 ok = js.True == bindings.GetHTMLScriptElementCharset( 7282 this.ref, js.Pointer(&ret), 7283 ) 7284 return 7285 } 7286 7287 // SetCharset sets the value of property "HTMLScriptElement.charset" to val. 7288 // 7289 // It returns false if the property cannot be set. 7290 func (this HTMLScriptElement) SetCharset(val js.String) bool { 7291 return js.True == bindings.SetHTMLScriptElementCharset( 7292 this.ref, 7293 val.Ref(), 7294 ) 7295 } 7296 7297 // Event returns the value of property "HTMLScriptElement.event". 7298 // 7299 // It returns ok=false if there is no such property. 7300 func (this HTMLScriptElement) Event() (ret js.String, ok bool) { 7301 ok = js.True == bindings.GetHTMLScriptElementEvent( 7302 this.ref, js.Pointer(&ret), 7303 ) 7304 return 7305 } 7306 7307 // SetEvent sets the value of property "HTMLScriptElement.event" to val. 7308 // 7309 // It returns false if the property cannot be set. 7310 func (this HTMLScriptElement) SetEvent(val js.String) bool { 7311 return js.True == bindings.SetHTMLScriptElementEvent( 7312 this.ref, 7313 val.Ref(), 7314 ) 7315 } 7316 7317 // HtmlFor returns the value of property "HTMLScriptElement.htmlFor". 7318 // 7319 // It returns ok=false if there is no such property. 7320 func (this HTMLScriptElement) HtmlFor() (ret js.String, ok bool) { 7321 ok = js.True == bindings.GetHTMLScriptElementHtmlFor( 7322 this.ref, js.Pointer(&ret), 7323 ) 7324 return 7325 } 7326 7327 // SetHtmlFor sets the value of property "HTMLScriptElement.htmlFor" to val. 7328 // 7329 // It returns false if the property cannot be set. 7330 func (this HTMLScriptElement) SetHtmlFor(val js.String) bool { 7331 return js.True == bindings.SetHTMLScriptElementHtmlFor( 7332 this.ref, 7333 val.Ref(), 7334 ) 7335 } 7336 7337 // AttributionSrc returns the value of property "HTMLScriptElement.attributionSrc". 7338 // 7339 // It returns ok=false if there is no such property. 7340 func (this HTMLScriptElement) AttributionSrc() (ret js.String, ok bool) { 7341 ok = js.True == bindings.GetHTMLScriptElementAttributionSrc( 7342 this.ref, js.Pointer(&ret), 7343 ) 7344 return 7345 } 7346 7347 // SetAttributionSrc sets the value of property "HTMLScriptElement.attributionSrc" to val. 7348 // 7349 // It returns false if the property cannot be set. 7350 func (this HTMLScriptElement) SetAttributionSrc(val js.String) bool { 7351 return js.True == bindings.SetHTMLScriptElementAttributionSrc( 7352 this.ref, 7353 val.Ref(), 7354 ) 7355 } 7356 7357 // HasFuncSupports returns true if the static method "HTMLScriptElement.supports" exists. 7358 func (this HTMLScriptElement) HasFuncSupports() bool { 7359 return js.True == bindings.HasFuncHTMLScriptElementSupports( 7360 this.ref, 7361 ) 7362 } 7363 7364 // FuncSupports returns the static method "HTMLScriptElement.supports". 7365 func (this HTMLScriptElement) FuncSupports() (fn js.Func[func(typ js.String) bool]) { 7366 bindings.FuncHTMLScriptElementSupports( 7367 this.ref, js.Pointer(&fn), 7368 ) 7369 return 7370 } 7371 7372 // Supports calls the static method "HTMLScriptElement.supports". 7373 func (this HTMLScriptElement) Supports(typ js.String) (ret bool) { 7374 bindings.CallHTMLScriptElementSupports( 7375 this.ref, js.Pointer(&ret), 7376 typ.Ref(), 7377 ) 7378 7379 return 7380 } 7381 7382 // TrySupports calls the static method "HTMLScriptElement.supports" 7383 // in a try/catch block and returns (_, err, ok = false) when it went through 7384 // the catch clause. 7385 func (this HTMLScriptElement) TrySupports(typ js.String) (ret bool, exception js.Any, ok bool) { 7386 ok = js.True == bindings.TryHTMLScriptElementSupports( 7387 this.ref, js.Pointer(&ret), js.Pointer(&exception), 7388 typ.Ref(), 7389 ) 7390 7391 return 7392 } 7393 7394 type SVGScriptElement struct { 7395 SVGElement 7396 } 7397 7398 func (this SVGScriptElement) Once() SVGScriptElement { 7399 this.ref.Once() 7400 return this 7401 } 7402 7403 func (this SVGScriptElement) Ref() js.Ref { 7404 return this.SVGElement.Ref() 7405 } 7406 7407 func (this SVGScriptElement) FromRef(ref js.Ref) SVGScriptElement { 7408 this.SVGElement = this.SVGElement.FromRef(ref) 7409 return this 7410 } 7411 7412 func (this SVGScriptElement) Free() { 7413 this.ref.Free() 7414 } 7415 7416 // Type returns the value of property "SVGScriptElement.type". 7417 // 7418 // It returns ok=false if there is no such property. 7419 func (this SVGScriptElement) Type() (ret js.String, ok bool) { 7420 ok = js.True == bindings.GetSVGScriptElementType( 7421 this.ref, js.Pointer(&ret), 7422 ) 7423 return 7424 } 7425 7426 // SetType sets the value of property "SVGScriptElement.type" to val. 7427 // 7428 // It returns false if the property cannot be set. 7429 func (this SVGScriptElement) SetType(val js.String) bool { 7430 return js.True == bindings.SetSVGScriptElementType( 7431 this.ref, 7432 val.Ref(), 7433 ) 7434 } 7435 7436 // CrossOrigin returns the value of property "SVGScriptElement.crossOrigin". 7437 // 7438 // It returns ok=false if there is no such property. 7439 func (this SVGScriptElement) CrossOrigin() (ret js.String, ok bool) { 7440 ok = js.True == bindings.GetSVGScriptElementCrossOrigin( 7441 this.ref, js.Pointer(&ret), 7442 ) 7443 return 7444 } 7445 7446 // SetCrossOrigin sets the value of property "SVGScriptElement.crossOrigin" to val. 7447 // 7448 // It returns false if the property cannot be set. 7449 func (this SVGScriptElement) SetCrossOrigin(val js.String) bool { 7450 return js.True == bindings.SetSVGScriptElementCrossOrigin( 7451 this.ref, 7452 val.Ref(), 7453 ) 7454 } 7455 7456 // Href returns the value of property "SVGScriptElement.href". 7457 // 7458 // It returns ok=false if there is no such property. 7459 func (this SVGScriptElement) Href() (ret SVGAnimatedString, ok bool) { 7460 ok = js.True == bindings.GetSVGScriptElementHref( 7461 this.ref, js.Pointer(&ret), 7462 ) 7463 return 7464 } 7465 7466 type OneOf_HTMLScriptElement_SVGScriptElement struct { 7467 ref js.Ref 7468 } 7469 7470 func (x OneOf_HTMLScriptElement_SVGScriptElement) Ref() js.Ref { 7471 return x.ref 7472 } 7473 7474 func (x OneOf_HTMLScriptElement_SVGScriptElement) Free() { 7475 x.ref.Free() 7476 } 7477 7478 func (x OneOf_HTMLScriptElement_SVGScriptElement) FromRef(ref js.Ref) OneOf_HTMLScriptElement_SVGScriptElement { 7479 return OneOf_HTMLScriptElement_SVGScriptElement{ 7480 ref: ref, 7481 } 7482 } 7483 7484 func (x OneOf_HTMLScriptElement_SVGScriptElement) HTMLScriptElement() HTMLScriptElement { 7485 return HTMLScriptElement{}.FromRef(x.ref) 7486 } 7487 7488 func (x OneOf_HTMLScriptElement_SVGScriptElement) SVGScriptElement() SVGScriptElement { 7489 return SVGScriptElement{}.FromRef(x.ref) 7490 } 7491 7492 type HTMLOrSVGScriptElement = OneOf_HTMLScriptElement_SVGScriptElement