github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis01_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 type OptionalEffectTiming struct { 12 // Delay is "OptionalEffectTiming.delay" 13 // 14 // Optional 15 // 16 // NOTE: FFI_USE_Delay MUST be set to true to make this field effective. 17 Delay float64 18 // EndDelay is "OptionalEffectTiming.endDelay" 19 // 20 // Optional 21 // 22 // NOTE: FFI_USE_EndDelay MUST be set to true to make this field effective. 23 EndDelay float64 24 // Fill is "OptionalEffectTiming.fill" 25 // 26 // Optional 27 Fill FillMode 28 // IterationStart is "OptionalEffectTiming.iterationStart" 29 // 30 // Optional 31 // 32 // NOTE: FFI_USE_IterationStart MUST be set to true to make this field effective. 33 IterationStart float64 34 // Iterations is "OptionalEffectTiming.iterations" 35 // 36 // Optional 37 // 38 // NOTE: FFI_USE_Iterations MUST be set to true to make this field effective. 39 Iterations float64 40 // Duration is "OptionalEffectTiming.duration" 41 // 42 // Optional 43 Duration OneOf_Float64_String 44 // Direction is "OptionalEffectTiming.direction" 45 // 46 // Optional 47 Direction PlaybackDirection 48 // Easing is "OptionalEffectTiming.easing" 49 // 50 // Optional 51 Easing js.String 52 // PlaybackRate is "OptionalEffectTiming.playbackRate" 53 // 54 // Optional 55 // 56 // NOTE: FFI_USE_PlaybackRate MUST be set to true to make this field effective. 57 PlaybackRate float64 58 59 FFI_USE_Delay bool // for Delay. 60 FFI_USE_EndDelay bool // for EndDelay. 61 FFI_USE_IterationStart bool // for IterationStart. 62 FFI_USE_Iterations bool // for Iterations. 63 FFI_USE_PlaybackRate bool // for PlaybackRate. 64 65 FFI_USE bool 66 } 67 68 // FromRef calls UpdateFrom and returns a OptionalEffectTiming with all fields set. 69 func (p OptionalEffectTiming) FromRef(ref js.Ref) OptionalEffectTiming { 70 p.UpdateFrom(ref) 71 return p 72 } 73 74 // New creates a new OptionalEffectTiming in the application heap. 75 func (p OptionalEffectTiming) New() js.Ref { 76 return bindings.OptionalEffectTimingJSLoad( 77 js.Pointer(&p), js.True, 0, 78 ) 79 } 80 81 // UpdateFrom copies value of all fields of the heap object to p. 82 func (p *OptionalEffectTiming) UpdateFrom(ref js.Ref) { 83 bindings.OptionalEffectTimingJSStore( 84 js.Pointer(p), ref, 85 ) 86 } 87 88 // Update writes all fields of the p to the heap object referenced by ref. 89 func (p *OptionalEffectTiming) Update(ref js.Ref) { 90 bindings.OptionalEffectTimingJSLoad( 91 js.Pointer(p), js.False, ref, 92 ) 93 } 94 95 // FreeMembers frees fields with heap reference, if recursive is true 96 // free all heap references reachable from p. 97 func (p *OptionalEffectTiming) FreeMembers(recursive bool) { 98 js.Free( 99 p.Duration.Ref(), 100 p.Easing.Ref(), 101 ) 102 p.Duration = p.Duration.FromRef(js.Undefined) 103 p.Easing = p.Easing.FromRef(js.Undefined) 104 } 105 106 type OneOf_Float64_EffectTiming struct { 107 ref js.Ref 108 } 109 110 func (x OneOf_Float64_EffectTiming) Ref() js.Ref { 111 return x.ref 112 } 113 114 func (x OneOf_Float64_EffectTiming) Free() { 115 x.ref.Free() 116 } 117 118 func (x OneOf_Float64_EffectTiming) FromRef(ref js.Ref) OneOf_Float64_EffectTiming { 119 return OneOf_Float64_EffectTiming{ 120 ref: ref, 121 } 122 } 123 124 func (x OneOf_Float64_EffectTiming) Float64() float64 { 125 return js.Number[float64]{}.FromRef(x.ref).Get() 126 } 127 128 func (x OneOf_Float64_EffectTiming) EffectTiming() EffectTiming { 129 var ret EffectTiming 130 ret.UpdateFrom(x.ref) 131 return ret 132 } 133 134 type AnimationNodeList struct { 135 ref js.Ref 136 } 137 138 func (this AnimationNodeList) Once() AnimationNodeList { 139 this.ref.Once() 140 return this 141 } 142 143 func (this AnimationNodeList) Ref() js.Ref { 144 return this.ref 145 } 146 147 func (this AnimationNodeList) FromRef(ref js.Ref) AnimationNodeList { 148 this.ref = ref 149 return this 150 } 151 152 func (this AnimationNodeList) Free() { 153 this.ref.Free() 154 } 155 156 // Length returns the value of property "AnimationNodeList.length". 157 // 158 // It returns ok=false if there is no such property. 159 func (this AnimationNodeList) Length() (ret uint32, ok bool) { 160 ok = js.True == bindings.GetAnimationNodeListLength( 161 this.ref, js.Pointer(&ret), 162 ) 163 return 164 } 165 166 // HasFuncItem returns true if the method "AnimationNodeList.item" exists. 167 func (this AnimationNodeList) HasFuncItem() bool { 168 return js.True == bindings.HasFuncAnimationNodeListItem( 169 this.ref, 170 ) 171 } 172 173 // FuncItem returns the method "AnimationNodeList.item". 174 func (this AnimationNodeList) FuncItem() (fn js.Func[func(index uint32) AnimationEffect]) { 175 bindings.FuncAnimationNodeListItem( 176 this.ref, js.Pointer(&fn), 177 ) 178 return 179 } 180 181 // Item calls the method "AnimationNodeList.item". 182 func (this AnimationNodeList) Item(index uint32) (ret AnimationEffect) { 183 bindings.CallAnimationNodeListItem( 184 this.ref, js.Pointer(&ret), 185 uint32(index), 186 ) 187 188 return 189 } 190 191 // TryItem calls the method "AnimationNodeList.item" 192 // in a try/catch block and returns (_, err, ok = false) when it went through 193 // the catch clause. 194 func (this AnimationNodeList) TryItem(index uint32) (ret AnimationEffect, exception js.Any, ok bool) { 195 ok = js.True == bindings.TryAnimationNodeListItem( 196 this.ref, js.Pointer(&ret), js.Pointer(&exception), 197 uint32(index), 198 ) 199 200 return 201 } 202 203 func NewGroupEffect(children js.Array[AnimationEffect], timing OneOf_Float64_EffectTiming) (ret GroupEffect) { 204 ret.ref = bindings.NewGroupEffectByGroupEffect( 205 children.Ref(), 206 timing.Ref()) 207 return 208 } 209 210 func NewGroupEffectByGroupEffect1(children js.Array[AnimationEffect]) (ret GroupEffect) { 211 ret.ref = bindings.NewGroupEffectByGroupEffect1( 212 children.Ref()) 213 return 214 } 215 216 type GroupEffect struct { 217 ref js.Ref 218 } 219 220 func (this GroupEffect) Once() GroupEffect { 221 this.ref.Once() 222 return this 223 } 224 225 func (this GroupEffect) Ref() js.Ref { 226 return this.ref 227 } 228 229 func (this GroupEffect) FromRef(ref js.Ref) GroupEffect { 230 this.ref = ref 231 return this 232 } 233 234 func (this GroupEffect) Free() { 235 this.ref.Free() 236 } 237 238 // Children returns the value of property "GroupEffect.children". 239 // 240 // It returns ok=false if there is no such property. 241 func (this GroupEffect) Children() (ret AnimationNodeList, ok bool) { 242 ok = js.True == bindings.GetGroupEffectChildren( 243 this.ref, js.Pointer(&ret), 244 ) 245 return 246 } 247 248 // FirstChild returns the value of property "GroupEffect.firstChild". 249 // 250 // It returns ok=false if there is no such property. 251 func (this GroupEffect) FirstChild() (ret AnimationEffect, ok bool) { 252 ok = js.True == bindings.GetGroupEffectFirstChild( 253 this.ref, js.Pointer(&ret), 254 ) 255 return 256 } 257 258 // LastChild returns the value of property "GroupEffect.lastChild". 259 // 260 // It returns ok=false if there is no such property. 261 func (this GroupEffect) LastChild() (ret AnimationEffect, ok bool) { 262 ok = js.True == bindings.GetGroupEffectLastChild( 263 this.ref, js.Pointer(&ret), 264 ) 265 return 266 } 267 268 // HasFuncClone returns true if the method "GroupEffect.clone" exists. 269 func (this GroupEffect) HasFuncClone() bool { 270 return js.True == bindings.HasFuncGroupEffectClone( 271 this.ref, 272 ) 273 } 274 275 // FuncClone returns the method "GroupEffect.clone". 276 func (this GroupEffect) FuncClone() (fn js.Func[func() GroupEffect]) { 277 bindings.FuncGroupEffectClone( 278 this.ref, js.Pointer(&fn), 279 ) 280 return 281 } 282 283 // Clone calls the method "GroupEffect.clone". 284 func (this GroupEffect) Clone() (ret GroupEffect) { 285 bindings.CallGroupEffectClone( 286 this.ref, js.Pointer(&ret), 287 ) 288 289 return 290 } 291 292 // TryClone calls the method "GroupEffect.clone" 293 // in a try/catch block and returns (_, err, ok = false) when it went through 294 // the catch clause. 295 func (this GroupEffect) TryClone() (ret GroupEffect, exception js.Any, ok bool) { 296 ok = js.True == bindings.TryGroupEffectClone( 297 this.ref, js.Pointer(&ret), js.Pointer(&exception), 298 ) 299 300 return 301 } 302 303 // HasFuncPrepend returns true if the method "GroupEffect.prepend" exists. 304 func (this GroupEffect) HasFuncPrepend() bool { 305 return js.True == bindings.HasFuncGroupEffectPrepend( 306 this.ref, 307 ) 308 } 309 310 // FuncPrepend returns the method "GroupEffect.prepend". 311 func (this GroupEffect) FuncPrepend() (fn js.Func[func(effects ...AnimationEffect)]) { 312 bindings.FuncGroupEffectPrepend( 313 this.ref, js.Pointer(&fn), 314 ) 315 return 316 } 317 318 // Prepend calls the method "GroupEffect.prepend". 319 func (this GroupEffect) Prepend(effects ...AnimationEffect) (ret js.Void) { 320 bindings.CallGroupEffectPrepend( 321 this.ref, js.Pointer(&ret), 322 js.SliceData(effects), 323 js.SizeU(len(effects)), 324 ) 325 326 return 327 } 328 329 // TryPrepend calls the method "GroupEffect.prepend" 330 // in a try/catch block and returns (_, err, ok = false) when it went through 331 // the catch clause. 332 func (this GroupEffect) TryPrepend(effects ...AnimationEffect) (ret js.Void, exception js.Any, ok bool) { 333 ok = js.True == bindings.TryGroupEffectPrepend( 334 this.ref, js.Pointer(&ret), js.Pointer(&exception), 335 js.SliceData(effects), 336 js.SizeU(len(effects)), 337 ) 338 339 return 340 } 341 342 // HasFuncAppend returns true if the method "GroupEffect.append" exists. 343 func (this GroupEffect) HasFuncAppend() bool { 344 return js.True == bindings.HasFuncGroupEffectAppend( 345 this.ref, 346 ) 347 } 348 349 // FuncAppend returns the method "GroupEffect.append". 350 func (this GroupEffect) FuncAppend() (fn js.Func[func(effects ...AnimationEffect)]) { 351 bindings.FuncGroupEffectAppend( 352 this.ref, js.Pointer(&fn), 353 ) 354 return 355 } 356 357 // Append calls the method "GroupEffect.append". 358 func (this GroupEffect) Append(effects ...AnimationEffect) (ret js.Void) { 359 bindings.CallGroupEffectAppend( 360 this.ref, js.Pointer(&ret), 361 js.SliceData(effects), 362 js.SizeU(len(effects)), 363 ) 364 365 return 366 } 367 368 // TryAppend calls the method "GroupEffect.append" 369 // in a try/catch block and returns (_, err, ok = false) when it went through 370 // the catch clause. 371 func (this GroupEffect) TryAppend(effects ...AnimationEffect) (ret js.Void, exception js.Any, ok bool) { 372 ok = js.True == bindings.TryGroupEffectAppend( 373 this.ref, js.Pointer(&ret), js.Pointer(&exception), 374 js.SliceData(effects), 375 js.SizeU(len(effects)), 376 ) 377 378 return 379 } 380 381 type AnimationEffect struct { 382 ref js.Ref 383 } 384 385 func (this AnimationEffect) Once() AnimationEffect { 386 this.ref.Once() 387 return this 388 } 389 390 func (this AnimationEffect) Ref() js.Ref { 391 return this.ref 392 } 393 394 func (this AnimationEffect) FromRef(ref js.Ref) AnimationEffect { 395 this.ref = ref 396 return this 397 } 398 399 func (this AnimationEffect) Free() { 400 this.ref.Free() 401 } 402 403 // Parent returns the value of property "AnimationEffect.parent". 404 // 405 // It returns ok=false if there is no such property. 406 func (this AnimationEffect) Parent() (ret GroupEffect, ok bool) { 407 ok = js.True == bindings.GetAnimationEffectParent( 408 this.ref, js.Pointer(&ret), 409 ) 410 return 411 } 412 413 // PreviousSibling returns the value of property "AnimationEffect.previousSibling". 414 // 415 // It returns ok=false if there is no such property. 416 func (this AnimationEffect) PreviousSibling() (ret AnimationEffect, ok bool) { 417 ok = js.True == bindings.GetAnimationEffectPreviousSibling( 418 this.ref, js.Pointer(&ret), 419 ) 420 return 421 } 422 423 // NextSibling returns the value of property "AnimationEffect.nextSibling". 424 // 425 // It returns ok=false if there is no such property. 426 func (this AnimationEffect) NextSibling() (ret AnimationEffect, ok bool) { 427 ok = js.True == bindings.GetAnimationEffectNextSibling( 428 this.ref, js.Pointer(&ret), 429 ) 430 return 431 } 432 433 // HasFuncGetTiming returns true if the method "AnimationEffect.getTiming" exists. 434 func (this AnimationEffect) HasFuncGetTiming() bool { 435 return js.True == bindings.HasFuncAnimationEffectGetTiming( 436 this.ref, 437 ) 438 } 439 440 // FuncGetTiming returns the method "AnimationEffect.getTiming". 441 func (this AnimationEffect) FuncGetTiming() (fn js.Func[func() EffectTiming]) { 442 bindings.FuncAnimationEffectGetTiming( 443 this.ref, js.Pointer(&fn), 444 ) 445 return 446 } 447 448 // GetTiming calls the method "AnimationEffect.getTiming". 449 func (this AnimationEffect) GetTiming() (ret EffectTiming) { 450 bindings.CallAnimationEffectGetTiming( 451 this.ref, js.Pointer(&ret), 452 ) 453 454 return 455 } 456 457 // TryGetTiming calls the method "AnimationEffect.getTiming" 458 // in a try/catch block and returns (_, err, ok = false) when it went through 459 // the catch clause. 460 func (this AnimationEffect) TryGetTiming() (ret EffectTiming, exception js.Any, ok bool) { 461 ok = js.True == bindings.TryAnimationEffectGetTiming( 462 this.ref, js.Pointer(&ret), js.Pointer(&exception), 463 ) 464 465 return 466 } 467 468 // HasFuncGetComputedTiming returns true if the method "AnimationEffect.getComputedTiming" exists. 469 func (this AnimationEffect) HasFuncGetComputedTiming() bool { 470 return js.True == bindings.HasFuncAnimationEffectGetComputedTiming( 471 this.ref, 472 ) 473 } 474 475 // FuncGetComputedTiming returns the method "AnimationEffect.getComputedTiming". 476 func (this AnimationEffect) FuncGetComputedTiming() (fn js.Func[func() ComputedEffectTiming]) { 477 bindings.FuncAnimationEffectGetComputedTiming( 478 this.ref, js.Pointer(&fn), 479 ) 480 return 481 } 482 483 // GetComputedTiming calls the method "AnimationEffect.getComputedTiming". 484 func (this AnimationEffect) GetComputedTiming() (ret ComputedEffectTiming) { 485 bindings.CallAnimationEffectGetComputedTiming( 486 this.ref, js.Pointer(&ret), 487 ) 488 489 return 490 } 491 492 // TryGetComputedTiming calls the method "AnimationEffect.getComputedTiming" 493 // in a try/catch block and returns (_, err, ok = false) when it went through 494 // the catch clause. 495 func (this AnimationEffect) TryGetComputedTiming() (ret ComputedEffectTiming, exception js.Any, ok bool) { 496 ok = js.True == bindings.TryAnimationEffectGetComputedTiming( 497 this.ref, js.Pointer(&ret), js.Pointer(&exception), 498 ) 499 500 return 501 } 502 503 // HasFuncUpdateTiming returns true if the method "AnimationEffect.updateTiming" exists. 504 func (this AnimationEffect) HasFuncUpdateTiming() bool { 505 return js.True == bindings.HasFuncAnimationEffectUpdateTiming( 506 this.ref, 507 ) 508 } 509 510 // FuncUpdateTiming returns the method "AnimationEffect.updateTiming". 511 func (this AnimationEffect) FuncUpdateTiming() (fn js.Func[func(timing OptionalEffectTiming)]) { 512 bindings.FuncAnimationEffectUpdateTiming( 513 this.ref, js.Pointer(&fn), 514 ) 515 return 516 } 517 518 // UpdateTiming calls the method "AnimationEffect.updateTiming". 519 func (this AnimationEffect) UpdateTiming(timing OptionalEffectTiming) (ret js.Void) { 520 bindings.CallAnimationEffectUpdateTiming( 521 this.ref, js.Pointer(&ret), 522 js.Pointer(&timing), 523 ) 524 525 return 526 } 527 528 // TryUpdateTiming calls the method "AnimationEffect.updateTiming" 529 // in a try/catch block and returns (_, err, ok = false) when it went through 530 // the catch clause. 531 func (this AnimationEffect) TryUpdateTiming(timing OptionalEffectTiming) (ret js.Void, exception js.Any, ok bool) { 532 ok = js.True == bindings.TryAnimationEffectUpdateTiming( 533 this.ref, js.Pointer(&ret), js.Pointer(&exception), 534 js.Pointer(&timing), 535 ) 536 537 return 538 } 539 540 // HasFuncUpdateTiming1 returns true if the method "AnimationEffect.updateTiming" exists. 541 func (this AnimationEffect) HasFuncUpdateTiming1() bool { 542 return js.True == bindings.HasFuncAnimationEffectUpdateTiming1( 543 this.ref, 544 ) 545 } 546 547 // FuncUpdateTiming1 returns the method "AnimationEffect.updateTiming". 548 func (this AnimationEffect) FuncUpdateTiming1() (fn js.Func[func()]) { 549 bindings.FuncAnimationEffectUpdateTiming1( 550 this.ref, js.Pointer(&fn), 551 ) 552 return 553 } 554 555 // UpdateTiming1 calls the method "AnimationEffect.updateTiming". 556 func (this AnimationEffect) UpdateTiming1() (ret js.Void) { 557 bindings.CallAnimationEffectUpdateTiming1( 558 this.ref, js.Pointer(&ret), 559 ) 560 561 return 562 } 563 564 // TryUpdateTiming1 calls the method "AnimationEffect.updateTiming" 565 // in a try/catch block and returns (_, err, ok = false) when it went through 566 // the catch clause. 567 func (this AnimationEffect) TryUpdateTiming1() (ret js.Void, exception js.Any, ok bool) { 568 ok = js.True == bindings.TryAnimationEffectUpdateTiming1( 569 this.ref, js.Pointer(&ret), js.Pointer(&exception), 570 ) 571 572 return 573 } 574 575 // HasFuncBefore returns true if the method "AnimationEffect.before" exists. 576 func (this AnimationEffect) HasFuncBefore() bool { 577 return js.True == bindings.HasFuncAnimationEffectBefore( 578 this.ref, 579 ) 580 } 581 582 // FuncBefore returns the method "AnimationEffect.before". 583 func (this AnimationEffect) FuncBefore() (fn js.Func[func(effects ...AnimationEffect)]) { 584 bindings.FuncAnimationEffectBefore( 585 this.ref, js.Pointer(&fn), 586 ) 587 return 588 } 589 590 // Before calls the method "AnimationEffect.before". 591 func (this AnimationEffect) Before(effects ...AnimationEffect) (ret js.Void) { 592 bindings.CallAnimationEffectBefore( 593 this.ref, js.Pointer(&ret), 594 js.SliceData(effects), 595 js.SizeU(len(effects)), 596 ) 597 598 return 599 } 600 601 // TryBefore calls the method "AnimationEffect.before" 602 // in a try/catch block and returns (_, err, ok = false) when it went through 603 // the catch clause. 604 func (this AnimationEffect) TryBefore(effects ...AnimationEffect) (ret js.Void, exception js.Any, ok bool) { 605 ok = js.True == bindings.TryAnimationEffectBefore( 606 this.ref, js.Pointer(&ret), js.Pointer(&exception), 607 js.SliceData(effects), 608 js.SizeU(len(effects)), 609 ) 610 611 return 612 } 613 614 // HasFuncAfter returns true if the method "AnimationEffect.after" exists. 615 func (this AnimationEffect) HasFuncAfter() bool { 616 return js.True == bindings.HasFuncAnimationEffectAfter( 617 this.ref, 618 ) 619 } 620 621 // FuncAfter returns the method "AnimationEffect.after". 622 func (this AnimationEffect) FuncAfter() (fn js.Func[func(effects ...AnimationEffect)]) { 623 bindings.FuncAnimationEffectAfter( 624 this.ref, js.Pointer(&fn), 625 ) 626 return 627 } 628 629 // After calls the method "AnimationEffect.after". 630 func (this AnimationEffect) After(effects ...AnimationEffect) (ret js.Void) { 631 bindings.CallAnimationEffectAfter( 632 this.ref, js.Pointer(&ret), 633 js.SliceData(effects), 634 js.SizeU(len(effects)), 635 ) 636 637 return 638 } 639 640 // TryAfter calls the method "AnimationEffect.after" 641 // in a try/catch block and returns (_, err, ok = false) when it went through 642 // the catch clause. 643 func (this AnimationEffect) TryAfter(effects ...AnimationEffect) (ret js.Void, exception js.Any, ok bool) { 644 ok = js.True == bindings.TryAnimationEffectAfter( 645 this.ref, js.Pointer(&ret), js.Pointer(&exception), 646 js.SliceData(effects), 647 js.SizeU(len(effects)), 648 ) 649 650 return 651 } 652 653 // HasFuncReplace returns true if the method "AnimationEffect.replace" exists. 654 func (this AnimationEffect) HasFuncReplace() bool { 655 return js.True == bindings.HasFuncAnimationEffectReplace( 656 this.ref, 657 ) 658 } 659 660 // FuncReplace returns the method "AnimationEffect.replace". 661 func (this AnimationEffect) FuncReplace() (fn js.Func[func(effects ...AnimationEffect)]) { 662 bindings.FuncAnimationEffectReplace( 663 this.ref, js.Pointer(&fn), 664 ) 665 return 666 } 667 668 // Replace calls the method "AnimationEffect.replace". 669 func (this AnimationEffect) Replace(effects ...AnimationEffect) (ret js.Void) { 670 bindings.CallAnimationEffectReplace( 671 this.ref, js.Pointer(&ret), 672 js.SliceData(effects), 673 js.SizeU(len(effects)), 674 ) 675 676 return 677 } 678 679 // TryReplace calls the method "AnimationEffect.replace" 680 // in a try/catch block and returns (_, err, ok = false) when it went through 681 // the catch clause. 682 func (this AnimationEffect) TryReplace(effects ...AnimationEffect) (ret js.Void, exception js.Any, ok bool) { 683 ok = js.True == bindings.TryAnimationEffectReplace( 684 this.ref, js.Pointer(&ret), js.Pointer(&exception), 685 js.SliceData(effects), 686 js.SizeU(len(effects)), 687 ) 688 689 return 690 } 691 692 // HasFuncRemove returns true if the method "AnimationEffect.remove" exists. 693 func (this AnimationEffect) HasFuncRemove() bool { 694 return js.True == bindings.HasFuncAnimationEffectRemove( 695 this.ref, 696 ) 697 } 698 699 // FuncRemove returns the method "AnimationEffect.remove". 700 func (this AnimationEffect) FuncRemove() (fn js.Func[func()]) { 701 bindings.FuncAnimationEffectRemove( 702 this.ref, js.Pointer(&fn), 703 ) 704 return 705 } 706 707 // Remove calls the method "AnimationEffect.remove". 708 func (this AnimationEffect) Remove() (ret js.Void) { 709 bindings.CallAnimationEffectRemove( 710 this.ref, js.Pointer(&ret), 711 ) 712 713 return 714 } 715 716 // TryRemove calls the method "AnimationEffect.remove" 717 // in a try/catch block and returns (_, err, ok = false) when it went through 718 // the catch clause. 719 func (this AnimationEffect) TryRemove() (ret js.Void, exception js.Any, ok bool) { 720 ok = js.True == bindings.TryAnimationEffectRemove( 721 this.ref, js.Pointer(&ret), js.Pointer(&exception), 722 ) 723 724 return 725 } 726 727 type AnimationTimeline struct { 728 ref js.Ref 729 } 730 731 func (this AnimationTimeline) Once() AnimationTimeline { 732 this.ref.Once() 733 return this 734 } 735 736 func (this AnimationTimeline) Ref() js.Ref { 737 return this.ref 738 } 739 740 func (this AnimationTimeline) FromRef(ref js.Ref) AnimationTimeline { 741 this.ref = ref 742 return this 743 } 744 745 func (this AnimationTimeline) Free() { 746 this.ref.Free() 747 } 748 749 // CurrentTime returns the value of property "AnimationTimeline.currentTime". 750 // 751 // It returns ok=false if there is no such property. 752 func (this AnimationTimeline) CurrentTime() (ret CSSNumberish, ok bool) { 753 ok = js.True == bindings.GetAnimationTimelineCurrentTime( 754 this.ref, js.Pointer(&ret), 755 ) 756 return 757 } 758 759 // Duration returns the value of property "AnimationTimeline.duration". 760 // 761 // It returns ok=false if there is no such property. 762 func (this AnimationTimeline) Duration() (ret CSSNumberish, ok bool) { 763 ok = js.True == bindings.GetAnimationTimelineDuration( 764 this.ref, js.Pointer(&ret), 765 ) 766 return 767 } 768 769 // HasFuncPlay returns true if the method "AnimationTimeline.play" exists. 770 func (this AnimationTimeline) HasFuncPlay() bool { 771 return js.True == bindings.HasFuncAnimationTimelinePlay( 772 this.ref, 773 ) 774 } 775 776 // FuncPlay returns the method "AnimationTimeline.play". 777 func (this AnimationTimeline) FuncPlay() (fn js.Func[func(effect AnimationEffect) Animation]) { 778 bindings.FuncAnimationTimelinePlay( 779 this.ref, js.Pointer(&fn), 780 ) 781 return 782 } 783 784 // Play calls the method "AnimationTimeline.play". 785 func (this AnimationTimeline) Play(effect AnimationEffect) (ret Animation) { 786 bindings.CallAnimationTimelinePlay( 787 this.ref, js.Pointer(&ret), 788 effect.Ref(), 789 ) 790 791 return 792 } 793 794 // TryPlay calls the method "AnimationTimeline.play" 795 // in a try/catch block and returns (_, err, ok = false) when it went through 796 // the catch clause. 797 func (this AnimationTimeline) TryPlay(effect AnimationEffect) (ret Animation, exception js.Any, ok bool) { 798 ok = js.True == bindings.TryAnimationTimelinePlay( 799 this.ref, js.Pointer(&ret), js.Pointer(&exception), 800 effect.Ref(), 801 ) 802 803 return 804 } 805 806 // HasFuncPlay1 returns true if the method "AnimationTimeline.play" exists. 807 func (this AnimationTimeline) HasFuncPlay1() bool { 808 return js.True == bindings.HasFuncAnimationTimelinePlay1( 809 this.ref, 810 ) 811 } 812 813 // FuncPlay1 returns the method "AnimationTimeline.play". 814 func (this AnimationTimeline) FuncPlay1() (fn js.Func[func() Animation]) { 815 bindings.FuncAnimationTimelinePlay1( 816 this.ref, js.Pointer(&fn), 817 ) 818 return 819 } 820 821 // Play1 calls the method "AnimationTimeline.play". 822 func (this AnimationTimeline) Play1() (ret Animation) { 823 bindings.CallAnimationTimelinePlay1( 824 this.ref, js.Pointer(&ret), 825 ) 826 827 return 828 } 829 830 // TryPlay1 calls the method "AnimationTimeline.play" 831 // in a try/catch block and returns (_, err, ok = false) when it went through 832 // the catch clause. 833 func (this AnimationTimeline) TryPlay1() (ret Animation, exception js.Any, ok bool) { 834 ok = js.True == bindings.TryAnimationTimelinePlay1( 835 this.ref, js.Pointer(&ret), js.Pointer(&exception), 836 ) 837 838 return 839 } 840 841 type AnimationPlayState uint32 842 843 const ( 844 _ AnimationPlayState = iota 845 846 AnimationPlayState_IDLE 847 AnimationPlayState_RUNNING 848 AnimationPlayState_PAUSED 849 AnimationPlayState_FINISHED 850 ) 851 852 func (AnimationPlayState) FromRef(str js.Ref) AnimationPlayState { 853 return AnimationPlayState(bindings.ConstOfAnimationPlayState(str)) 854 } 855 856 func (x AnimationPlayState) String() (string, bool) { 857 switch x { 858 case AnimationPlayState_IDLE: 859 return "idle", true 860 case AnimationPlayState_RUNNING: 861 return "running", true 862 case AnimationPlayState_PAUSED: 863 return "paused", true 864 case AnimationPlayState_FINISHED: 865 return "finished", true 866 default: 867 return "", false 868 } 869 } 870 871 type AnimationReplaceState uint32 872 873 const ( 874 _ AnimationReplaceState = iota 875 876 AnimationReplaceState_ACTIVE 877 AnimationReplaceState_REMOVED 878 AnimationReplaceState_PERSISTED 879 ) 880 881 func (AnimationReplaceState) FromRef(str js.Ref) AnimationReplaceState { 882 return AnimationReplaceState(bindings.ConstOfAnimationReplaceState(str)) 883 } 884 885 func (x AnimationReplaceState) String() (string, bool) { 886 switch x { 887 case AnimationReplaceState_ACTIVE: 888 return "active", true 889 case AnimationReplaceState_REMOVED: 890 return "removed", true 891 case AnimationReplaceState_PERSISTED: 892 return "persisted", true 893 default: 894 return "", false 895 } 896 } 897 898 func NewAnimation(effect AnimationEffect, timeline AnimationTimeline) (ret Animation) { 899 ret.ref = bindings.NewAnimationByAnimation( 900 effect.Ref(), 901 timeline.Ref()) 902 return 903 } 904 905 func NewAnimationByAnimation1(effect AnimationEffect) (ret Animation) { 906 ret.ref = bindings.NewAnimationByAnimation1( 907 effect.Ref()) 908 return 909 } 910 911 func NewAnimationByAnimation2() (ret Animation) { 912 ret.ref = bindings.NewAnimationByAnimation2() 913 return 914 } 915 916 type Animation struct { 917 EventTarget 918 } 919 920 func (this Animation) Once() Animation { 921 this.ref.Once() 922 return this 923 } 924 925 func (this Animation) Ref() js.Ref { 926 return this.EventTarget.Ref() 927 } 928 929 func (this Animation) FromRef(ref js.Ref) Animation { 930 this.EventTarget = this.EventTarget.FromRef(ref) 931 return this 932 } 933 934 func (this Animation) Free() { 935 this.ref.Free() 936 } 937 938 // Id returns the value of property "Animation.id". 939 // 940 // It returns ok=false if there is no such property. 941 func (this Animation) Id() (ret js.String, ok bool) { 942 ok = js.True == bindings.GetAnimationId( 943 this.ref, js.Pointer(&ret), 944 ) 945 return 946 } 947 948 // SetId sets the value of property "Animation.id" to val. 949 // 950 // It returns false if the property cannot be set. 951 func (this Animation) SetId(val js.String) bool { 952 return js.True == bindings.SetAnimationId( 953 this.ref, 954 val.Ref(), 955 ) 956 } 957 958 // Effect returns the value of property "Animation.effect". 959 // 960 // It returns ok=false if there is no such property. 961 func (this Animation) Effect() (ret AnimationEffect, ok bool) { 962 ok = js.True == bindings.GetAnimationEffect( 963 this.ref, js.Pointer(&ret), 964 ) 965 return 966 } 967 968 // SetEffect sets the value of property "Animation.effect" to val. 969 // 970 // It returns false if the property cannot be set. 971 func (this Animation) SetEffect(val AnimationEffect) bool { 972 return js.True == bindings.SetAnimationEffect( 973 this.ref, 974 val.Ref(), 975 ) 976 } 977 978 // Timeline returns the value of property "Animation.timeline". 979 // 980 // It returns ok=false if there is no such property. 981 func (this Animation) Timeline() (ret AnimationTimeline, ok bool) { 982 ok = js.True == bindings.GetAnimationTimeline( 983 this.ref, js.Pointer(&ret), 984 ) 985 return 986 } 987 988 // SetTimeline sets the value of property "Animation.timeline" to val. 989 // 990 // It returns false if the property cannot be set. 991 func (this Animation) SetTimeline(val AnimationTimeline) bool { 992 return js.True == bindings.SetAnimationTimeline( 993 this.ref, 994 val.Ref(), 995 ) 996 } 997 998 // PlaybackRate returns the value of property "Animation.playbackRate". 999 // 1000 // It returns ok=false if there is no such property. 1001 func (this Animation) PlaybackRate() (ret float64, ok bool) { 1002 ok = js.True == bindings.GetAnimationPlaybackRate( 1003 this.ref, js.Pointer(&ret), 1004 ) 1005 return 1006 } 1007 1008 // SetPlaybackRate sets the value of property "Animation.playbackRate" to val. 1009 // 1010 // It returns false if the property cannot be set. 1011 func (this Animation) SetPlaybackRate(val float64) bool { 1012 return js.True == bindings.SetAnimationPlaybackRate( 1013 this.ref, 1014 float64(val), 1015 ) 1016 } 1017 1018 // PlayState returns the value of property "Animation.playState". 1019 // 1020 // It returns ok=false if there is no such property. 1021 func (this Animation) PlayState() (ret AnimationPlayState, ok bool) { 1022 ok = js.True == bindings.GetAnimationPlayState( 1023 this.ref, js.Pointer(&ret), 1024 ) 1025 return 1026 } 1027 1028 // ReplaceState returns the value of property "Animation.replaceState". 1029 // 1030 // It returns ok=false if there is no such property. 1031 func (this Animation) ReplaceState() (ret AnimationReplaceState, ok bool) { 1032 ok = js.True == bindings.GetAnimationReplaceState( 1033 this.ref, js.Pointer(&ret), 1034 ) 1035 return 1036 } 1037 1038 // Pending returns the value of property "Animation.pending". 1039 // 1040 // It returns ok=false if there is no such property. 1041 func (this Animation) Pending() (ret bool, ok bool) { 1042 ok = js.True == bindings.GetAnimationPending( 1043 this.ref, js.Pointer(&ret), 1044 ) 1045 return 1046 } 1047 1048 // Ready returns the value of property "Animation.ready". 1049 // 1050 // It returns ok=false if there is no such property. 1051 func (this Animation) Ready() (ret js.Promise[Animation], ok bool) { 1052 ok = js.True == bindings.GetAnimationReady( 1053 this.ref, js.Pointer(&ret), 1054 ) 1055 return 1056 } 1057 1058 // Finished returns the value of property "Animation.finished". 1059 // 1060 // It returns ok=false if there is no such property. 1061 func (this Animation) Finished() (ret js.Promise[Animation], ok bool) { 1062 ok = js.True == bindings.GetAnimationFinished( 1063 this.ref, js.Pointer(&ret), 1064 ) 1065 return 1066 } 1067 1068 // StartTime returns the value of property "Animation.startTime". 1069 // 1070 // It returns ok=false if there is no such property. 1071 func (this Animation) StartTime() (ret CSSNumberish, ok bool) { 1072 ok = js.True == bindings.GetAnimationStartTime( 1073 this.ref, js.Pointer(&ret), 1074 ) 1075 return 1076 } 1077 1078 // SetStartTime sets the value of property "Animation.startTime" to val. 1079 // 1080 // It returns false if the property cannot be set. 1081 func (this Animation) SetStartTime(val CSSNumberish) bool { 1082 return js.True == bindings.SetAnimationStartTime( 1083 this.ref, 1084 val.Ref(), 1085 ) 1086 } 1087 1088 // CurrentTime returns the value of property "Animation.currentTime". 1089 // 1090 // It returns ok=false if there is no such property. 1091 func (this Animation) CurrentTime() (ret CSSNumberish, ok bool) { 1092 ok = js.True == bindings.GetAnimationCurrentTime( 1093 this.ref, js.Pointer(&ret), 1094 ) 1095 return 1096 } 1097 1098 // SetCurrentTime sets the value of property "Animation.currentTime" to val. 1099 // 1100 // It returns false if the property cannot be set. 1101 func (this Animation) SetCurrentTime(val CSSNumberish) bool { 1102 return js.True == bindings.SetAnimationCurrentTime( 1103 this.ref, 1104 val.Ref(), 1105 ) 1106 } 1107 1108 // HasFuncCancel returns true if the method "Animation.cancel" exists. 1109 func (this Animation) HasFuncCancel() bool { 1110 return js.True == bindings.HasFuncAnimationCancel( 1111 this.ref, 1112 ) 1113 } 1114 1115 // FuncCancel returns the method "Animation.cancel". 1116 func (this Animation) FuncCancel() (fn js.Func[func()]) { 1117 bindings.FuncAnimationCancel( 1118 this.ref, js.Pointer(&fn), 1119 ) 1120 return 1121 } 1122 1123 // Cancel calls the method "Animation.cancel". 1124 func (this Animation) Cancel() (ret js.Void) { 1125 bindings.CallAnimationCancel( 1126 this.ref, js.Pointer(&ret), 1127 ) 1128 1129 return 1130 } 1131 1132 // TryCancel calls the method "Animation.cancel" 1133 // in a try/catch block and returns (_, err, ok = false) when it went through 1134 // the catch clause. 1135 func (this Animation) TryCancel() (ret js.Void, exception js.Any, ok bool) { 1136 ok = js.True == bindings.TryAnimationCancel( 1137 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1138 ) 1139 1140 return 1141 } 1142 1143 // HasFuncFinish returns true if the method "Animation.finish" exists. 1144 func (this Animation) HasFuncFinish() bool { 1145 return js.True == bindings.HasFuncAnimationFinish( 1146 this.ref, 1147 ) 1148 } 1149 1150 // FuncFinish returns the method "Animation.finish". 1151 func (this Animation) FuncFinish() (fn js.Func[func()]) { 1152 bindings.FuncAnimationFinish( 1153 this.ref, js.Pointer(&fn), 1154 ) 1155 return 1156 } 1157 1158 // Finish calls the method "Animation.finish". 1159 func (this Animation) Finish() (ret js.Void) { 1160 bindings.CallAnimationFinish( 1161 this.ref, js.Pointer(&ret), 1162 ) 1163 1164 return 1165 } 1166 1167 // TryFinish calls the method "Animation.finish" 1168 // in a try/catch block and returns (_, err, ok = false) when it went through 1169 // the catch clause. 1170 func (this Animation) TryFinish() (ret js.Void, exception js.Any, ok bool) { 1171 ok = js.True == bindings.TryAnimationFinish( 1172 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1173 ) 1174 1175 return 1176 } 1177 1178 // HasFuncPlay returns true if the method "Animation.play" exists. 1179 func (this Animation) HasFuncPlay() bool { 1180 return js.True == bindings.HasFuncAnimationPlay( 1181 this.ref, 1182 ) 1183 } 1184 1185 // FuncPlay returns the method "Animation.play". 1186 func (this Animation) FuncPlay() (fn js.Func[func()]) { 1187 bindings.FuncAnimationPlay( 1188 this.ref, js.Pointer(&fn), 1189 ) 1190 return 1191 } 1192 1193 // Play calls the method "Animation.play". 1194 func (this Animation) Play() (ret js.Void) { 1195 bindings.CallAnimationPlay( 1196 this.ref, js.Pointer(&ret), 1197 ) 1198 1199 return 1200 } 1201 1202 // TryPlay calls the method "Animation.play" 1203 // in a try/catch block and returns (_, err, ok = false) when it went through 1204 // the catch clause. 1205 func (this Animation) TryPlay() (ret js.Void, exception js.Any, ok bool) { 1206 ok = js.True == bindings.TryAnimationPlay( 1207 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1208 ) 1209 1210 return 1211 } 1212 1213 // HasFuncPause returns true if the method "Animation.pause" exists. 1214 func (this Animation) HasFuncPause() bool { 1215 return js.True == bindings.HasFuncAnimationPause( 1216 this.ref, 1217 ) 1218 } 1219 1220 // FuncPause returns the method "Animation.pause". 1221 func (this Animation) FuncPause() (fn js.Func[func()]) { 1222 bindings.FuncAnimationPause( 1223 this.ref, js.Pointer(&fn), 1224 ) 1225 return 1226 } 1227 1228 // Pause calls the method "Animation.pause". 1229 func (this Animation) Pause() (ret js.Void) { 1230 bindings.CallAnimationPause( 1231 this.ref, js.Pointer(&ret), 1232 ) 1233 1234 return 1235 } 1236 1237 // TryPause calls the method "Animation.pause" 1238 // in a try/catch block and returns (_, err, ok = false) when it went through 1239 // the catch clause. 1240 func (this Animation) TryPause() (ret js.Void, exception js.Any, ok bool) { 1241 ok = js.True == bindings.TryAnimationPause( 1242 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1243 ) 1244 1245 return 1246 } 1247 1248 // HasFuncUpdatePlaybackRate returns true if the method "Animation.updatePlaybackRate" exists. 1249 func (this Animation) HasFuncUpdatePlaybackRate() bool { 1250 return js.True == bindings.HasFuncAnimationUpdatePlaybackRate( 1251 this.ref, 1252 ) 1253 } 1254 1255 // FuncUpdatePlaybackRate returns the method "Animation.updatePlaybackRate". 1256 func (this Animation) FuncUpdatePlaybackRate() (fn js.Func[func(playbackRate float64)]) { 1257 bindings.FuncAnimationUpdatePlaybackRate( 1258 this.ref, js.Pointer(&fn), 1259 ) 1260 return 1261 } 1262 1263 // UpdatePlaybackRate calls the method "Animation.updatePlaybackRate". 1264 func (this Animation) UpdatePlaybackRate(playbackRate float64) (ret js.Void) { 1265 bindings.CallAnimationUpdatePlaybackRate( 1266 this.ref, js.Pointer(&ret), 1267 float64(playbackRate), 1268 ) 1269 1270 return 1271 } 1272 1273 // TryUpdatePlaybackRate calls the method "Animation.updatePlaybackRate" 1274 // in a try/catch block and returns (_, err, ok = false) when it went through 1275 // the catch clause. 1276 func (this Animation) TryUpdatePlaybackRate(playbackRate float64) (ret js.Void, exception js.Any, ok bool) { 1277 ok = js.True == bindings.TryAnimationUpdatePlaybackRate( 1278 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1279 float64(playbackRate), 1280 ) 1281 1282 return 1283 } 1284 1285 // HasFuncReverse returns true if the method "Animation.reverse" exists. 1286 func (this Animation) HasFuncReverse() bool { 1287 return js.True == bindings.HasFuncAnimationReverse( 1288 this.ref, 1289 ) 1290 } 1291 1292 // FuncReverse returns the method "Animation.reverse". 1293 func (this Animation) FuncReverse() (fn js.Func[func()]) { 1294 bindings.FuncAnimationReverse( 1295 this.ref, js.Pointer(&fn), 1296 ) 1297 return 1298 } 1299 1300 // Reverse calls the method "Animation.reverse". 1301 func (this Animation) Reverse() (ret js.Void) { 1302 bindings.CallAnimationReverse( 1303 this.ref, js.Pointer(&ret), 1304 ) 1305 1306 return 1307 } 1308 1309 // TryReverse calls the method "Animation.reverse" 1310 // in a try/catch block and returns (_, err, ok = false) when it went through 1311 // the catch clause. 1312 func (this Animation) TryReverse() (ret js.Void, exception js.Any, ok bool) { 1313 ok = js.True == bindings.TryAnimationReverse( 1314 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1315 ) 1316 1317 return 1318 } 1319 1320 // HasFuncPersist returns true if the method "Animation.persist" exists. 1321 func (this Animation) HasFuncPersist() bool { 1322 return js.True == bindings.HasFuncAnimationPersist( 1323 this.ref, 1324 ) 1325 } 1326 1327 // FuncPersist returns the method "Animation.persist". 1328 func (this Animation) FuncPersist() (fn js.Func[func()]) { 1329 bindings.FuncAnimationPersist( 1330 this.ref, js.Pointer(&fn), 1331 ) 1332 return 1333 } 1334 1335 // Persist calls the method "Animation.persist". 1336 func (this Animation) Persist() (ret js.Void) { 1337 bindings.CallAnimationPersist( 1338 this.ref, js.Pointer(&ret), 1339 ) 1340 1341 return 1342 } 1343 1344 // TryPersist calls the method "Animation.persist" 1345 // in a try/catch block and returns (_, err, ok = false) when it went through 1346 // the catch clause. 1347 func (this Animation) TryPersist() (ret js.Void, exception js.Any, ok bool) { 1348 ok = js.True == bindings.TryAnimationPersist( 1349 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1350 ) 1351 1352 return 1353 } 1354 1355 // HasFuncCommitStyles returns true if the method "Animation.commitStyles" exists. 1356 func (this Animation) HasFuncCommitStyles() bool { 1357 return js.True == bindings.HasFuncAnimationCommitStyles( 1358 this.ref, 1359 ) 1360 } 1361 1362 // FuncCommitStyles returns the method "Animation.commitStyles". 1363 func (this Animation) FuncCommitStyles() (fn js.Func[func()]) { 1364 bindings.FuncAnimationCommitStyles( 1365 this.ref, js.Pointer(&fn), 1366 ) 1367 return 1368 } 1369 1370 // CommitStyles calls the method "Animation.commitStyles". 1371 func (this Animation) CommitStyles() (ret js.Void) { 1372 bindings.CallAnimationCommitStyles( 1373 this.ref, js.Pointer(&ret), 1374 ) 1375 1376 return 1377 } 1378 1379 // TryCommitStyles calls the method "Animation.commitStyles" 1380 // in a try/catch block and returns (_, err, ok = false) when it went through 1381 // the catch clause. 1382 func (this Animation) TryCommitStyles() (ret js.Void, exception js.Any, ok bool) { 1383 ok = js.True == bindings.TryAnimationCommitStyles( 1384 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1385 ) 1386 1387 return 1388 } 1389 1390 type ShadowRootMode uint32 1391 1392 const ( 1393 _ ShadowRootMode = iota 1394 1395 ShadowRootMode_OPEN 1396 ShadowRootMode_CLOSED 1397 ) 1398 1399 func (ShadowRootMode) FromRef(str js.Ref) ShadowRootMode { 1400 return ShadowRootMode(bindings.ConstOfShadowRootMode(str)) 1401 } 1402 1403 func (x ShadowRootMode) String() (string, bool) { 1404 switch x { 1405 case ShadowRootMode_OPEN: 1406 return "open", true 1407 case ShadowRootMode_CLOSED: 1408 return "closed", true 1409 default: 1410 return "", false 1411 } 1412 } 1413 1414 type SlotAssignmentMode uint32 1415 1416 const ( 1417 _ SlotAssignmentMode = iota 1418 1419 SlotAssignmentMode_MANUAL 1420 SlotAssignmentMode_NAMED 1421 ) 1422 1423 func (SlotAssignmentMode) FromRef(str js.Ref) SlotAssignmentMode { 1424 return SlotAssignmentMode(bindings.ConstOfSlotAssignmentMode(str)) 1425 } 1426 1427 func (x SlotAssignmentMode) String() (string, bool) { 1428 switch x { 1429 case SlotAssignmentMode_MANUAL: 1430 return "manual", true 1431 case SlotAssignmentMode_NAMED: 1432 return "named", true 1433 default: 1434 return "", false 1435 } 1436 } 1437 1438 type MediaList struct { 1439 ref js.Ref 1440 } 1441 1442 func (this MediaList) Once() MediaList { 1443 this.ref.Once() 1444 return this 1445 } 1446 1447 func (this MediaList) Ref() js.Ref { 1448 return this.ref 1449 } 1450 1451 func (this MediaList) FromRef(ref js.Ref) MediaList { 1452 this.ref = ref 1453 return this 1454 } 1455 1456 func (this MediaList) Free() { 1457 this.ref.Free() 1458 } 1459 1460 // MediaText returns the value of property "MediaList.mediaText". 1461 // 1462 // It returns ok=false if there is no such property. 1463 func (this MediaList) MediaText() (ret js.String, ok bool) { 1464 ok = js.True == bindings.GetMediaListMediaText( 1465 this.ref, js.Pointer(&ret), 1466 ) 1467 return 1468 } 1469 1470 // SetMediaText sets the value of property "MediaList.mediaText" to val. 1471 // 1472 // It returns false if the property cannot be set. 1473 func (this MediaList) SetMediaText(val js.String) bool { 1474 return js.True == bindings.SetMediaListMediaText( 1475 this.ref, 1476 val.Ref(), 1477 ) 1478 } 1479 1480 // Length returns the value of property "MediaList.length". 1481 // 1482 // It returns ok=false if there is no such property. 1483 func (this MediaList) Length() (ret uint32, ok bool) { 1484 ok = js.True == bindings.GetMediaListLength( 1485 this.ref, js.Pointer(&ret), 1486 ) 1487 return 1488 } 1489 1490 // HasFuncItem returns true if the method "MediaList.item" exists. 1491 func (this MediaList) HasFuncItem() bool { 1492 return js.True == bindings.HasFuncMediaListItem( 1493 this.ref, 1494 ) 1495 } 1496 1497 // FuncItem returns the method "MediaList.item". 1498 func (this MediaList) FuncItem() (fn js.Func[func(index uint32) js.String]) { 1499 bindings.FuncMediaListItem( 1500 this.ref, js.Pointer(&fn), 1501 ) 1502 return 1503 } 1504 1505 // Item calls the method "MediaList.item". 1506 func (this MediaList) Item(index uint32) (ret js.String) { 1507 bindings.CallMediaListItem( 1508 this.ref, js.Pointer(&ret), 1509 uint32(index), 1510 ) 1511 1512 return 1513 } 1514 1515 // TryItem calls the method "MediaList.item" 1516 // in a try/catch block and returns (_, err, ok = false) when it went through 1517 // the catch clause. 1518 func (this MediaList) TryItem(index uint32) (ret js.String, exception js.Any, ok bool) { 1519 ok = js.True == bindings.TryMediaListItem( 1520 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1521 uint32(index), 1522 ) 1523 1524 return 1525 } 1526 1527 // HasFuncAppendMedium returns true if the method "MediaList.appendMedium" exists. 1528 func (this MediaList) HasFuncAppendMedium() bool { 1529 return js.True == bindings.HasFuncMediaListAppendMedium( 1530 this.ref, 1531 ) 1532 } 1533 1534 // FuncAppendMedium returns the method "MediaList.appendMedium". 1535 func (this MediaList) FuncAppendMedium() (fn js.Func[func(medium js.String)]) { 1536 bindings.FuncMediaListAppendMedium( 1537 this.ref, js.Pointer(&fn), 1538 ) 1539 return 1540 } 1541 1542 // AppendMedium calls the method "MediaList.appendMedium". 1543 func (this MediaList) AppendMedium(medium js.String) (ret js.Void) { 1544 bindings.CallMediaListAppendMedium( 1545 this.ref, js.Pointer(&ret), 1546 medium.Ref(), 1547 ) 1548 1549 return 1550 } 1551 1552 // TryAppendMedium calls the method "MediaList.appendMedium" 1553 // in a try/catch block and returns (_, err, ok = false) when it went through 1554 // the catch clause. 1555 func (this MediaList) TryAppendMedium(medium js.String) (ret js.Void, exception js.Any, ok bool) { 1556 ok = js.True == bindings.TryMediaListAppendMedium( 1557 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1558 medium.Ref(), 1559 ) 1560 1561 return 1562 } 1563 1564 // HasFuncDeleteMedium returns true if the method "MediaList.deleteMedium" exists. 1565 func (this MediaList) HasFuncDeleteMedium() bool { 1566 return js.True == bindings.HasFuncMediaListDeleteMedium( 1567 this.ref, 1568 ) 1569 } 1570 1571 // FuncDeleteMedium returns the method "MediaList.deleteMedium". 1572 func (this MediaList) FuncDeleteMedium() (fn js.Func[func(medium js.String)]) { 1573 bindings.FuncMediaListDeleteMedium( 1574 this.ref, js.Pointer(&fn), 1575 ) 1576 return 1577 } 1578 1579 // DeleteMedium calls the method "MediaList.deleteMedium". 1580 func (this MediaList) DeleteMedium(medium js.String) (ret js.Void) { 1581 bindings.CallMediaListDeleteMedium( 1582 this.ref, js.Pointer(&ret), 1583 medium.Ref(), 1584 ) 1585 1586 return 1587 } 1588 1589 // TryDeleteMedium calls the method "MediaList.deleteMedium" 1590 // in a try/catch block and returns (_, err, ok = false) when it went through 1591 // the catch clause. 1592 func (this MediaList) TryDeleteMedium(medium js.String) (ret js.Void, exception js.Any, ok bool) { 1593 ok = js.True == bindings.TryMediaListDeleteMedium( 1594 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1595 medium.Ref(), 1596 ) 1597 1598 return 1599 } 1600 1601 type OneOf_MediaList_String struct { 1602 ref js.Ref 1603 } 1604 1605 func (x OneOf_MediaList_String) Ref() js.Ref { 1606 return x.ref 1607 } 1608 1609 func (x OneOf_MediaList_String) Free() { 1610 x.ref.Free() 1611 } 1612 1613 func (x OneOf_MediaList_String) FromRef(ref js.Ref) OneOf_MediaList_String { 1614 return OneOf_MediaList_String{ 1615 ref: ref, 1616 } 1617 } 1618 1619 func (x OneOf_MediaList_String) MediaList() MediaList { 1620 return MediaList{}.FromRef(x.ref) 1621 } 1622 1623 func (x OneOf_MediaList_String) String() js.String { 1624 return js.String{}.FromRef(x.ref) 1625 } 1626 1627 type CSSStyleSheetInit struct { 1628 // BaseURL is "CSSStyleSheetInit.baseURL" 1629 // 1630 // Optional, defaults to null. 1631 BaseURL js.String 1632 // Media is "CSSStyleSheetInit.media" 1633 // 1634 // Optional, defaults to "". 1635 Media OneOf_MediaList_String 1636 // Disabled is "CSSStyleSheetInit.disabled" 1637 // 1638 // Optional, defaults to false. 1639 // 1640 // NOTE: FFI_USE_Disabled MUST be set to true to make this field effective. 1641 Disabled bool 1642 1643 FFI_USE_Disabled bool // for Disabled. 1644 1645 FFI_USE bool 1646 } 1647 1648 // FromRef calls UpdateFrom and returns a CSSStyleSheetInit with all fields set. 1649 func (p CSSStyleSheetInit) FromRef(ref js.Ref) CSSStyleSheetInit { 1650 p.UpdateFrom(ref) 1651 return p 1652 } 1653 1654 // New creates a new CSSStyleSheetInit in the application heap. 1655 func (p CSSStyleSheetInit) New() js.Ref { 1656 return bindings.CSSStyleSheetInitJSLoad( 1657 js.Pointer(&p), js.True, 0, 1658 ) 1659 } 1660 1661 // UpdateFrom copies value of all fields of the heap object to p. 1662 func (p *CSSStyleSheetInit) UpdateFrom(ref js.Ref) { 1663 bindings.CSSStyleSheetInitJSStore( 1664 js.Pointer(p), ref, 1665 ) 1666 } 1667 1668 // Update writes all fields of the p to the heap object referenced by ref. 1669 func (p *CSSStyleSheetInit) Update(ref js.Ref) { 1670 bindings.CSSStyleSheetInitJSLoad( 1671 js.Pointer(p), js.False, ref, 1672 ) 1673 } 1674 1675 // FreeMembers frees fields with heap reference, if recursive is true 1676 // free all heap references reachable from p. 1677 func (p *CSSStyleSheetInit) FreeMembers(recursive bool) { 1678 js.Free( 1679 p.BaseURL.Ref(), 1680 p.Media.Ref(), 1681 ) 1682 p.BaseURL = p.BaseURL.FromRef(js.Undefined) 1683 p.Media = p.Media.FromRef(js.Undefined) 1684 } 1685 1686 const ( 1687 CSSRule_STYLE_RULE uint16 = 1 1688 CSSRule_CHARSET_RULE uint16 = 2 1689 CSSRule_IMPORT_RULE uint16 = 3 1690 CSSRule_MEDIA_RULE uint16 = 4 1691 CSSRule_FONT_FACE_RULE uint16 = 5 1692 CSSRule_PAGE_RULE uint16 = 6 1693 CSSRule_MARGIN_RULE uint16 = 9 1694 CSSRule_NAMESPACE_RULE uint16 = 10 1695 CSSRule_COUNTER_STYLE_RULE uint16 = 11 1696 CSSRule_SUPPORTS_RULE uint16 = 12 1697 CSSRule_FONT_FEATURE_VALUES_RULE uint16 = 14 1698 CSSRule_KEYFRAMES_RULE uint16 = 7 1699 CSSRule_KEYFRAME_RULE uint16 = 8 1700 ) 1701 1702 type CSSRule struct { 1703 ref js.Ref 1704 } 1705 1706 func (this CSSRule) Once() CSSRule { 1707 this.ref.Once() 1708 return this 1709 } 1710 1711 func (this CSSRule) Ref() js.Ref { 1712 return this.ref 1713 } 1714 1715 func (this CSSRule) FromRef(ref js.Ref) CSSRule { 1716 this.ref = ref 1717 return this 1718 } 1719 1720 func (this CSSRule) Free() { 1721 this.ref.Free() 1722 } 1723 1724 // CssText returns the value of property "CSSRule.cssText". 1725 // 1726 // It returns ok=false if there is no such property. 1727 func (this CSSRule) CssText() (ret js.String, ok bool) { 1728 ok = js.True == bindings.GetCSSRuleCssText( 1729 this.ref, js.Pointer(&ret), 1730 ) 1731 return 1732 } 1733 1734 // SetCssText sets the value of property "CSSRule.cssText" to val. 1735 // 1736 // It returns false if the property cannot be set. 1737 func (this CSSRule) SetCssText(val js.String) bool { 1738 return js.True == bindings.SetCSSRuleCssText( 1739 this.ref, 1740 val.Ref(), 1741 ) 1742 } 1743 1744 // ParentRule returns the value of property "CSSRule.parentRule". 1745 // 1746 // It returns ok=false if there is no such property. 1747 func (this CSSRule) ParentRule() (ret CSSRule, ok bool) { 1748 ok = js.True == bindings.GetCSSRuleParentRule( 1749 this.ref, js.Pointer(&ret), 1750 ) 1751 return 1752 } 1753 1754 // ParentStyleSheet returns the value of property "CSSRule.parentStyleSheet". 1755 // 1756 // It returns ok=false if there is no such property. 1757 func (this CSSRule) ParentStyleSheet() (ret CSSStyleSheet, ok bool) { 1758 ok = js.True == bindings.GetCSSRuleParentStyleSheet( 1759 this.ref, js.Pointer(&ret), 1760 ) 1761 return 1762 } 1763 1764 // Type returns the value of property "CSSRule.type". 1765 // 1766 // It returns ok=false if there is no such property. 1767 func (this CSSRule) Type() (ret uint16, ok bool) { 1768 ok = js.True == bindings.GetCSSRuleType( 1769 this.ref, js.Pointer(&ret), 1770 ) 1771 return 1772 } 1773 1774 type CSSRuleList struct { 1775 ref js.Ref 1776 } 1777 1778 func (this CSSRuleList) Once() CSSRuleList { 1779 this.ref.Once() 1780 return this 1781 } 1782 1783 func (this CSSRuleList) Ref() js.Ref { 1784 return this.ref 1785 } 1786 1787 func (this CSSRuleList) FromRef(ref js.Ref) CSSRuleList { 1788 this.ref = ref 1789 return this 1790 } 1791 1792 func (this CSSRuleList) Free() { 1793 this.ref.Free() 1794 } 1795 1796 // Length returns the value of property "CSSRuleList.length". 1797 // 1798 // It returns ok=false if there is no such property. 1799 func (this CSSRuleList) Length() (ret uint32, ok bool) { 1800 ok = js.True == bindings.GetCSSRuleListLength( 1801 this.ref, js.Pointer(&ret), 1802 ) 1803 return 1804 } 1805 1806 // HasFuncItem returns true if the method "CSSRuleList.item" exists. 1807 func (this CSSRuleList) HasFuncItem() bool { 1808 return js.True == bindings.HasFuncCSSRuleListItem( 1809 this.ref, 1810 ) 1811 } 1812 1813 // FuncItem returns the method "CSSRuleList.item". 1814 func (this CSSRuleList) FuncItem() (fn js.Func[func(index uint32) CSSRule]) { 1815 bindings.FuncCSSRuleListItem( 1816 this.ref, js.Pointer(&fn), 1817 ) 1818 return 1819 } 1820 1821 // Item calls the method "CSSRuleList.item". 1822 func (this CSSRuleList) Item(index uint32) (ret CSSRule) { 1823 bindings.CallCSSRuleListItem( 1824 this.ref, js.Pointer(&ret), 1825 uint32(index), 1826 ) 1827 1828 return 1829 } 1830 1831 // TryItem calls the method "CSSRuleList.item" 1832 // in a try/catch block and returns (_, err, ok = false) when it went through 1833 // the catch clause. 1834 func (this CSSRuleList) TryItem(index uint32) (ret CSSRule, exception js.Any, ok bool) { 1835 ok = js.True == bindings.TryCSSRuleListItem( 1836 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1837 uint32(index), 1838 ) 1839 1840 return 1841 } 1842 1843 func NewCSSStyleSheet(options CSSStyleSheetInit) (ret CSSStyleSheet) { 1844 ret.ref = bindings.NewCSSStyleSheetByCSSStyleSheet( 1845 js.Pointer(&options)) 1846 return 1847 } 1848 1849 func NewCSSStyleSheetByCSSStyleSheet1() (ret CSSStyleSheet) { 1850 ret.ref = bindings.NewCSSStyleSheetByCSSStyleSheet1() 1851 return 1852 } 1853 1854 type CSSStyleSheet struct { 1855 StyleSheet 1856 } 1857 1858 func (this CSSStyleSheet) Once() CSSStyleSheet { 1859 this.ref.Once() 1860 return this 1861 } 1862 1863 func (this CSSStyleSheet) Ref() js.Ref { 1864 return this.StyleSheet.Ref() 1865 } 1866 1867 func (this CSSStyleSheet) FromRef(ref js.Ref) CSSStyleSheet { 1868 this.StyleSheet = this.StyleSheet.FromRef(ref) 1869 return this 1870 } 1871 1872 func (this CSSStyleSheet) Free() { 1873 this.ref.Free() 1874 } 1875 1876 // OwnerRule returns the value of property "CSSStyleSheet.ownerRule". 1877 // 1878 // It returns ok=false if there is no such property. 1879 func (this CSSStyleSheet) OwnerRule() (ret CSSRule, ok bool) { 1880 ok = js.True == bindings.GetCSSStyleSheetOwnerRule( 1881 this.ref, js.Pointer(&ret), 1882 ) 1883 return 1884 } 1885 1886 // CssRules returns the value of property "CSSStyleSheet.cssRules". 1887 // 1888 // It returns ok=false if there is no such property. 1889 func (this CSSStyleSheet) CssRules() (ret CSSRuleList, ok bool) { 1890 ok = js.True == bindings.GetCSSStyleSheetCssRules( 1891 this.ref, js.Pointer(&ret), 1892 ) 1893 return 1894 } 1895 1896 // Rules returns the value of property "CSSStyleSheet.rules". 1897 // 1898 // It returns ok=false if there is no such property. 1899 func (this CSSStyleSheet) Rules() (ret CSSRuleList, ok bool) { 1900 ok = js.True == bindings.GetCSSStyleSheetRules( 1901 this.ref, js.Pointer(&ret), 1902 ) 1903 return 1904 } 1905 1906 // HasFuncInsertRule returns true if the method "CSSStyleSheet.insertRule" exists. 1907 func (this CSSStyleSheet) HasFuncInsertRule() bool { 1908 return js.True == bindings.HasFuncCSSStyleSheetInsertRule( 1909 this.ref, 1910 ) 1911 } 1912 1913 // FuncInsertRule returns the method "CSSStyleSheet.insertRule". 1914 func (this CSSStyleSheet) FuncInsertRule() (fn js.Func[func(rule js.String, index uint32) uint32]) { 1915 bindings.FuncCSSStyleSheetInsertRule( 1916 this.ref, js.Pointer(&fn), 1917 ) 1918 return 1919 } 1920 1921 // InsertRule calls the method "CSSStyleSheet.insertRule". 1922 func (this CSSStyleSheet) InsertRule(rule js.String, index uint32) (ret uint32) { 1923 bindings.CallCSSStyleSheetInsertRule( 1924 this.ref, js.Pointer(&ret), 1925 rule.Ref(), 1926 uint32(index), 1927 ) 1928 1929 return 1930 } 1931 1932 // TryInsertRule calls the method "CSSStyleSheet.insertRule" 1933 // in a try/catch block and returns (_, err, ok = false) when it went through 1934 // the catch clause. 1935 func (this CSSStyleSheet) TryInsertRule(rule js.String, index uint32) (ret uint32, exception js.Any, ok bool) { 1936 ok = js.True == bindings.TryCSSStyleSheetInsertRule( 1937 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1938 rule.Ref(), 1939 uint32(index), 1940 ) 1941 1942 return 1943 } 1944 1945 // HasFuncInsertRule1 returns true if the method "CSSStyleSheet.insertRule" exists. 1946 func (this CSSStyleSheet) HasFuncInsertRule1() bool { 1947 return js.True == bindings.HasFuncCSSStyleSheetInsertRule1( 1948 this.ref, 1949 ) 1950 } 1951 1952 // FuncInsertRule1 returns the method "CSSStyleSheet.insertRule". 1953 func (this CSSStyleSheet) FuncInsertRule1() (fn js.Func[func(rule js.String) uint32]) { 1954 bindings.FuncCSSStyleSheetInsertRule1( 1955 this.ref, js.Pointer(&fn), 1956 ) 1957 return 1958 } 1959 1960 // InsertRule1 calls the method "CSSStyleSheet.insertRule". 1961 func (this CSSStyleSheet) InsertRule1(rule js.String) (ret uint32) { 1962 bindings.CallCSSStyleSheetInsertRule1( 1963 this.ref, js.Pointer(&ret), 1964 rule.Ref(), 1965 ) 1966 1967 return 1968 } 1969 1970 // TryInsertRule1 calls the method "CSSStyleSheet.insertRule" 1971 // in a try/catch block and returns (_, err, ok = false) when it went through 1972 // the catch clause. 1973 func (this CSSStyleSheet) TryInsertRule1(rule js.String) (ret uint32, exception js.Any, ok bool) { 1974 ok = js.True == bindings.TryCSSStyleSheetInsertRule1( 1975 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1976 rule.Ref(), 1977 ) 1978 1979 return 1980 } 1981 1982 // HasFuncDeleteRule returns true if the method "CSSStyleSheet.deleteRule" exists. 1983 func (this CSSStyleSheet) HasFuncDeleteRule() bool { 1984 return js.True == bindings.HasFuncCSSStyleSheetDeleteRule( 1985 this.ref, 1986 ) 1987 } 1988 1989 // FuncDeleteRule returns the method "CSSStyleSheet.deleteRule". 1990 func (this CSSStyleSheet) FuncDeleteRule() (fn js.Func[func(index uint32)]) { 1991 bindings.FuncCSSStyleSheetDeleteRule( 1992 this.ref, js.Pointer(&fn), 1993 ) 1994 return 1995 } 1996 1997 // DeleteRule calls the method "CSSStyleSheet.deleteRule". 1998 func (this CSSStyleSheet) DeleteRule(index uint32) (ret js.Void) { 1999 bindings.CallCSSStyleSheetDeleteRule( 2000 this.ref, js.Pointer(&ret), 2001 uint32(index), 2002 ) 2003 2004 return 2005 } 2006 2007 // TryDeleteRule calls the method "CSSStyleSheet.deleteRule" 2008 // in a try/catch block and returns (_, err, ok = false) when it went through 2009 // the catch clause. 2010 func (this CSSStyleSheet) TryDeleteRule(index uint32) (ret js.Void, exception js.Any, ok bool) { 2011 ok = js.True == bindings.TryCSSStyleSheetDeleteRule( 2012 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2013 uint32(index), 2014 ) 2015 2016 return 2017 } 2018 2019 // HasFuncReplace returns true if the method "CSSStyleSheet.replace" exists. 2020 func (this CSSStyleSheet) HasFuncReplace() bool { 2021 return js.True == bindings.HasFuncCSSStyleSheetReplace( 2022 this.ref, 2023 ) 2024 } 2025 2026 // FuncReplace returns the method "CSSStyleSheet.replace". 2027 func (this CSSStyleSheet) FuncReplace() (fn js.Func[func(text js.String) js.Promise[CSSStyleSheet]]) { 2028 bindings.FuncCSSStyleSheetReplace( 2029 this.ref, js.Pointer(&fn), 2030 ) 2031 return 2032 } 2033 2034 // Replace calls the method "CSSStyleSheet.replace". 2035 func (this CSSStyleSheet) Replace(text js.String) (ret js.Promise[CSSStyleSheet]) { 2036 bindings.CallCSSStyleSheetReplace( 2037 this.ref, js.Pointer(&ret), 2038 text.Ref(), 2039 ) 2040 2041 return 2042 } 2043 2044 // TryReplace calls the method "CSSStyleSheet.replace" 2045 // in a try/catch block and returns (_, err, ok = false) when it went through 2046 // the catch clause. 2047 func (this CSSStyleSheet) TryReplace(text js.String) (ret js.Promise[CSSStyleSheet], exception js.Any, ok bool) { 2048 ok = js.True == bindings.TryCSSStyleSheetReplace( 2049 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2050 text.Ref(), 2051 ) 2052 2053 return 2054 } 2055 2056 // HasFuncReplaceSync returns true if the method "CSSStyleSheet.replaceSync" exists. 2057 func (this CSSStyleSheet) HasFuncReplaceSync() bool { 2058 return js.True == bindings.HasFuncCSSStyleSheetReplaceSync( 2059 this.ref, 2060 ) 2061 } 2062 2063 // FuncReplaceSync returns the method "CSSStyleSheet.replaceSync". 2064 func (this CSSStyleSheet) FuncReplaceSync() (fn js.Func[func(text js.String)]) { 2065 bindings.FuncCSSStyleSheetReplaceSync( 2066 this.ref, js.Pointer(&fn), 2067 ) 2068 return 2069 } 2070 2071 // ReplaceSync calls the method "CSSStyleSheet.replaceSync". 2072 func (this CSSStyleSheet) ReplaceSync(text js.String) (ret js.Void) { 2073 bindings.CallCSSStyleSheetReplaceSync( 2074 this.ref, js.Pointer(&ret), 2075 text.Ref(), 2076 ) 2077 2078 return 2079 } 2080 2081 // TryReplaceSync calls the method "CSSStyleSheet.replaceSync" 2082 // in a try/catch block and returns (_, err, ok = false) when it went through 2083 // the catch clause. 2084 func (this CSSStyleSheet) TryReplaceSync(text js.String) (ret js.Void, exception js.Any, ok bool) { 2085 ok = js.True == bindings.TryCSSStyleSheetReplaceSync( 2086 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2087 text.Ref(), 2088 ) 2089 2090 return 2091 } 2092 2093 // HasFuncAddRule returns true if the method "CSSStyleSheet.addRule" exists. 2094 func (this CSSStyleSheet) HasFuncAddRule() bool { 2095 return js.True == bindings.HasFuncCSSStyleSheetAddRule( 2096 this.ref, 2097 ) 2098 } 2099 2100 // FuncAddRule returns the method "CSSStyleSheet.addRule". 2101 func (this CSSStyleSheet) FuncAddRule() (fn js.Func[func(selector js.String, style js.String, index uint32) int32]) { 2102 bindings.FuncCSSStyleSheetAddRule( 2103 this.ref, js.Pointer(&fn), 2104 ) 2105 return 2106 } 2107 2108 // AddRule calls the method "CSSStyleSheet.addRule". 2109 func (this CSSStyleSheet) AddRule(selector js.String, style js.String, index uint32) (ret int32) { 2110 bindings.CallCSSStyleSheetAddRule( 2111 this.ref, js.Pointer(&ret), 2112 selector.Ref(), 2113 style.Ref(), 2114 uint32(index), 2115 ) 2116 2117 return 2118 } 2119 2120 // TryAddRule calls the method "CSSStyleSheet.addRule" 2121 // in a try/catch block and returns (_, err, ok = false) when it went through 2122 // the catch clause. 2123 func (this CSSStyleSheet) TryAddRule(selector js.String, style js.String, index uint32) (ret int32, exception js.Any, ok bool) { 2124 ok = js.True == bindings.TryCSSStyleSheetAddRule( 2125 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2126 selector.Ref(), 2127 style.Ref(), 2128 uint32(index), 2129 ) 2130 2131 return 2132 } 2133 2134 // HasFuncAddRule1 returns true if the method "CSSStyleSheet.addRule" exists. 2135 func (this CSSStyleSheet) HasFuncAddRule1() bool { 2136 return js.True == bindings.HasFuncCSSStyleSheetAddRule1( 2137 this.ref, 2138 ) 2139 } 2140 2141 // FuncAddRule1 returns the method "CSSStyleSheet.addRule". 2142 func (this CSSStyleSheet) FuncAddRule1() (fn js.Func[func(selector js.String, style js.String) int32]) { 2143 bindings.FuncCSSStyleSheetAddRule1( 2144 this.ref, js.Pointer(&fn), 2145 ) 2146 return 2147 } 2148 2149 // AddRule1 calls the method "CSSStyleSheet.addRule". 2150 func (this CSSStyleSheet) AddRule1(selector js.String, style js.String) (ret int32) { 2151 bindings.CallCSSStyleSheetAddRule1( 2152 this.ref, js.Pointer(&ret), 2153 selector.Ref(), 2154 style.Ref(), 2155 ) 2156 2157 return 2158 } 2159 2160 // TryAddRule1 calls the method "CSSStyleSheet.addRule" 2161 // in a try/catch block and returns (_, err, ok = false) when it went through 2162 // the catch clause. 2163 func (this CSSStyleSheet) TryAddRule1(selector js.String, style js.String) (ret int32, exception js.Any, ok bool) { 2164 ok = js.True == bindings.TryCSSStyleSheetAddRule1( 2165 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2166 selector.Ref(), 2167 style.Ref(), 2168 ) 2169 2170 return 2171 } 2172 2173 // HasFuncAddRule2 returns true if the method "CSSStyleSheet.addRule" exists. 2174 func (this CSSStyleSheet) HasFuncAddRule2() bool { 2175 return js.True == bindings.HasFuncCSSStyleSheetAddRule2( 2176 this.ref, 2177 ) 2178 } 2179 2180 // FuncAddRule2 returns the method "CSSStyleSheet.addRule". 2181 func (this CSSStyleSheet) FuncAddRule2() (fn js.Func[func(selector js.String) int32]) { 2182 bindings.FuncCSSStyleSheetAddRule2( 2183 this.ref, js.Pointer(&fn), 2184 ) 2185 return 2186 } 2187 2188 // AddRule2 calls the method "CSSStyleSheet.addRule". 2189 func (this CSSStyleSheet) AddRule2(selector js.String) (ret int32) { 2190 bindings.CallCSSStyleSheetAddRule2( 2191 this.ref, js.Pointer(&ret), 2192 selector.Ref(), 2193 ) 2194 2195 return 2196 } 2197 2198 // TryAddRule2 calls the method "CSSStyleSheet.addRule" 2199 // in a try/catch block and returns (_, err, ok = false) when it went through 2200 // the catch clause. 2201 func (this CSSStyleSheet) TryAddRule2(selector js.String) (ret int32, exception js.Any, ok bool) { 2202 ok = js.True == bindings.TryCSSStyleSheetAddRule2( 2203 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2204 selector.Ref(), 2205 ) 2206 2207 return 2208 } 2209 2210 // HasFuncAddRule3 returns true if the method "CSSStyleSheet.addRule" exists. 2211 func (this CSSStyleSheet) HasFuncAddRule3() bool { 2212 return js.True == bindings.HasFuncCSSStyleSheetAddRule3( 2213 this.ref, 2214 ) 2215 } 2216 2217 // FuncAddRule3 returns the method "CSSStyleSheet.addRule". 2218 func (this CSSStyleSheet) FuncAddRule3() (fn js.Func[func() int32]) { 2219 bindings.FuncCSSStyleSheetAddRule3( 2220 this.ref, js.Pointer(&fn), 2221 ) 2222 return 2223 } 2224 2225 // AddRule3 calls the method "CSSStyleSheet.addRule". 2226 func (this CSSStyleSheet) AddRule3() (ret int32) { 2227 bindings.CallCSSStyleSheetAddRule3( 2228 this.ref, js.Pointer(&ret), 2229 ) 2230 2231 return 2232 } 2233 2234 // TryAddRule3 calls the method "CSSStyleSheet.addRule" 2235 // in a try/catch block and returns (_, err, ok = false) when it went through 2236 // the catch clause. 2237 func (this CSSStyleSheet) TryAddRule3() (ret int32, exception js.Any, ok bool) { 2238 ok = js.True == bindings.TryCSSStyleSheetAddRule3( 2239 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2240 ) 2241 2242 return 2243 } 2244 2245 // HasFuncRemoveRule returns true if the method "CSSStyleSheet.removeRule" exists. 2246 func (this CSSStyleSheet) HasFuncRemoveRule() bool { 2247 return js.True == bindings.HasFuncCSSStyleSheetRemoveRule( 2248 this.ref, 2249 ) 2250 } 2251 2252 // FuncRemoveRule returns the method "CSSStyleSheet.removeRule". 2253 func (this CSSStyleSheet) FuncRemoveRule() (fn js.Func[func(index uint32)]) { 2254 bindings.FuncCSSStyleSheetRemoveRule( 2255 this.ref, js.Pointer(&fn), 2256 ) 2257 return 2258 } 2259 2260 // RemoveRule calls the method "CSSStyleSheet.removeRule". 2261 func (this CSSStyleSheet) RemoveRule(index uint32) (ret js.Void) { 2262 bindings.CallCSSStyleSheetRemoveRule( 2263 this.ref, js.Pointer(&ret), 2264 uint32(index), 2265 ) 2266 2267 return 2268 } 2269 2270 // TryRemoveRule calls the method "CSSStyleSheet.removeRule" 2271 // in a try/catch block and returns (_, err, ok = false) when it went through 2272 // the catch clause. 2273 func (this CSSStyleSheet) TryRemoveRule(index uint32) (ret js.Void, exception js.Any, ok bool) { 2274 ok = js.True == bindings.TryCSSStyleSheetRemoveRule( 2275 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2276 uint32(index), 2277 ) 2278 2279 return 2280 } 2281 2282 // HasFuncRemoveRule1 returns true if the method "CSSStyleSheet.removeRule" exists. 2283 func (this CSSStyleSheet) HasFuncRemoveRule1() bool { 2284 return js.True == bindings.HasFuncCSSStyleSheetRemoveRule1( 2285 this.ref, 2286 ) 2287 } 2288 2289 // FuncRemoveRule1 returns the method "CSSStyleSheet.removeRule". 2290 func (this CSSStyleSheet) FuncRemoveRule1() (fn js.Func[func()]) { 2291 bindings.FuncCSSStyleSheetRemoveRule1( 2292 this.ref, js.Pointer(&fn), 2293 ) 2294 return 2295 } 2296 2297 // RemoveRule1 calls the method "CSSStyleSheet.removeRule". 2298 func (this CSSStyleSheet) RemoveRule1() (ret js.Void) { 2299 bindings.CallCSSStyleSheetRemoveRule1( 2300 this.ref, js.Pointer(&ret), 2301 ) 2302 2303 return 2304 } 2305 2306 // TryRemoveRule1 calls the method "CSSStyleSheet.removeRule" 2307 // in a try/catch block and returns (_, err, ok = false) when it went through 2308 // the catch clause. 2309 func (this CSSStyleSheet) TryRemoveRule1() (ret js.Void, exception js.Any, ok bool) { 2310 ok = js.True == bindings.TryCSSStyleSheetRemoveRule1( 2311 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2312 ) 2313 2314 return 2315 } 2316 2317 type StyleSheetList struct { 2318 ref js.Ref 2319 } 2320 2321 func (this StyleSheetList) Once() StyleSheetList { 2322 this.ref.Once() 2323 return this 2324 } 2325 2326 func (this StyleSheetList) Ref() js.Ref { 2327 return this.ref 2328 } 2329 2330 func (this StyleSheetList) FromRef(ref js.Ref) StyleSheetList { 2331 this.ref = ref 2332 return this 2333 } 2334 2335 func (this StyleSheetList) Free() { 2336 this.ref.Free() 2337 } 2338 2339 // Length returns the value of property "StyleSheetList.length". 2340 // 2341 // It returns ok=false if there is no such property. 2342 func (this StyleSheetList) Length() (ret uint32, ok bool) { 2343 ok = js.True == bindings.GetStyleSheetListLength( 2344 this.ref, js.Pointer(&ret), 2345 ) 2346 return 2347 } 2348 2349 // HasFuncItem returns true if the method "StyleSheetList.item" exists. 2350 func (this StyleSheetList) HasFuncItem() bool { 2351 return js.True == bindings.HasFuncStyleSheetListItem( 2352 this.ref, 2353 ) 2354 } 2355 2356 // FuncItem returns the method "StyleSheetList.item". 2357 func (this StyleSheetList) FuncItem() (fn js.Func[func(index uint32) CSSStyleSheet]) { 2358 bindings.FuncStyleSheetListItem( 2359 this.ref, js.Pointer(&fn), 2360 ) 2361 return 2362 } 2363 2364 // Item calls the method "StyleSheetList.item". 2365 func (this StyleSheetList) Item(index uint32) (ret CSSStyleSheet) { 2366 bindings.CallStyleSheetListItem( 2367 this.ref, js.Pointer(&ret), 2368 uint32(index), 2369 ) 2370 2371 return 2372 } 2373 2374 // TryItem calls the method "StyleSheetList.item" 2375 // in a try/catch block and returns (_, err, ok = false) when it went through 2376 // the catch clause. 2377 func (this StyleSheetList) TryItem(index uint32) (ret CSSStyleSheet, exception js.Any, ok bool) { 2378 ok = js.True == bindings.TryStyleSheetListItem( 2379 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2380 uint32(index), 2381 ) 2382 2383 return 2384 } 2385 2386 type ShadowRoot struct { 2387 DocumentFragment 2388 } 2389 2390 func (this ShadowRoot) Once() ShadowRoot { 2391 this.ref.Once() 2392 return this 2393 } 2394 2395 func (this ShadowRoot) Ref() js.Ref { 2396 return this.DocumentFragment.Ref() 2397 } 2398 2399 func (this ShadowRoot) FromRef(ref js.Ref) ShadowRoot { 2400 this.DocumentFragment = this.DocumentFragment.FromRef(ref) 2401 return this 2402 } 2403 2404 func (this ShadowRoot) Free() { 2405 this.ref.Free() 2406 } 2407 2408 // Mode returns the value of property "ShadowRoot.mode". 2409 // 2410 // It returns ok=false if there is no such property. 2411 func (this ShadowRoot) Mode() (ret ShadowRootMode, ok bool) { 2412 ok = js.True == bindings.GetShadowRootMode( 2413 this.ref, js.Pointer(&ret), 2414 ) 2415 return 2416 } 2417 2418 // DelegatesFocus returns the value of property "ShadowRoot.delegatesFocus". 2419 // 2420 // It returns ok=false if there is no such property. 2421 func (this ShadowRoot) DelegatesFocus() (ret bool, ok bool) { 2422 ok = js.True == bindings.GetShadowRootDelegatesFocus( 2423 this.ref, js.Pointer(&ret), 2424 ) 2425 return 2426 } 2427 2428 // SlotAssignment returns the value of property "ShadowRoot.slotAssignment". 2429 // 2430 // It returns ok=false if there is no such property. 2431 func (this ShadowRoot) SlotAssignment() (ret SlotAssignmentMode, ok bool) { 2432 ok = js.True == bindings.GetShadowRootSlotAssignment( 2433 this.ref, js.Pointer(&ret), 2434 ) 2435 return 2436 } 2437 2438 // Host returns the value of property "ShadowRoot.host". 2439 // 2440 // It returns ok=false if there is no such property. 2441 func (this ShadowRoot) Host() (ret Element, ok bool) { 2442 ok = js.True == bindings.GetShadowRootHost( 2443 this.ref, js.Pointer(&ret), 2444 ) 2445 return 2446 } 2447 2448 // InnerHTML returns the value of property "ShadowRoot.innerHTML". 2449 // 2450 // It returns ok=false if there is no such property. 2451 func (this ShadowRoot) InnerHTML() (ret js.String, ok bool) { 2452 ok = js.True == bindings.GetShadowRootInnerHTML( 2453 this.ref, js.Pointer(&ret), 2454 ) 2455 return 2456 } 2457 2458 // SetInnerHTML sets the value of property "ShadowRoot.innerHTML" to val. 2459 // 2460 // It returns false if the property cannot be set. 2461 func (this ShadowRoot) SetInnerHTML(val js.String) bool { 2462 return js.True == bindings.SetShadowRootInnerHTML( 2463 this.ref, 2464 val.Ref(), 2465 ) 2466 } 2467 2468 // FullscreenElement returns the value of property "ShadowRoot.fullscreenElement". 2469 // 2470 // It returns ok=false if there is no such property. 2471 func (this ShadowRoot) FullscreenElement() (ret Element, ok bool) { 2472 ok = js.True == bindings.GetShadowRootFullscreenElement( 2473 this.ref, js.Pointer(&ret), 2474 ) 2475 return 2476 } 2477 2478 // StyleSheets returns the value of property "ShadowRoot.styleSheets". 2479 // 2480 // It returns ok=false if there is no such property. 2481 func (this ShadowRoot) StyleSheets() (ret StyleSheetList, ok bool) { 2482 ok = js.True == bindings.GetShadowRootStyleSheets( 2483 this.ref, js.Pointer(&ret), 2484 ) 2485 return 2486 } 2487 2488 // AdoptedStyleSheets returns the value of property "ShadowRoot.adoptedStyleSheets". 2489 // 2490 // It returns ok=false if there is no such property. 2491 func (this ShadowRoot) AdoptedStyleSheets() (ret js.ObservableArray[CSSStyleSheet], ok bool) { 2492 ok = js.True == bindings.GetShadowRootAdoptedStyleSheets( 2493 this.ref, js.Pointer(&ret), 2494 ) 2495 return 2496 } 2497 2498 // SetAdoptedStyleSheets sets the value of property "ShadowRoot.adoptedStyleSheets" to val. 2499 // 2500 // It returns false if the property cannot be set. 2501 func (this ShadowRoot) SetAdoptedStyleSheets(val js.ObservableArray[CSSStyleSheet]) bool { 2502 return js.True == bindings.SetShadowRootAdoptedStyleSheets( 2503 this.ref, 2504 val.Ref(), 2505 ) 2506 } 2507 2508 // PictureInPictureElement returns the value of property "ShadowRoot.pictureInPictureElement". 2509 // 2510 // It returns ok=false if there is no such property. 2511 func (this ShadowRoot) PictureInPictureElement() (ret Element, ok bool) { 2512 ok = js.True == bindings.GetShadowRootPictureInPictureElement( 2513 this.ref, js.Pointer(&ret), 2514 ) 2515 return 2516 } 2517 2518 // ActiveElement returns the value of property "ShadowRoot.activeElement". 2519 // 2520 // It returns ok=false if there is no such property. 2521 func (this ShadowRoot) ActiveElement() (ret Element, ok bool) { 2522 ok = js.True == bindings.GetShadowRootActiveElement( 2523 this.ref, js.Pointer(&ret), 2524 ) 2525 return 2526 } 2527 2528 // PointerLockElement returns the value of property "ShadowRoot.pointerLockElement". 2529 // 2530 // It returns ok=false if there is no such property. 2531 func (this ShadowRoot) PointerLockElement() (ret Element, ok bool) { 2532 ok = js.True == bindings.GetShadowRootPointerLockElement( 2533 this.ref, js.Pointer(&ret), 2534 ) 2535 return 2536 } 2537 2538 // HasFuncGetAnimations returns true if the method "ShadowRoot.getAnimations" exists. 2539 func (this ShadowRoot) HasFuncGetAnimations() bool { 2540 return js.True == bindings.HasFuncShadowRootGetAnimations( 2541 this.ref, 2542 ) 2543 } 2544 2545 // FuncGetAnimations returns the method "ShadowRoot.getAnimations". 2546 func (this ShadowRoot) FuncGetAnimations() (fn js.Func[func() js.Array[Animation]]) { 2547 bindings.FuncShadowRootGetAnimations( 2548 this.ref, js.Pointer(&fn), 2549 ) 2550 return 2551 } 2552 2553 // GetAnimations calls the method "ShadowRoot.getAnimations". 2554 func (this ShadowRoot) GetAnimations() (ret js.Array[Animation]) { 2555 bindings.CallShadowRootGetAnimations( 2556 this.ref, js.Pointer(&ret), 2557 ) 2558 2559 return 2560 } 2561 2562 // TryGetAnimations calls the method "ShadowRoot.getAnimations" 2563 // in a try/catch block and returns (_, err, ok = false) when it went through 2564 // the catch clause. 2565 func (this ShadowRoot) TryGetAnimations() (ret js.Array[Animation], exception js.Any, ok bool) { 2566 ok = js.True == bindings.TryShadowRootGetAnimations( 2567 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2568 ) 2569 2570 return 2571 } 2572 2573 type ShadowRootInit struct { 2574 // Mode is "ShadowRootInit.mode" 2575 // 2576 // Required 2577 Mode ShadowRootMode 2578 // DelegatesFocus is "ShadowRootInit.delegatesFocus" 2579 // 2580 // Optional, defaults to false. 2581 // 2582 // NOTE: FFI_USE_DelegatesFocus MUST be set to true to make this field effective. 2583 DelegatesFocus bool 2584 // SlotAssignment is "ShadowRootInit.slotAssignment" 2585 // 2586 // Optional, defaults to "named". 2587 SlotAssignment SlotAssignmentMode 2588 2589 FFI_USE_DelegatesFocus bool // for DelegatesFocus. 2590 2591 FFI_USE bool 2592 } 2593 2594 // FromRef calls UpdateFrom and returns a ShadowRootInit with all fields set. 2595 func (p ShadowRootInit) FromRef(ref js.Ref) ShadowRootInit { 2596 p.UpdateFrom(ref) 2597 return p 2598 } 2599 2600 // New creates a new ShadowRootInit in the application heap. 2601 func (p ShadowRootInit) New() js.Ref { 2602 return bindings.ShadowRootInitJSLoad( 2603 js.Pointer(&p), js.True, 0, 2604 ) 2605 } 2606 2607 // UpdateFrom copies value of all fields of the heap object to p. 2608 func (p *ShadowRootInit) UpdateFrom(ref js.Ref) { 2609 bindings.ShadowRootInitJSStore( 2610 js.Pointer(p), ref, 2611 ) 2612 } 2613 2614 // Update writes all fields of the p to the heap object referenced by ref. 2615 func (p *ShadowRootInit) Update(ref js.Ref) { 2616 bindings.ShadowRootInitJSLoad( 2617 js.Pointer(p), js.False, ref, 2618 ) 2619 } 2620 2621 // FreeMembers frees fields with heap reference, if recursive is true 2622 // free all heap references reachable from p. 2623 func (p *ShadowRootInit) FreeMembers(recursive bool) { 2624 } 2625 2626 type FullscreenNavigationUI uint32 2627 2628 const ( 2629 _ FullscreenNavigationUI = iota 2630 2631 FullscreenNavigationUI_AUTO 2632 FullscreenNavigationUI_SHOW 2633 FullscreenNavigationUI_HIDE 2634 ) 2635 2636 func (FullscreenNavigationUI) FromRef(str js.Ref) FullscreenNavigationUI { 2637 return FullscreenNavigationUI(bindings.ConstOfFullscreenNavigationUI(str)) 2638 } 2639 2640 func (x FullscreenNavigationUI) String() (string, bool) { 2641 switch x { 2642 case FullscreenNavigationUI_AUTO: 2643 return "auto", true 2644 case FullscreenNavigationUI_SHOW: 2645 return "show", true 2646 case FullscreenNavigationUI_HIDE: 2647 return "hide", true 2648 default: 2649 return "", false 2650 } 2651 } 2652 2653 type ScreenDetailed struct { 2654 Screen 2655 } 2656 2657 func (this ScreenDetailed) Once() ScreenDetailed { 2658 this.ref.Once() 2659 return this 2660 } 2661 2662 func (this ScreenDetailed) Ref() js.Ref { 2663 return this.Screen.Ref() 2664 } 2665 2666 func (this ScreenDetailed) FromRef(ref js.Ref) ScreenDetailed { 2667 this.Screen = this.Screen.FromRef(ref) 2668 return this 2669 } 2670 2671 func (this ScreenDetailed) Free() { 2672 this.ref.Free() 2673 } 2674 2675 // AvailLeft returns the value of property "ScreenDetailed.availLeft". 2676 // 2677 // It returns ok=false if there is no such property. 2678 func (this ScreenDetailed) AvailLeft() (ret int32, ok bool) { 2679 ok = js.True == bindings.GetScreenDetailedAvailLeft( 2680 this.ref, js.Pointer(&ret), 2681 ) 2682 return 2683 } 2684 2685 // AvailTop returns the value of property "ScreenDetailed.availTop". 2686 // 2687 // It returns ok=false if there is no such property. 2688 func (this ScreenDetailed) AvailTop() (ret int32, ok bool) { 2689 ok = js.True == bindings.GetScreenDetailedAvailTop( 2690 this.ref, js.Pointer(&ret), 2691 ) 2692 return 2693 } 2694 2695 // Left returns the value of property "ScreenDetailed.left". 2696 // 2697 // It returns ok=false if there is no such property. 2698 func (this ScreenDetailed) Left() (ret int32, ok bool) { 2699 ok = js.True == bindings.GetScreenDetailedLeft( 2700 this.ref, js.Pointer(&ret), 2701 ) 2702 return 2703 } 2704 2705 // Top returns the value of property "ScreenDetailed.top". 2706 // 2707 // It returns ok=false if there is no such property. 2708 func (this ScreenDetailed) Top() (ret int32, ok bool) { 2709 ok = js.True == bindings.GetScreenDetailedTop( 2710 this.ref, js.Pointer(&ret), 2711 ) 2712 return 2713 } 2714 2715 // IsPrimary returns the value of property "ScreenDetailed.isPrimary". 2716 // 2717 // It returns ok=false if there is no such property. 2718 func (this ScreenDetailed) IsPrimary() (ret bool, ok bool) { 2719 ok = js.True == bindings.GetScreenDetailedIsPrimary( 2720 this.ref, js.Pointer(&ret), 2721 ) 2722 return 2723 } 2724 2725 // IsInternal returns the value of property "ScreenDetailed.isInternal". 2726 // 2727 // It returns ok=false if there is no such property. 2728 func (this ScreenDetailed) IsInternal() (ret bool, ok bool) { 2729 ok = js.True == bindings.GetScreenDetailedIsInternal( 2730 this.ref, js.Pointer(&ret), 2731 ) 2732 return 2733 } 2734 2735 // DevicePixelRatio returns the value of property "ScreenDetailed.devicePixelRatio". 2736 // 2737 // It returns ok=false if there is no such property. 2738 func (this ScreenDetailed) DevicePixelRatio() (ret float32, ok bool) { 2739 ok = js.True == bindings.GetScreenDetailedDevicePixelRatio( 2740 this.ref, js.Pointer(&ret), 2741 ) 2742 return 2743 } 2744 2745 // Label returns the value of property "ScreenDetailed.label". 2746 // 2747 // It returns ok=false if there is no such property. 2748 func (this ScreenDetailed) Label() (ret js.String, ok bool) { 2749 ok = js.True == bindings.GetScreenDetailedLabel( 2750 this.ref, js.Pointer(&ret), 2751 ) 2752 return 2753 } 2754 2755 type FullscreenOptions struct { 2756 // NavigationUI is "FullscreenOptions.navigationUI" 2757 // 2758 // Optional, defaults to "auto". 2759 NavigationUI FullscreenNavigationUI 2760 // Screen is "FullscreenOptions.screen" 2761 // 2762 // Optional 2763 Screen ScreenDetailed 2764 2765 FFI_USE bool 2766 } 2767 2768 // FromRef calls UpdateFrom and returns a FullscreenOptions with all fields set. 2769 func (p FullscreenOptions) FromRef(ref js.Ref) FullscreenOptions { 2770 p.UpdateFrom(ref) 2771 return p 2772 } 2773 2774 // New creates a new FullscreenOptions in the application heap. 2775 func (p FullscreenOptions) New() js.Ref { 2776 return bindings.FullscreenOptionsJSLoad( 2777 js.Pointer(&p), js.True, 0, 2778 ) 2779 } 2780 2781 // UpdateFrom copies value of all fields of the heap object to p. 2782 func (p *FullscreenOptions) UpdateFrom(ref js.Ref) { 2783 bindings.FullscreenOptionsJSStore( 2784 js.Pointer(p), ref, 2785 ) 2786 } 2787 2788 // Update writes all fields of the p to the heap object referenced by ref. 2789 func (p *FullscreenOptions) Update(ref js.Ref) { 2790 bindings.FullscreenOptionsJSLoad( 2791 js.Pointer(p), js.False, ref, 2792 ) 2793 } 2794 2795 // FreeMembers frees fields with heap reference, if recursive is true 2796 // free all heap references reachable from p. 2797 func (p *FullscreenOptions) FreeMembers(recursive bool) { 2798 js.Free( 2799 p.Screen.Ref(), 2800 ) 2801 p.Screen = p.Screen.FromRef(js.Undefined) 2802 } 2803 2804 type CSSStyleValue struct { 2805 ref js.Ref 2806 } 2807 2808 func (this CSSStyleValue) Once() CSSStyleValue { 2809 this.ref.Once() 2810 return this 2811 } 2812 2813 func (this CSSStyleValue) Ref() js.Ref { 2814 return this.ref 2815 } 2816 2817 func (this CSSStyleValue) FromRef(ref js.Ref) CSSStyleValue { 2818 this.ref = ref 2819 return this 2820 } 2821 2822 func (this CSSStyleValue) Free() { 2823 this.ref.Free() 2824 } 2825 2826 // HasFuncToString returns true if the method "CSSStyleValue.toString" exists. 2827 func (this CSSStyleValue) HasFuncToString() bool { 2828 return js.True == bindings.HasFuncCSSStyleValueToString( 2829 this.ref, 2830 ) 2831 } 2832 2833 // FuncToString returns the method "CSSStyleValue.toString". 2834 func (this CSSStyleValue) FuncToString() (fn js.Func[func() js.String]) { 2835 bindings.FuncCSSStyleValueToString( 2836 this.ref, js.Pointer(&fn), 2837 ) 2838 return 2839 } 2840 2841 // ToString calls the method "CSSStyleValue.toString". 2842 func (this CSSStyleValue) ToString() (ret js.String) { 2843 bindings.CallCSSStyleValueToString( 2844 this.ref, js.Pointer(&ret), 2845 ) 2846 2847 return 2848 } 2849 2850 // TryToString calls the method "CSSStyleValue.toString" 2851 // in a try/catch block and returns (_, err, ok = false) when it went through 2852 // the catch clause. 2853 func (this CSSStyleValue) TryToString() (ret js.String, exception js.Any, ok bool) { 2854 ok = js.True == bindings.TryCSSStyleValueToString( 2855 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2856 ) 2857 2858 return 2859 } 2860 2861 // HasFuncParse returns true if the static method "CSSStyleValue.parse" exists. 2862 func (this CSSStyleValue) HasFuncParse() bool { 2863 return js.True == bindings.HasFuncCSSStyleValueParse( 2864 this.ref, 2865 ) 2866 } 2867 2868 // FuncParse returns the static method "CSSStyleValue.parse". 2869 func (this CSSStyleValue) FuncParse() (fn js.Func[func(property js.String, cssText js.String) CSSStyleValue]) { 2870 bindings.FuncCSSStyleValueParse( 2871 this.ref, js.Pointer(&fn), 2872 ) 2873 return 2874 } 2875 2876 // Parse calls the static method "CSSStyleValue.parse". 2877 func (this CSSStyleValue) Parse(property js.String, cssText js.String) (ret CSSStyleValue) { 2878 bindings.CallCSSStyleValueParse( 2879 this.ref, js.Pointer(&ret), 2880 property.Ref(), 2881 cssText.Ref(), 2882 ) 2883 2884 return 2885 } 2886 2887 // TryParse calls the static method "CSSStyleValue.parse" 2888 // in a try/catch block and returns (_, err, ok = false) when it went through 2889 // the catch clause. 2890 func (this CSSStyleValue) TryParse(property js.String, cssText js.String) (ret CSSStyleValue, exception js.Any, ok bool) { 2891 ok = js.True == bindings.TryCSSStyleValueParse( 2892 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2893 property.Ref(), 2894 cssText.Ref(), 2895 ) 2896 2897 return 2898 } 2899 2900 // HasFuncParseAll returns true if the static method "CSSStyleValue.parseAll" exists. 2901 func (this CSSStyleValue) HasFuncParseAll() bool { 2902 return js.True == bindings.HasFuncCSSStyleValueParseAll( 2903 this.ref, 2904 ) 2905 } 2906 2907 // FuncParseAll returns the static method "CSSStyleValue.parseAll". 2908 func (this CSSStyleValue) FuncParseAll() (fn js.Func[func(property js.String, cssText js.String) js.Array[CSSStyleValue]]) { 2909 bindings.FuncCSSStyleValueParseAll( 2910 this.ref, js.Pointer(&fn), 2911 ) 2912 return 2913 } 2914 2915 // ParseAll calls the static method "CSSStyleValue.parseAll". 2916 func (this CSSStyleValue) ParseAll(property js.String, cssText js.String) (ret js.Array[CSSStyleValue]) { 2917 bindings.CallCSSStyleValueParseAll( 2918 this.ref, js.Pointer(&ret), 2919 property.Ref(), 2920 cssText.Ref(), 2921 ) 2922 2923 return 2924 } 2925 2926 // TryParseAll calls the static method "CSSStyleValue.parseAll" 2927 // in a try/catch block and returns (_, err, ok = false) when it went through 2928 // the catch clause. 2929 func (this CSSStyleValue) TryParseAll(property js.String, cssText js.String) (ret js.Array[CSSStyleValue], exception js.Any, ok bool) { 2930 ok = js.True == bindings.TryCSSStyleValueParseAll( 2931 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2932 property.Ref(), 2933 cssText.Ref(), 2934 ) 2935 2936 return 2937 } 2938 2939 type OneOf_undefined_CSSStyleValue struct { 2940 ref js.Ref 2941 } 2942 2943 func (x OneOf_undefined_CSSStyleValue) Ref() js.Ref { 2944 return x.ref 2945 } 2946 2947 func (x OneOf_undefined_CSSStyleValue) Free() { 2948 x.ref.Free() 2949 } 2950 2951 func (x OneOf_undefined_CSSStyleValue) FromRef(ref js.Ref) OneOf_undefined_CSSStyleValue { 2952 return OneOf_undefined_CSSStyleValue{ 2953 ref: ref, 2954 } 2955 } 2956 2957 func (x OneOf_undefined_CSSStyleValue) Undefined() bool { 2958 return x.ref == js.Undefined 2959 } 2960 2961 func (x OneOf_undefined_CSSStyleValue) CSSStyleValue() CSSStyleValue { 2962 return CSSStyleValue{}.FromRef(x.ref) 2963 } 2964 2965 type StylePropertyMapReadOnly struct { 2966 ref js.Ref 2967 } 2968 2969 func (this StylePropertyMapReadOnly) Once() StylePropertyMapReadOnly { 2970 this.ref.Once() 2971 return this 2972 } 2973 2974 func (this StylePropertyMapReadOnly) Ref() js.Ref { 2975 return this.ref 2976 } 2977 2978 func (this StylePropertyMapReadOnly) FromRef(ref js.Ref) StylePropertyMapReadOnly { 2979 this.ref = ref 2980 return this 2981 } 2982 2983 func (this StylePropertyMapReadOnly) Free() { 2984 this.ref.Free() 2985 } 2986 2987 // Size returns the value of property "StylePropertyMapReadOnly.size". 2988 // 2989 // It returns ok=false if there is no such property. 2990 func (this StylePropertyMapReadOnly) Size() (ret uint32, ok bool) { 2991 ok = js.True == bindings.GetStylePropertyMapReadOnlySize( 2992 this.ref, js.Pointer(&ret), 2993 ) 2994 return 2995 } 2996 2997 // HasFuncGet returns true if the method "StylePropertyMapReadOnly.get" exists. 2998 func (this StylePropertyMapReadOnly) HasFuncGet() bool { 2999 return js.True == bindings.HasFuncStylePropertyMapReadOnlyGet( 3000 this.ref, 3001 ) 3002 } 3003 3004 // FuncGet returns the method "StylePropertyMapReadOnly.get". 3005 func (this StylePropertyMapReadOnly) FuncGet() (fn js.Func[func(property js.String) OneOf_undefined_CSSStyleValue]) { 3006 bindings.FuncStylePropertyMapReadOnlyGet( 3007 this.ref, js.Pointer(&fn), 3008 ) 3009 return 3010 } 3011 3012 // Get calls the method "StylePropertyMapReadOnly.get". 3013 func (this StylePropertyMapReadOnly) Get(property js.String) (ret OneOf_undefined_CSSStyleValue) { 3014 bindings.CallStylePropertyMapReadOnlyGet( 3015 this.ref, js.Pointer(&ret), 3016 property.Ref(), 3017 ) 3018 3019 return 3020 } 3021 3022 // TryGet calls the method "StylePropertyMapReadOnly.get" 3023 // in a try/catch block and returns (_, err, ok = false) when it went through 3024 // the catch clause. 3025 func (this StylePropertyMapReadOnly) TryGet(property js.String) (ret OneOf_undefined_CSSStyleValue, exception js.Any, ok bool) { 3026 ok = js.True == bindings.TryStylePropertyMapReadOnlyGet( 3027 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3028 property.Ref(), 3029 ) 3030 3031 return 3032 } 3033 3034 // HasFuncGetAll returns true if the method "StylePropertyMapReadOnly.getAll" exists. 3035 func (this StylePropertyMapReadOnly) HasFuncGetAll() bool { 3036 return js.True == bindings.HasFuncStylePropertyMapReadOnlyGetAll( 3037 this.ref, 3038 ) 3039 } 3040 3041 // FuncGetAll returns the method "StylePropertyMapReadOnly.getAll". 3042 func (this StylePropertyMapReadOnly) FuncGetAll() (fn js.Func[func(property js.String) js.Array[CSSStyleValue]]) { 3043 bindings.FuncStylePropertyMapReadOnlyGetAll( 3044 this.ref, js.Pointer(&fn), 3045 ) 3046 return 3047 } 3048 3049 // GetAll calls the method "StylePropertyMapReadOnly.getAll". 3050 func (this StylePropertyMapReadOnly) GetAll(property js.String) (ret js.Array[CSSStyleValue]) { 3051 bindings.CallStylePropertyMapReadOnlyGetAll( 3052 this.ref, js.Pointer(&ret), 3053 property.Ref(), 3054 ) 3055 3056 return 3057 } 3058 3059 // TryGetAll calls the method "StylePropertyMapReadOnly.getAll" 3060 // in a try/catch block and returns (_, err, ok = false) when it went through 3061 // the catch clause. 3062 func (this StylePropertyMapReadOnly) TryGetAll(property js.String) (ret js.Array[CSSStyleValue], exception js.Any, ok bool) { 3063 ok = js.True == bindings.TryStylePropertyMapReadOnlyGetAll( 3064 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3065 property.Ref(), 3066 ) 3067 3068 return 3069 } 3070 3071 // HasFuncHas returns true if the method "StylePropertyMapReadOnly.has" exists. 3072 func (this StylePropertyMapReadOnly) HasFuncHas() bool { 3073 return js.True == bindings.HasFuncStylePropertyMapReadOnlyHas( 3074 this.ref, 3075 ) 3076 } 3077 3078 // FuncHas returns the method "StylePropertyMapReadOnly.has". 3079 func (this StylePropertyMapReadOnly) FuncHas() (fn js.Func[func(property js.String) bool]) { 3080 bindings.FuncStylePropertyMapReadOnlyHas( 3081 this.ref, js.Pointer(&fn), 3082 ) 3083 return 3084 } 3085 3086 // Has calls the method "StylePropertyMapReadOnly.has". 3087 func (this StylePropertyMapReadOnly) Has(property js.String) (ret bool) { 3088 bindings.CallStylePropertyMapReadOnlyHas( 3089 this.ref, js.Pointer(&ret), 3090 property.Ref(), 3091 ) 3092 3093 return 3094 } 3095 3096 // TryHas calls the method "StylePropertyMapReadOnly.has" 3097 // in a try/catch block and returns (_, err, ok = false) when it went through 3098 // the catch clause. 3099 func (this StylePropertyMapReadOnly) TryHas(property js.String) (ret bool, exception js.Any, ok bool) { 3100 ok = js.True == bindings.TryStylePropertyMapReadOnlyHas( 3101 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3102 property.Ref(), 3103 ) 3104 3105 return 3106 } 3107 3108 type FocusableAreaSearchMode uint32 3109 3110 const ( 3111 _ FocusableAreaSearchMode = iota 3112 3113 FocusableAreaSearchMode_VISIBLE 3114 FocusableAreaSearchMode_ALL 3115 ) 3116 3117 func (FocusableAreaSearchMode) FromRef(str js.Ref) FocusableAreaSearchMode { 3118 return FocusableAreaSearchMode(bindings.ConstOfFocusableAreaSearchMode(str)) 3119 } 3120 3121 func (x FocusableAreaSearchMode) String() (string, bool) { 3122 switch x { 3123 case FocusableAreaSearchMode_VISIBLE: 3124 return "visible", true 3125 case FocusableAreaSearchMode_ALL: 3126 return "all", true 3127 default: 3128 return "", false 3129 } 3130 } 3131 3132 type FocusableAreasOption struct { 3133 // Mode is "FocusableAreasOption.mode" 3134 // 3135 // Optional 3136 Mode FocusableAreaSearchMode 3137 3138 FFI_USE bool 3139 } 3140 3141 // FromRef calls UpdateFrom and returns a FocusableAreasOption with all fields set. 3142 func (p FocusableAreasOption) FromRef(ref js.Ref) FocusableAreasOption { 3143 p.UpdateFrom(ref) 3144 return p 3145 } 3146 3147 // New creates a new FocusableAreasOption in the application heap. 3148 func (p FocusableAreasOption) New() js.Ref { 3149 return bindings.FocusableAreasOptionJSLoad( 3150 js.Pointer(&p), js.True, 0, 3151 ) 3152 } 3153 3154 // UpdateFrom copies value of all fields of the heap object to p. 3155 func (p *FocusableAreasOption) UpdateFrom(ref js.Ref) { 3156 bindings.FocusableAreasOptionJSStore( 3157 js.Pointer(p), ref, 3158 ) 3159 } 3160 3161 // Update writes all fields of the p to the heap object referenced by ref. 3162 func (p *FocusableAreasOption) Update(ref js.Ref) { 3163 bindings.FocusableAreasOptionJSLoad( 3164 js.Pointer(p), js.False, ref, 3165 ) 3166 } 3167 3168 // FreeMembers frees fields with heap reference, if recursive is true 3169 // free all heap references reachable from p. 3170 func (p *FocusableAreasOption) FreeMembers(recursive bool) { 3171 } 3172 3173 type SpatialNavigationDirection uint32 3174 3175 const ( 3176 _ SpatialNavigationDirection = iota 3177 3178 SpatialNavigationDirection_UP 3179 SpatialNavigationDirection_DOWN 3180 SpatialNavigationDirection_LEFT 3181 SpatialNavigationDirection_RIGHT 3182 ) 3183 3184 func (SpatialNavigationDirection) FromRef(str js.Ref) SpatialNavigationDirection { 3185 return SpatialNavigationDirection(bindings.ConstOfSpatialNavigationDirection(str)) 3186 } 3187 3188 func (x SpatialNavigationDirection) String() (string, bool) { 3189 switch x { 3190 case SpatialNavigationDirection_UP: 3191 return "up", true 3192 case SpatialNavigationDirection_DOWN: 3193 return "down", true 3194 case SpatialNavigationDirection_LEFT: 3195 return "left", true 3196 case SpatialNavigationDirection_RIGHT: 3197 return "right", true 3198 default: 3199 return "", false 3200 } 3201 } 3202 3203 type SpatialNavigationSearchOptions struct { 3204 // Candidates is "SpatialNavigationSearchOptions.candidates" 3205 // 3206 // Optional 3207 Candidates js.Array[Node] 3208 // Container is "SpatialNavigationSearchOptions.container" 3209 // 3210 // Optional 3211 Container Node 3212 3213 FFI_USE bool 3214 } 3215 3216 // FromRef calls UpdateFrom and returns a SpatialNavigationSearchOptions with all fields set. 3217 func (p SpatialNavigationSearchOptions) FromRef(ref js.Ref) SpatialNavigationSearchOptions { 3218 p.UpdateFrom(ref) 3219 return p 3220 } 3221 3222 // New creates a new SpatialNavigationSearchOptions in the application heap. 3223 func (p SpatialNavigationSearchOptions) New() js.Ref { 3224 return bindings.SpatialNavigationSearchOptionsJSLoad( 3225 js.Pointer(&p), js.True, 0, 3226 ) 3227 } 3228 3229 // UpdateFrom copies value of all fields of the heap object to p. 3230 func (p *SpatialNavigationSearchOptions) UpdateFrom(ref js.Ref) { 3231 bindings.SpatialNavigationSearchOptionsJSStore( 3232 js.Pointer(p), ref, 3233 ) 3234 } 3235 3236 // Update writes all fields of the p to the heap object referenced by ref. 3237 func (p *SpatialNavigationSearchOptions) Update(ref js.Ref) { 3238 bindings.SpatialNavigationSearchOptionsJSLoad( 3239 js.Pointer(p), js.False, ref, 3240 ) 3241 } 3242 3243 // FreeMembers frees fields with heap reference, if recursive is true 3244 // free all heap references reachable from p. 3245 func (p *SpatialNavigationSearchOptions) FreeMembers(recursive bool) { 3246 js.Free( 3247 p.Candidates.Ref(), 3248 p.Container.Ref(), 3249 ) 3250 p.Candidates = p.Candidates.FromRef(js.Undefined) 3251 p.Container = p.Container.FromRef(js.Undefined) 3252 } 3253 3254 type DOMPointInit struct { 3255 // X is "DOMPointInit.x" 3256 // 3257 // Optional, defaults to 0. 3258 // 3259 // NOTE: FFI_USE_X MUST be set to true to make this field effective. 3260 X float64 3261 // Y is "DOMPointInit.y" 3262 // 3263 // Optional, defaults to 0. 3264 // 3265 // NOTE: FFI_USE_Y MUST be set to true to make this field effective. 3266 Y float64 3267 // Z is "DOMPointInit.z" 3268 // 3269 // Optional, defaults to 0. 3270 // 3271 // NOTE: FFI_USE_Z MUST be set to true to make this field effective. 3272 Z float64 3273 // W is "DOMPointInit.w" 3274 // 3275 // Optional, defaults to 1. 3276 // 3277 // NOTE: FFI_USE_W MUST be set to true to make this field effective. 3278 W float64 3279 3280 FFI_USE_X bool // for X. 3281 FFI_USE_Y bool // for Y. 3282 FFI_USE_Z bool // for Z. 3283 FFI_USE_W bool // for W. 3284 3285 FFI_USE bool 3286 } 3287 3288 // FromRef calls UpdateFrom and returns a DOMPointInit with all fields set. 3289 func (p DOMPointInit) FromRef(ref js.Ref) DOMPointInit { 3290 p.UpdateFrom(ref) 3291 return p 3292 } 3293 3294 // New creates a new DOMPointInit in the application heap. 3295 func (p DOMPointInit) New() js.Ref { 3296 return bindings.DOMPointInitJSLoad( 3297 js.Pointer(&p), js.True, 0, 3298 ) 3299 } 3300 3301 // UpdateFrom copies value of all fields of the heap object to p. 3302 func (p *DOMPointInit) UpdateFrom(ref js.Ref) { 3303 bindings.DOMPointInitJSStore( 3304 js.Pointer(p), ref, 3305 ) 3306 } 3307 3308 // Update writes all fields of the p to the heap object referenced by ref. 3309 func (p *DOMPointInit) Update(ref js.Ref) { 3310 bindings.DOMPointInitJSLoad( 3311 js.Pointer(p), js.False, ref, 3312 ) 3313 } 3314 3315 // FreeMembers frees fields with heap reference, if recursive is true 3316 // free all heap references reachable from p. 3317 func (p *DOMPointInit) FreeMembers(recursive bool) { 3318 } 3319 3320 type DOMRectInit struct { 3321 // X is "DOMRectInit.x" 3322 // 3323 // Optional, defaults to 0. 3324 // 3325 // NOTE: FFI_USE_X MUST be set to true to make this field effective. 3326 X float64 3327 // Y is "DOMRectInit.y" 3328 // 3329 // Optional, defaults to 0. 3330 // 3331 // NOTE: FFI_USE_Y MUST be set to true to make this field effective. 3332 Y float64 3333 // Width is "DOMRectInit.width" 3334 // 3335 // Optional, defaults to 0. 3336 // 3337 // NOTE: FFI_USE_Width MUST be set to true to make this field effective. 3338 Width float64 3339 // Height is "DOMRectInit.height" 3340 // 3341 // Optional, defaults to 0. 3342 // 3343 // NOTE: FFI_USE_Height MUST be set to true to make this field effective. 3344 Height float64 3345 3346 FFI_USE_X bool // for X. 3347 FFI_USE_Y bool // for Y. 3348 FFI_USE_Width bool // for Width. 3349 FFI_USE_Height bool // for Height. 3350 3351 FFI_USE bool 3352 } 3353 3354 // FromRef calls UpdateFrom and returns a DOMRectInit with all fields set. 3355 func (p DOMRectInit) FromRef(ref js.Ref) DOMRectInit { 3356 p.UpdateFrom(ref) 3357 return p 3358 } 3359 3360 // New creates a new DOMRectInit in the application heap. 3361 func (p DOMRectInit) New() js.Ref { 3362 return bindings.DOMRectInitJSLoad( 3363 js.Pointer(&p), js.True, 0, 3364 ) 3365 } 3366 3367 // UpdateFrom copies value of all fields of the heap object to p. 3368 func (p *DOMRectInit) UpdateFrom(ref js.Ref) { 3369 bindings.DOMRectInitJSStore( 3370 js.Pointer(p), ref, 3371 ) 3372 } 3373 3374 // Update writes all fields of the p to the heap object referenced by ref. 3375 func (p *DOMRectInit) Update(ref js.Ref) { 3376 bindings.DOMRectInitJSLoad( 3377 js.Pointer(p), js.False, ref, 3378 ) 3379 } 3380 3381 // FreeMembers frees fields with heap reference, if recursive is true 3382 // free all heap references reachable from p. 3383 func (p *DOMRectInit) FreeMembers(recursive bool) { 3384 } 3385 3386 type DOMQuadInit struct { 3387 // P1 is "DOMQuadInit.p1" 3388 // 3389 // Optional 3390 // 3391 // NOTE: P1.FFI_USE MUST be set to true to get P1 used. 3392 P1 DOMPointInit 3393 // P2 is "DOMQuadInit.p2" 3394 // 3395 // Optional 3396 // 3397 // NOTE: P2.FFI_USE MUST be set to true to get P2 used. 3398 P2 DOMPointInit 3399 // P3 is "DOMQuadInit.p3" 3400 // 3401 // Optional 3402 // 3403 // NOTE: P3.FFI_USE MUST be set to true to get P3 used. 3404 P3 DOMPointInit 3405 // P4 is "DOMQuadInit.p4" 3406 // 3407 // Optional 3408 // 3409 // NOTE: P4.FFI_USE MUST be set to true to get P4 used. 3410 P4 DOMPointInit 3411 3412 FFI_USE bool 3413 } 3414 3415 // FromRef calls UpdateFrom and returns a DOMQuadInit with all fields set. 3416 func (p DOMQuadInit) FromRef(ref js.Ref) DOMQuadInit { 3417 p.UpdateFrom(ref) 3418 return p 3419 } 3420 3421 // New creates a new DOMQuadInit in the application heap. 3422 func (p DOMQuadInit) New() js.Ref { 3423 return bindings.DOMQuadInitJSLoad( 3424 js.Pointer(&p), js.True, 0, 3425 ) 3426 } 3427 3428 // UpdateFrom copies value of all fields of the heap object to p. 3429 func (p *DOMQuadInit) UpdateFrom(ref js.Ref) { 3430 bindings.DOMQuadInitJSStore( 3431 js.Pointer(p), ref, 3432 ) 3433 } 3434 3435 // Update writes all fields of the p to the heap object referenced by ref. 3436 func (p *DOMQuadInit) Update(ref js.Ref) { 3437 bindings.DOMQuadInitJSLoad( 3438 js.Pointer(p), js.False, ref, 3439 ) 3440 } 3441 3442 // FreeMembers frees fields with heap reference, if recursive is true 3443 // free all heap references reachable from p. 3444 func (p *DOMQuadInit) FreeMembers(recursive bool) { 3445 if recursive { 3446 p.P1.FreeMembers(true) 3447 p.P2.FreeMembers(true) 3448 p.P3.FreeMembers(true) 3449 p.P4.FreeMembers(true) 3450 } 3451 } 3452 3453 func NewDOMRect(x float64, y float64, width float64, height float64) (ret DOMRect) { 3454 ret.ref = bindings.NewDOMRectByDOMRect( 3455 float64(x), 3456 float64(y), 3457 float64(width), 3458 float64(height)) 3459 return 3460 } 3461 3462 func NewDOMRectByDOMRect1(x float64, y float64, width float64) (ret DOMRect) { 3463 ret.ref = bindings.NewDOMRectByDOMRect1( 3464 float64(x), 3465 float64(y), 3466 float64(width)) 3467 return 3468 } 3469 3470 func NewDOMRectByDOMRect2(x float64, y float64) (ret DOMRect) { 3471 ret.ref = bindings.NewDOMRectByDOMRect2( 3472 float64(x), 3473 float64(y)) 3474 return 3475 } 3476 3477 func NewDOMRectByDOMRect3(x float64) (ret DOMRect) { 3478 ret.ref = bindings.NewDOMRectByDOMRect3( 3479 float64(x)) 3480 return 3481 } 3482 3483 func NewDOMRectByDOMRect4() (ret DOMRect) { 3484 ret.ref = bindings.NewDOMRectByDOMRect4() 3485 return 3486 } 3487 3488 type DOMRect struct { 3489 DOMRectReadOnly 3490 } 3491 3492 func (this DOMRect) Once() DOMRect { 3493 this.ref.Once() 3494 return this 3495 } 3496 3497 func (this DOMRect) Ref() js.Ref { 3498 return this.DOMRectReadOnly.Ref() 3499 } 3500 3501 func (this DOMRect) FromRef(ref js.Ref) DOMRect { 3502 this.DOMRectReadOnly = this.DOMRectReadOnly.FromRef(ref) 3503 return this 3504 } 3505 3506 func (this DOMRect) Free() { 3507 this.ref.Free() 3508 } 3509 3510 // X returns the value of property "DOMRect.x". 3511 // 3512 // It returns ok=false if there is no such property. 3513 func (this DOMRect) X() (ret float64, ok bool) { 3514 ok = js.True == bindings.GetDOMRectX( 3515 this.ref, js.Pointer(&ret), 3516 ) 3517 return 3518 } 3519 3520 // SetX sets the value of property "DOMRect.x" to val. 3521 // 3522 // It returns false if the property cannot be set. 3523 func (this DOMRect) SetX(val float64) bool { 3524 return js.True == bindings.SetDOMRectX( 3525 this.ref, 3526 float64(val), 3527 ) 3528 } 3529 3530 // Y returns the value of property "DOMRect.y". 3531 // 3532 // It returns ok=false if there is no such property. 3533 func (this DOMRect) Y() (ret float64, ok bool) { 3534 ok = js.True == bindings.GetDOMRectY( 3535 this.ref, js.Pointer(&ret), 3536 ) 3537 return 3538 } 3539 3540 // SetY sets the value of property "DOMRect.y" to val. 3541 // 3542 // It returns false if the property cannot be set. 3543 func (this DOMRect) SetY(val float64) bool { 3544 return js.True == bindings.SetDOMRectY( 3545 this.ref, 3546 float64(val), 3547 ) 3548 } 3549 3550 // Width returns the value of property "DOMRect.width". 3551 // 3552 // It returns ok=false if there is no such property. 3553 func (this DOMRect) Width() (ret float64, ok bool) { 3554 ok = js.True == bindings.GetDOMRectWidth( 3555 this.ref, js.Pointer(&ret), 3556 ) 3557 return 3558 } 3559 3560 // SetWidth sets the value of property "DOMRect.width" to val. 3561 // 3562 // It returns false if the property cannot be set. 3563 func (this DOMRect) SetWidth(val float64) bool { 3564 return js.True == bindings.SetDOMRectWidth( 3565 this.ref, 3566 float64(val), 3567 ) 3568 } 3569 3570 // Height returns the value of property "DOMRect.height". 3571 // 3572 // It returns ok=false if there is no such property. 3573 func (this DOMRect) Height() (ret float64, ok bool) { 3574 ok = js.True == bindings.GetDOMRectHeight( 3575 this.ref, js.Pointer(&ret), 3576 ) 3577 return 3578 } 3579 3580 // SetHeight sets the value of property "DOMRect.height" to val. 3581 // 3582 // It returns false if the property cannot be set. 3583 func (this DOMRect) SetHeight(val float64) bool { 3584 return js.True == bindings.SetDOMRectHeight( 3585 this.ref, 3586 float64(val), 3587 ) 3588 } 3589 3590 // HasFuncFromRect returns true if the static method "DOMRect.fromRect" exists. 3591 func (this DOMRect) HasFuncFromRect() bool { 3592 return js.True == bindings.HasFuncDOMRectFromRect( 3593 this.ref, 3594 ) 3595 } 3596 3597 // FuncFromRect returns the static method "DOMRect.fromRect". 3598 func (this DOMRect) FuncFromRect() (fn js.Func[func(other DOMRectInit) DOMRect]) { 3599 bindings.FuncDOMRectFromRect( 3600 this.ref, js.Pointer(&fn), 3601 ) 3602 return 3603 } 3604 3605 // FromRect calls the static method "DOMRect.fromRect". 3606 func (this DOMRect) FromRect(other DOMRectInit) (ret DOMRect) { 3607 bindings.CallDOMRectFromRect( 3608 this.ref, js.Pointer(&ret), 3609 js.Pointer(&other), 3610 ) 3611 3612 return 3613 } 3614 3615 // TryFromRect calls the static method "DOMRect.fromRect" 3616 // in a try/catch block and returns (_, err, ok = false) when it went through 3617 // the catch clause. 3618 func (this DOMRect) TryFromRect(other DOMRectInit) (ret DOMRect, exception js.Any, ok bool) { 3619 ok = js.True == bindings.TryDOMRectFromRect( 3620 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3621 js.Pointer(&other), 3622 ) 3623 3624 return 3625 } 3626 3627 // HasFuncFromRect1 returns true if the static method "DOMRect.fromRect" exists. 3628 func (this DOMRect) HasFuncFromRect1() bool { 3629 return js.True == bindings.HasFuncDOMRectFromRect1( 3630 this.ref, 3631 ) 3632 } 3633 3634 // FuncFromRect1 returns the static method "DOMRect.fromRect". 3635 func (this DOMRect) FuncFromRect1() (fn js.Func[func() DOMRect]) { 3636 bindings.FuncDOMRectFromRect1( 3637 this.ref, js.Pointer(&fn), 3638 ) 3639 return 3640 } 3641 3642 // FromRect1 calls the static method "DOMRect.fromRect". 3643 func (this DOMRect) FromRect1() (ret DOMRect) { 3644 bindings.CallDOMRectFromRect1( 3645 this.ref, js.Pointer(&ret), 3646 ) 3647 3648 return 3649 } 3650 3651 // TryFromRect1 calls the static method "DOMRect.fromRect" 3652 // in a try/catch block and returns (_, err, ok = false) when it went through 3653 // the catch clause. 3654 func (this DOMRect) TryFromRect1() (ret DOMRect, exception js.Any, ok bool) { 3655 ok = js.True == bindings.TryDOMRectFromRect1( 3656 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3657 ) 3658 3659 return 3660 } 3661 3662 func NewDOMPoint(x float64, y float64, z float64, w float64) (ret DOMPoint) { 3663 ret.ref = bindings.NewDOMPointByDOMPoint( 3664 float64(x), 3665 float64(y), 3666 float64(z), 3667 float64(w)) 3668 return 3669 } 3670 3671 func NewDOMPointByDOMPoint1(x float64, y float64, z float64) (ret DOMPoint) { 3672 ret.ref = bindings.NewDOMPointByDOMPoint1( 3673 float64(x), 3674 float64(y), 3675 float64(z)) 3676 return 3677 } 3678 3679 func NewDOMPointByDOMPoint2(x float64, y float64) (ret DOMPoint) { 3680 ret.ref = bindings.NewDOMPointByDOMPoint2( 3681 float64(x), 3682 float64(y)) 3683 return 3684 } 3685 3686 func NewDOMPointByDOMPoint3(x float64) (ret DOMPoint) { 3687 ret.ref = bindings.NewDOMPointByDOMPoint3( 3688 float64(x)) 3689 return 3690 } 3691 3692 func NewDOMPointByDOMPoint4() (ret DOMPoint) { 3693 ret.ref = bindings.NewDOMPointByDOMPoint4() 3694 return 3695 } 3696 3697 type DOMPoint struct { 3698 DOMPointReadOnly 3699 } 3700 3701 func (this DOMPoint) Once() DOMPoint { 3702 this.ref.Once() 3703 return this 3704 } 3705 3706 func (this DOMPoint) Ref() js.Ref { 3707 return this.DOMPointReadOnly.Ref() 3708 } 3709 3710 func (this DOMPoint) FromRef(ref js.Ref) DOMPoint { 3711 this.DOMPointReadOnly = this.DOMPointReadOnly.FromRef(ref) 3712 return this 3713 } 3714 3715 func (this DOMPoint) Free() { 3716 this.ref.Free() 3717 } 3718 3719 // X returns the value of property "DOMPoint.x". 3720 // 3721 // It returns ok=false if there is no such property. 3722 func (this DOMPoint) X() (ret float64, ok bool) { 3723 ok = js.True == bindings.GetDOMPointX( 3724 this.ref, js.Pointer(&ret), 3725 ) 3726 return 3727 } 3728 3729 // SetX sets the value of property "DOMPoint.x" to val. 3730 // 3731 // It returns false if the property cannot be set. 3732 func (this DOMPoint) SetX(val float64) bool { 3733 return js.True == bindings.SetDOMPointX( 3734 this.ref, 3735 float64(val), 3736 ) 3737 } 3738 3739 // Y returns the value of property "DOMPoint.y". 3740 // 3741 // It returns ok=false if there is no such property. 3742 func (this DOMPoint) Y() (ret float64, ok bool) { 3743 ok = js.True == bindings.GetDOMPointY( 3744 this.ref, js.Pointer(&ret), 3745 ) 3746 return 3747 } 3748 3749 // SetY sets the value of property "DOMPoint.y" to val. 3750 // 3751 // It returns false if the property cannot be set. 3752 func (this DOMPoint) SetY(val float64) bool { 3753 return js.True == bindings.SetDOMPointY( 3754 this.ref, 3755 float64(val), 3756 ) 3757 } 3758 3759 // Z returns the value of property "DOMPoint.z". 3760 // 3761 // It returns ok=false if there is no such property. 3762 func (this DOMPoint) Z() (ret float64, ok bool) { 3763 ok = js.True == bindings.GetDOMPointZ( 3764 this.ref, js.Pointer(&ret), 3765 ) 3766 return 3767 } 3768 3769 // SetZ sets the value of property "DOMPoint.z" to val. 3770 // 3771 // It returns false if the property cannot be set. 3772 func (this DOMPoint) SetZ(val float64) bool { 3773 return js.True == bindings.SetDOMPointZ( 3774 this.ref, 3775 float64(val), 3776 ) 3777 } 3778 3779 // W returns the value of property "DOMPoint.w". 3780 // 3781 // It returns ok=false if there is no such property. 3782 func (this DOMPoint) W() (ret float64, ok bool) { 3783 ok = js.True == bindings.GetDOMPointW( 3784 this.ref, js.Pointer(&ret), 3785 ) 3786 return 3787 } 3788 3789 // SetW sets the value of property "DOMPoint.w" to val. 3790 // 3791 // It returns false if the property cannot be set. 3792 func (this DOMPoint) SetW(val float64) bool { 3793 return js.True == bindings.SetDOMPointW( 3794 this.ref, 3795 float64(val), 3796 ) 3797 } 3798 3799 // HasFuncFromPoint returns true if the static method "DOMPoint.fromPoint" exists. 3800 func (this DOMPoint) HasFuncFromPoint() bool { 3801 return js.True == bindings.HasFuncDOMPointFromPoint( 3802 this.ref, 3803 ) 3804 } 3805 3806 // FuncFromPoint returns the static method "DOMPoint.fromPoint". 3807 func (this DOMPoint) FuncFromPoint() (fn js.Func[func(other DOMPointInit) DOMPoint]) { 3808 bindings.FuncDOMPointFromPoint( 3809 this.ref, js.Pointer(&fn), 3810 ) 3811 return 3812 } 3813 3814 // FromPoint calls the static method "DOMPoint.fromPoint". 3815 func (this DOMPoint) FromPoint(other DOMPointInit) (ret DOMPoint) { 3816 bindings.CallDOMPointFromPoint( 3817 this.ref, js.Pointer(&ret), 3818 js.Pointer(&other), 3819 ) 3820 3821 return 3822 } 3823 3824 // TryFromPoint calls the static method "DOMPoint.fromPoint" 3825 // in a try/catch block and returns (_, err, ok = false) when it went through 3826 // the catch clause. 3827 func (this DOMPoint) TryFromPoint(other DOMPointInit) (ret DOMPoint, exception js.Any, ok bool) { 3828 ok = js.True == bindings.TryDOMPointFromPoint( 3829 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3830 js.Pointer(&other), 3831 ) 3832 3833 return 3834 } 3835 3836 // HasFuncFromPoint1 returns true if the static method "DOMPoint.fromPoint" exists. 3837 func (this DOMPoint) HasFuncFromPoint1() bool { 3838 return js.True == bindings.HasFuncDOMPointFromPoint1( 3839 this.ref, 3840 ) 3841 } 3842 3843 // FuncFromPoint1 returns the static method "DOMPoint.fromPoint". 3844 func (this DOMPoint) FuncFromPoint1() (fn js.Func[func() DOMPoint]) { 3845 bindings.FuncDOMPointFromPoint1( 3846 this.ref, js.Pointer(&fn), 3847 ) 3848 return 3849 } 3850 3851 // FromPoint1 calls the static method "DOMPoint.fromPoint". 3852 func (this DOMPoint) FromPoint1() (ret DOMPoint) { 3853 bindings.CallDOMPointFromPoint1( 3854 this.ref, js.Pointer(&ret), 3855 ) 3856 3857 return 3858 } 3859 3860 // TryFromPoint1 calls the static method "DOMPoint.fromPoint" 3861 // in a try/catch block and returns (_, err, ok = false) when it went through 3862 // the catch clause. 3863 func (this DOMPoint) TryFromPoint1() (ret DOMPoint, exception js.Any, ok bool) { 3864 ok = js.True == bindings.TryDOMPointFromPoint1( 3865 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3866 ) 3867 3868 return 3869 } 3870 3871 func NewDOMQuad(p1 DOMPointInit, p2 DOMPointInit, p3 DOMPointInit, p4 DOMPointInit) (ret DOMQuad) { 3872 ret.ref = bindings.NewDOMQuadByDOMQuad( 3873 js.Pointer(&p1), 3874 js.Pointer(&p2), 3875 js.Pointer(&p3), 3876 js.Pointer(&p4)) 3877 return 3878 } 3879 3880 func NewDOMQuadByDOMQuad1(p1 DOMPointInit, p2 DOMPointInit, p3 DOMPointInit) (ret DOMQuad) { 3881 ret.ref = bindings.NewDOMQuadByDOMQuad1( 3882 js.Pointer(&p1), 3883 js.Pointer(&p2), 3884 js.Pointer(&p3)) 3885 return 3886 } 3887 3888 func NewDOMQuadByDOMQuad2(p1 DOMPointInit, p2 DOMPointInit) (ret DOMQuad) { 3889 ret.ref = bindings.NewDOMQuadByDOMQuad2( 3890 js.Pointer(&p1), 3891 js.Pointer(&p2)) 3892 return 3893 } 3894 3895 func NewDOMQuadByDOMQuad3(p1 DOMPointInit) (ret DOMQuad) { 3896 ret.ref = bindings.NewDOMQuadByDOMQuad3( 3897 js.Pointer(&p1)) 3898 return 3899 } 3900 3901 func NewDOMQuadByDOMQuad4() (ret DOMQuad) { 3902 ret.ref = bindings.NewDOMQuadByDOMQuad4() 3903 return 3904 } 3905 3906 type DOMQuad struct { 3907 ref js.Ref 3908 } 3909 3910 func (this DOMQuad) Once() DOMQuad { 3911 this.ref.Once() 3912 return this 3913 } 3914 3915 func (this DOMQuad) Ref() js.Ref { 3916 return this.ref 3917 } 3918 3919 func (this DOMQuad) FromRef(ref js.Ref) DOMQuad { 3920 this.ref = ref 3921 return this 3922 } 3923 3924 func (this DOMQuad) Free() { 3925 this.ref.Free() 3926 } 3927 3928 // P1 returns the value of property "DOMQuad.p1". 3929 // 3930 // It returns ok=false if there is no such property. 3931 func (this DOMQuad) P1() (ret DOMPoint, ok bool) { 3932 ok = js.True == bindings.GetDOMQuadP1( 3933 this.ref, js.Pointer(&ret), 3934 ) 3935 return 3936 } 3937 3938 // P2 returns the value of property "DOMQuad.p2". 3939 // 3940 // It returns ok=false if there is no such property. 3941 func (this DOMQuad) P2() (ret DOMPoint, ok bool) { 3942 ok = js.True == bindings.GetDOMQuadP2( 3943 this.ref, js.Pointer(&ret), 3944 ) 3945 return 3946 } 3947 3948 // P3 returns the value of property "DOMQuad.p3". 3949 // 3950 // It returns ok=false if there is no such property. 3951 func (this DOMQuad) P3() (ret DOMPoint, ok bool) { 3952 ok = js.True == bindings.GetDOMQuadP3( 3953 this.ref, js.Pointer(&ret), 3954 ) 3955 return 3956 } 3957 3958 // P4 returns the value of property "DOMQuad.p4". 3959 // 3960 // It returns ok=false if there is no such property. 3961 func (this DOMQuad) P4() (ret DOMPoint, ok bool) { 3962 ok = js.True == bindings.GetDOMQuadP4( 3963 this.ref, js.Pointer(&ret), 3964 ) 3965 return 3966 } 3967 3968 // HasFuncFromRect returns true if the static method "DOMQuad.fromRect" exists. 3969 func (this DOMQuad) HasFuncFromRect() bool { 3970 return js.True == bindings.HasFuncDOMQuadFromRect( 3971 this.ref, 3972 ) 3973 } 3974 3975 // FuncFromRect returns the static method "DOMQuad.fromRect". 3976 func (this DOMQuad) FuncFromRect() (fn js.Func[func(other DOMRectInit) DOMQuad]) { 3977 bindings.FuncDOMQuadFromRect( 3978 this.ref, js.Pointer(&fn), 3979 ) 3980 return 3981 } 3982 3983 // FromRect calls the static method "DOMQuad.fromRect". 3984 func (this DOMQuad) FromRect(other DOMRectInit) (ret DOMQuad) { 3985 bindings.CallDOMQuadFromRect( 3986 this.ref, js.Pointer(&ret), 3987 js.Pointer(&other), 3988 ) 3989 3990 return 3991 } 3992 3993 // TryFromRect calls the static method "DOMQuad.fromRect" 3994 // in a try/catch block and returns (_, err, ok = false) when it went through 3995 // the catch clause. 3996 func (this DOMQuad) TryFromRect(other DOMRectInit) (ret DOMQuad, exception js.Any, ok bool) { 3997 ok = js.True == bindings.TryDOMQuadFromRect( 3998 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3999 js.Pointer(&other), 4000 ) 4001 4002 return 4003 } 4004 4005 // HasFuncFromRect1 returns true if the static method "DOMQuad.fromRect" exists. 4006 func (this DOMQuad) HasFuncFromRect1() bool { 4007 return js.True == bindings.HasFuncDOMQuadFromRect1( 4008 this.ref, 4009 ) 4010 } 4011 4012 // FuncFromRect1 returns the static method "DOMQuad.fromRect". 4013 func (this DOMQuad) FuncFromRect1() (fn js.Func[func() DOMQuad]) { 4014 bindings.FuncDOMQuadFromRect1( 4015 this.ref, js.Pointer(&fn), 4016 ) 4017 return 4018 } 4019 4020 // FromRect1 calls the static method "DOMQuad.fromRect". 4021 func (this DOMQuad) FromRect1() (ret DOMQuad) { 4022 bindings.CallDOMQuadFromRect1( 4023 this.ref, js.Pointer(&ret), 4024 ) 4025 4026 return 4027 } 4028 4029 // TryFromRect1 calls the static method "DOMQuad.fromRect" 4030 // in a try/catch block and returns (_, err, ok = false) when it went through 4031 // the catch clause. 4032 func (this DOMQuad) TryFromRect1() (ret DOMQuad, exception js.Any, ok bool) { 4033 ok = js.True == bindings.TryDOMQuadFromRect1( 4034 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4035 ) 4036 4037 return 4038 } 4039 4040 // HasFuncFromQuad returns true if the static method "DOMQuad.fromQuad" exists. 4041 func (this DOMQuad) HasFuncFromQuad() bool { 4042 return js.True == bindings.HasFuncDOMQuadFromQuad( 4043 this.ref, 4044 ) 4045 } 4046 4047 // FuncFromQuad returns the static method "DOMQuad.fromQuad". 4048 func (this DOMQuad) FuncFromQuad() (fn js.Func[func(other DOMQuadInit) DOMQuad]) { 4049 bindings.FuncDOMQuadFromQuad( 4050 this.ref, js.Pointer(&fn), 4051 ) 4052 return 4053 } 4054 4055 // FromQuad calls the static method "DOMQuad.fromQuad". 4056 func (this DOMQuad) FromQuad(other DOMQuadInit) (ret DOMQuad) { 4057 bindings.CallDOMQuadFromQuad( 4058 this.ref, js.Pointer(&ret), 4059 js.Pointer(&other), 4060 ) 4061 4062 return 4063 } 4064 4065 // TryFromQuad calls the static method "DOMQuad.fromQuad" 4066 // in a try/catch block and returns (_, err, ok = false) when it went through 4067 // the catch clause. 4068 func (this DOMQuad) TryFromQuad(other DOMQuadInit) (ret DOMQuad, exception js.Any, ok bool) { 4069 ok = js.True == bindings.TryDOMQuadFromQuad( 4070 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4071 js.Pointer(&other), 4072 ) 4073 4074 return 4075 } 4076 4077 // HasFuncFromQuad1 returns true if the static method "DOMQuad.fromQuad" exists. 4078 func (this DOMQuad) HasFuncFromQuad1() bool { 4079 return js.True == bindings.HasFuncDOMQuadFromQuad1( 4080 this.ref, 4081 ) 4082 } 4083 4084 // FuncFromQuad1 returns the static method "DOMQuad.fromQuad". 4085 func (this DOMQuad) FuncFromQuad1() (fn js.Func[func() DOMQuad]) { 4086 bindings.FuncDOMQuadFromQuad1( 4087 this.ref, js.Pointer(&fn), 4088 ) 4089 return 4090 } 4091 4092 // FromQuad1 calls the static method "DOMQuad.fromQuad". 4093 func (this DOMQuad) FromQuad1() (ret DOMQuad) { 4094 bindings.CallDOMQuadFromQuad1( 4095 this.ref, js.Pointer(&ret), 4096 ) 4097 4098 return 4099 } 4100 4101 // TryFromQuad1 calls the static method "DOMQuad.fromQuad" 4102 // in a try/catch block and returns (_, err, ok = false) when it went through 4103 // the catch clause. 4104 func (this DOMQuad) TryFromQuad1() (ret DOMQuad, exception js.Any, ok bool) { 4105 ok = js.True == bindings.TryDOMQuadFromQuad1( 4106 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4107 ) 4108 4109 return 4110 } 4111 4112 // HasFuncGetBounds returns true if the method "DOMQuad.getBounds" exists. 4113 func (this DOMQuad) HasFuncGetBounds() bool { 4114 return js.True == bindings.HasFuncDOMQuadGetBounds( 4115 this.ref, 4116 ) 4117 } 4118 4119 // FuncGetBounds returns the method "DOMQuad.getBounds". 4120 func (this DOMQuad) FuncGetBounds() (fn js.Func[func() DOMRect]) { 4121 bindings.FuncDOMQuadGetBounds( 4122 this.ref, js.Pointer(&fn), 4123 ) 4124 return 4125 } 4126 4127 // GetBounds calls the method "DOMQuad.getBounds". 4128 func (this DOMQuad) GetBounds() (ret DOMRect) { 4129 bindings.CallDOMQuadGetBounds( 4130 this.ref, js.Pointer(&ret), 4131 ) 4132 4133 return 4134 } 4135 4136 // TryGetBounds calls the method "DOMQuad.getBounds" 4137 // in a try/catch block and returns (_, err, ok = false) when it went through 4138 // the catch clause. 4139 func (this DOMQuad) TryGetBounds() (ret DOMRect, exception js.Any, ok bool) { 4140 ok = js.True == bindings.TryDOMQuadGetBounds( 4141 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4142 ) 4143 4144 return 4145 } 4146 4147 // HasFuncToJSON returns true if the method "DOMQuad.toJSON" exists. 4148 func (this DOMQuad) HasFuncToJSON() bool { 4149 return js.True == bindings.HasFuncDOMQuadToJSON( 4150 this.ref, 4151 ) 4152 } 4153 4154 // FuncToJSON returns the method "DOMQuad.toJSON". 4155 func (this DOMQuad) FuncToJSON() (fn js.Func[func() js.Object]) { 4156 bindings.FuncDOMQuadToJSON( 4157 this.ref, js.Pointer(&fn), 4158 ) 4159 return 4160 } 4161 4162 // ToJSON calls the method "DOMQuad.toJSON". 4163 func (this DOMQuad) ToJSON() (ret js.Object) { 4164 bindings.CallDOMQuadToJSON( 4165 this.ref, js.Pointer(&ret), 4166 ) 4167 4168 return 4169 } 4170 4171 // TryToJSON calls the method "DOMQuad.toJSON" 4172 // in a try/catch block and returns (_, err, ok = false) when it went through 4173 // the catch clause. 4174 func (this DOMQuad) TryToJSON() (ret js.Object, exception js.Any, ok bool) { 4175 ok = js.True == bindings.TryDOMQuadToJSON( 4176 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4177 ) 4178 4179 return 4180 } 4181 4182 type CSSBoxType uint32 4183 4184 const ( 4185 _ CSSBoxType = iota 4186 4187 CSSBoxType_MARGIN 4188 CSSBoxType_BORDER 4189 CSSBoxType_PADDING 4190 CSSBoxType_CONTENT 4191 ) 4192 4193 func (CSSBoxType) FromRef(str js.Ref) CSSBoxType { 4194 return CSSBoxType(bindings.ConstOfCSSBoxType(str)) 4195 } 4196 4197 func (x CSSBoxType) String() (string, bool) { 4198 switch x { 4199 case CSSBoxType_MARGIN: 4200 return "margin", true 4201 case CSSBoxType_BORDER: 4202 return "border", true 4203 case CSSBoxType_PADDING: 4204 return "padding", true 4205 case CSSBoxType_CONTENT: 4206 return "content", true 4207 default: 4208 return "", false 4209 } 4210 } 4211 4212 type ConvertCoordinateOptions struct { 4213 // FromBox is "ConvertCoordinateOptions.fromBox" 4214 // 4215 // Optional, defaults to "border". 4216 FromBox CSSBoxType 4217 // ToBox is "ConvertCoordinateOptions.toBox" 4218 // 4219 // Optional, defaults to "border". 4220 ToBox CSSBoxType 4221 4222 FFI_USE bool 4223 } 4224 4225 // FromRef calls UpdateFrom and returns a ConvertCoordinateOptions with all fields set. 4226 func (p ConvertCoordinateOptions) FromRef(ref js.Ref) ConvertCoordinateOptions { 4227 p.UpdateFrom(ref) 4228 return p 4229 } 4230 4231 // New creates a new ConvertCoordinateOptions in the application heap. 4232 func (p ConvertCoordinateOptions) New() js.Ref { 4233 return bindings.ConvertCoordinateOptionsJSLoad( 4234 js.Pointer(&p), js.True, 0, 4235 ) 4236 } 4237 4238 // UpdateFrom copies value of all fields of the heap object to p. 4239 func (p *ConvertCoordinateOptions) UpdateFrom(ref js.Ref) { 4240 bindings.ConvertCoordinateOptionsJSStore( 4241 js.Pointer(p), ref, 4242 ) 4243 } 4244 4245 // Update writes all fields of the p to the heap object referenced by ref. 4246 func (p *ConvertCoordinateOptions) Update(ref js.Ref) { 4247 bindings.ConvertCoordinateOptionsJSLoad( 4248 js.Pointer(p), js.False, ref, 4249 ) 4250 } 4251 4252 // FreeMembers frees fields with heap reference, if recursive is true 4253 // free all heap references reachable from p. 4254 func (p *ConvertCoordinateOptions) FreeMembers(recursive bool) { 4255 } 4256 4257 func NewDOMRectReadOnly(x float64, y float64, width float64, height float64) (ret DOMRectReadOnly) { 4258 ret.ref = bindings.NewDOMRectReadOnlyByDOMRectReadOnly( 4259 float64(x), 4260 float64(y), 4261 float64(width), 4262 float64(height)) 4263 return 4264 } 4265 4266 func NewDOMRectReadOnlyByDOMRectReadOnly1(x float64, y float64, width float64) (ret DOMRectReadOnly) { 4267 ret.ref = bindings.NewDOMRectReadOnlyByDOMRectReadOnly1( 4268 float64(x), 4269 float64(y), 4270 float64(width)) 4271 return 4272 } 4273 4274 func NewDOMRectReadOnlyByDOMRectReadOnly2(x float64, y float64) (ret DOMRectReadOnly) { 4275 ret.ref = bindings.NewDOMRectReadOnlyByDOMRectReadOnly2( 4276 float64(x), 4277 float64(y)) 4278 return 4279 } 4280 4281 func NewDOMRectReadOnlyByDOMRectReadOnly3(x float64) (ret DOMRectReadOnly) { 4282 ret.ref = bindings.NewDOMRectReadOnlyByDOMRectReadOnly3( 4283 float64(x)) 4284 return 4285 } 4286 4287 func NewDOMRectReadOnlyByDOMRectReadOnly4() (ret DOMRectReadOnly) { 4288 ret.ref = bindings.NewDOMRectReadOnlyByDOMRectReadOnly4() 4289 return 4290 } 4291 4292 type DOMRectReadOnly struct { 4293 ref js.Ref 4294 } 4295 4296 func (this DOMRectReadOnly) Once() DOMRectReadOnly { 4297 this.ref.Once() 4298 return this 4299 } 4300 4301 func (this DOMRectReadOnly) Ref() js.Ref { 4302 return this.ref 4303 } 4304 4305 func (this DOMRectReadOnly) FromRef(ref js.Ref) DOMRectReadOnly { 4306 this.ref = ref 4307 return this 4308 } 4309 4310 func (this DOMRectReadOnly) Free() { 4311 this.ref.Free() 4312 } 4313 4314 // X returns the value of property "DOMRectReadOnly.x". 4315 // 4316 // It returns ok=false if there is no such property. 4317 func (this DOMRectReadOnly) X() (ret float64, ok bool) { 4318 ok = js.True == bindings.GetDOMRectReadOnlyX( 4319 this.ref, js.Pointer(&ret), 4320 ) 4321 return 4322 } 4323 4324 // Y returns the value of property "DOMRectReadOnly.y". 4325 // 4326 // It returns ok=false if there is no such property. 4327 func (this DOMRectReadOnly) Y() (ret float64, ok bool) { 4328 ok = js.True == bindings.GetDOMRectReadOnlyY( 4329 this.ref, js.Pointer(&ret), 4330 ) 4331 return 4332 } 4333 4334 // Width returns the value of property "DOMRectReadOnly.width". 4335 // 4336 // It returns ok=false if there is no such property. 4337 func (this DOMRectReadOnly) Width() (ret float64, ok bool) { 4338 ok = js.True == bindings.GetDOMRectReadOnlyWidth( 4339 this.ref, js.Pointer(&ret), 4340 ) 4341 return 4342 } 4343 4344 // Height returns the value of property "DOMRectReadOnly.height". 4345 // 4346 // It returns ok=false if there is no such property. 4347 func (this DOMRectReadOnly) Height() (ret float64, ok bool) { 4348 ok = js.True == bindings.GetDOMRectReadOnlyHeight( 4349 this.ref, js.Pointer(&ret), 4350 ) 4351 return 4352 } 4353 4354 // Top returns the value of property "DOMRectReadOnly.top". 4355 // 4356 // It returns ok=false if there is no such property. 4357 func (this DOMRectReadOnly) Top() (ret float64, ok bool) { 4358 ok = js.True == bindings.GetDOMRectReadOnlyTop( 4359 this.ref, js.Pointer(&ret), 4360 ) 4361 return 4362 } 4363 4364 // Right returns the value of property "DOMRectReadOnly.right". 4365 // 4366 // It returns ok=false if there is no such property. 4367 func (this DOMRectReadOnly) Right() (ret float64, ok bool) { 4368 ok = js.True == bindings.GetDOMRectReadOnlyRight( 4369 this.ref, js.Pointer(&ret), 4370 ) 4371 return 4372 } 4373 4374 // Bottom returns the value of property "DOMRectReadOnly.bottom". 4375 // 4376 // It returns ok=false if there is no such property. 4377 func (this DOMRectReadOnly) Bottom() (ret float64, ok bool) { 4378 ok = js.True == bindings.GetDOMRectReadOnlyBottom( 4379 this.ref, js.Pointer(&ret), 4380 ) 4381 return 4382 } 4383 4384 // Left returns the value of property "DOMRectReadOnly.left". 4385 // 4386 // It returns ok=false if there is no such property. 4387 func (this DOMRectReadOnly) Left() (ret float64, ok bool) { 4388 ok = js.True == bindings.GetDOMRectReadOnlyLeft( 4389 this.ref, js.Pointer(&ret), 4390 ) 4391 return 4392 } 4393 4394 // HasFuncFromRect returns true if the static method "DOMRectReadOnly.fromRect" exists. 4395 func (this DOMRectReadOnly) HasFuncFromRect() bool { 4396 return js.True == bindings.HasFuncDOMRectReadOnlyFromRect( 4397 this.ref, 4398 ) 4399 } 4400 4401 // FuncFromRect returns the static method "DOMRectReadOnly.fromRect". 4402 func (this DOMRectReadOnly) FuncFromRect() (fn js.Func[func(other DOMRectInit) DOMRectReadOnly]) { 4403 bindings.FuncDOMRectReadOnlyFromRect( 4404 this.ref, js.Pointer(&fn), 4405 ) 4406 return 4407 } 4408 4409 // FromRect calls the static method "DOMRectReadOnly.fromRect". 4410 func (this DOMRectReadOnly) FromRect(other DOMRectInit) (ret DOMRectReadOnly) { 4411 bindings.CallDOMRectReadOnlyFromRect( 4412 this.ref, js.Pointer(&ret), 4413 js.Pointer(&other), 4414 ) 4415 4416 return 4417 } 4418 4419 // TryFromRect calls the static method "DOMRectReadOnly.fromRect" 4420 // in a try/catch block and returns (_, err, ok = false) when it went through 4421 // the catch clause. 4422 func (this DOMRectReadOnly) TryFromRect(other DOMRectInit) (ret DOMRectReadOnly, exception js.Any, ok bool) { 4423 ok = js.True == bindings.TryDOMRectReadOnlyFromRect( 4424 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4425 js.Pointer(&other), 4426 ) 4427 4428 return 4429 } 4430 4431 // HasFuncFromRect1 returns true if the static method "DOMRectReadOnly.fromRect" exists. 4432 func (this DOMRectReadOnly) HasFuncFromRect1() bool { 4433 return js.True == bindings.HasFuncDOMRectReadOnlyFromRect1( 4434 this.ref, 4435 ) 4436 } 4437 4438 // FuncFromRect1 returns the static method "DOMRectReadOnly.fromRect". 4439 func (this DOMRectReadOnly) FuncFromRect1() (fn js.Func[func() DOMRectReadOnly]) { 4440 bindings.FuncDOMRectReadOnlyFromRect1( 4441 this.ref, js.Pointer(&fn), 4442 ) 4443 return 4444 } 4445 4446 // FromRect1 calls the static method "DOMRectReadOnly.fromRect". 4447 func (this DOMRectReadOnly) FromRect1() (ret DOMRectReadOnly) { 4448 bindings.CallDOMRectReadOnlyFromRect1( 4449 this.ref, js.Pointer(&ret), 4450 ) 4451 4452 return 4453 } 4454 4455 // TryFromRect1 calls the static method "DOMRectReadOnly.fromRect" 4456 // in a try/catch block and returns (_, err, ok = false) when it went through 4457 // the catch clause. 4458 func (this DOMRectReadOnly) TryFromRect1() (ret DOMRectReadOnly, exception js.Any, ok bool) { 4459 ok = js.True == bindings.TryDOMRectReadOnlyFromRect1( 4460 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4461 ) 4462 4463 return 4464 } 4465 4466 // HasFuncToJSON returns true if the method "DOMRectReadOnly.toJSON" exists. 4467 func (this DOMRectReadOnly) HasFuncToJSON() bool { 4468 return js.True == bindings.HasFuncDOMRectReadOnlyToJSON( 4469 this.ref, 4470 ) 4471 } 4472 4473 // FuncToJSON returns the method "DOMRectReadOnly.toJSON". 4474 func (this DOMRectReadOnly) FuncToJSON() (fn js.Func[func() js.Object]) { 4475 bindings.FuncDOMRectReadOnlyToJSON( 4476 this.ref, js.Pointer(&fn), 4477 ) 4478 return 4479 } 4480 4481 // ToJSON calls the method "DOMRectReadOnly.toJSON". 4482 func (this DOMRectReadOnly) ToJSON() (ret js.Object) { 4483 bindings.CallDOMRectReadOnlyToJSON( 4484 this.ref, js.Pointer(&ret), 4485 ) 4486 4487 return 4488 } 4489 4490 // TryToJSON calls the method "DOMRectReadOnly.toJSON" 4491 // in a try/catch block and returns (_, err, ok = false) when it went through 4492 // the catch clause. 4493 func (this DOMRectReadOnly) TryToJSON() (ret js.Object, exception js.Any, ok bool) { 4494 ok = js.True == bindings.TryDOMRectReadOnlyToJSON( 4495 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4496 ) 4497 4498 return 4499 } 4500 4501 type AssignedNodesOptions struct { 4502 // Flatten is "AssignedNodesOptions.flatten" 4503 // 4504 // Optional, defaults to false. 4505 // 4506 // NOTE: FFI_USE_Flatten MUST be set to true to make this field effective. 4507 Flatten bool 4508 4509 FFI_USE_Flatten bool // for Flatten. 4510 4511 FFI_USE bool 4512 } 4513 4514 // FromRef calls UpdateFrom and returns a AssignedNodesOptions with all fields set. 4515 func (p AssignedNodesOptions) FromRef(ref js.Ref) AssignedNodesOptions { 4516 p.UpdateFrom(ref) 4517 return p 4518 } 4519 4520 // New creates a new AssignedNodesOptions in the application heap. 4521 func (p AssignedNodesOptions) New() js.Ref { 4522 return bindings.AssignedNodesOptionsJSLoad( 4523 js.Pointer(&p), js.True, 0, 4524 ) 4525 } 4526 4527 // UpdateFrom copies value of all fields of the heap object to p. 4528 func (p *AssignedNodesOptions) UpdateFrom(ref js.Ref) { 4529 bindings.AssignedNodesOptionsJSStore( 4530 js.Pointer(p), ref, 4531 ) 4532 } 4533 4534 // Update writes all fields of the p to the heap object referenced by ref. 4535 func (p *AssignedNodesOptions) Update(ref js.Ref) { 4536 bindings.AssignedNodesOptionsJSLoad( 4537 js.Pointer(p), js.False, ref, 4538 ) 4539 } 4540 4541 // FreeMembers frees fields with heap reference, if recursive is true 4542 // free all heap references reachable from p. 4543 func (p *AssignedNodesOptions) FreeMembers(recursive bool) { 4544 } 4545 4546 type OneOf_Element_Text struct { 4547 ref js.Ref 4548 } 4549 4550 func (x OneOf_Element_Text) Ref() js.Ref { 4551 return x.ref 4552 } 4553 4554 func (x OneOf_Element_Text) Free() { 4555 x.ref.Free() 4556 } 4557 4558 func (x OneOf_Element_Text) FromRef(ref js.Ref) OneOf_Element_Text { 4559 return OneOf_Element_Text{ 4560 ref: ref, 4561 } 4562 } 4563 4564 func (x OneOf_Element_Text) Element() Element { 4565 return Element{}.FromRef(x.ref) 4566 } 4567 4568 func (x OneOf_Element_Text) Text() Text { 4569 return Text{}.FromRef(x.ref) 4570 }