github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis21_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package web 5 6 import ( 7 "github.com/primecitizens/pcz/std/ffi/js" 8 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 9 ) 10 11 func NewCSSPerspective(length CSSPerspectiveValue) (ret CSSPerspective) { 12 ret.ref = bindings.NewCSSPerspectiveByCSSPerspective( 13 length.Ref()) 14 return 15 } 16 17 type CSSPerspective struct { 18 CSSTransformComponent 19 } 20 21 func (this CSSPerspective) Once() CSSPerspective { 22 this.ref.Once() 23 return this 24 } 25 26 func (this CSSPerspective) Ref() js.Ref { 27 return this.CSSTransformComponent.Ref() 28 } 29 30 func (this CSSPerspective) FromRef(ref js.Ref) CSSPerspective { 31 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 32 return this 33 } 34 35 func (this CSSPerspective) Free() { 36 this.ref.Free() 37 } 38 39 // Length returns the value of property "CSSPerspective.length". 40 // 41 // It returns ok=false if there is no such property. 42 func (this CSSPerspective) Length() (ret CSSPerspectiveValue, ok bool) { 43 ok = js.True == bindings.GetCSSPerspectiveLength( 44 this.ref, js.Pointer(&ret), 45 ) 46 return 47 } 48 49 // SetLength sets the value of property "CSSPerspective.length" to val. 50 // 51 // It returns false if the property cannot be set. 52 func (this CSSPerspective) SetLength(val CSSPerspectiveValue) bool { 53 return js.True == bindings.SetCSSPerspectiveLength( 54 this.ref, 55 val.Ref(), 56 ) 57 } 58 59 type CSSPositionFallbackRule struct { 60 CSSGroupingRule 61 } 62 63 func (this CSSPositionFallbackRule) Once() CSSPositionFallbackRule { 64 this.ref.Once() 65 return this 66 } 67 68 func (this CSSPositionFallbackRule) Ref() js.Ref { 69 return this.CSSGroupingRule.Ref() 70 } 71 72 func (this CSSPositionFallbackRule) FromRef(ref js.Ref) CSSPositionFallbackRule { 73 this.CSSGroupingRule = this.CSSGroupingRule.FromRef(ref) 74 return this 75 } 76 77 func (this CSSPositionFallbackRule) Free() { 78 this.ref.Free() 79 } 80 81 // Name returns the value of property "CSSPositionFallbackRule.name". 82 // 83 // It returns ok=false if there is no such property. 84 func (this CSSPositionFallbackRule) Name() (ret js.String, ok bool) { 85 ok = js.True == bindings.GetCSSPositionFallbackRuleName( 86 this.ref, js.Pointer(&ret), 87 ) 88 return 89 } 90 91 type CSSPropertyRule struct { 92 CSSRule 93 } 94 95 func (this CSSPropertyRule) Once() CSSPropertyRule { 96 this.ref.Once() 97 return this 98 } 99 100 func (this CSSPropertyRule) Ref() js.Ref { 101 return this.CSSRule.Ref() 102 } 103 104 func (this CSSPropertyRule) FromRef(ref js.Ref) CSSPropertyRule { 105 this.CSSRule = this.CSSRule.FromRef(ref) 106 return this 107 } 108 109 func (this CSSPropertyRule) Free() { 110 this.ref.Free() 111 } 112 113 // Name returns the value of property "CSSPropertyRule.name". 114 // 115 // It returns ok=false if there is no such property. 116 func (this CSSPropertyRule) Name() (ret js.String, ok bool) { 117 ok = js.True == bindings.GetCSSPropertyRuleName( 118 this.ref, js.Pointer(&ret), 119 ) 120 return 121 } 122 123 // Syntax returns the value of property "CSSPropertyRule.syntax". 124 // 125 // It returns ok=false if there is no such property. 126 func (this CSSPropertyRule) Syntax() (ret js.String, ok bool) { 127 ok = js.True == bindings.GetCSSPropertyRuleSyntax( 128 this.ref, js.Pointer(&ret), 129 ) 130 return 131 } 132 133 // Inherits returns the value of property "CSSPropertyRule.inherits". 134 // 135 // It returns ok=false if there is no such property. 136 func (this CSSPropertyRule) Inherits() (ret bool, ok bool) { 137 ok = js.True == bindings.GetCSSPropertyRuleInherits( 138 this.ref, js.Pointer(&ret), 139 ) 140 return 141 } 142 143 // InitialValue returns the value of property "CSSPropertyRule.initialValue". 144 // 145 // It returns ok=false if there is no such property. 146 func (this CSSPropertyRule) InitialValue() (ret js.String, ok bool) { 147 ok = js.True == bindings.GetCSSPropertyRuleInitialValue( 148 this.ref, js.Pointer(&ret), 149 ) 150 return 151 } 152 153 func NewCSSRGB(r CSSColorRGBComp, g CSSColorRGBComp, b CSSColorRGBComp, alpha CSSColorPercent) (ret CSSRGB) { 154 ret.ref = bindings.NewCSSRGBByCSSRGB( 155 r.Ref(), 156 g.Ref(), 157 b.Ref(), 158 alpha.Ref()) 159 return 160 } 161 162 func NewCSSRGBByCSSRGB1(r CSSColorRGBComp, g CSSColorRGBComp, b CSSColorRGBComp) (ret CSSRGB) { 163 ret.ref = bindings.NewCSSRGBByCSSRGB1( 164 r.Ref(), 165 g.Ref(), 166 b.Ref()) 167 return 168 } 169 170 type CSSRGB struct { 171 CSSColorValue 172 } 173 174 func (this CSSRGB) Once() CSSRGB { 175 this.ref.Once() 176 return this 177 } 178 179 func (this CSSRGB) Ref() js.Ref { 180 return this.CSSColorValue.Ref() 181 } 182 183 func (this CSSRGB) FromRef(ref js.Ref) CSSRGB { 184 this.CSSColorValue = this.CSSColorValue.FromRef(ref) 185 return this 186 } 187 188 func (this CSSRGB) Free() { 189 this.ref.Free() 190 } 191 192 // R returns the value of property "CSSRGB.r". 193 // 194 // It returns ok=false if there is no such property. 195 func (this CSSRGB) R() (ret CSSColorRGBComp, ok bool) { 196 ok = js.True == bindings.GetCSSRGBR( 197 this.ref, js.Pointer(&ret), 198 ) 199 return 200 } 201 202 // SetR sets the value of property "CSSRGB.r" to val. 203 // 204 // It returns false if the property cannot be set. 205 func (this CSSRGB) SetR(val CSSColorRGBComp) bool { 206 return js.True == bindings.SetCSSRGBR( 207 this.ref, 208 val.Ref(), 209 ) 210 } 211 212 // G returns the value of property "CSSRGB.g". 213 // 214 // It returns ok=false if there is no such property. 215 func (this CSSRGB) G() (ret CSSColorRGBComp, ok bool) { 216 ok = js.True == bindings.GetCSSRGBG( 217 this.ref, js.Pointer(&ret), 218 ) 219 return 220 } 221 222 // SetG sets the value of property "CSSRGB.g" to val. 223 // 224 // It returns false if the property cannot be set. 225 func (this CSSRGB) SetG(val CSSColorRGBComp) bool { 226 return js.True == bindings.SetCSSRGBG( 227 this.ref, 228 val.Ref(), 229 ) 230 } 231 232 // B returns the value of property "CSSRGB.b". 233 // 234 // It returns ok=false if there is no such property. 235 func (this CSSRGB) B() (ret CSSColorRGBComp, ok bool) { 236 ok = js.True == bindings.GetCSSRGBB( 237 this.ref, js.Pointer(&ret), 238 ) 239 return 240 } 241 242 // SetB sets the value of property "CSSRGB.b" to val. 243 // 244 // It returns false if the property cannot be set. 245 func (this CSSRGB) SetB(val CSSColorRGBComp) bool { 246 return js.True == bindings.SetCSSRGBB( 247 this.ref, 248 val.Ref(), 249 ) 250 } 251 252 // Alpha returns the value of property "CSSRGB.alpha". 253 // 254 // It returns ok=false if there is no such property. 255 func (this CSSRGB) Alpha() (ret CSSColorPercent, ok bool) { 256 ok = js.True == bindings.GetCSSRGBAlpha( 257 this.ref, js.Pointer(&ret), 258 ) 259 return 260 } 261 262 // SetAlpha sets the value of property "CSSRGB.alpha" to val. 263 // 264 // It returns false if the property cannot be set. 265 func (this CSSRGB) SetAlpha(val CSSColorPercent) bool { 266 return js.True == bindings.SetCSSRGBAlpha( 267 this.ref, 268 val.Ref(), 269 ) 270 } 271 272 func NewCSSRotate(angle CSSNumericValue) (ret CSSRotate) { 273 ret.ref = bindings.NewCSSRotateByCSSRotate( 274 angle.Ref()) 275 return 276 } 277 278 func NewCSSRotateByCSSRotate1(x CSSNumberish, y CSSNumberish, z CSSNumberish, angle CSSNumericValue) (ret CSSRotate) { 279 ret.ref = bindings.NewCSSRotateByCSSRotate1( 280 x.Ref(), 281 y.Ref(), 282 z.Ref(), 283 angle.Ref()) 284 return 285 } 286 287 type CSSRotate struct { 288 CSSTransformComponent 289 } 290 291 func (this CSSRotate) Once() CSSRotate { 292 this.ref.Once() 293 return this 294 } 295 296 func (this CSSRotate) Ref() js.Ref { 297 return this.CSSTransformComponent.Ref() 298 } 299 300 func (this CSSRotate) FromRef(ref js.Ref) CSSRotate { 301 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 302 return this 303 } 304 305 func (this CSSRotate) Free() { 306 this.ref.Free() 307 } 308 309 // X returns the value of property "CSSRotate.x". 310 // 311 // It returns ok=false if there is no such property. 312 func (this CSSRotate) X() (ret CSSNumberish, ok bool) { 313 ok = js.True == bindings.GetCSSRotateX( 314 this.ref, js.Pointer(&ret), 315 ) 316 return 317 } 318 319 // SetX sets the value of property "CSSRotate.x" to val. 320 // 321 // It returns false if the property cannot be set. 322 func (this CSSRotate) SetX(val CSSNumberish) bool { 323 return js.True == bindings.SetCSSRotateX( 324 this.ref, 325 val.Ref(), 326 ) 327 } 328 329 // Y returns the value of property "CSSRotate.y". 330 // 331 // It returns ok=false if there is no such property. 332 func (this CSSRotate) Y() (ret CSSNumberish, ok bool) { 333 ok = js.True == bindings.GetCSSRotateY( 334 this.ref, js.Pointer(&ret), 335 ) 336 return 337 } 338 339 // SetY sets the value of property "CSSRotate.y" to val. 340 // 341 // It returns false if the property cannot be set. 342 func (this CSSRotate) SetY(val CSSNumberish) bool { 343 return js.True == bindings.SetCSSRotateY( 344 this.ref, 345 val.Ref(), 346 ) 347 } 348 349 // Z returns the value of property "CSSRotate.z". 350 // 351 // It returns ok=false if there is no such property. 352 func (this CSSRotate) Z() (ret CSSNumberish, ok bool) { 353 ok = js.True == bindings.GetCSSRotateZ( 354 this.ref, js.Pointer(&ret), 355 ) 356 return 357 } 358 359 // SetZ sets the value of property "CSSRotate.z" to val. 360 // 361 // It returns false if the property cannot be set. 362 func (this CSSRotate) SetZ(val CSSNumberish) bool { 363 return js.True == bindings.SetCSSRotateZ( 364 this.ref, 365 val.Ref(), 366 ) 367 } 368 369 // Angle returns the value of property "CSSRotate.angle". 370 // 371 // It returns ok=false if there is no such property. 372 func (this CSSRotate) Angle() (ret CSSNumericValue, ok bool) { 373 ok = js.True == bindings.GetCSSRotateAngle( 374 this.ref, js.Pointer(&ret), 375 ) 376 return 377 } 378 379 // SetAngle sets the value of property "CSSRotate.angle" to val. 380 // 381 // It returns false if the property cannot be set. 382 func (this CSSRotate) SetAngle(val CSSNumericValue) bool { 383 return js.True == bindings.SetCSSRotateAngle( 384 this.ref, 385 val.Ref(), 386 ) 387 } 388 389 func NewCSSScale(x CSSNumberish, y CSSNumberish, z CSSNumberish) (ret CSSScale) { 390 ret.ref = bindings.NewCSSScaleByCSSScale( 391 x.Ref(), 392 y.Ref(), 393 z.Ref()) 394 return 395 } 396 397 func NewCSSScaleByCSSScale1(x CSSNumberish, y CSSNumberish) (ret CSSScale) { 398 ret.ref = bindings.NewCSSScaleByCSSScale1( 399 x.Ref(), 400 y.Ref()) 401 return 402 } 403 404 type CSSScale struct { 405 CSSTransformComponent 406 } 407 408 func (this CSSScale) Once() CSSScale { 409 this.ref.Once() 410 return this 411 } 412 413 func (this CSSScale) Ref() js.Ref { 414 return this.CSSTransformComponent.Ref() 415 } 416 417 func (this CSSScale) FromRef(ref js.Ref) CSSScale { 418 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 419 return this 420 } 421 422 func (this CSSScale) Free() { 423 this.ref.Free() 424 } 425 426 // X returns the value of property "CSSScale.x". 427 // 428 // It returns ok=false if there is no such property. 429 func (this CSSScale) X() (ret CSSNumberish, ok bool) { 430 ok = js.True == bindings.GetCSSScaleX( 431 this.ref, js.Pointer(&ret), 432 ) 433 return 434 } 435 436 // SetX sets the value of property "CSSScale.x" to val. 437 // 438 // It returns false if the property cannot be set. 439 func (this CSSScale) SetX(val CSSNumberish) bool { 440 return js.True == bindings.SetCSSScaleX( 441 this.ref, 442 val.Ref(), 443 ) 444 } 445 446 // Y returns the value of property "CSSScale.y". 447 // 448 // It returns ok=false if there is no such property. 449 func (this CSSScale) Y() (ret CSSNumberish, ok bool) { 450 ok = js.True == bindings.GetCSSScaleY( 451 this.ref, js.Pointer(&ret), 452 ) 453 return 454 } 455 456 // SetY sets the value of property "CSSScale.y" to val. 457 // 458 // It returns false if the property cannot be set. 459 func (this CSSScale) SetY(val CSSNumberish) bool { 460 return js.True == bindings.SetCSSScaleY( 461 this.ref, 462 val.Ref(), 463 ) 464 } 465 466 // Z returns the value of property "CSSScale.z". 467 // 468 // It returns ok=false if there is no such property. 469 func (this CSSScale) Z() (ret CSSNumberish, ok bool) { 470 ok = js.True == bindings.GetCSSScaleZ( 471 this.ref, js.Pointer(&ret), 472 ) 473 return 474 } 475 476 // SetZ sets the value of property "CSSScale.z" to val. 477 // 478 // It returns false if the property cannot be set. 479 func (this CSSScale) SetZ(val CSSNumberish) bool { 480 return js.True == bindings.SetCSSScaleZ( 481 this.ref, 482 val.Ref(), 483 ) 484 } 485 486 type CSSScopeRule struct { 487 CSSGroupingRule 488 } 489 490 func (this CSSScopeRule) Once() CSSScopeRule { 491 this.ref.Once() 492 return this 493 } 494 495 func (this CSSScopeRule) Ref() js.Ref { 496 return this.CSSGroupingRule.Ref() 497 } 498 499 func (this CSSScopeRule) FromRef(ref js.Ref) CSSScopeRule { 500 this.CSSGroupingRule = this.CSSGroupingRule.FromRef(ref) 501 return this 502 } 503 504 func (this CSSScopeRule) Free() { 505 this.ref.Free() 506 } 507 508 // Start returns the value of property "CSSScopeRule.start". 509 // 510 // It returns ok=false if there is no such property. 511 func (this CSSScopeRule) Start() (ret js.String, ok bool) { 512 ok = js.True == bindings.GetCSSScopeRuleStart( 513 this.ref, js.Pointer(&ret), 514 ) 515 return 516 } 517 518 // End returns the value of property "CSSScopeRule.end". 519 // 520 // It returns ok=false if there is no such property. 521 func (this CSSScopeRule) End() (ret js.String, ok bool) { 522 ok = js.True == bindings.GetCSSScopeRuleEnd( 523 this.ref, js.Pointer(&ret), 524 ) 525 return 526 } 527 528 func NewCSSSkew(ax CSSNumericValue, ay CSSNumericValue) (ret CSSSkew) { 529 ret.ref = bindings.NewCSSSkewByCSSSkew( 530 ax.Ref(), 531 ay.Ref()) 532 return 533 } 534 535 type CSSSkew struct { 536 CSSTransformComponent 537 } 538 539 func (this CSSSkew) Once() CSSSkew { 540 this.ref.Once() 541 return this 542 } 543 544 func (this CSSSkew) Ref() js.Ref { 545 return this.CSSTransformComponent.Ref() 546 } 547 548 func (this CSSSkew) FromRef(ref js.Ref) CSSSkew { 549 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 550 return this 551 } 552 553 func (this CSSSkew) Free() { 554 this.ref.Free() 555 } 556 557 // Ax returns the value of property "CSSSkew.ax". 558 // 559 // It returns ok=false if there is no such property. 560 func (this CSSSkew) Ax() (ret CSSNumericValue, ok bool) { 561 ok = js.True == bindings.GetCSSSkewAx( 562 this.ref, js.Pointer(&ret), 563 ) 564 return 565 } 566 567 // SetAx sets the value of property "CSSSkew.ax" to val. 568 // 569 // It returns false if the property cannot be set. 570 func (this CSSSkew) SetAx(val CSSNumericValue) bool { 571 return js.True == bindings.SetCSSSkewAx( 572 this.ref, 573 val.Ref(), 574 ) 575 } 576 577 // Ay returns the value of property "CSSSkew.ay". 578 // 579 // It returns ok=false if there is no such property. 580 func (this CSSSkew) Ay() (ret CSSNumericValue, ok bool) { 581 ok = js.True == bindings.GetCSSSkewAy( 582 this.ref, js.Pointer(&ret), 583 ) 584 return 585 } 586 587 // SetAy sets the value of property "CSSSkew.ay" to val. 588 // 589 // It returns false if the property cannot be set. 590 func (this CSSSkew) SetAy(val CSSNumericValue) bool { 591 return js.True == bindings.SetCSSSkewAy( 592 this.ref, 593 val.Ref(), 594 ) 595 } 596 597 func NewCSSSkewX(ax CSSNumericValue) (ret CSSSkewX) { 598 ret.ref = bindings.NewCSSSkewXByCSSSkewX( 599 ax.Ref()) 600 return 601 } 602 603 type CSSSkewX struct { 604 CSSTransformComponent 605 } 606 607 func (this CSSSkewX) Once() CSSSkewX { 608 this.ref.Once() 609 return this 610 } 611 612 func (this CSSSkewX) Ref() js.Ref { 613 return this.CSSTransformComponent.Ref() 614 } 615 616 func (this CSSSkewX) FromRef(ref js.Ref) CSSSkewX { 617 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 618 return this 619 } 620 621 func (this CSSSkewX) Free() { 622 this.ref.Free() 623 } 624 625 // Ax returns the value of property "CSSSkewX.ax". 626 // 627 // It returns ok=false if there is no such property. 628 func (this CSSSkewX) Ax() (ret CSSNumericValue, ok bool) { 629 ok = js.True == bindings.GetCSSSkewXAx( 630 this.ref, js.Pointer(&ret), 631 ) 632 return 633 } 634 635 // SetAx sets the value of property "CSSSkewX.ax" to val. 636 // 637 // It returns false if the property cannot be set. 638 func (this CSSSkewX) SetAx(val CSSNumericValue) bool { 639 return js.True == bindings.SetCSSSkewXAx( 640 this.ref, 641 val.Ref(), 642 ) 643 } 644 645 func NewCSSSkewY(ay CSSNumericValue) (ret CSSSkewY) { 646 ret.ref = bindings.NewCSSSkewYByCSSSkewY( 647 ay.Ref()) 648 return 649 } 650 651 type CSSSkewY struct { 652 CSSTransformComponent 653 } 654 655 func (this CSSSkewY) Once() CSSSkewY { 656 this.ref.Once() 657 return this 658 } 659 660 func (this CSSSkewY) Ref() js.Ref { 661 return this.CSSTransformComponent.Ref() 662 } 663 664 func (this CSSSkewY) FromRef(ref js.Ref) CSSSkewY { 665 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 666 return this 667 } 668 669 func (this CSSSkewY) Free() { 670 this.ref.Free() 671 } 672 673 // Ay returns the value of property "CSSSkewY.ay". 674 // 675 // It returns ok=false if there is no such property. 676 func (this CSSSkewY) Ay() (ret CSSNumericValue, ok bool) { 677 ok = js.True == bindings.GetCSSSkewYAy( 678 this.ref, js.Pointer(&ret), 679 ) 680 return 681 } 682 683 // SetAy sets the value of property "CSSSkewY.ay" to val. 684 // 685 // It returns false if the property cannot be set. 686 func (this CSSSkewY) SetAy(val CSSNumericValue) bool { 687 return js.True == bindings.SetCSSSkewYAy( 688 this.ref, 689 val.Ref(), 690 ) 691 } 692 693 type CSSStartingStyleRule struct { 694 CSSGroupingRule 695 } 696 697 func (this CSSStartingStyleRule) Once() CSSStartingStyleRule { 698 this.ref.Once() 699 return this 700 } 701 702 func (this CSSStartingStyleRule) Ref() js.Ref { 703 return this.CSSGroupingRule.Ref() 704 } 705 706 func (this CSSStartingStyleRule) FromRef(ref js.Ref) CSSStartingStyleRule { 707 this.CSSGroupingRule = this.CSSGroupingRule.FromRef(ref) 708 return this 709 } 710 711 func (this CSSStartingStyleRule) Free() { 712 this.ref.Free() 713 } 714 715 type CSSStyleRule struct { 716 CSSGroupingRule 717 } 718 719 func (this CSSStyleRule) Once() CSSStyleRule { 720 this.ref.Once() 721 return this 722 } 723 724 func (this CSSStyleRule) Ref() js.Ref { 725 return this.CSSGroupingRule.Ref() 726 } 727 728 func (this CSSStyleRule) FromRef(ref js.Ref) CSSStyleRule { 729 this.CSSGroupingRule = this.CSSGroupingRule.FromRef(ref) 730 return this 731 } 732 733 func (this CSSStyleRule) Free() { 734 this.ref.Free() 735 } 736 737 // SelectorText returns the value of property "CSSStyleRule.selectorText". 738 // 739 // It returns ok=false if there is no such property. 740 func (this CSSStyleRule) SelectorText() (ret js.String, ok bool) { 741 ok = js.True == bindings.GetCSSStyleRuleSelectorText( 742 this.ref, js.Pointer(&ret), 743 ) 744 return 745 } 746 747 // SetSelectorText sets the value of property "CSSStyleRule.selectorText" to val. 748 // 749 // It returns false if the property cannot be set. 750 func (this CSSStyleRule) SetSelectorText(val js.String) bool { 751 return js.True == bindings.SetCSSStyleRuleSelectorText( 752 this.ref, 753 val.Ref(), 754 ) 755 } 756 757 // Style returns the value of property "CSSStyleRule.style". 758 // 759 // It returns ok=false if there is no such property. 760 func (this CSSStyleRule) Style() (ret CSSStyleDeclaration, ok bool) { 761 ok = js.True == bindings.GetCSSStyleRuleStyle( 762 this.ref, js.Pointer(&ret), 763 ) 764 return 765 } 766 767 // StyleMap returns the value of property "CSSStyleRule.styleMap". 768 // 769 // It returns ok=false if there is no such property. 770 func (this CSSStyleRule) StyleMap() (ret StylePropertyMap, ok bool) { 771 ok = js.True == bindings.GetCSSStyleRuleStyleMap( 772 this.ref, js.Pointer(&ret), 773 ) 774 return 775 } 776 777 type CSSSupportsRule struct { 778 CSSConditionRule 779 } 780 781 func (this CSSSupportsRule) Once() CSSSupportsRule { 782 this.ref.Once() 783 return this 784 } 785 786 func (this CSSSupportsRule) Ref() js.Ref { 787 return this.CSSConditionRule.Ref() 788 } 789 790 func (this CSSSupportsRule) FromRef(ref js.Ref) CSSSupportsRule { 791 this.CSSConditionRule = this.CSSConditionRule.FromRef(ref) 792 return this 793 } 794 795 func (this CSSSupportsRule) Free() { 796 this.ref.Free() 797 } 798 799 type CSSTransformComponent struct { 800 ref js.Ref 801 } 802 803 func (this CSSTransformComponent) Once() CSSTransformComponent { 804 this.ref.Once() 805 return this 806 } 807 808 func (this CSSTransformComponent) Ref() js.Ref { 809 return this.ref 810 } 811 812 func (this CSSTransformComponent) FromRef(ref js.Ref) CSSTransformComponent { 813 this.ref = ref 814 return this 815 } 816 817 func (this CSSTransformComponent) Free() { 818 this.ref.Free() 819 } 820 821 // Is2D returns the value of property "CSSTransformComponent.is2D". 822 // 823 // It returns ok=false if there is no such property. 824 func (this CSSTransformComponent) Is2D() (ret bool, ok bool) { 825 ok = js.True == bindings.GetCSSTransformComponentIs2D( 826 this.ref, js.Pointer(&ret), 827 ) 828 return 829 } 830 831 // SetIs2D sets the value of property "CSSTransformComponent.is2D" to val. 832 // 833 // It returns false if the property cannot be set. 834 func (this CSSTransformComponent) SetIs2D(val bool) bool { 835 return js.True == bindings.SetCSSTransformComponentIs2D( 836 this.ref, 837 js.Bool(bool(val)), 838 ) 839 } 840 841 // HasFuncToString returns true if the method "CSSTransformComponent.toString" exists. 842 func (this CSSTransformComponent) HasFuncToString() bool { 843 return js.True == bindings.HasFuncCSSTransformComponentToString( 844 this.ref, 845 ) 846 } 847 848 // FuncToString returns the method "CSSTransformComponent.toString". 849 func (this CSSTransformComponent) FuncToString() (fn js.Func[func() js.String]) { 850 bindings.FuncCSSTransformComponentToString( 851 this.ref, js.Pointer(&fn), 852 ) 853 return 854 } 855 856 // ToString calls the method "CSSTransformComponent.toString". 857 func (this CSSTransformComponent) ToString() (ret js.String) { 858 bindings.CallCSSTransformComponentToString( 859 this.ref, js.Pointer(&ret), 860 ) 861 862 return 863 } 864 865 // TryToString calls the method "CSSTransformComponent.toString" 866 // in a try/catch block and returns (_, err, ok = false) when it went through 867 // the catch clause. 868 func (this CSSTransformComponent) TryToString() (ret js.String, exception js.Any, ok bool) { 869 ok = js.True == bindings.TryCSSTransformComponentToString( 870 this.ref, js.Pointer(&ret), js.Pointer(&exception), 871 ) 872 873 return 874 } 875 876 // HasFuncToMatrix returns true if the method "CSSTransformComponent.toMatrix" exists. 877 func (this CSSTransformComponent) HasFuncToMatrix() bool { 878 return js.True == bindings.HasFuncCSSTransformComponentToMatrix( 879 this.ref, 880 ) 881 } 882 883 // FuncToMatrix returns the method "CSSTransformComponent.toMatrix". 884 func (this CSSTransformComponent) FuncToMatrix() (fn js.Func[func() DOMMatrix]) { 885 bindings.FuncCSSTransformComponentToMatrix( 886 this.ref, js.Pointer(&fn), 887 ) 888 return 889 } 890 891 // ToMatrix calls the method "CSSTransformComponent.toMatrix". 892 func (this CSSTransformComponent) ToMatrix() (ret DOMMatrix) { 893 bindings.CallCSSTransformComponentToMatrix( 894 this.ref, js.Pointer(&ret), 895 ) 896 897 return 898 } 899 900 // TryToMatrix calls the method "CSSTransformComponent.toMatrix" 901 // in a try/catch block and returns (_, err, ok = false) when it went through 902 // the catch clause. 903 func (this CSSTransformComponent) TryToMatrix() (ret DOMMatrix, exception js.Any, ok bool) { 904 ok = js.True == bindings.TryCSSTransformComponentToMatrix( 905 this.ref, js.Pointer(&ret), js.Pointer(&exception), 906 ) 907 908 return 909 } 910 911 func NewCSSTransformValue(transforms js.Array[CSSTransformComponent]) (ret CSSTransformValue) { 912 ret.ref = bindings.NewCSSTransformValueByCSSTransformValue( 913 transforms.Ref()) 914 return 915 } 916 917 type CSSTransformValue struct { 918 CSSStyleValue 919 } 920 921 func (this CSSTransformValue) Once() CSSTransformValue { 922 this.ref.Once() 923 return this 924 } 925 926 func (this CSSTransformValue) Ref() js.Ref { 927 return this.CSSStyleValue.Ref() 928 } 929 930 func (this CSSTransformValue) FromRef(ref js.Ref) CSSTransformValue { 931 this.CSSStyleValue = this.CSSStyleValue.FromRef(ref) 932 return this 933 } 934 935 func (this CSSTransformValue) Free() { 936 this.ref.Free() 937 } 938 939 // Length returns the value of property "CSSTransformValue.length". 940 // 941 // It returns ok=false if there is no such property. 942 func (this CSSTransformValue) Length() (ret uint32, ok bool) { 943 ok = js.True == bindings.GetCSSTransformValueLength( 944 this.ref, js.Pointer(&ret), 945 ) 946 return 947 } 948 949 // Is2D returns the value of property "CSSTransformValue.is2D". 950 // 951 // It returns ok=false if there is no such property. 952 func (this CSSTransformValue) Is2D() (ret bool, ok bool) { 953 ok = js.True == bindings.GetCSSTransformValueIs2D( 954 this.ref, js.Pointer(&ret), 955 ) 956 return 957 } 958 959 // HasFuncGet returns true if the method "CSSTransformValue." exists. 960 func (this CSSTransformValue) HasFuncGet() bool { 961 return js.True == bindings.HasFuncCSSTransformValueGet( 962 this.ref, 963 ) 964 } 965 966 // FuncGet returns the method "CSSTransformValue.". 967 func (this CSSTransformValue) FuncGet() (fn js.Func[func(index uint32) CSSTransformComponent]) { 968 bindings.FuncCSSTransformValueGet( 969 this.ref, js.Pointer(&fn), 970 ) 971 return 972 } 973 974 // Get calls the method "CSSTransformValue.". 975 func (this CSSTransformValue) Get(index uint32) (ret CSSTransformComponent) { 976 bindings.CallCSSTransformValueGet( 977 this.ref, js.Pointer(&ret), 978 uint32(index), 979 ) 980 981 return 982 } 983 984 // TryGet calls the method "CSSTransformValue." 985 // in a try/catch block and returns (_, err, ok = false) when it went through 986 // the catch clause. 987 func (this CSSTransformValue) TryGet(index uint32) (ret CSSTransformComponent, exception js.Any, ok bool) { 988 ok = js.True == bindings.TryCSSTransformValueGet( 989 this.ref, js.Pointer(&ret), js.Pointer(&exception), 990 uint32(index), 991 ) 992 993 return 994 } 995 996 // HasFuncSet returns true if the method "CSSTransformValue." exists. 997 func (this CSSTransformValue) HasFuncSet() bool { 998 return js.True == bindings.HasFuncCSSTransformValueSet( 999 this.ref, 1000 ) 1001 } 1002 1003 // FuncSet returns the method "CSSTransformValue.". 1004 func (this CSSTransformValue) FuncSet() (fn js.Func[func(index uint32, val CSSTransformComponent)]) { 1005 bindings.FuncCSSTransformValueSet( 1006 this.ref, js.Pointer(&fn), 1007 ) 1008 return 1009 } 1010 1011 // Set calls the method "CSSTransformValue.". 1012 func (this CSSTransformValue) Set(index uint32, val CSSTransformComponent) (ret js.Void) { 1013 bindings.CallCSSTransformValueSet( 1014 this.ref, js.Pointer(&ret), 1015 uint32(index), 1016 val.Ref(), 1017 ) 1018 1019 return 1020 } 1021 1022 // TrySet calls the method "CSSTransformValue." 1023 // in a try/catch block and returns (_, err, ok = false) when it went through 1024 // the catch clause. 1025 func (this CSSTransformValue) TrySet(index uint32, val CSSTransformComponent) (ret js.Void, exception js.Any, ok bool) { 1026 ok = js.True == bindings.TryCSSTransformValueSet( 1027 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1028 uint32(index), 1029 val.Ref(), 1030 ) 1031 1032 return 1033 } 1034 1035 // HasFuncToMatrix returns true if the method "CSSTransformValue.toMatrix" exists. 1036 func (this CSSTransformValue) HasFuncToMatrix() bool { 1037 return js.True == bindings.HasFuncCSSTransformValueToMatrix( 1038 this.ref, 1039 ) 1040 } 1041 1042 // FuncToMatrix returns the method "CSSTransformValue.toMatrix". 1043 func (this CSSTransformValue) FuncToMatrix() (fn js.Func[func() DOMMatrix]) { 1044 bindings.FuncCSSTransformValueToMatrix( 1045 this.ref, js.Pointer(&fn), 1046 ) 1047 return 1048 } 1049 1050 // ToMatrix calls the method "CSSTransformValue.toMatrix". 1051 func (this CSSTransformValue) ToMatrix() (ret DOMMatrix) { 1052 bindings.CallCSSTransformValueToMatrix( 1053 this.ref, js.Pointer(&ret), 1054 ) 1055 1056 return 1057 } 1058 1059 // TryToMatrix calls the method "CSSTransformValue.toMatrix" 1060 // in a try/catch block and returns (_, err, ok = false) when it went through 1061 // the catch clause. 1062 func (this CSSTransformValue) TryToMatrix() (ret DOMMatrix, exception js.Any, ok bool) { 1063 ok = js.True == bindings.TryCSSTransformValueToMatrix( 1064 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1065 ) 1066 1067 return 1068 } 1069 1070 func NewCSSTransition(effect AnimationEffect, timeline AnimationTimeline) (ret CSSTransition) { 1071 ret.ref = bindings.NewCSSTransitionByCSSTransition( 1072 effect.Ref(), 1073 timeline.Ref()) 1074 return 1075 } 1076 1077 func NewCSSTransitionByCSSTransition1(effect AnimationEffect) (ret CSSTransition) { 1078 ret.ref = bindings.NewCSSTransitionByCSSTransition1( 1079 effect.Ref()) 1080 return 1081 } 1082 1083 func NewCSSTransitionByCSSTransition2() (ret CSSTransition) { 1084 ret.ref = bindings.NewCSSTransitionByCSSTransition2() 1085 return 1086 } 1087 1088 type CSSTransition struct { 1089 Animation 1090 } 1091 1092 func (this CSSTransition) Once() CSSTransition { 1093 this.ref.Once() 1094 return this 1095 } 1096 1097 func (this CSSTransition) Ref() js.Ref { 1098 return this.Animation.Ref() 1099 } 1100 1101 func (this CSSTransition) FromRef(ref js.Ref) CSSTransition { 1102 this.Animation = this.Animation.FromRef(ref) 1103 return this 1104 } 1105 1106 func (this CSSTransition) Free() { 1107 this.ref.Free() 1108 } 1109 1110 // TransitionProperty returns the value of property "CSSTransition.transitionProperty". 1111 // 1112 // It returns ok=false if there is no such property. 1113 func (this CSSTransition) TransitionProperty() (ret js.String, ok bool) { 1114 ok = js.True == bindings.GetCSSTransitionTransitionProperty( 1115 this.ref, js.Pointer(&ret), 1116 ) 1117 return 1118 } 1119 1120 func NewCSSTranslate(x CSSNumericValue, y CSSNumericValue, z CSSNumericValue) (ret CSSTranslate) { 1121 ret.ref = bindings.NewCSSTranslateByCSSTranslate( 1122 x.Ref(), 1123 y.Ref(), 1124 z.Ref()) 1125 return 1126 } 1127 1128 func NewCSSTranslateByCSSTranslate1(x CSSNumericValue, y CSSNumericValue) (ret CSSTranslate) { 1129 ret.ref = bindings.NewCSSTranslateByCSSTranslate1( 1130 x.Ref(), 1131 y.Ref()) 1132 return 1133 } 1134 1135 type CSSTranslate struct { 1136 CSSTransformComponent 1137 } 1138 1139 func (this CSSTranslate) Once() CSSTranslate { 1140 this.ref.Once() 1141 return this 1142 } 1143 1144 func (this CSSTranslate) Ref() js.Ref { 1145 return this.CSSTransformComponent.Ref() 1146 } 1147 1148 func (this CSSTranslate) FromRef(ref js.Ref) CSSTranslate { 1149 this.CSSTransformComponent = this.CSSTransformComponent.FromRef(ref) 1150 return this 1151 } 1152 1153 func (this CSSTranslate) Free() { 1154 this.ref.Free() 1155 } 1156 1157 // X returns the value of property "CSSTranslate.x". 1158 // 1159 // It returns ok=false if there is no such property. 1160 func (this CSSTranslate) X() (ret CSSNumericValue, ok bool) { 1161 ok = js.True == bindings.GetCSSTranslateX( 1162 this.ref, js.Pointer(&ret), 1163 ) 1164 return 1165 } 1166 1167 // SetX sets the value of property "CSSTranslate.x" to val. 1168 // 1169 // It returns false if the property cannot be set. 1170 func (this CSSTranslate) SetX(val CSSNumericValue) bool { 1171 return js.True == bindings.SetCSSTranslateX( 1172 this.ref, 1173 val.Ref(), 1174 ) 1175 } 1176 1177 // Y returns the value of property "CSSTranslate.y". 1178 // 1179 // It returns ok=false if there is no such property. 1180 func (this CSSTranslate) Y() (ret CSSNumericValue, ok bool) { 1181 ok = js.True == bindings.GetCSSTranslateY( 1182 this.ref, js.Pointer(&ret), 1183 ) 1184 return 1185 } 1186 1187 // SetY sets the value of property "CSSTranslate.y" to val. 1188 // 1189 // It returns false if the property cannot be set. 1190 func (this CSSTranslate) SetY(val CSSNumericValue) bool { 1191 return js.True == bindings.SetCSSTranslateY( 1192 this.ref, 1193 val.Ref(), 1194 ) 1195 } 1196 1197 // Z returns the value of property "CSSTranslate.z". 1198 // 1199 // It returns ok=false if there is no such property. 1200 func (this CSSTranslate) Z() (ret CSSNumericValue, ok bool) { 1201 ok = js.True == bindings.GetCSSTranslateZ( 1202 this.ref, js.Pointer(&ret), 1203 ) 1204 return 1205 } 1206 1207 // SetZ sets the value of property "CSSTranslate.z" to val. 1208 // 1209 // It returns false if the property cannot be set. 1210 func (this CSSTranslate) SetZ(val CSSNumericValue) bool { 1211 return js.True == bindings.SetCSSTranslateZ( 1212 this.ref, 1213 val.Ref(), 1214 ) 1215 } 1216 1217 type CSSTryRule struct { 1218 CSSRule 1219 } 1220 1221 func (this CSSTryRule) Once() CSSTryRule { 1222 this.ref.Once() 1223 return this 1224 } 1225 1226 func (this CSSTryRule) Ref() js.Ref { 1227 return this.CSSRule.Ref() 1228 } 1229 1230 func (this CSSTryRule) FromRef(ref js.Ref) CSSTryRule { 1231 this.CSSRule = this.CSSRule.FromRef(ref) 1232 return this 1233 } 1234 1235 func (this CSSTryRule) Free() { 1236 this.ref.Free() 1237 } 1238 1239 // Style returns the value of property "CSSTryRule.style". 1240 // 1241 // It returns ok=false if there is no such property. 1242 func (this CSSTryRule) Style() (ret CSSStyleDeclaration, ok bool) { 1243 ok = js.True == bindings.GetCSSTryRuleStyle( 1244 this.ref, js.Pointer(&ret), 1245 ) 1246 return 1247 } 1248 1249 func NewCSSUnparsedValue(members js.Array[CSSUnparsedSegment]) (ret CSSUnparsedValue) { 1250 ret.ref = bindings.NewCSSUnparsedValueByCSSUnparsedValue( 1251 members.Ref()) 1252 return 1253 } 1254 1255 type CSSUnparsedValue struct { 1256 CSSStyleValue 1257 } 1258 1259 func (this CSSUnparsedValue) Once() CSSUnparsedValue { 1260 this.ref.Once() 1261 return this 1262 } 1263 1264 func (this CSSUnparsedValue) Ref() js.Ref { 1265 return this.CSSStyleValue.Ref() 1266 } 1267 1268 func (this CSSUnparsedValue) FromRef(ref js.Ref) CSSUnparsedValue { 1269 this.CSSStyleValue = this.CSSStyleValue.FromRef(ref) 1270 return this 1271 } 1272 1273 func (this CSSUnparsedValue) Free() { 1274 this.ref.Free() 1275 } 1276 1277 // Length returns the value of property "CSSUnparsedValue.length". 1278 // 1279 // It returns ok=false if there is no such property. 1280 func (this CSSUnparsedValue) Length() (ret uint32, ok bool) { 1281 ok = js.True == bindings.GetCSSUnparsedValueLength( 1282 this.ref, js.Pointer(&ret), 1283 ) 1284 return 1285 } 1286 1287 // HasFuncGet returns true if the method "CSSUnparsedValue." exists. 1288 func (this CSSUnparsedValue) HasFuncGet() bool { 1289 return js.True == bindings.HasFuncCSSUnparsedValueGet( 1290 this.ref, 1291 ) 1292 } 1293 1294 // FuncGet returns the method "CSSUnparsedValue.". 1295 func (this CSSUnparsedValue) FuncGet() (fn js.Func[func(index uint32) CSSUnparsedSegment]) { 1296 bindings.FuncCSSUnparsedValueGet( 1297 this.ref, js.Pointer(&fn), 1298 ) 1299 return 1300 } 1301 1302 // Get calls the method "CSSUnparsedValue.". 1303 func (this CSSUnparsedValue) Get(index uint32) (ret CSSUnparsedSegment) { 1304 bindings.CallCSSUnparsedValueGet( 1305 this.ref, js.Pointer(&ret), 1306 uint32(index), 1307 ) 1308 1309 return 1310 } 1311 1312 // TryGet calls the method "CSSUnparsedValue." 1313 // in a try/catch block and returns (_, err, ok = false) when it went through 1314 // the catch clause. 1315 func (this CSSUnparsedValue) TryGet(index uint32) (ret CSSUnparsedSegment, exception js.Any, ok bool) { 1316 ok = js.True == bindings.TryCSSUnparsedValueGet( 1317 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1318 uint32(index), 1319 ) 1320 1321 return 1322 } 1323 1324 // HasFuncSet returns true if the method "CSSUnparsedValue." exists. 1325 func (this CSSUnparsedValue) HasFuncSet() bool { 1326 return js.True == bindings.HasFuncCSSUnparsedValueSet( 1327 this.ref, 1328 ) 1329 } 1330 1331 // FuncSet returns the method "CSSUnparsedValue.". 1332 func (this CSSUnparsedValue) FuncSet() (fn js.Func[func(index uint32, val CSSUnparsedSegment)]) { 1333 bindings.FuncCSSUnparsedValueSet( 1334 this.ref, js.Pointer(&fn), 1335 ) 1336 return 1337 } 1338 1339 // Set calls the method "CSSUnparsedValue.". 1340 func (this CSSUnparsedValue) Set(index uint32, val CSSUnparsedSegment) (ret js.Void) { 1341 bindings.CallCSSUnparsedValueSet( 1342 this.ref, js.Pointer(&ret), 1343 uint32(index), 1344 val.Ref(), 1345 ) 1346 1347 return 1348 } 1349 1350 // TrySet calls the method "CSSUnparsedValue." 1351 // in a try/catch block and returns (_, err, ok = false) when it went through 1352 // the catch clause. 1353 func (this CSSUnparsedValue) TrySet(index uint32, val CSSUnparsedSegment) (ret js.Void, exception js.Any, ok bool) { 1354 ok = js.True == bindings.TryCSSUnparsedValueSet( 1355 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1356 uint32(index), 1357 val.Ref(), 1358 ) 1359 1360 return 1361 } 1362 1363 func NewCSSVariableReferenceValue(variable js.String, fallback CSSUnparsedValue) (ret CSSVariableReferenceValue) { 1364 ret.ref = bindings.NewCSSVariableReferenceValueByCSSVariableReferenceValue( 1365 variable.Ref(), 1366 fallback.Ref()) 1367 return 1368 } 1369 1370 func NewCSSVariableReferenceValueByCSSVariableReferenceValue1(variable js.String) (ret CSSVariableReferenceValue) { 1371 ret.ref = bindings.NewCSSVariableReferenceValueByCSSVariableReferenceValue1( 1372 variable.Ref()) 1373 return 1374 } 1375 1376 type CSSVariableReferenceValue struct { 1377 ref js.Ref 1378 } 1379 1380 func (this CSSVariableReferenceValue) Once() CSSVariableReferenceValue { 1381 this.ref.Once() 1382 return this 1383 } 1384 1385 func (this CSSVariableReferenceValue) Ref() js.Ref { 1386 return this.ref 1387 } 1388 1389 func (this CSSVariableReferenceValue) FromRef(ref js.Ref) CSSVariableReferenceValue { 1390 this.ref = ref 1391 return this 1392 } 1393 1394 func (this CSSVariableReferenceValue) Free() { 1395 this.ref.Free() 1396 } 1397 1398 // Variable returns the value of property "CSSVariableReferenceValue.variable". 1399 // 1400 // It returns ok=false if there is no such property. 1401 func (this CSSVariableReferenceValue) Variable() (ret js.String, ok bool) { 1402 ok = js.True == bindings.GetCSSVariableReferenceValueVariable( 1403 this.ref, js.Pointer(&ret), 1404 ) 1405 return 1406 } 1407 1408 // SetVariable sets the value of property "CSSVariableReferenceValue.variable" to val. 1409 // 1410 // It returns false if the property cannot be set. 1411 func (this CSSVariableReferenceValue) SetVariable(val js.String) bool { 1412 return js.True == bindings.SetCSSVariableReferenceValueVariable( 1413 this.ref, 1414 val.Ref(), 1415 ) 1416 } 1417 1418 // Fallback returns the value of property "CSSVariableReferenceValue.fallback". 1419 // 1420 // It returns ok=false if there is no such property. 1421 func (this CSSVariableReferenceValue) Fallback() (ret CSSUnparsedValue, ok bool) { 1422 ok = js.True == bindings.GetCSSVariableReferenceValueFallback( 1423 this.ref, js.Pointer(&ret), 1424 ) 1425 return 1426 } 1427 1428 type OneOf_String_CSSVariableReferenceValue struct { 1429 ref js.Ref 1430 } 1431 1432 func (x OneOf_String_CSSVariableReferenceValue) Ref() js.Ref { 1433 return x.ref 1434 } 1435 1436 func (x OneOf_String_CSSVariableReferenceValue) Free() { 1437 x.ref.Free() 1438 } 1439 1440 func (x OneOf_String_CSSVariableReferenceValue) FromRef(ref js.Ref) OneOf_String_CSSVariableReferenceValue { 1441 return OneOf_String_CSSVariableReferenceValue{ 1442 ref: ref, 1443 } 1444 } 1445 1446 func (x OneOf_String_CSSVariableReferenceValue) String() js.String { 1447 return js.String{}.FromRef(x.ref) 1448 } 1449 1450 func (x OneOf_String_CSSVariableReferenceValue) CSSVariableReferenceValue() CSSVariableReferenceValue { 1451 return CSSVariableReferenceValue{}.FromRef(x.ref) 1452 } 1453 1454 type CSSUnparsedSegment = OneOf_String_CSSVariableReferenceValue 1455 1456 type OneOf_Response_undefined struct { 1457 ref js.Ref 1458 } 1459 1460 func (x OneOf_Response_undefined) Ref() js.Ref { 1461 return x.ref 1462 } 1463 1464 func (x OneOf_Response_undefined) Free() { 1465 x.ref.Free() 1466 } 1467 1468 func (x OneOf_Response_undefined) FromRef(ref js.Ref) OneOf_Response_undefined { 1469 return OneOf_Response_undefined{ 1470 ref: ref, 1471 } 1472 } 1473 1474 func (x OneOf_Response_undefined) Undefined() bool { 1475 return x.ref == js.Undefined 1476 } 1477 1478 func (x OneOf_Response_undefined) Response() Response { 1479 return Response{}.FromRef(x.ref) 1480 } 1481 1482 type Cache struct { 1483 ref js.Ref 1484 } 1485 1486 func (this Cache) Once() Cache { 1487 this.ref.Once() 1488 return this 1489 } 1490 1491 func (this Cache) Ref() js.Ref { 1492 return this.ref 1493 } 1494 1495 func (this Cache) FromRef(ref js.Ref) Cache { 1496 this.ref = ref 1497 return this 1498 } 1499 1500 func (this Cache) Free() { 1501 this.ref.Free() 1502 } 1503 1504 // HasFuncMatch returns true if the method "Cache.match" exists. 1505 func (this Cache) HasFuncMatch() bool { 1506 return js.True == bindings.HasFuncCacheMatch( 1507 this.ref, 1508 ) 1509 } 1510 1511 // FuncMatch returns the method "Cache.match". 1512 func (this Cache) FuncMatch() (fn js.Func[func(request RequestInfo, options CacheQueryOptions) js.Promise[OneOf_Response_undefined]]) { 1513 bindings.FuncCacheMatch( 1514 this.ref, js.Pointer(&fn), 1515 ) 1516 return 1517 } 1518 1519 // Match calls the method "Cache.match". 1520 func (this Cache) Match(request RequestInfo, options CacheQueryOptions) (ret js.Promise[OneOf_Response_undefined]) { 1521 bindings.CallCacheMatch( 1522 this.ref, js.Pointer(&ret), 1523 request.Ref(), 1524 js.Pointer(&options), 1525 ) 1526 1527 return 1528 } 1529 1530 // TryMatch calls the method "Cache.match" 1531 // in a try/catch block and returns (_, err, ok = false) when it went through 1532 // the catch clause. 1533 func (this Cache) TryMatch(request RequestInfo, options CacheQueryOptions) (ret js.Promise[OneOf_Response_undefined], exception js.Any, ok bool) { 1534 ok = js.True == bindings.TryCacheMatch( 1535 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1536 request.Ref(), 1537 js.Pointer(&options), 1538 ) 1539 1540 return 1541 } 1542 1543 // HasFuncMatch1 returns true if the method "Cache.match" exists. 1544 func (this Cache) HasFuncMatch1() bool { 1545 return js.True == bindings.HasFuncCacheMatch1( 1546 this.ref, 1547 ) 1548 } 1549 1550 // FuncMatch1 returns the method "Cache.match". 1551 func (this Cache) FuncMatch1() (fn js.Func[func(request RequestInfo) js.Promise[OneOf_Response_undefined]]) { 1552 bindings.FuncCacheMatch1( 1553 this.ref, js.Pointer(&fn), 1554 ) 1555 return 1556 } 1557 1558 // Match1 calls the method "Cache.match". 1559 func (this Cache) Match1(request RequestInfo) (ret js.Promise[OneOf_Response_undefined]) { 1560 bindings.CallCacheMatch1( 1561 this.ref, js.Pointer(&ret), 1562 request.Ref(), 1563 ) 1564 1565 return 1566 } 1567 1568 // TryMatch1 calls the method "Cache.match" 1569 // in a try/catch block and returns (_, err, ok = false) when it went through 1570 // the catch clause. 1571 func (this Cache) TryMatch1(request RequestInfo) (ret js.Promise[OneOf_Response_undefined], exception js.Any, ok bool) { 1572 ok = js.True == bindings.TryCacheMatch1( 1573 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1574 request.Ref(), 1575 ) 1576 1577 return 1578 } 1579 1580 // HasFuncMatchAll returns true if the method "Cache.matchAll" exists. 1581 func (this Cache) HasFuncMatchAll() bool { 1582 return js.True == bindings.HasFuncCacheMatchAll( 1583 this.ref, 1584 ) 1585 } 1586 1587 // FuncMatchAll returns the method "Cache.matchAll". 1588 func (this Cache) FuncMatchAll() (fn js.Func[func(request RequestInfo, options CacheQueryOptions) js.Promise[js.FrozenArray[Response]]]) { 1589 bindings.FuncCacheMatchAll( 1590 this.ref, js.Pointer(&fn), 1591 ) 1592 return 1593 } 1594 1595 // MatchAll calls the method "Cache.matchAll". 1596 func (this Cache) MatchAll(request RequestInfo, options CacheQueryOptions) (ret js.Promise[js.FrozenArray[Response]]) { 1597 bindings.CallCacheMatchAll( 1598 this.ref, js.Pointer(&ret), 1599 request.Ref(), 1600 js.Pointer(&options), 1601 ) 1602 1603 return 1604 } 1605 1606 // TryMatchAll calls the method "Cache.matchAll" 1607 // in a try/catch block and returns (_, err, ok = false) when it went through 1608 // the catch clause. 1609 func (this Cache) TryMatchAll(request RequestInfo, options CacheQueryOptions) (ret js.Promise[js.FrozenArray[Response]], exception js.Any, ok bool) { 1610 ok = js.True == bindings.TryCacheMatchAll( 1611 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1612 request.Ref(), 1613 js.Pointer(&options), 1614 ) 1615 1616 return 1617 } 1618 1619 // HasFuncMatchAll1 returns true if the method "Cache.matchAll" exists. 1620 func (this Cache) HasFuncMatchAll1() bool { 1621 return js.True == bindings.HasFuncCacheMatchAll1( 1622 this.ref, 1623 ) 1624 } 1625 1626 // FuncMatchAll1 returns the method "Cache.matchAll". 1627 func (this Cache) FuncMatchAll1() (fn js.Func[func(request RequestInfo) js.Promise[js.FrozenArray[Response]]]) { 1628 bindings.FuncCacheMatchAll1( 1629 this.ref, js.Pointer(&fn), 1630 ) 1631 return 1632 } 1633 1634 // MatchAll1 calls the method "Cache.matchAll". 1635 func (this Cache) MatchAll1(request RequestInfo) (ret js.Promise[js.FrozenArray[Response]]) { 1636 bindings.CallCacheMatchAll1( 1637 this.ref, js.Pointer(&ret), 1638 request.Ref(), 1639 ) 1640 1641 return 1642 } 1643 1644 // TryMatchAll1 calls the method "Cache.matchAll" 1645 // in a try/catch block and returns (_, err, ok = false) when it went through 1646 // the catch clause. 1647 func (this Cache) TryMatchAll1(request RequestInfo) (ret js.Promise[js.FrozenArray[Response]], exception js.Any, ok bool) { 1648 ok = js.True == bindings.TryCacheMatchAll1( 1649 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1650 request.Ref(), 1651 ) 1652 1653 return 1654 } 1655 1656 // HasFuncMatchAll2 returns true if the method "Cache.matchAll" exists. 1657 func (this Cache) HasFuncMatchAll2() bool { 1658 return js.True == bindings.HasFuncCacheMatchAll2( 1659 this.ref, 1660 ) 1661 } 1662 1663 // FuncMatchAll2 returns the method "Cache.matchAll". 1664 func (this Cache) FuncMatchAll2() (fn js.Func[func() js.Promise[js.FrozenArray[Response]]]) { 1665 bindings.FuncCacheMatchAll2( 1666 this.ref, js.Pointer(&fn), 1667 ) 1668 return 1669 } 1670 1671 // MatchAll2 calls the method "Cache.matchAll". 1672 func (this Cache) MatchAll2() (ret js.Promise[js.FrozenArray[Response]]) { 1673 bindings.CallCacheMatchAll2( 1674 this.ref, js.Pointer(&ret), 1675 ) 1676 1677 return 1678 } 1679 1680 // TryMatchAll2 calls the method "Cache.matchAll" 1681 // in a try/catch block and returns (_, err, ok = false) when it went through 1682 // the catch clause. 1683 func (this Cache) TryMatchAll2() (ret js.Promise[js.FrozenArray[Response]], exception js.Any, ok bool) { 1684 ok = js.True == bindings.TryCacheMatchAll2( 1685 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1686 ) 1687 1688 return 1689 } 1690 1691 // HasFuncAdd returns true if the method "Cache.add" exists. 1692 func (this Cache) HasFuncAdd() bool { 1693 return js.True == bindings.HasFuncCacheAdd( 1694 this.ref, 1695 ) 1696 } 1697 1698 // FuncAdd returns the method "Cache.add". 1699 func (this Cache) FuncAdd() (fn js.Func[func(request RequestInfo) js.Promise[js.Void]]) { 1700 bindings.FuncCacheAdd( 1701 this.ref, js.Pointer(&fn), 1702 ) 1703 return 1704 } 1705 1706 // Add calls the method "Cache.add". 1707 func (this Cache) Add(request RequestInfo) (ret js.Promise[js.Void]) { 1708 bindings.CallCacheAdd( 1709 this.ref, js.Pointer(&ret), 1710 request.Ref(), 1711 ) 1712 1713 return 1714 } 1715 1716 // TryAdd calls the method "Cache.add" 1717 // in a try/catch block and returns (_, err, ok = false) when it went through 1718 // the catch clause. 1719 func (this Cache) TryAdd(request RequestInfo) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1720 ok = js.True == bindings.TryCacheAdd( 1721 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1722 request.Ref(), 1723 ) 1724 1725 return 1726 } 1727 1728 // HasFuncAddAll returns true if the method "Cache.addAll" exists. 1729 func (this Cache) HasFuncAddAll() bool { 1730 return js.True == bindings.HasFuncCacheAddAll( 1731 this.ref, 1732 ) 1733 } 1734 1735 // FuncAddAll returns the method "Cache.addAll". 1736 func (this Cache) FuncAddAll() (fn js.Func[func(requests js.Array[RequestInfo]) js.Promise[js.Void]]) { 1737 bindings.FuncCacheAddAll( 1738 this.ref, js.Pointer(&fn), 1739 ) 1740 return 1741 } 1742 1743 // AddAll calls the method "Cache.addAll". 1744 func (this Cache) AddAll(requests js.Array[RequestInfo]) (ret js.Promise[js.Void]) { 1745 bindings.CallCacheAddAll( 1746 this.ref, js.Pointer(&ret), 1747 requests.Ref(), 1748 ) 1749 1750 return 1751 } 1752 1753 // TryAddAll calls the method "Cache.addAll" 1754 // in a try/catch block and returns (_, err, ok = false) when it went through 1755 // the catch clause. 1756 func (this Cache) TryAddAll(requests js.Array[RequestInfo]) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1757 ok = js.True == bindings.TryCacheAddAll( 1758 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1759 requests.Ref(), 1760 ) 1761 1762 return 1763 } 1764 1765 // HasFuncPut returns true if the method "Cache.put" exists. 1766 func (this Cache) HasFuncPut() bool { 1767 return js.True == bindings.HasFuncCachePut( 1768 this.ref, 1769 ) 1770 } 1771 1772 // FuncPut returns the method "Cache.put". 1773 func (this Cache) FuncPut() (fn js.Func[func(request RequestInfo, response Response) js.Promise[js.Void]]) { 1774 bindings.FuncCachePut( 1775 this.ref, js.Pointer(&fn), 1776 ) 1777 return 1778 } 1779 1780 // Put calls the method "Cache.put". 1781 func (this Cache) Put(request RequestInfo, response Response) (ret js.Promise[js.Void]) { 1782 bindings.CallCachePut( 1783 this.ref, js.Pointer(&ret), 1784 request.Ref(), 1785 response.Ref(), 1786 ) 1787 1788 return 1789 } 1790 1791 // TryPut calls the method "Cache.put" 1792 // in a try/catch block and returns (_, err, ok = false) when it went through 1793 // the catch clause. 1794 func (this Cache) TryPut(request RequestInfo, response Response) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1795 ok = js.True == bindings.TryCachePut( 1796 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1797 request.Ref(), 1798 response.Ref(), 1799 ) 1800 1801 return 1802 } 1803 1804 // HasFuncDelete returns true if the method "Cache.delete" exists. 1805 func (this Cache) HasFuncDelete() bool { 1806 return js.True == bindings.HasFuncCacheDelete( 1807 this.ref, 1808 ) 1809 } 1810 1811 // FuncDelete returns the method "Cache.delete". 1812 func (this Cache) FuncDelete() (fn js.Func[func(request RequestInfo, options CacheQueryOptions) js.Promise[js.Boolean]]) { 1813 bindings.FuncCacheDelete( 1814 this.ref, js.Pointer(&fn), 1815 ) 1816 return 1817 } 1818 1819 // Delete calls the method "Cache.delete". 1820 func (this Cache) Delete(request RequestInfo, options CacheQueryOptions) (ret js.Promise[js.Boolean]) { 1821 bindings.CallCacheDelete( 1822 this.ref, js.Pointer(&ret), 1823 request.Ref(), 1824 js.Pointer(&options), 1825 ) 1826 1827 return 1828 } 1829 1830 // TryDelete calls the method "Cache.delete" 1831 // in a try/catch block and returns (_, err, ok = false) when it went through 1832 // the catch clause. 1833 func (this Cache) TryDelete(request RequestInfo, options CacheQueryOptions) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 1834 ok = js.True == bindings.TryCacheDelete( 1835 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1836 request.Ref(), 1837 js.Pointer(&options), 1838 ) 1839 1840 return 1841 } 1842 1843 // HasFuncDelete1 returns true if the method "Cache.delete" exists. 1844 func (this Cache) HasFuncDelete1() bool { 1845 return js.True == bindings.HasFuncCacheDelete1( 1846 this.ref, 1847 ) 1848 } 1849 1850 // FuncDelete1 returns the method "Cache.delete". 1851 func (this Cache) FuncDelete1() (fn js.Func[func(request RequestInfo) js.Promise[js.Boolean]]) { 1852 bindings.FuncCacheDelete1( 1853 this.ref, js.Pointer(&fn), 1854 ) 1855 return 1856 } 1857 1858 // Delete1 calls the method "Cache.delete". 1859 func (this Cache) Delete1(request RequestInfo) (ret js.Promise[js.Boolean]) { 1860 bindings.CallCacheDelete1( 1861 this.ref, js.Pointer(&ret), 1862 request.Ref(), 1863 ) 1864 1865 return 1866 } 1867 1868 // TryDelete1 calls the method "Cache.delete" 1869 // in a try/catch block and returns (_, err, ok = false) when it went through 1870 // the catch clause. 1871 func (this Cache) TryDelete1(request RequestInfo) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 1872 ok = js.True == bindings.TryCacheDelete1( 1873 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1874 request.Ref(), 1875 ) 1876 1877 return 1878 } 1879 1880 // HasFuncKeys returns true if the method "Cache.keys" exists. 1881 func (this Cache) HasFuncKeys() bool { 1882 return js.True == bindings.HasFuncCacheKeys( 1883 this.ref, 1884 ) 1885 } 1886 1887 // FuncKeys returns the method "Cache.keys". 1888 func (this Cache) FuncKeys() (fn js.Func[func(request RequestInfo, options CacheQueryOptions) js.Promise[js.FrozenArray[Request]]]) { 1889 bindings.FuncCacheKeys( 1890 this.ref, js.Pointer(&fn), 1891 ) 1892 return 1893 } 1894 1895 // Keys calls the method "Cache.keys". 1896 func (this Cache) Keys(request RequestInfo, options CacheQueryOptions) (ret js.Promise[js.FrozenArray[Request]]) { 1897 bindings.CallCacheKeys( 1898 this.ref, js.Pointer(&ret), 1899 request.Ref(), 1900 js.Pointer(&options), 1901 ) 1902 1903 return 1904 } 1905 1906 // TryKeys calls the method "Cache.keys" 1907 // in a try/catch block and returns (_, err, ok = false) when it went through 1908 // the catch clause. 1909 func (this Cache) TryKeys(request RequestInfo, options CacheQueryOptions) (ret js.Promise[js.FrozenArray[Request]], exception js.Any, ok bool) { 1910 ok = js.True == bindings.TryCacheKeys( 1911 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1912 request.Ref(), 1913 js.Pointer(&options), 1914 ) 1915 1916 return 1917 } 1918 1919 // HasFuncKeys1 returns true if the method "Cache.keys" exists. 1920 func (this Cache) HasFuncKeys1() bool { 1921 return js.True == bindings.HasFuncCacheKeys1( 1922 this.ref, 1923 ) 1924 } 1925 1926 // FuncKeys1 returns the method "Cache.keys". 1927 func (this Cache) FuncKeys1() (fn js.Func[func(request RequestInfo) js.Promise[js.FrozenArray[Request]]]) { 1928 bindings.FuncCacheKeys1( 1929 this.ref, js.Pointer(&fn), 1930 ) 1931 return 1932 } 1933 1934 // Keys1 calls the method "Cache.keys". 1935 func (this Cache) Keys1(request RequestInfo) (ret js.Promise[js.FrozenArray[Request]]) { 1936 bindings.CallCacheKeys1( 1937 this.ref, js.Pointer(&ret), 1938 request.Ref(), 1939 ) 1940 1941 return 1942 } 1943 1944 // TryKeys1 calls the method "Cache.keys" 1945 // in a try/catch block and returns (_, err, ok = false) when it went through 1946 // the catch clause. 1947 func (this Cache) TryKeys1(request RequestInfo) (ret js.Promise[js.FrozenArray[Request]], exception js.Any, ok bool) { 1948 ok = js.True == bindings.TryCacheKeys1( 1949 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1950 request.Ref(), 1951 ) 1952 1953 return 1954 } 1955 1956 // HasFuncKeys2 returns true if the method "Cache.keys" exists. 1957 func (this Cache) HasFuncKeys2() bool { 1958 return js.True == bindings.HasFuncCacheKeys2( 1959 this.ref, 1960 ) 1961 } 1962 1963 // FuncKeys2 returns the method "Cache.keys". 1964 func (this Cache) FuncKeys2() (fn js.Func[func() js.Promise[js.FrozenArray[Request]]]) { 1965 bindings.FuncCacheKeys2( 1966 this.ref, js.Pointer(&fn), 1967 ) 1968 return 1969 } 1970 1971 // Keys2 calls the method "Cache.keys". 1972 func (this Cache) Keys2() (ret js.Promise[js.FrozenArray[Request]]) { 1973 bindings.CallCacheKeys2( 1974 this.ref, js.Pointer(&ret), 1975 ) 1976 1977 return 1978 } 1979 1980 // TryKeys2 calls the method "Cache.keys" 1981 // in a try/catch block and returns (_, err, ok = false) when it went through 1982 // the catch clause. 1983 func (this Cache) TryKeys2() (ret js.Promise[js.FrozenArray[Request]], exception js.Any, ok bool) { 1984 ok = js.True == bindings.TryCacheKeys2( 1985 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1986 ) 1987 1988 return 1989 } 1990 1991 type MultiCacheQueryOptions struct { 1992 // CacheName is "MultiCacheQueryOptions.cacheName" 1993 // 1994 // Optional 1995 CacheName js.String 1996 // IgnoreSearch is "MultiCacheQueryOptions.ignoreSearch" 1997 // 1998 // Optional, defaults to false. 1999 // 2000 // NOTE: FFI_USE_IgnoreSearch MUST be set to true to make this field effective. 2001 IgnoreSearch bool 2002 // IgnoreMethod is "MultiCacheQueryOptions.ignoreMethod" 2003 // 2004 // Optional, defaults to false. 2005 // 2006 // NOTE: FFI_USE_IgnoreMethod MUST be set to true to make this field effective. 2007 IgnoreMethod bool 2008 // IgnoreVary is "MultiCacheQueryOptions.ignoreVary" 2009 // 2010 // Optional, defaults to false. 2011 // 2012 // NOTE: FFI_USE_IgnoreVary MUST be set to true to make this field effective. 2013 IgnoreVary bool 2014 2015 FFI_USE_IgnoreSearch bool // for IgnoreSearch. 2016 FFI_USE_IgnoreMethod bool // for IgnoreMethod. 2017 FFI_USE_IgnoreVary bool // for IgnoreVary. 2018 2019 FFI_USE bool 2020 } 2021 2022 // FromRef calls UpdateFrom and returns a MultiCacheQueryOptions with all fields set. 2023 func (p MultiCacheQueryOptions) FromRef(ref js.Ref) MultiCacheQueryOptions { 2024 p.UpdateFrom(ref) 2025 return p 2026 } 2027 2028 // New creates a new MultiCacheQueryOptions in the application heap. 2029 func (p MultiCacheQueryOptions) New() js.Ref { 2030 return bindings.MultiCacheQueryOptionsJSLoad( 2031 js.Pointer(&p), js.True, 0, 2032 ) 2033 } 2034 2035 // UpdateFrom copies value of all fields of the heap object to p. 2036 func (p *MultiCacheQueryOptions) UpdateFrom(ref js.Ref) { 2037 bindings.MultiCacheQueryOptionsJSStore( 2038 js.Pointer(p), ref, 2039 ) 2040 } 2041 2042 // Update writes all fields of the p to the heap object referenced by ref. 2043 func (p *MultiCacheQueryOptions) Update(ref js.Ref) { 2044 bindings.MultiCacheQueryOptionsJSLoad( 2045 js.Pointer(p), js.False, ref, 2046 ) 2047 } 2048 2049 // FreeMembers frees fields with heap reference, if recursive is true 2050 // free all heap references reachable from p. 2051 func (p *MultiCacheQueryOptions) FreeMembers(recursive bool) { 2052 js.Free( 2053 p.CacheName.Ref(), 2054 ) 2055 p.CacheName = p.CacheName.FromRef(js.Undefined) 2056 } 2057 2058 type CacheStorage struct { 2059 ref js.Ref 2060 } 2061 2062 func (this CacheStorage) Once() CacheStorage { 2063 this.ref.Once() 2064 return this 2065 } 2066 2067 func (this CacheStorage) Ref() js.Ref { 2068 return this.ref 2069 } 2070 2071 func (this CacheStorage) FromRef(ref js.Ref) CacheStorage { 2072 this.ref = ref 2073 return this 2074 } 2075 2076 func (this CacheStorage) Free() { 2077 this.ref.Free() 2078 } 2079 2080 // HasFuncMatch returns true if the method "CacheStorage.match" exists. 2081 func (this CacheStorage) HasFuncMatch() bool { 2082 return js.True == bindings.HasFuncCacheStorageMatch( 2083 this.ref, 2084 ) 2085 } 2086 2087 // FuncMatch returns the method "CacheStorage.match". 2088 func (this CacheStorage) FuncMatch() (fn js.Func[func(request RequestInfo, options MultiCacheQueryOptions) js.Promise[OneOf_Response_undefined]]) { 2089 bindings.FuncCacheStorageMatch( 2090 this.ref, js.Pointer(&fn), 2091 ) 2092 return 2093 } 2094 2095 // Match calls the method "CacheStorage.match". 2096 func (this CacheStorage) Match(request RequestInfo, options MultiCacheQueryOptions) (ret js.Promise[OneOf_Response_undefined]) { 2097 bindings.CallCacheStorageMatch( 2098 this.ref, js.Pointer(&ret), 2099 request.Ref(), 2100 js.Pointer(&options), 2101 ) 2102 2103 return 2104 } 2105 2106 // TryMatch calls the method "CacheStorage.match" 2107 // in a try/catch block and returns (_, err, ok = false) when it went through 2108 // the catch clause. 2109 func (this CacheStorage) TryMatch(request RequestInfo, options MultiCacheQueryOptions) (ret js.Promise[OneOf_Response_undefined], exception js.Any, ok bool) { 2110 ok = js.True == bindings.TryCacheStorageMatch( 2111 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2112 request.Ref(), 2113 js.Pointer(&options), 2114 ) 2115 2116 return 2117 } 2118 2119 // HasFuncMatch1 returns true if the method "CacheStorage.match" exists. 2120 func (this CacheStorage) HasFuncMatch1() bool { 2121 return js.True == bindings.HasFuncCacheStorageMatch1( 2122 this.ref, 2123 ) 2124 } 2125 2126 // FuncMatch1 returns the method "CacheStorage.match". 2127 func (this CacheStorage) FuncMatch1() (fn js.Func[func(request RequestInfo) js.Promise[OneOf_Response_undefined]]) { 2128 bindings.FuncCacheStorageMatch1( 2129 this.ref, js.Pointer(&fn), 2130 ) 2131 return 2132 } 2133 2134 // Match1 calls the method "CacheStorage.match". 2135 func (this CacheStorage) Match1(request RequestInfo) (ret js.Promise[OneOf_Response_undefined]) { 2136 bindings.CallCacheStorageMatch1( 2137 this.ref, js.Pointer(&ret), 2138 request.Ref(), 2139 ) 2140 2141 return 2142 } 2143 2144 // TryMatch1 calls the method "CacheStorage.match" 2145 // in a try/catch block and returns (_, err, ok = false) when it went through 2146 // the catch clause. 2147 func (this CacheStorage) TryMatch1(request RequestInfo) (ret js.Promise[OneOf_Response_undefined], exception js.Any, ok bool) { 2148 ok = js.True == bindings.TryCacheStorageMatch1( 2149 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2150 request.Ref(), 2151 ) 2152 2153 return 2154 } 2155 2156 // HasFuncHas returns true if the method "CacheStorage.has" exists. 2157 func (this CacheStorage) HasFuncHas() bool { 2158 return js.True == bindings.HasFuncCacheStorageHas( 2159 this.ref, 2160 ) 2161 } 2162 2163 // FuncHas returns the method "CacheStorage.has". 2164 func (this CacheStorage) FuncHas() (fn js.Func[func(cacheName js.String) js.Promise[js.Boolean]]) { 2165 bindings.FuncCacheStorageHas( 2166 this.ref, js.Pointer(&fn), 2167 ) 2168 return 2169 } 2170 2171 // Has calls the method "CacheStorage.has". 2172 func (this CacheStorage) Has(cacheName js.String) (ret js.Promise[js.Boolean]) { 2173 bindings.CallCacheStorageHas( 2174 this.ref, js.Pointer(&ret), 2175 cacheName.Ref(), 2176 ) 2177 2178 return 2179 } 2180 2181 // TryHas calls the method "CacheStorage.has" 2182 // in a try/catch block and returns (_, err, ok = false) when it went through 2183 // the catch clause. 2184 func (this CacheStorage) TryHas(cacheName js.String) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 2185 ok = js.True == bindings.TryCacheStorageHas( 2186 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2187 cacheName.Ref(), 2188 ) 2189 2190 return 2191 } 2192 2193 // HasFuncOpen returns true if the method "CacheStorage.open" exists. 2194 func (this CacheStorage) HasFuncOpen() bool { 2195 return js.True == bindings.HasFuncCacheStorageOpen( 2196 this.ref, 2197 ) 2198 } 2199 2200 // FuncOpen returns the method "CacheStorage.open". 2201 func (this CacheStorage) FuncOpen() (fn js.Func[func(cacheName js.String) js.Promise[Cache]]) { 2202 bindings.FuncCacheStorageOpen( 2203 this.ref, js.Pointer(&fn), 2204 ) 2205 return 2206 } 2207 2208 // Open calls the method "CacheStorage.open". 2209 func (this CacheStorage) Open(cacheName js.String) (ret js.Promise[Cache]) { 2210 bindings.CallCacheStorageOpen( 2211 this.ref, js.Pointer(&ret), 2212 cacheName.Ref(), 2213 ) 2214 2215 return 2216 } 2217 2218 // TryOpen calls the method "CacheStorage.open" 2219 // in a try/catch block and returns (_, err, ok = false) when it went through 2220 // the catch clause. 2221 func (this CacheStorage) TryOpen(cacheName js.String) (ret js.Promise[Cache], exception js.Any, ok bool) { 2222 ok = js.True == bindings.TryCacheStorageOpen( 2223 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2224 cacheName.Ref(), 2225 ) 2226 2227 return 2228 } 2229 2230 // HasFuncDelete returns true if the method "CacheStorage.delete" exists. 2231 func (this CacheStorage) HasFuncDelete() bool { 2232 return js.True == bindings.HasFuncCacheStorageDelete( 2233 this.ref, 2234 ) 2235 } 2236 2237 // FuncDelete returns the method "CacheStorage.delete". 2238 func (this CacheStorage) FuncDelete() (fn js.Func[func(cacheName js.String) js.Promise[js.Boolean]]) { 2239 bindings.FuncCacheStorageDelete( 2240 this.ref, js.Pointer(&fn), 2241 ) 2242 return 2243 } 2244 2245 // Delete calls the method "CacheStorage.delete". 2246 func (this CacheStorage) Delete(cacheName js.String) (ret js.Promise[js.Boolean]) { 2247 bindings.CallCacheStorageDelete( 2248 this.ref, js.Pointer(&ret), 2249 cacheName.Ref(), 2250 ) 2251 2252 return 2253 } 2254 2255 // TryDelete calls the method "CacheStorage.delete" 2256 // in a try/catch block and returns (_, err, ok = false) when it went through 2257 // the catch clause. 2258 func (this CacheStorage) TryDelete(cacheName js.String) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 2259 ok = js.True == bindings.TryCacheStorageDelete( 2260 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2261 cacheName.Ref(), 2262 ) 2263 2264 return 2265 } 2266 2267 // HasFuncKeys returns true if the method "CacheStorage.keys" exists. 2268 func (this CacheStorage) HasFuncKeys() bool { 2269 return js.True == bindings.HasFuncCacheStorageKeys( 2270 this.ref, 2271 ) 2272 } 2273 2274 // FuncKeys returns the method "CacheStorage.keys". 2275 func (this CacheStorage) FuncKeys() (fn js.Func[func() js.Promise[js.Array[js.String]]]) { 2276 bindings.FuncCacheStorageKeys( 2277 this.ref, js.Pointer(&fn), 2278 ) 2279 return 2280 } 2281 2282 // Keys calls the method "CacheStorage.keys". 2283 func (this CacheStorage) Keys() (ret js.Promise[js.Array[js.String]]) { 2284 bindings.CallCacheStorageKeys( 2285 this.ref, js.Pointer(&ret), 2286 ) 2287 2288 return 2289 } 2290 2291 // TryKeys calls the method "CacheStorage.keys" 2292 // in a try/catch block and returns (_, err, ok = false) when it went through 2293 // the catch clause. 2294 func (this CacheStorage) TryKeys() (ret js.Promise[js.Array[js.String]], exception js.Any, ok bool) { 2295 ok = js.True == bindings.TryCacheStorageKeys( 2296 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2297 ) 2298 2299 return 2300 } 2301 2302 type CameraDevicePermissionDescriptor struct { 2303 // PanTiltZoom is "CameraDevicePermissionDescriptor.panTiltZoom" 2304 // 2305 // Optional, defaults to false. 2306 // 2307 // NOTE: FFI_USE_PanTiltZoom MUST be set to true to make this field effective. 2308 PanTiltZoom bool 2309 // Name is "CameraDevicePermissionDescriptor.name" 2310 // 2311 // Required 2312 Name js.String 2313 2314 FFI_USE_PanTiltZoom bool // for PanTiltZoom. 2315 2316 FFI_USE bool 2317 } 2318 2319 // FromRef calls UpdateFrom and returns a CameraDevicePermissionDescriptor with all fields set. 2320 func (p CameraDevicePermissionDescriptor) FromRef(ref js.Ref) CameraDevicePermissionDescriptor { 2321 p.UpdateFrom(ref) 2322 return p 2323 } 2324 2325 // New creates a new CameraDevicePermissionDescriptor in the application heap. 2326 func (p CameraDevicePermissionDescriptor) New() js.Ref { 2327 return bindings.CameraDevicePermissionDescriptorJSLoad( 2328 js.Pointer(&p), js.True, 0, 2329 ) 2330 } 2331 2332 // UpdateFrom copies value of all fields of the heap object to p. 2333 func (p *CameraDevicePermissionDescriptor) UpdateFrom(ref js.Ref) { 2334 bindings.CameraDevicePermissionDescriptorJSStore( 2335 js.Pointer(p), ref, 2336 ) 2337 } 2338 2339 // Update writes all fields of the p to the heap object referenced by ref. 2340 func (p *CameraDevicePermissionDescriptor) Update(ref js.Ref) { 2341 bindings.CameraDevicePermissionDescriptorJSLoad( 2342 js.Pointer(p), js.False, ref, 2343 ) 2344 } 2345 2346 // FreeMembers frees fields with heap reference, if recursive is true 2347 // free all heap references reachable from p. 2348 func (p *CameraDevicePermissionDescriptor) FreeMembers(recursive bool) { 2349 js.Free( 2350 p.Name.Ref(), 2351 ) 2352 p.Name = p.Name.FromRef(js.Undefined) 2353 } 2354 2355 func NewCanMakePaymentEvent(typ js.String) (ret CanMakePaymentEvent) { 2356 ret.ref = bindings.NewCanMakePaymentEventByCanMakePaymentEvent( 2357 typ.Ref()) 2358 return 2359 } 2360 2361 type CanMakePaymentEvent struct { 2362 ExtendableEvent 2363 } 2364 2365 func (this CanMakePaymentEvent) Once() CanMakePaymentEvent { 2366 this.ref.Once() 2367 return this 2368 } 2369 2370 func (this CanMakePaymentEvent) Ref() js.Ref { 2371 return this.ExtendableEvent.Ref() 2372 } 2373 2374 func (this CanMakePaymentEvent) FromRef(ref js.Ref) CanMakePaymentEvent { 2375 this.ExtendableEvent = this.ExtendableEvent.FromRef(ref) 2376 return this 2377 } 2378 2379 func (this CanMakePaymentEvent) Free() { 2380 this.ref.Free() 2381 } 2382 2383 // HasFuncRespondWith returns true if the method "CanMakePaymentEvent.respondWith" exists. 2384 func (this CanMakePaymentEvent) HasFuncRespondWith() bool { 2385 return js.True == bindings.HasFuncCanMakePaymentEventRespondWith( 2386 this.ref, 2387 ) 2388 } 2389 2390 // FuncRespondWith returns the method "CanMakePaymentEvent.respondWith". 2391 func (this CanMakePaymentEvent) FuncRespondWith() (fn js.Func[func(canMakePaymentResponse js.Promise[js.Boolean])]) { 2392 bindings.FuncCanMakePaymentEventRespondWith( 2393 this.ref, js.Pointer(&fn), 2394 ) 2395 return 2396 } 2397 2398 // RespondWith calls the method "CanMakePaymentEvent.respondWith". 2399 func (this CanMakePaymentEvent) RespondWith(canMakePaymentResponse js.Promise[js.Boolean]) (ret js.Void) { 2400 bindings.CallCanMakePaymentEventRespondWith( 2401 this.ref, js.Pointer(&ret), 2402 canMakePaymentResponse.Ref(), 2403 ) 2404 2405 return 2406 } 2407 2408 // TryRespondWith calls the method "CanMakePaymentEvent.respondWith" 2409 // in a try/catch block and returns (_, err, ok = false) when it went through 2410 // the catch clause. 2411 func (this CanMakePaymentEvent) TryRespondWith(canMakePaymentResponse js.Promise[js.Boolean]) (ret js.Void, exception js.Any, ok bool) { 2412 ok = js.True == bindings.TryCanMakePaymentEventRespondWith( 2413 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2414 canMakePaymentResponse.Ref(), 2415 ) 2416 2417 return 2418 } 2419 2420 type CanvasCaptureMediaStreamTrack struct { 2421 MediaStreamTrack 2422 } 2423 2424 func (this CanvasCaptureMediaStreamTrack) Once() CanvasCaptureMediaStreamTrack { 2425 this.ref.Once() 2426 return this 2427 } 2428 2429 func (this CanvasCaptureMediaStreamTrack) Ref() js.Ref { 2430 return this.MediaStreamTrack.Ref() 2431 } 2432 2433 func (this CanvasCaptureMediaStreamTrack) FromRef(ref js.Ref) CanvasCaptureMediaStreamTrack { 2434 this.MediaStreamTrack = this.MediaStreamTrack.FromRef(ref) 2435 return this 2436 } 2437 2438 func (this CanvasCaptureMediaStreamTrack) Free() { 2439 this.ref.Free() 2440 } 2441 2442 // Canvas returns the value of property "CanvasCaptureMediaStreamTrack.canvas". 2443 // 2444 // It returns ok=false if there is no such property. 2445 func (this CanvasCaptureMediaStreamTrack) Canvas() (ret HTMLCanvasElement, ok bool) { 2446 ok = js.True == bindings.GetCanvasCaptureMediaStreamTrackCanvas( 2447 this.ref, js.Pointer(&ret), 2448 ) 2449 return 2450 } 2451 2452 // HasFuncRequestFrame returns true if the method "CanvasCaptureMediaStreamTrack.requestFrame" exists. 2453 func (this CanvasCaptureMediaStreamTrack) HasFuncRequestFrame() bool { 2454 return js.True == bindings.HasFuncCanvasCaptureMediaStreamTrackRequestFrame( 2455 this.ref, 2456 ) 2457 } 2458 2459 // FuncRequestFrame returns the method "CanvasCaptureMediaStreamTrack.requestFrame". 2460 func (this CanvasCaptureMediaStreamTrack) FuncRequestFrame() (fn js.Func[func()]) { 2461 bindings.FuncCanvasCaptureMediaStreamTrackRequestFrame( 2462 this.ref, js.Pointer(&fn), 2463 ) 2464 return 2465 } 2466 2467 // RequestFrame calls the method "CanvasCaptureMediaStreamTrack.requestFrame". 2468 func (this CanvasCaptureMediaStreamTrack) RequestFrame() (ret js.Void) { 2469 bindings.CallCanvasCaptureMediaStreamTrackRequestFrame( 2470 this.ref, js.Pointer(&ret), 2471 ) 2472 2473 return 2474 } 2475 2476 // TryRequestFrame calls the method "CanvasCaptureMediaStreamTrack.requestFrame" 2477 // in a try/catch block and returns (_, err, ok = false) when it went through 2478 // the catch clause. 2479 func (this CanvasCaptureMediaStreamTrack) TryRequestFrame() (ret js.Void, exception js.Any, ok bool) { 2480 ok = js.True == bindings.TryCanvasCaptureMediaStreamTrackRequestFrame( 2481 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2482 ) 2483 2484 return 2485 } 2486 2487 type CaptureActionEventInit struct { 2488 // Action is "CaptureActionEventInit.action" 2489 // 2490 // Optional 2491 Action js.String 2492 // Bubbles is "CaptureActionEventInit.bubbles" 2493 // 2494 // Optional, defaults to false. 2495 // 2496 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2497 Bubbles bool 2498 // Cancelable is "CaptureActionEventInit.cancelable" 2499 // 2500 // Optional, defaults to false. 2501 // 2502 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2503 Cancelable bool 2504 // Composed is "CaptureActionEventInit.composed" 2505 // 2506 // Optional, defaults to false. 2507 // 2508 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2509 Composed bool 2510 2511 FFI_USE_Bubbles bool // for Bubbles. 2512 FFI_USE_Cancelable bool // for Cancelable. 2513 FFI_USE_Composed bool // for Composed. 2514 2515 FFI_USE bool 2516 } 2517 2518 // FromRef calls UpdateFrom and returns a CaptureActionEventInit with all fields set. 2519 func (p CaptureActionEventInit) FromRef(ref js.Ref) CaptureActionEventInit { 2520 p.UpdateFrom(ref) 2521 return p 2522 } 2523 2524 // New creates a new CaptureActionEventInit in the application heap. 2525 func (p CaptureActionEventInit) New() js.Ref { 2526 return bindings.CaptureActionEventInitJSLoad( 2527 js.Pointer(&p), js.True, 0, 2528 ) 2529 } 2530 2531 // UpdateFrom copies value of all fields of the heap object to p. 2532 func (p *CaptureActionEventInit) UpdateFrom(ref js.Ref) { 2533 bindings.CaptureActionEventInitJSStore( 2534 js.Pointer(p), ref, 2535 ) 2536 } 2537 2538 // Update writes all fields of the p to the heap object referenced by ref. 2539 func (p *CaptureActionEventInit) Update(ref js.Ref) { 2540 bindings.CaptureActionEventInitJSLoad( 2541 js.Pointer(p), js.False, ref, 2542 ) 2543 } 2544 2545 // FreeMembers frees fields with heap reference, if recursive is true 2546 // free all heap references reachable from p. 2547 func (p *CaptureActionEventInit) FreeMembers(recursive bool) { 2548 js.Free( 2549 p.Action.Ref(), 2550 ) 2551 p.Action = p.Action.FromRef(js.Undefined) 2552 } 2553 2554 func NewCaptureActionEvent(init CaptureActionEventInit) (ret CaptureActionEvent) { 2555 ret.ref = bindings.NewCaptureActionEventByCaptureActionEvent( 2556 js.Pointer(&init)) 2557 return 2558 } 2559 2560 func NewCaptureActionEventByCaptureActionEvent1() (ret CaptureActionEvent) { 2561 ret.ref = bindings.NewCaptureActionEventByCaptureActionEvent1() 2562 return 2563 } 2564 2565 type CaptureActionEvent struct { 2566 Event 2567 } 2568 2569 func (this CaptureActionEvent) Once() CaptureActionEvent { 2570 this.ref.Once() 2571 return this 2572 } 2573 2574 func (this CaptureActionEvent) Ref() js.Ref { 2575 return this.Event.Ref() 2576 } 2577 2578 func (this CaptureActionEvent) FromRef(ref js.Ref) CaptureActionEvent { 2579 this.Event = this.Event.FromRef(ref) 2580 return this 2581 } 2582 2583 func (this CaptureActionEvent) Free() { 2584 this.ref.Free() 2585 } 2586 2587 // Action returns the value of property "CaptureActionEvent.action". 2588 // 2589 // It returns ok=false if there is no such property. 2590 func (this CaptureActionEvent) Action() (ret CaptureAction, ok bool) { 2591 ok = js.True == bindings.GetCaptureActionEventAction( 2592 this.ref, js.Pointer(&ret), 2593 ) 2594 return 2595 } 2596 2597 type CaptureStartFocusBehavior uint32 2598 2599 const ( 2600 _ CaptureStartFocusBehavior = iota 2601 2602 CaptureStartFocusBehavior_FOCUS_CAPTURING_APPLICATION 2603 CaptureStartFocusBehavior_FOCUS_CAPTURED_SURFACE 2604 CaptureStartFocusBehavior_NO_FOCUS_CHANGE 2605 ) 2606 2607 func (CaptureStartFocusBehavior) FromRef(str js.Ref) CaptureStartFocusBehavior { 2608 return CaptureStartFocusBehavior(bindings.ConstOfCaptureStartFocusBehavior(str)) 2609 } 2610 2611 func (x CaptureStartFocusBehavior) String() (string, bool) { 2612 switch x { 2613 case CaptureStartFocusBehavior_FOCUS_CAPTURING_APPLICATION: 2614 return "focus-capturing-application", true 2615 case CaptureStartFocusBehavior_FOCUS_CAPTURED_SURFACE: 2616 return "focus-captured-surface", true 2617 case CaptureStartFocusBehavior_NO_FOCUS_CHANGE: 2618 return "no-focus-change", true 2619 default: 2620 return "", false 2621 } 2622 } 2623 2624 type CaptureController struct { 2625 EventTarget 2626 } 2627 2628 func (this CaptureController) Once() CaptureController { 2629 this.ref.Once() 2630 return this 2631 } 2632 2633 func (this CaptureController) Ref() js.Ref { 2634 return this.EventTarget.Ref() 2635 } 2636 2637 func (this CaptureController) FromRef(ref js.Ref) CaptureController { 2638 this.EventTarget = this.EventTarget.FromRef(ref) 2639 return this 2640 } 2641 2642 func (this CaptureController) Free() { 2643 this.ref.Free() 2644 } 2645 2646 // HasFuncSetFocusBehavior returns true if the method "CaptureController.setFocusBehavior" exists. 2647 func (this CaptureController) HasFuncSetFocusBehavior() bool { 2648 return js.True == bindings.HasFuncCaptureControllerSetFocusBehavior( 2649 this.ref, 2650 ) 2651 } 2652 2653 // FuncSetFocusBehavior returns the method "CaptureController.setFocusBehavior". 2654 func (this CaptureController) FuncSetFocusBehavior() (fn js.Func[func(focusBehavior CaptureStartFocusBehavior)]) { 2655 bindings.FuncCaptureControllerSetFocusBehavior( 2656 this.ref, js.Pointer(&fn), 2657 ) 2658 return 2659 } 2660 2661 // SetFocusBehavior calls the method "CaptureController.setFocusBehavior". 2662 func (this CaptureController) SetFocusBehavior(focusBehavior CaptureStartFocusBehavior) (ret js.Void) { 2663 bindings.CallCaptureControllerSetFocusBehavior( 2664 this.ref, js.Pointer(&ret), 2665 uint32(focusBehavior), 2666 ) 2667 2668 return 2669 } 2670 2671 // TrySetFocusBehavior calls the method "CaptureController.setFocusBehavior" 2672 // in a try/catch block and returns (_, err, ok = false) when it went through 2673 // the catch clause. 2674 func (this CaptureController) TrySetFocusBehavior(focusBehavior CaptureStartFocusBehavior) (ret js.Void, exception js.Any, ok bool) { 2675 ok = js.True == bindings.TryCaptureControllerSetFocusBehavior( 2676 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2677 uint32(focusBehavior), 2678 ) 2679 2680 return 2681 } 2682 2683 type CaptureHandleConfig struct { 2684 // ExposeOrigin is "CaptureHandleConfig.exposeOrigin" 2685 // 2686 // Optional, defaults to false. 2687 // 2688 // NOTE: FFI_USE_ExposeOrigin MUST be set to true to make this field effective. 2689 ExposeOrigin bool 2690 // Handle is "CaptureHandleConfig.handle" 2691 // 2692 // Optional, defaults to "". 2693 Handle js.String 2694 // PermittedOrigins is "CaptureHandleConfig.permittedOrigins" 2695 // 2696 // Optional, defaults to []. 2697 PermittedOrigins js.Array[js.String] 2698 2699 FFI_USE_ExposeOrigin bool // for ExposeOrigin. 2700 2701 FFI_USE bool 2702 } 2703 2704 // FromRef calls UpdateFrom and returns a CaptureHandleConfig with all fields set. 2705 func (p CaptureHandleConfig) FromRef(ref js.Ref) CaptureHandleConfig { 2706 p.UpdateFrom(ref) 2707 return p 2708 } 2709 2710 // New creates a new CaptureHandleConfig in the application heap. 2711 func (p CaptureHandleConfig) New() js.Ref { 2712 return bindings.CaptureHandleConfigJSLoad( 2713 js.Pointer(&p), js.True, 0, 2714 ) 2715 } 2716 2717 // UpdateFrom copies value of all fields of the heap object to p. 2718 func (p *CaptureHandleConfig) UpdateFrom(ref js.Ref) { 2719 bindings.CaptureHandleConfigJSStore( 2720 js.Pointer(p), ref, 2721 ) 2722 } 2723 2724 // Update writes all fields of the p to the heap object referenced by ref. 2725 func (p *CaptureHandleConfig) Update(ref js.Ref) { 2726 bindings.CaptureHandleConfigJSLoad( 2727 js.Pointer(p), js.False, ref, 2728 ) 2729 } 2730 2731 // FreeMembers frees fields with heap reference, if recursive is true 2732 // free all heap references reachable from p. 2733 func (p *CaptureHandleConfig) FreeMembers(recursive bool) { 2734 js.Free( 2735 p.Handle.Ref(), 2736 p.PermittedOrigins.Ref(), 2737 ) 2738 p.Handle = p.Handle.FromRef(js.Undefined) 2739 p.PermittedOrigins = p.PermittedOrigins.FromRef(js.Undefined) 2740 } 2741 2742 type CapturedMouseEventInit struct { 2743 // SurfaceX is "CapturedMouseEventInit.surfaceX" 2744 // 2745 // Optional, defaults to -1. 2746 // 2747 // NOTE: FFI_USE_SurfaceX MUST be set to true to make this field effective. 2748 SurfaceX int32 2749 // SurfaceY is "CapturedMouseEventInit.surfaceY" 2750 // 2751 // Optional, defaults to -1. 2752 // 2753 // NOTE: FFI_USE_SurfaceY MUST be set to true to make this field effective. 2754 SurfaceY int32 2755 // Bubbles is "CapturedMouseEventInit.bubbles" 2756 // 2757 // Optional, defaults to false. 2758 // 2759 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2760 Bubbles bool 2761 // Cancelable is "CapturedMouseEventInit.cancelable" 2762 // 2763 // Optional, defaults to false. 2764 // 2765 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2766 Cancelable bool 2767 // Composed is "CapturedMouseEventInit.composed" 2768 // 2769 // Optional, defaults to false. 2770 // 2771 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2772 Composed bool 2773 2774 FFI_USE_SurfaceX bool // for SurfaceX. 2775 FFI_USE_SurfaceY bool // for SurfaceY. 2776 FFI_USE_Bubbles bool // for Bubbles. 2777 FFI_USE_Cancelable bool // for Cancelable. 2778 FFI_USE_Composed bool // for Composed. 2779 2780 FFI_USE bool 2781 } 2782 2783 // FromRef calls UpdateFrom and returns a CapturedMouseEventInit with all fields set. 2784 func (p CapturedMouseEventInit) FromRef(ref js.Ref) CapturedMouseEventInit { 2785 p.UpdateFrom(ref) 2786 return p 2787 } 2788 2789 // New creates a new CapturedMouseEventInit in the application heap. 2790 func (p CapturedMouseEventInit) New() js.Ref { 2791 return bindings.CapturedMouseEventInitJSLoad( 2792 js.Pointer(&p), js.True, 0, 2793 ) 2794 } 2795 2796 // UpdateFrom copies value of all fields of the heap object to p. 2797 func (p *CapturedMouseEventInit) UpdateFrom(ref js.Ref) { 2798 bindings.CapturedMouseEventInitJSStore( 2799 js.Pointer(p), ref, 2800 ) 2801 } 2802 2803 // Update writes all fields of the p to the heap object referenced by ref. 2804 func (p *CapturedMouseEventInit) Update(ref js.Ref) { 2805 bindings.CapturedMouseEventInitJSLoad( 2806 js.Pointer(p), js.False, ref, 2807 ) 2808 } 2809 2810 // FreeMembers frees fields with heap reference, if recursive is true 2811 // free all heap references reachable from p. 2812 func (p *CapturedMouseEventInit) FreeMembers(recursive bool) { 2813 } 2814 2815 func NewCapturedMouseEvent(typ js.String, eventInitDict CapturedMouseEventInit) (ret CapturedMouseEvent) { 2816 ret.ref = bindings.NewCapturedMouseEventByCapturedMouseEvent( 2817 typ.Ref(), 2818 js.Pointer(&eventInitDict)) 2819 return 2820 } 2821 2822 func NewCapturedMouseEventByCapturedMouseEvent1(typ js.String) (ret CapturedMouseEvent) { 2823 ret.ref = bindings.NewCapturedMouseEventByCapturedMouseEvent1( 2824 typ.Ref()) 2825 return 2826 } 2827 2828 type CapturedMouseEvent struct { 2829 Event 2830 } 2831 2832 func (this CapturedMouseEvent) Once() CapturedMouseEvent { 2833 this.ref.Once() 2834 return this 2835 } 2836 2837 func (this CapturedMouseEvent) Ref() js.Ref { 2838 return this.Event.Ref() 2839 } 2840 2841 func (this CapturedMouseEvent) FromRef(ref js.Ref) CapturedMouseEvent { 2842 this.Event = this.Event.FromRef(ref) 2843 return this 2844 } 2845 2846 func (this CapturedMouseEvent) Free() { 2847 this.ref.Free() 2848 } 2849 2850 // SurfaceX returns the value of property "CapturedMouseEvent.surfaceX". 2851 // 2852 // It returns ok=false if there is no such property. 2853 func (this CapturedMouseEvent) SurfaceX() (ret int32, ok bool) { 2854 ok = js.True == bindings.GetCapturedMouseEventSurfaceX( 2855 this.ref, js.Pointer(&ret), 2856 ) 2857 return 2858 } 2859 2860 // SurfaceY returns the value of property "CapturedMouseEvent.surfaceY". 2861 // 2862 // It returns ok=false if there is no such property. 2863 func (this CapturedMouseEvent) SurfaceY() (ret int32, ok bool) { 2864 ok = js.True == bindings.GetCapturedMouseEventSurfaceY( 2865 this.ref, js.Pointer(&ret), 2866 ) 2867 return 2868 } 2869 2870 type CharacterBoundsUpdateEventInit struct { 2871 // RangeStart is "CharacterBoundsUpdateEventInit.rangeStart" 2872 // 2873 // Optional 2874 // 2875 // NOTE: FFI_USE_RangeStart MUST be set to true to make this field effective. 2876 RangeStart uint32 2877 // RangeEnd is "CharacterBoundsUpdateEventInit.rangeEnd" 2878 // 2879 // Optional 2880 // 2881 // NOTE: FFI_USE_RangeEnd MUST be set to true to make this field effective. 2882 RangeEnd uint32 2883 // Bubbles is "CharacterBoundsUpdateEventInit.bubbles" 2884 // 2885 // Optional, defaults to false. 2886 // 2887 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2888 Bubbles bool 2889 // Cancelable is "CharacterBoundsUpdateEventInit.cancelable" 2890 // 2891 // Optional, defaults to false. 2892 // 2893 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2894 Cancelable bool 2895 // Composed is "CharacterBoundsUpdateEventInit.composed" 2896 // 2897 // Optional, defaults to false. 2898 // 2899 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2900 Composed bool 2901 2902 FFI_USE_RangeStart bool // for RangeStart. 2903 FFI_USE_RangeEnd bool // for RangeEnd. 2904 FFI_USE_Bubbles bool // for Bubbles. 2905 FFI_USE_Cancelable bool // for Cancelable. 2906 FFI_USE_Composed bool // for Composed. 2907 2908 FFI_USE bool 2909 } 2910 2911 // FromRef calls UpdateFrom and returns a CharacterBoundsUpdateEventInit with all fields set. 2912 func (p CharacterBoundsUpdateEventInit) FromRef(ref js.Ref) CharacterBoundsUpdateEventInit { 2913 p.UpdateFrom(ref) 2914 return p 2915 } 2916 2917 // New creates a new CharacterBoundsUpdateEventInit in the application heap. 2918 func (p CharacterBoundsUpdateEventInit) New() js.Ref { 2919 return bindings.CharacterBoundsUpdateEventInitJSLoad( 2920 js.Pointer(&p), js.True, 0, 2921 ) 2922 } 2923 2924 // UpdateFrom copies value of all fields of the heap object to p. 2925 func (p *CharacterBoundsUpdateEventInit) UpdateFrom(ref js.Ref) { 2926 bindings.CharacterBoundsUpdateEventInitJSStore( 2927 js.Pointer(p), ref, 2928 ) 2929 } 2930 2931 // Update writes all fields of the p to the heap object referenced by ref. 2932 func (p *CharacterBoundsUpdateEventInit) Update(ref js.Ref) { 2933 bindings.CharacterBoundsUpdateEventInitJSLoad( 2934 js.Pointer(p), js.False, ref, 2935 ) 2936 } 2937 2938 // FreeMembers frees fields with heap reference, if recursive is true 2939 // free all heap references reachable from p. 2940 func (p *CharacterBoundsUpdateEventInit) FreeMembers(recursive bool) { 2941 } 2942 2943 func NewCharacterBoundsUpdateEvent(typ js.String, options CharacterBoundsUpdateEventInit) (ret CharacterBoundsUpdateEvent) { 2944 ret.ref = bindings.NewCharacterBoundsUpdateEventByCharacterBoundsUpdateEvent( 2945 typ.Ref(), 2946 js.Pointer(&options)) 2947 return 2948 } 2949 2950 func NewCharacterBoundsUpdateEventByCharacterBoundsUpdateEvent1(typ js.String) (ret CharacterBoundsUpdateEvent) { 2951 ret.ref = bindings.NewCharacterBoundsUpdateEventByCharacterBoundsUpdateEvent1( 2952 typ.Ref()) 2953 return 2954 } 2955 2956 type CharacterBoundsUpdateEvent struct { 2957 Event 2958 } 2959 2960 func (this CharacterBoundsUpdateEvent) Once() CharacterBoundsUpdateEvent { 2961 this.ref.Once() 2962 return this 2963 } 2964 2965 func (this CharacterBoundsUpdateEvent) Ref() js.Ref { 2966 return this.Event.Ref() 2967 } 2968 2969 func (this CharacterBoundsUpdateEvent) FromRef(ref js.Ref) CharacterBoundsUpdateEvent { 2970 this.Event = this.Event.FromRef(ref) 2971 return this 2972 } 2973 2974 func (this CharacterBoundsUpdateEvent) Free() { 2975 this.ref.Free() 2976 } 2977 2978 // RangeStart returns the value of property "CharacterBoundsUpdateEvent.rangeStart". 2979 // 2980 // It returns ok=false if there is no such property. 2981 func (this CharacterBoundsUpdateEvent) RangeStart() (ret uint32, ok bool) { 2982 ok = js.True == bindings.GetCharacterBoundsUpdateEventRangeStart( 2983 this.ref, js.Pointer(&ret), 2984 ) 2985 return 2986 } 2987 2988 // RangeEnd returns the value of property "CharacterBoundsUpdateEvent.rangeEnd". 2989 // 2990 // It returns ok=false if there is no such property. 2991 func (this CharacterBoundsUpdateEvent) RangeEnd() (ret uint32, ok bool) { 2992 ok = js.True == bindings.GetCharacterBoundsUpdateEventRangeEnd( 2993 this.ref, js.Pointer(&ret), 2994 ) 2995 return 2996 } 2997 2998 type CharacterData struct { 2999 Node 3000 } 3001 3002 func (this CharacterData) Once() CharacterData { 3003 this.ref.Once() 3004 return this 3005 } 3006 3007 func (this CharacterData) Ref() js.Ref { 3008 return this.Node.Ref() 3009 } 3010 3011 func (this CharacterData) FromRef(ref js.Ref) CharacterData { 3012 this.Node = this.Node.FromRef(ref) 3013 return this 3014 } 3015 3016 func (this CharacterData) Free() { 3017 this.ref.Free() 3018 } 3019 3020 // Data returns the value of property "CharacterData.data". 3021 // 3022 // It returns ok=false if there is no such property. 3023 func (this CharacterData) Data() (ret js.String, ok bool) { 3024 ok = js.True == bindings.GetCharacterDataData( 3025 this.ref, js.Pointer(&ret), 3026 ) 3027 return 3028 } 3029 3030 // SetData sets the value of property "CharacterData.data" to val. 3031 // 3032 // It returns false if the property cannot be set. 3033 func (this CharacterData) SetData(val js.String) bool { 3034 return js.True == bindings.SetCharacterDataData( 3035 this.ref, 3036 val.Ref(), 3037 ) 3038 } 3039 3040 // Length returns the value of property "CharacterData.length". 3041 // 3042 // It returns ok=false if there is no such property. 3043 func (this CharacterData) Length() (ret uint32, ok bool) { 3044 ok = js.True == bindings.GetCharacterDataLength( 3045 this.ref, js.Pointer(&ret), 3046 ) 3047 return 3048 } 3049 3050 // PreviousElementSibling returns the value of property "CharacterData.previousElementSibling". 3051 // 3052 // It returns ok=false if there is no such property. 3053 func (this CharacterData) PreviousElementSibling() (ret Element, ok bool) { 3054 ok = js.True == bindings.GetCharacterDataPreviousElementSibling( 3055 this.ref, js.Pointer(&ret), 3056 ) 3057 return 3058 } 3059 3060 // NextElementSibling returns the value of property "CharacterData.nextElementSibling". 3061 // 3062 // It returns ok=false if there is no such property. 3063 func (this CharacterData) NextElementSibling() (ret Element, ok bool) { 3064 ok = js.True == bindings.GetCharacterDataNextElementSibling( 3065 this.ref, js.Pointer(&ret), 3066 ) 3067 return 3068 } 3069 3070 // HasFuncSubstringData returns true if the method "CharacterData.substringData" exists. 3071 func (this CharacterData) HasFuncSubstringData() bool { 3072 return js.True == bindings.HasFuncCharacterDataSubstringData( 3073 this.ref, 3074 ) 3075 } 3076 3077 // FuncSubstringData returns the method "CharacterData.substringData". 3078 func (this CharacterData) FuncSubstringData() (fn js.Func[func(offset uint32, count uint32) js.String]) { 3079 bindings.FuncCharacterDataSubstringData( 3080 this.ref, js.Pointer(&fn), 3081 ) 3082 return 3083 } 3084 3085 // SubstringData calls the method "CharacterData.substringData". 3086 func (this CharacterData) SubstringData(offset uint32, count uint32) (ret js.String) { 3087 bindings.CallCharacterDataSubstringData( 3088 this.ref, js.Pointer(&ret), 3089 uint32(offset), 3090 uint32(count), 3091 ) 3092 3093 return 3094 } 3095 3096 // TrySubstringData calls the method "CharacterData.substringData" 3097 // in a try/catch block and returns (_, err, ok = false) when it went through 3098 // the catch clause. 3099 func (this CharacterData) TrySubstringData(offset uint32, count uint32) (ret js.String, exception js.Any, ok bool) { 3100 ok = js.True == bindings.TryCharacterDataSubstringData( 3101 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3102 uint32(offset), 3103 uint32(count), 3104 ) 3105 3106 return 3107 } 3108 3109 // HasFuncAppendData returns true if the method "CharacterData.appendData" exists. 3110 func (this CharacterData) HasFuncAppendData() bool { 3111 return js.True == bindings.HasFuncCharacterDataAppendData( 3112 this.ref, 3113 ) 3114 } 3115 3116 // FuncAppendData returns the method "CharacterData.appendData". 3117 func (this CharacterData) FuncAppendData() (fn js.Func[func(data js.String)]) { 3118 bindings.FuncCharacterDataAppendData( 3119 this.ref, js.Pointer(&fn), 3120 ) 3121 return 3122 } 3123 3124 // AppendData calls the method "CharacterData.appendData". 3125 func (this CharacterData) AppendData(data js.String) (ret js.Void) { 3126 bindings.CallCharacterDataAppendData( 3127 this.ref, js.Pointer(&ret), 3128 data.Ref(), 3129 ) 3130 3131 return 3132 } 3133 3134 // TryAppendData calls the method "CharacterData.appendData" 3135 // in a try/catch block and returns (_, err, ok = false) when it went through 3136 // the catch clause. 3137 func (this CharacterData) TryAppendData(data js.String) (ret js.Void, exception js.Any, ok bool) { 3138 ok = js.True == bindings.TryCharacterDataAppendData( 3139 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3140 data.Ref(), 3141 ) 3142 3143 return 3144 } 3145 3146 // HasFuncInsertData returns true if the method "CharacterData.insertData" exists. 3147 func (this CharacterData) HasFuncInsertData() bool { 3148 return js.True == bindings.HasFuncCharacterDataInsertData( 3149 this.ref, 3150 ) 3151 } 3152 3153 // FuncInsertData returns the method "CharacterData.insertData". 3154 func (this CharacterData) FuncInsertData() (fn js.Func[func(offset uint32, data js.String)]) { 3155 bindings.FuncCharacterDataInsertData( 3156 this.ref, js.Pointer(&fn), 3157 ) 3158 return 3159 } 3160 3161 // InsertData calls the method "CharacterData.insertData". 3162 func (this CharacterData) InsertData(offset uint32, data js.String) (ret js.Void) { 3163 bindings.CallCharacterDataInsertData( 3164 this.ref, js.Pointer(&ret), 3165 uint32(offset), 3166 data.Ref(), 3167 ) 3168 3169 return 3170 } 3171 3172 // TryInsertData calls the method "CharacterData.insertData" 3173 // in a try/catch block and returns (_, err, ok = false) when it went through 3174 // the catch clause. 3175 func (this CharacterData) TryInsertData(offset uint32, data js.String) (ret js.Void, exception js.Any, ok bool) { 3176 ok = js.True == bindings.TryCharacterDataInsertData( 3177 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3178 uint32(offset), 3179 data.Ref(), 3180 ) 3181 3182 return 3183 } 3184 3185 // HasFuncDeleteData returns true if the method "CharacterData.deleteData" exists. 3186 func (this CharacterData) HasFuncDeleteData() bool { 3187 return js.True == bindings.HasFuncCharacterDataDeleteData( 3188 this.ref, 3189 ) 3190 } 3191 3192 // FuncDeleteData returns the method "CharacterData.deleteData". 3193 func (this CharacterData) FuncDeleteData() (fn js.Func[func(offset uint32, count uint32)]) { 3194 bindings.FuncCharacterDataDeleteData( 3195 this.ref, js.Pointer(&fn), 3196 ) 3197 return 3198 } 3199 3200 // DeleteData calls the method "CharacterData.deleteData". 3201 func (this CharacterData) DeleteData(offset uint32, count uint32) (ret js.Void) { 3202 bindings.CallCharacterDataDeleteData( 3203 this.ref, js.Pointer(&ret), 3204 uint32(offset), 3205 uint32(count), 3206 ) 3207 3208 return 3209 } 3210 3211 // TryDeleteData calls the method "CharacterData.deleteData" 3212 // in a try/catch block and returns (_, err, ok = false) when it went through 3213 // the catch clause. 3214 func (this CharacterData) TryDeleteData(offset uint32, count uint32) (ret js.Void, exception js.Any, ok bool) { 3215 ok = js.True == bindings.TryCharacterDataDeleteData( 3216 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3217 uint32(offset), 3218 uint32(count), 3219 ) 3220 3221 return 3222 } 3223 3224 // HasFuncReplaceData returns true if the method "CharacterData.replaceData" exists. 3225 func (this CharacterData) HasFuncReplaceData() bool { 3226 return js.True == bindings.HasFuncCharacterDataReplaceData( 3227 this.ref, 3228 ) 3229 } 3230 3231 // FuncReplaceData returns the method "CharacterData.replaceData". 3232 func (this CharacterData) FuncReplaceData() (fn js.Func[func(offset uint32, count uint32, data js.String)]) { 3233 bindings.FuncCharacterDataReplaceData( 3234 this.ref, js.Pointer(&fn), 3235 ) 3236 return 3237 } 3238 3239 // ReplaceData calls the method "CharacterData.replaceData". 3240 func (this CharacterData) ReplaceData(offset uint32, count uint32, data js.String) (ret js.Void) { 3241 bindings.CallCharacterDataReplaceData( 3242 this.ref, js.Pointer(&ret), 3243 uint32(offset), 3244 uint32(count), 3245 data.Ref(), 3246 ) 3247 3248 return 3249 } 3250 3251 // TryReplaceData calls the method "CharacterData.replaceData" 3252 // in a try/catch block and returns (_, err, ok = false) when it went through 3253 // the catch clause. 3254 func (this CharacterData) TryReplaceData(offset uint32, count uint32, data js.String) (ret js.Void, exception js.Any, ok bool) { 3255 ok = js.True == bindings.TryCharacterDataReplaceData( 3256 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3257 uint32(offset), 3258 uint32(count), 3259 data.Ref(), 3260 ) 3261 3262 return 3263 } 3264 3265 // HasFuncBefore returns true if the method "CharacterData.before" exists. 3266 func (this CharacterData) HasFuncBefore() bool { 3267 return js.True == bindings.HasFuncCharacterDataBefore( 3268 this.ref, 3269 ) 3270 } 3271 3272 // FuncBefore returns the method "CharacterData.before". 3273 func (this CharacterData) FuncBefore() (fn js.Func[func(nodes ...OneOf_Node_String)]) { 3274 bindings.FuncCharacterDataBefore( 3275 this.ref, js.Pointer(&fn), 3276 ) 3277 return 3278 } 3279 3280 // Before calls the method "CharacterData.before". 3281 func (this CharacterData) Before(nodes ...OneOf_Node_String) (ret js.Void) { 3282 bindings.CallCharacterDataBefore( 3283 this.ref, js.Pointer(&ret), 3284 js.SliceData(nodes), 3285 js.SizeU(len(nodes)), 3286 ) 3287 3288 return 3289 } 3290 3291 // TryBefore calls the method "CharacterData.before" 3292 // in a try/catch block and returns (_, err, ok = false) when it went through 3293 // the catch clause. 3294 func (this CharacterData) TryBefore(nodes ...OneOf_Node_String) (ret js.Void, exception js.Any, ok bool) { 3295 ok = js.True == bindings.TryCharacterDataBefore( 3296 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3297 js.SliceData(nodes), 3298 js.SizeU(len(nodes)), 3299 ) 3300 3301 return 3302 } 3303 3304 // HasFuncAfter returns true if the method "CharacterData.after" exists. 3305 func (this CharacterData) HasFuncAfter() bool { 3306 return js.True == bindings.HasFuncCharacterDataAfter( 3307 this.ref, 3308 ) 3309 } 3310 3311 // FuncAfter returns the method "CharacterData.after". 3312 func (this CharacterData) FuncAfter() (fn js.Func[func(nodes ...OneOf_Node_String)]) { 3313 bindings.FuncCharacterDataAfter( 3314 this.ref, js.Pointer(&fn), 3315 ) 3316 return 3317 } 3318 3319 // After calls the method "CharacterData.after". 3320 func (this CharacterData) After(nodes ...OneOf_Node_String) (ret js.Void) { 3321 bindings.CallCharacterDataAfter( 3322 this.ref, js.Pointer(&ret), 3323 js.SliceData(nodes), 3324 js.SizeU(len(nodes)), 3325 ) 3326 3327 return 3328 } 3329 3330 // TryAfter calls the method "CharacterData.after" 3331 // in a try/catch block and returns (_, err, ok = false) when it went through 3332 // the catch clause. 3333 func (this CharacterData) TryAfter(nodes ...OneOf_Node_String) (ret js.Void, exception js.Any, ok bool) { 3334 ok = js.True == bindings.TryCharacterDataAfter( 3335 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3336 js.SliceData(nodes), 3337 js.SizeU(len(nodes)), 3338 ) 3339 3340 return 3341 } 3342 3343 // HasFuncReplaceWith returns true if the method "CharacterData.replaceWith" exists. 3344 func (this CharacterData) HasFuncReplaceWith() bool { 3345 return js.True == bindings.HasFuncCharacterDataReplaceWith( 3346 this.ref, 3347 ) 3348 } 3349 3350 // FuncReplaceWith returns the method "CharacterData.replaceWith". 3351 func (this CharacterData) FuncReplaceWith() (fn js.Func[func(nodes ...OneOf_Node_String)]) { 3352 bindings.FuncCharacterDataReplaceWith( 3353 this.ref, js.Pointer(&fn), 3354 ) 3355 return 3356 } 3357 3358 // ReplaceWith calls the method "CharacterData.replaceWith". 3359 func (this CharacterData) ReplaceWith(nodes ...OneOf_Node_String) (ret js.Void) { 3360 bindings.CallCharacterDataReplaceWith( 3361 this.ref, js.Pointer(&ret), 3362 js.SliceData(nodes), 3363 js.SizeU(len(nodes)), 3364 ) 3365 3366 return 3367 } 3368 3369 // TryReplaceWith calls the method "CharacterData.replaceWith" 3370 // in a try/catch block and returns (_, err, ok = false) when it went through 3371 // the catch clause. 3372 func (this CharacterData) TryReplaceWith(nodes ...OneOf_Node_String) (ret js.Void, exception js.Any, ok bool) { 3373 ok = js.True == bindings.TryCharacterDataReplaceWith( 3374 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3375 js.SliceData(nodes), 3376 js.SizeU(len(nodes)), 3377 ) 3378 3379 return 3380 } 3381 3382 // HasFuncRemove returns true if the method "CharacterData.remove" exists. 3383 func (this CharacterData) HasFuncRemove() bool { 3384 return js.True == bindings.HasFuncCharacterDataRemove( 3385 this.ref, 3386 ) 3387 } 3388 3389 // FuncRemove returns the method "CharacterData.remove". 3390 func (this CharacterData) FuncRemove() (fn js.Func[func()]) { 3391 bindings.FuncCharacterDataRemove( 3392 this.ref, js.Pointer(&fn), 3393 ) 3394 return 3395 } 3396 3397 // Remove calls the method "CharacterData.remove". 3398 func (this CharacterData) Remove() (ret js.Void) { 3399 bindings.CallCharacterDataRemove( 3400 this.ref, js.Pointer(&ret), 3401 ) 3402 3403 return 3404 } 3405 3406 // TryRemove calls the method "CharacterData.remove" 3407 // in a try/catch block and returns (_, err, ok = false) when it went through 3408 // the catch clause. 3409 func (this CharacterData) TryRemove() (ret js.Void, exception js.Any, ok bool) { 3410 ok = js.True == bindings.TryCharacterDataRemove( 3411 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3412 ) 3413 3414 return 3415 } 3416 3417 type ChildDisplayType uint32 3418 3419 const ( 3420 _ ChildDisplayType = iota 3421 3422 ChildDisplayType_BLOCK 3423 ChildDisplayType_NORMAL 3424 ) 3425 3426 func (ChildDisplayType) FromRef(str js.Ref) ChildDisplayType { 3427 return ChildDisplayType(bindings.ConstOfChildDisplayType(str)) 3428 } 3429 3430 func (x ChildDisplayType) String() (string, bool) { 3431 switch x { 3432 case ChildDisplayType_BLOCK: 3433 return "block", true 3434 case ChildDisplayType_NORMAL: 3435 return "normal", true 3436 default: 3437 return "", false 3438 } 3439 } 3440 3441 type FrameType uint32 3442 3443 const ( 3444 _ FrameType = iota 3445 3446 FrameType_AUXILIARY 3447 FrameType_TOP_LEVEL 3448 FrameType_NESTED 3449 FrameType_NONE 3450 ) 3451 3452 func (FrameType) FromRef(str js.Ref) FrameType { 3453 return FrameType(bindings.ConstOfFrameType(str)) 3454 } 3455 3456 func (x FrameType) String() (string, bool) { 3457 switch x { 3458 case FrameType_AUXILIARY: 3459 return "auxiliary", true 3460 case FrameType_TOP_LEVEL: 3461 return "top-level", true 3462 case FrameType_NESTED: 3463 return "nested", true 3464 case FrameType_NONE: 3465 return "none", true 3466 default: 3467 return "", false 3468 } 3469 } 3470 3471 type ClientType uint32 3472 3473 const ( 3474 _ ClientType = iota 3475 3476 ClientType_WINDOW 3477 ClientType_WORKER 3478 ClientType_SHAREDWORKER 3479 ClientType_ALL 3480 ) 3481 3482 func (ClientType) FromRef(str js.Ref) ClientType { 3483 return ClientType(bindings.ConstOfClientType(str)) 3484 } 3485 3486 func (x ClientType) String() (string, bool) { 3487 switch x { 3488 case ClientType_WINDOW: 3489 return "window", true 3490 case ClientType_WORKER: 3491 return "worker", true 3492 case ClientType_SHAREDWORKER: 3493 return "sharedworker", true 3494 case ClientType_ALL: 3495 return "all", true 3496 default: 3497 return "", false 3498 } 3499 } 3500 3501 type ClientLifecycleState uint32 3502 3503 const ( 3504 _ ClientLifecycleState = iota 3505 3506 ClientLifecycleState_ACTIVE 3507 ClientLifecycleState_FROZEN 3508 ) 3509 3510 func (ClientLifecycleState) FromRef(str js.Ref) ClientLifecycleState { 3511 return ClientLifecycleState(bindings.ConstOfClientLifecycleState(str)) 3512 } 3513 3514 func (x ClientLifecycleState) String() (string, bool) { 3515 switch x { 3516 case ClientLifecycleState_ACTIVE: 3517 return "active", true 3518 case ClientLifecycleState_FROZEN: 3519 return "frozen", true 3520 default: 3521 return "", false 3522 } 3523 } 3524 3525 type Client struct { 3526 ref js.Ref 3527 } 3528 3529 func (this Client) Once() Client { 3530 this.ref.Once() 3531 return this 3532 } 3533 3534 func (this Client) Ref() js.Ref { 3535 return this.ref 3536 } 3537 3538 func (this Client) FromRef(ref js.Ref) Client { 3539 this.ref = ref 3540 return this 3541 } 3542 3543 func (this Client) Free() { 3544 this.ref.Free() 3545 } 3546 3547 // Url returns the value of property "Client.url". 3548 // 3549 // It returns ok=false if there is no such property. 3550 func (this Client) Url() (ret js.String, ok bool) { 3551 ok = js.True == bindings.GetClientUrl( 3552 this.ref, js.Pointer(&ret), 3553 ) 3554 return 3555 } 3556 3557 // FrameType returns the value of property "Client.frameType". 3558 // 3559 // It returns ok=false if there is no such property. 3560 func (this Client) FrameType() (ret FrameType, ok bool) { 3561 ok = js.True == bindings.GetClientFrameType( 3562 this.ref, js.Pointer(&ret), 3563 ) 3564 return 3565 } 3566 3567 // Id returns the value of property "Client.id". 3568 // 3569 // It returns ok=false if there is no such property. 3570 func (this Client) Id() (ret js.String, ok bool) { 3571 ok = js.True == bindings.GetClientId( 3572 this.ref, js.Pointer(&ret), 3573 ) 3574 return 3575 } 3576 3577 // Type returns the value of property "Client.type". 3578 // 3579 // It returns ok=false if there is no such property. 3580 func (this Client) Type() (ret ClientType, ok bool) { 3581 ok = js.True == bindings.GetClientType( 3582 this.ref, js.Pointer(&ret), 3583 ) 3584 return 3585 } 3586 3587 // LifecycleState returns the value of property "Client.lifecycleState". 3588 // 3589 // It returns ok=false if there is no such property. 3590 func (this Client) LifecycleState() (ret ClientLifecycleState, ok bool) { 3591 ok = js.True == bindings.GetClientLifecycleState( 3592 this.ref, js.Pointer(&ret), 3593 ) 3594 return 3595 } 3596 3597 // HasFuncPostMessage returns true if the method "Client.postMessage" exists. 3598 func (this Client) HasFuncPostMessage() bool { 3599 return js.True == bindings.HasFuncClientPostMessage( 3600 this.ref, 3601 ) 3602 } 3603 3604 // FuncPostMessage returns the method "Client.postMessage". 3605 func (this Client) FuncPostMessage() (fn js.Func[func(message js.Any, transfer js.Array[js.Object])]) { 3606 bindings.FuncClientPostMessage( 3607 this.ref, js.Pointer(&fn), 3608 ) 3609 return 3610 } 3611 3612 // PostMessage calls the method "Client.postMessage". 3613 func (this Client) PostMessage(message js.Any, transfer js.Array[js.Object]) (ret js.Void) { 3614 bindings.CallClientPostMessage( 3615 this.ref, js.Pointer(&ret), 3616 message.Ref(), 3617 transfer.Ref(), 3618 ) 3619 3620 return 3621 } 3622 3623 // TryPostMessage calls the method "Client.postMessage" 3624 // in a try/catch block and returns (_, err, ok = false) when it went through 3625 // the catch clause. 3626 func (this Client) TryPostMessage(message js.Any, transfer js.Array[js.Object]) (ret js.Void, exception js.Any, ok bool) { 3627 ok = js.True == bindings.TryClientPostMessage( 3628 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3629 message.Ref(), 3630 transfer.Ref(), 3631 ) 3632 3633 return 3634 } 3635 3636 // HasFuncPostMessage1 returns true if the method "Client.postMessage" exists. 3637 func (this Client) HasFuncPostMessage1() bool { 3638 return js.True == bindings.HasFuncClientPostMessage1( 3639 this.ref, 3640 ) 3641 } 3642 3643 // FuncPostMessage1 returns the method "Client.postMessage". 3644 func (this Client) FuncPostMessage1() (fn js.Func[func(message js.Any, options StructuredSerializeOptions)]) { 3645 bindings.FuncClientPostMessage1( 3646 this.ref, js.Pointer(&fn), 3647 ) 3648 return 3649 } 3650 3651 // PostMessage1 calls the method "Client.postMessage". 3652 func (this Client) PostMessage1(message js.Any, options StructuredSerializeOptions) (ret js.Void) { 3653 bindings.CallClientPostMessage1( 3654 this.ref, js.Pointer(&ret), 3655 message.Ref(), 3656 js.Pointer(&options), 3657 ) 3658 3659 return 3660 } 3661 3662 // TryPostMessage1 calls the method "Client.postMessage" 3663 // in a try/catch block and returns (_, err, ok = false) when it went through 3664 // the catch clause. 3665 func (this Client) TryPostMessage1(message js.Any, options StructuredSerializeOptions) (ret js.Void, exception js.Any, ok bool) { 3666 ok = js.True == bindings.TryClientPostMessage1( 3667 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3668 message.Ref(), 3669 js.Pointer(&options), 3670 ) 3671 3672 return 3673 } 3674 3675 // HasFuncPostMessage2 returns true if the method "Client.postMessage" exists. 3676 func (this Client) HasFuncPostMessage2() bool { 3677 return js.True == bindings.HasFuncClientPostMessage2( 3678 this.ref, 3679 ) 3680 } 3681 3682 // FuncPostMessage2 returns the method "Client.postMessage". 3683 func (this Client) FuncPostMessage2() (fn js.Func[func(message js.Any)]) { 3684 bindings.FuncClientPostMessage2( 3685 this.ref, js.Pointer(&fn), 3686 ) 3687 return 3688 } 3689 3690 // PostMessage2 calls the method "Client.postMessage". 3691 func (this Client) PostMessage2(message js.Any) (ret js.Void) { 3692 bindings.CallClientPostMessage2( 3693 this.ref, js.Pointer(&ret), 3694 message.Ref(), 3695 ) 3696 3697 return 3698 } 3699 3700 // TryPostMessage2 calls the method "Client.postMessage" 3701 // in a try/catch block and returns (_, err, ok = false) when it went through 3702 // the catch clause. 3703 func (this Client) TryPostMessage2(message js.Any) (ret js.Void, exception js.Any, ok bool) { 3704 ok = js.True == bindings.TryClientPostMessage2( 3705 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3706 message.Ref(), 3707 ) 3708 3709 return 3710 } 3711 3712 type ClientQueryOptions struct { 3713 // IncludeUncontrolled is "ClientQueryOptions.includeUncontrolled" 3714 // 3715 // Optional, defaults to false. 3716 // 3717 // NOTE: FFI_USE_IncludeUncontrolled MUST be set to true to make this field effective. 3718 IncludeUncontrolled bool 3719 // Type is "ClientQueryOptions.type" 3720 // 3721 // Optional, defaults to "window". 3722 Type ClientType 3723 3724 FFI_USE_IncludeUncontrolled bool // for IncludeUncontrolled. 3725 3726 FFI_USE bool 3727 } 3728 3729 // FromRef calls UpdateFrom and returns a ClientQueryOptions with all fields set. 3730 func (p ClientQueryOptions) FromRef(ref js.Ref) ClientQueryOptions { 3731 p.UpdateFrom(ref) 3732 return p 3733 } 3734 3735 // New creates a new ClientQueryOptions in the application heap. 3736 func (p ClientQueryOptions) New() js.Ref { 3737 return bindings.ClientQueryOptionsJSLoad( 3738 js.Pointer(&p), js.True, 0, 3739 ) 3740 } 3741 3742 // UpdateFrom copies value of all fields of the heap object to p. 3743 func (p *ClientQueryOptions) UpdateFrom(ref js.Ref) { 3744 bindings.ClientQueryOptionsJSStore( 3745 js.Pointer(p), ref, 3746 ) 3747 } 3748 3749 // Update writes all fields of the p to the heap object referenced by ref. 3750 func (p *ClientQueryOptions) Update(ref js.Ref) { 3751 bindings.ClientQueryOptionsJSLoad( 3752 js.Pointer(p), js.False, ref, 3753 ) 3754 } 3755 3756 // FreeMembers frees fields with heap reference, if recursive is true 3757 // free all heap references reachable from p. 3758 func (p *ClientQueryOptions) FreeMembers(recursive bool) { 3759 }