github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/automationinternal/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package automationinternal 5 6 import ( 7 "github.com/primecitizens/pcz/std/core/abi" 8 "github.com/primecitizens/pcz/std/core/mark" 9 "github.com/primecitizens/pcz/std/ffi/js" 10 "github.com/primecitizens/pcz/std/plat/js/webext/automationinternal/bindings" 11 ) 12 13 type AXEventParams struct { 14 // TreeID is "AXEventParams.treeID" 15 // 16 // Optional 17 TreeID js.String 18 // TargetID is "AXEventParams.targetID" 19 // 20 // Optional 21 // 22 // NOTE: FFI_USE_TargetID MUST be set to true to make this field effective. 23 TargetID int32 24 // EventType is "AXEventParams.eventType" 25 // 26 // Optional 27 EventType js.String 28 // EventFrom is "AXEventParams.eventFrom" 29 // 30 // Optional 31 EventFrom js.String 32 // MouseX is "AXEventParams.mouseX" 33 // 34 // Optional 35 // 36 // NOTE: FFI_USE_MouseX MUST be set to true to make this field effective. 37 MouseX float64 38 // MouseY is "AXEventParams.mouseY" 39 // 40 // Optional 41 // 42 // NOTE: FFI_USE_MouseY MUST be set to true to make this field effective. 43 MouseY float64 44 // ActionRequestID is "AXEventParams.actionRequestID" 45 // 46 // Optional 47 // 48 // NOTE: FFI_USE_ActionRequestID MUST be set to true to make this field effective. 49 ActionRequestID int32 50 51 FFI_USE_TargetID bool // for TargetID. 52 FFI_USE_MouseX bool // for MouseX. 53 FFI_USE_MouseY bool // for MouseY. 54 FFI_USE_ActionRequestID bool // for ActionRequestID. 55 56 FFI_USE bool 57 } 58 59 // FromRef calls UpdateFrom and returns a AXEventParams with all fields set. 60 func (p AXEventParams) FromRef(ref js.Ref) AXEventParams { 61 p.UpdateFrom(ref) 62 return p 63 } 64 65 // New creates a new AXEventParams in the application heap. 66 func (p AXEventParams) New() js.Ref { 67 return bindings.AXEventParamsJSLoad( 68 js.Pointer(&p), js.True, 0, 69 ) 70 } 71 72 // UpdateFrom copies value of all fields of the heap object to p. 73 func (p *AXEventParams) UpdateFrom(ref js.Ref) { 74 bindings.AXEventParamsJSStore( 75 js.Pointer(p), ref, 76 ) 77 } 78 79 // Update writes all fields of the p to the heap object referenced by ref. 80 func (p *AXEventParams) Update(ref js.Ref) { 81 bindings.AXEventParamsJSLoad( 82 js.Pointer(p), js.False, ref, 83 ) 84 } 85 86 // FreeMembers frees fields with heap reference, if recursive is true 87 // free all heap references reachable from p. 88 func (p *AXEventParams) FreeMembers(recursive bool) { 89 js.Free( 90 p.TreeID.Ref(), 91 p.EventType.Ref(), 92 p.EventFrom.Ref(), 93 ) 94 p.TreeID = p.TreeID.FromRef(js.Undefined) 95 p.EventType = p.EventType.FromRef(js.Undefined) 96 p.EventFrom = p.EventFrom.FromRef(js.Undefined) 97 } 98 99 type AXTextLocationParams struct { 100 // TreeID is "AXTextLocationParams.treeID" 101 // 102 // Optional 103 TreeID js.String 104 // NodeID is "AXTextLocationParams.nodeID" 105 // 106 // Optional 107 // 108 // NOTE: FFI_USE_NodeID MUST be set to true to make this field effective. 109 NodeID int32 110 // Result is "AXTextLocationParams.result" 111 // 112 // Optional 113 // 114 // NOTE: FFI_USE_Result MUST be set to true to make this field effective. 115 Result bool 116 // Left is "AXTextLocationParams.left" 117 // 118 // Optional 119 // 120 // NOTE: FFI_USE_Left MUST be set to true to make this field effective. 121 Left int32 122 // Top is "AXTextLocationParams.top" 123 // 124 // Optional 125 // 126 // NOTE: FFI_USE_Top MUST be set to true to make this field effective. 127 Top int32 128 // Width is "AXTextLocationParams.width" 129 // 130 // Optional 131 // 132 // NOTE: FFI_USE_Width MUST be set to true to make this field effective. 133 Width int32 134 // Height is "AXTextLocationParams.height" 135 // 136 // Optional 137 // 138 // NOTE: FFI_USE_Height MUST be set to true to make this field effective. 139 Height int32 140 // RequestID is "AXTextLocationParams.requestID" 141 // 142 // Optional 143 // 144 // NOTE: FFI_USE_RequestID MUST be set to true to make this field effective. 145 RequestID int32 146 147 FFI_USE_NodeID bool // for NodeID. 148 FFI_USE_Result bool // for Result. 149 FFI_USE_Left bool // for Left. 150 FFI_USE_Top bool // for Top. 151 FFI_USE_Width bool // for Width. 152 FFI_USE_Height bool // for Height. 153 FFI_USE_RequestID bool // for RequestID. 154 155 FFI_USE bool 156 } 157 158 // FromRef calls UpdateFrom and returns a AXTextLocationParams with all fields set. 159 func (p AXTextLocationParams) FromRef(ref js.Ref) AXTextLocationParams { 160 p.UpdateFrom(ref) 161 return p 162 } 163 164 // New creates a new AXTextLocationParams in the application heap. 165 func (p AXTextLocationParams) New() js.Ref { 166 return bindings.AXTextLocationParamsJSLoad( 167 js.Pointer(&p), js.True, 0, 168 ) 169 } 170 171 // UpdateFrom copies value of all fields of the heap object to p. 172 func (p *AXTextLocationParams) UpdateFrom(ref js.Ref) { 173 bindings.AXTextLocationParamsJSStore( 174 js.Pointer(p), ref, 175 ) 176 } 177 178 // Update writes all fields of the p to the heap object referenced by ref. 179 func (p *AXTextLocationParams) Update(ref js.Ref) { 180 bindings.AXTextLocationParamsJSLoad( 181 js.Pointer(p), js.False, ref, 182 ) 183 } 184 185 // FreeMembers frees fields with heap reference, if recursive is true 186 // free all heap references reachable from p. 187 func (p *AXTextLocationParams) FreeMembers(recursive bool) { 188 js.Free( 189 p.TreeID.Ref(), 190 ) 191 p.TreeID = p.TreeID.FromRef(js.Undefined) 192 } 193 194 type DisableDesktopCallbackFunc func(this js.Ref) js.Ref 195 196 func (fn DisableDesktopCallbackFunc) Register() js.Func[func()] { 197 return js.RegisterCallback[func()]( 198 fn, abi.FuncPCABIInternal(fn), 199 ) 200 } 201 202 func (fn DisableDesktopCallbackFunc) DispatchCallback( 203 targetPC uintptr, ctx *js.CallbackContext, 204 ) { 205 args := ctx.Args() 206 if len(args) != 0+1 /* js this */ || 207 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 208 js.ThrowInvalidCallbackInvocation() 209 } 210 211 if ctx.Return(fn( 212 args[0], 213 )) { 214 return 215 } 216 217 js.ThrowCallbackValueNotReturned() 218 } 219 220 type DisableDesktopCallback[T any] struct { 221 Fn func(arg T, this js.Ref) js.Ref 222 Arg T 223 } 224 225 func (cb *DisableDesktopCallback[T]) Register() js.Func[func()] { 226 return js.RegisterCallback[func()]( 227 cb, abi.FuncPCABIInternal(cb.Fn), 228 ) 229 } 230 231 func (cb *DisableDesktopCallback[T]) DispatchCallback( 232 targetPC uintptr, ctx *js.CallbackContext, 233 ) { 234 args := ctx.Args() 235 if len(args) != 0+1 /* js this */ || 236 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 237 js.ThrowInvalidCallbackInvocation() 238 } 239 240 if ctx.Return(cb.Fn( 241 cb.Arg, 242 args[0], 243 )) { 244 return 245 } 246 247 js.ThrowCallbackValueNotReturned() 248 } 249 250 type EnableDesktopCallbackFunc func(this js.Ref, tree_id js.String) js.Ref 251 252 func (fn EnableDesktopCallbackFunc) Register() js.Func[func(tree_id js.String)] { 253 return js.RegisterCallback[func(tree_id js.String)]( 254 fn, abi.FuncPCABIInternal(fn), 255 ) 256 } 257 258 func (fn EnableDesktopCallbackFunc) DispatchCallback( 259 targetPC uintptr, ctx *js.CallbackContext, 260 ) { 261 args := ctx.Args() 262 if len(args) != 1+1 /* js this */ || 263 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 264 js.ThrowInvalidCallbackInvocation() 265 } 266 267 if ctx.Return(fn( 268 args[0], 269 270 js.String{}.FromRef(args[0+1]), 271 )) { 272 return 273 } 274 275 js.ThrowCallbackValueNotReturned() 276 } 277 278 type EnableDesktopCallback[T any] struct { 279 Fn func(arg T, this js.Ref, tree_id js.String) js.Ref 280 Arg T 281 } 282 283 func (cb *EnableDesktopCallback[T]) Register() js.Func[func(tree_id js.String)] { 284 return js.RegisterCallback[func(tree_id js.String)]( 285 cb, abi.FuncPCABIInternal(cb.Fn), 286 ) 287 } 288 289 func (cb *EnableDesktopCallback[T]) DispatchCallback( 290 targetPC uintptr, ctx *js.CallbackContext, 291 ) { 292 args := ctx.Args() 293 if len(args) != 1+1 /* js this */ || 294 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 295 js.ThrowInvalidCallbackInvocation() 296 } 297 298 if ctx.Return(cb.Fn( 299 cb.Arg, 300 args[0], 301 302 js.String{}.FromRef(args[0+1]), 303 )) { 304 return 305 } 306 307 js.ThrowCallbackValueNotReturned() 308 } 309 310 type GetImageDataParams struct { 311 // MaxWidth is "GetImageDataParams.maxWidth" 312 // 313 // Optional 314 // 315 // NOTE: FFI_USE_MaxWidth MUST be set to true to make this field effective. 316 MaxWidth int32 317 // MaxHeight is "GetImageDataParams.maxHeight" 318 // 319 // Optional 320 // 321 // NOTE: FFI_USE_MaxHeight MUST be set to true to make this field effective. 322 MaxHeight int32 323 324 FFI_USE_MaxWidth bool // for MaxWidth. 325 FFI_USE_MaxHeight bool // for MaxHeight. 326 327 FFI_USE bool 328 } 329 330 // FromRef calls UpdateFrom and returns a GetImageDataParams with all fields set. 331 func (p GetImageDataParams) FromRef(ref js.Ref) GetImageDataParams { 332 p.UpdateFrom(ref) 333 return p 334 } 335 336 // New creates a new GetImageDataParams in the application heap. 337 func (p GetImageDataParams) New() js.Ref { 338 return bindings.GetImageDataParamsJSLoad( 339 js.Pointer(&p), js.True, 0, 340 ) 341 } 342 343 // UpdateFrom copies value of all fields of the heap object to p. 344 func (p *GetImageDataParams) UpdateFrom(ref js.Ref) { 345 bindings.GetImageDataParamsJSStore( 346 js.Pointer(p), ref, 347 ) 348 } 349 350 // Update writes all fields of the p to the heap object referenced by ref. 351 func (p *GetImageDataParams) Update(ref js.Ref) { 352 bindings.GetImageDataParamsJSLoad( 353 js.Pointer(p), js.False, ref, 354 ) 355 } 356 357 // FreeMembers frees fields with heap reference, if recursive is true 358 // free all heap references reachable from p. 359 func (p *GetImageDataParams) FreeMembers(recursive bool) { 360 } 361 362 type GetTextLocationDataParams struct { 363 // StartIndex is "GetTextLocationDataParams.startIndex" 364 // 365 // Optional 366 // 367 // NOTE: FFI_USE_StartIndex MUST be set to true to make this field effective. 368 StartIndex int32 369 // EndIndex is "GetTextLocationDataParams.endIndex" 370 // 371 // Optional 372 // 373 // NOTE: FFI_USE_EndIndex MUST be set to true to make this field effective. 374 EndIndex int32 375 376 FFI_USE_StartIndex bool // for StartIndex. 377 FFI_USE_EndIndex bool // for EndIndex. 378 379 FFI_USE bool 380 } 381 382 // FromRef calls UpdateFrom and returns a GetTextLocationDataParams with all fields set. 383 func (p GetTextLocationDataParams) FromRef(ref js.Ref) GetTextLocationDataParams { 384 p.UpdateFrom(ref) 385 return p 386 } 387 388 // New creates a new GetTextLocationDataParams in the application heap. 389 func (p GetTextLocationDataParams) New() js.Ref { 390 return bindings.GetTextLocationDataParamsJSLoad( 391 js.Pointer(&p), js.True, 0, 392 ) 393 } 394 395 // UpdateFrom copies value of all fields of the heap object to p. 396 func (p *GetTextLocationDataParams) UpdateFrom(ref js.Ref) { 397 bindings.GetTextLocationDataParamsJSStore( 398 js.Pointer(p), ref, 399 ) 400 } 401 402 // Update writes all fields of the p to the heap object referenced by ref. 403 func (p *GetTextLocationDataParams) Update(ref js.Ref) { 404 bindings.GetTextLocationDataParamsJSLoad( 405 js.Pointer(p), js.False, ref, 406 ) 407 } 408 409 // FreeMembers frees fields with heap reference, if recursive is true 410 // free all heap references reachable from p. 411 func (p *GetTextLocationDataParams) FreeMembers(recursive bool) { 412 } 413 414 type HitTestParams struct { 415 // X is "HitTestParams.x" 416 // 417 // Optional 418 // 419 // NOTE: FFI_USE_X MUST be set to true to make this field effective. 420 X int32 421 // Y is "HitTestParams.y" 422 // 423 // Optional 424 // 425 // NOTE: FFI_USE_Y MUST be set to true to make this field effective. 426 Y int32 427 // EventToFire is "HitTestParams.eventToFire" 428 // 429 // Optional 430 EventToFire js.String 431 432 FFI_USE_X bool // for X. 433 FFI_USE_Y bool // for Y. 434 435 FFI_USE bool 436 } 437 438 // FromRef calls UpdateFrom and returns a HitTestParams with all fields set. 439 func (p HitTestParams) FromRef(ref js.Ref) HitTestParams { 440 p.UpdateFrom(ref) 441 return p 442 } 443 444 // New creates a new HitTestParams in the application heap. 445 func (p HitTestParams) New() js.Ref { 446 return bindings.HitTestParamsJSLoad( 447 js.Pointer(&p), js.True, 0, 448 ) 449 } 450 451 // UpdateFrom copies value of all fields of the heap object to p. 452 func (p *HitTestParams) UpdateFrom(ref js.Ref) { 453 bindings.HitTestParamsJSStore( 454 js.Pointer(p), ref, 455 ) 456 } 457 458 // Update writes all fields of the p to the heap object referenced by ref. 459 func (p *HitTestParams) Update(ref js.Ref) { 460 bindings.HitTestParamsJSLoad( 461 js.Pointer(p), js.False, ref, 462 ) 463 } 464 465 // FreeMembers frees fields with heap reference, if recursive is true 466 // free all heap references reachable from p. 467 func (p *HitTestParams) FreeMembers(recursive bool) { 468 js.Free( 469 p.EventToFire.Ref(), 470 ) 471 p.EventToFire = p.EventToFire.FromRef(js.Undefined) 472 } 473 474 type PerformActionRequiredParams struct { 475 // TreeID is "PerformActionRequiredParams.treeID" 476 // 477 // Optional 478 TreeID js.String 479 // AutomationNodeID is "PerformActionRequiredParams.automationNodeID" 480 // 481 // Optional 482 // 483 // NOTE: FFI_USE_AutomationNodeID MUST be set to true to make this field effective. 484 AutomationNodeID int32 485 // ActionType is "PerformActionRequiredParams.actionType" 486 // 487 // Optional 488 ActionType js.String 489 // RequestID is "PerformActionRequiredParams.requestID" 490 // 491 // Optional 492 // 493 // NOTE: FFI_USE_RequestID MUST be set to true to make this field effective. 494 RequestID int32 495 496 FFI_USE_AutomationNodeID bool // for AutomationNodeID. 497 FFI_USE_RequestID bool // for RequestID. 498 499 FFI_USE bool 500 } 501 502 // FromRef calls UpdateFrom and returns a PerformActionRequiredParams with all fields set. 503 func (p PerformActionRequiredParams) FromRef(ref js.Ref) PerformActionRequiredParams { 504 p.UpdateFrom(ref) 505 return p 506 } 507 508 // New creates a new PerformActionRequiredParams in the application heap. 509 func (p PerformActionRequiredParams) New() js.Ref { 510 return bindings.PerformActionRequiredParamsJSLoad( 511 js.Pointer(&p), js.True, 0, 512 ) 513 } 514 515 // UpdateFrom copies value of all fields of the heap object to p. 516 func (p *PerformActionRequiredParams) UpdateFrom(ref js.Ref) { 517 bindings.PerformActionRequiredParamsJSStore( 518 js.Pointer(p), ref, 519 ) 520 } 521 522 // Update writes all fields of the p to the heap object referenced by ref. 523 func (p *PerformActionRequiredParams) Update(ref js.Ref) { 524 bindings.PerformActionRequiredParamsJSLoad( 525 js.Pointer(p), js.False, ref, 526 ) 527 } 528 529 // FreeMembers frees fields with heap reference, if recursive is true 530 // free all heap references reachable from p. 531 func (p *PerformActionRequiredParams) FreeMembers(recursive bool) { 532 js.Free( 533 p.TreeID.Ref(), 534 p.ActionType.Ref(), 535 ) 536 p.TreeID = p.TreeID.FromRef(js.Undefined) 537 p.ActionType = p.ActionType.FromRef(js.Undefined) 538 } 539 540 type PerformCustomActionParams struct { 541 // CustomActionID is "PerformCustomActionParams.customActionID" 542 // 543 // Optional 544 // 545 // NOTE: FFI_USE_CustomActionID MUST be set to true to make this field effective. 546 CustomActionID int32 547 548 FFI_USE_CustomActionID bool // for CustomActionID. 549 550 FFI_USE bool 551 } 552 553 // FromRef calls UpdateFrom and returns a PerformCustomActionParams with all fields set. 554 func (p PerformCustomActionParams) FromRef(ref js.Ref) PerformCustomActionParams { 555 p.UpdateFrom(ref) 556 return p 557 } 558 559 // New creates a new PerformCustomActionParams in the application heap. 560 func (p PerformCustomActionParams) New() js.Ref { 561 return bindings.PerformCustomActionParamsJSLoad( 562 js.Pointer(&p), js.True, 0, 563 ) 564 } 565 566 // UpdateFrom copies value of all fields of the heap object to p. 567 func (p *PerformCustomActionParams) UpdateFrom(ref js.Ref) { 568 bindings.PerformCustomActionParamsJSStore( 569 js.Pointer(p), ref, 570 ) 571 } 572 573 // Update writes all fields of the p to the heap object referenced by ref. 574 func (p *PerformCustomActionParams) Update(ref js.Ref) { 575 bindings.PerformCustomActionParamsJSLoad( 576 js.Pointer(p), js.False, ref, 577 ) 578 } 579 580 // FreeMembers frees fields with heap reference, if recursive is true 581 // free all heap references reachable from p. 582 func (p *PerformCustomActionParams) FreeMembers(recursive bool) { 583 } 584 585 type ReplaceSelectedTextParams struct { 586 // Value is "ReplaceSelectedTextParams.value" 587 // 588 // Optional 589 Value js.String 590 591 FFI_USE bool 592 } 593 594 // FromRef calls UpdateFrom and returns a ReplaceSelectedTextParams with all fields set. 595 func (p ReplaceSelectedTextParams) FromRef(ref js.Ref) ReplaceSelectedTextParams { 596 p.UpdateFrom(ref) 597 return p 598 } 599 600 // New creates a new ReplaceSelectedTextParams in the application heap. 601 func (p ReplaceSelectedTextParams) New() js.Ref { 602 return bindings.ReplaceSelectedTextParamsJSLoad( 603 js.Pointer(&p), js.True, 0, 604 ) 605 } 606 607 // UpdateFrom copies value of all fields of the heap object to p. 608 func (p *ReplaceSelectedTextParams) UpdateFrom(ref js.Ref) { 609 bindings.ReplaceSelectedTextParamsJSStore( 610 js.Pointer(p), ref, 611 ) 612 } 613 614 // Update writes all fields of the p to the heap object referenced by ref. 615 func (p *ReplaceSelectedTextParams) Update(ref js.Ref) { 616 bindings.ReplaceSelectedTextParamsJSLoad( 617 js.Pointer(p), js.False, ref, 618 ) 619 } 620 621 // FreeMembers frees fields with heap reference, if recursive is true 622 // free all heap references reachable from p. 623 func (p *ReplaceSelectedTextParams) FreeMembers(recursive bool) { 624 js.Free( 625 p.Value.Ref(), 626 ) 627 p.Value = p.Value.FromRef(js.Undefined) 628 } 629 630 type ScrollToPointParams struct { 631 // X is "ScrollToPointParams.x" 632 // 633 // Optional 634 // 635 // NOTE: FFI_USE_X MUST be set to true to make this field effective. 636 X int32 637 // Y is "ScrollToPointParams.y" 638 // 639 // Optional 640 // 641 // NOTE: FFI_USE_Y MUST be set to true to make this field effective. 642 Y int32 643 644 FFI_USE_X bool // for X. 645 FFI_USE_Y bool // for Y. 646 647 FFI_USE bool 648 } 649 650 // FromRef calls UpdateFrom and returns a ScrollToPointParams with all fields set. 651 func (p ScrollToPointParams) FromRef(ref js.Ref) ScrollToPointParams { 652 p.UpdateFrom(ref) 653 return p 654 } 655 656 // New creates a new ScrollToPointParams in the application heap. 657 func (p ScrollToPointParams) New() js.Ref { 658 return bindings.ScrollToPointParamsJSLoad( 659 js.Pointer(&p), js.True, 0, 660 ) 661 } 662 663 // UpdateFrom copies value of all fields of the heap object to p. 664 func (p *ScrollToPointParams) UpdateFrom(ref js.Ref) { 665 bindings.ScrollToPointParamsJSStore( 666 js.Pointer(p), ref, 667 ) 668 } 669 670 // Update writes all fields of the p to the heap object referenced by ref. 671 func (p *ScrollToPointParams) Update(ref js.Ref) { 672 bindings.ScrollToPointParamsJSLoad( 673 js.Pointer(p), js.False, ref, 674 ) 675 } 676 677 // FreeMembers frees fields with heap reference, if recursive is true 678 // free all heap references reachable from p. 679 func (p *ScrollToPointParams) FreeMembers(recursive bool) { 680 } 681 682 type ScrollToPositionAtRowColumnParams struct { 683 // Row is "ScrollToPositionAtRowColumnParams.row" 684 // 685 // Optional 686 // 687 // NOTE: FFI_USE_Row MUST be set to true to make this field effective. 688 Row int32 689 // Column is "ScrollToPositionAtRowColumnParams.column" 690 // 691 // Optional 692 // 693 // NOTE: FFI_USE_Column MUST be set to true to make this field effective. 694 Column int32 695 696 FFI_USE_Row bool // for Row. 697 FFI_USE_Column bool // for Column. 698 699 FFI_USE bool 700 } 701 702 // FromRef calls UpdateFrom and returns a ScrollToPositionAtRowColumnParams with all fields set. 703 func (p ScrollToPositionAtRowColumnParams) FromRef(ref js.Ref) ScrollToPositionAtRowColumnParams { 704 p.UpdateFrom(ref) 705 return p 706 } 707 708 // New creates a new ScrollToPositionAtRowColumnParams in the application heap. 709 func (p ScrollToPositionAtRowColumnParams) New() js.Ref { 710 return bindings.ScrollToPositionAtRowColumnParamsJSLoad( 711 js.Pointer(&p), js.True, 0, 712 ) 713 } 714 715 // UpdateFrom copies value of all fields of the heap object to p. 716 func (p *ScrollToPositionAtRowColumnParams) UpdateFrom(ref js.Ref) { 717 bindings.ScrollToPositionAtRowColumnParamsJSStore( 718 js.Pointer(p), ref, 719 ) 720 } 721 722 // Update writes all fields of the p to the heap object referenced by ref. 723 func (p *ScrollToPositionAtRowColumnParams) Update(ref js.Ref) { 724 bindings.ScrollToPositionAtRowColumnParamsJSLoad( 725 js.Pointer(p), js.False, ref, 726 ) 727 } 728 729 // FreeMembers frees fields with heap reference, if recursive is true 730 // free all heap references reachable from p. 731 func (p *ScrollToPositionAtRowColumnParams) FreeMembers(recursive bool) { 732 } 733 734 type SetScrollOffsetParams struct { 735 // X is "SetScrollOffsetParams.x" 736 // 737 // Optional 738 // 739 // NOTE: FFI_USE_X MUST be set to true to make this field effective. 740 X int32 741 // Y is "SetScrollOffsetParams.y" 742 // 743 // Optional 744 // 745 // NOTE: FFI_USE_Y MUST be set to true to make this field effective. 746 Y int32 747 748 FFI_USE_X bool // for X. 749 FFI_USE_Y bool // for Y. 750 751 FFI_USE bool 752 } 753 754 // FromRef calls UpdateFrom and returns a SetScrollOffsetParams with all fields set. 755 func (p SetScrollOffsetParams) FromRef(ref js.Ref) SetScrollOffsetParams { 756 p.UpdateFrom(ref) 757 return p 758 } 759 760 // New creates a new SetScrollOffsetParams in the application heap. 761 func (p SetScrollOffsetParams) New() js.Ref { 762 return bindings.SetScrollOffsetParamsJSLoad( 763 js.Pointer(&p), js.True, 0, 764 ) 765 } 766 767 // UpdateFrom copies value of all fields of the heap object to p. 768 func (p *SetScrollOffsetParams) UpdateFrom(ref js.Ref) { 769 bindings.SetScrollOffsetParamsJSStore( 770 js.Pointer(p), ref, 771 ) 772 } 773 774 // Update writes all fields of the p to the heap object referenced by ref. 775 func (p *SetScrollOffsetParams) Update(ref js.Ref) { 776 bindings.SetScrollOffsetParamsJSLoad( 777 js.Pointer(p), js.False, ref, 778 ) 779 } 780 781 // FreeMembers frees fields with heap reference, if recursive is true 782 // free all heap references reachable from p. 783 func (p *SetScrollOffsetParams) FreeMembers(recursive bool) { 784 } 785 786 type SetSelectionParams struct { 787 // FocusNodeID is "SetSelectionParams.focusNodeID" 788 // 789 // Optional 790 // 791 // NOTE: FFI_USE_FocusNodeID MUST be set to true to make this field effective. 792 FocusNodeID int32 793 // AnchorOffset is "SetSelectionParams.anchorOffset" 794 // 795 // Optional 796 // 797 // NOTE: FFI_USE_AnchorOffset MUST be set to true to make this field effective. 798 AnchorOffset int32 799 // FocusOffset is "SetSelectionParams.focusOffset" 800 // 801 // Optional 802 // 803 // NOTE: FFI_USE_FocusOffset MUST be set to true to make this field effective. 804 FocusOffset int32 805 806 FFI_USE_FocusNodeID bool // for FocusNodeID. 807 FFI_USE_AnchorOffset bool // for AnchorOffset. 808 FFI_USE_FocusOffset bool // for FocusOffset. 809 810 FFI_USE bool 811 } 812 813 // FromRef calls UpdateFrom and returns a SetSelectionParams with all fields set. 814 func (p SetSelectionParams) FromRef(ref js.Ref) SetSelectionParams { 815 p.UpdateFrom(ref) 816 return p 817 } 818 819 // New creates a new SetSelectionParams in the application heap. 820 func (p SetSelectionParams) New() js.Ref { 821 return bindings.SetSelectionParamsJSLoad( 822 js.Pointer(&p), js.True, 0, 823 ) 824 } 825 826 // UpdateFrom copies value of all fields of the heap object to p. 827 func (p *SetSelectionParams) UpdateFrom(ref js.Ref) { 828 bindings.SetSelectionParamsJSStore( 829 js.Pointer(p), ref, 830 ) 831 } 832 833 // Update writes all fields of the p to the heap object referenced by ref. 834 func (p *SetSelectionParams) Update(ref js.Ref) { 835 bindings.SetSelectionParamsJSLoad( 836 js.Pointer(p), js.False, ref, 837 ) 838 } 839 840 // FreeMembers frees fields with heap reference, if recursive is true 841 // free all heap references reachable from p. 842 func (p *SetSelectionParams) FreeMembers(recursive bool) { 843 } 844 845 type SetValueParams struct { 846 // Value is "SetValueParams.value" 847 // 848 // Optional 849 Value js.String 850 851 FFI_USE bool 852 } 853 854 // FromRef calls UpdateFrom and returns a SetValueParams with all fields set. 855 func (p SetValueParams) FromRef(ref js.Ref) SetValueParams { 856 p.UpdateFrom(ref) 857 return p 858 } 859 860 // New creates a new SetValueParams in the application heap. 861 func (p SetValueParams) New() js.Ref { 862 return bindings.SetValueParamsJSLoad( 863 js.Pointer(&p), js.True, 0, 864 ) 865 } 866 867 // UpdateFrom copies value of all fields of the heap object to p. 868 func (p *SetValueParams) UpdateFrom(ref js.Ref) { 869 bindings.SetValueParamsJSStore( 870 js.Pointer(p), ref, 871 ) 872 } 873 874 // Update writes all fields of the p to the heap object referenced by ref. 875 func (p *SetValueParams) Update(ref js.Ref) { 876 bindings.SetValueParamsJSLoad( 877 js.Pointer(p), js.False, ref, 878 ) 879 } 880 881 // FreeMembers frees fields with heap reference, if recursive is true 882 // free all heap references reachable from p. 883 func (p *SetValueParams) FreeMembers(recursive bool) { 884 js.Free( 885 p.Value.Ref(), 886 ) 887 p.Value = p.Value.FromRef(js.Undefined) 888 } 889 890 // HasFuncDisableDesktop returns true if the function "WEBEXT.automationInternal.disableDesktop" exists. 891 func HasFuncDisableDesktop() bool { 892 return js.True == bindings.HasFuncDisableDesktop() 893 } 894 895 // FuncDisableDesktop returns the function "WEBEXT.automationInternal.disableDesktop". 896 func FuncDisableDesktop() (fn js.Func[func(callback js.Func[func()])]) { 897 bindings.FuncDisableDesktop( 898 js.Pointer(&fn), 899 ) 900 return 901 } 902 903 // DisableDesktop calls the function "WEBEXT.automationInternal.disableDesktop" directly. 904 func DisableDesktop(callback js.Func[func()]) (ret js.Void) { 905 bindings.CallDisableDesktop( 906 js.Pointer(&ret), 907 callback.Ref(), 908 ) 909 910 return 911 } 912 913 // TryDisableDesktop calls the function "WEBEXT.automationInternal.disableDesktop" 914 // in a try/catch block and returns (_, err, ok = false) when it went through 915 // the catch clause. 916 func TryDisableDesktop(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 917 ok = js.True == bindings.TryDisableDesktop( 918 js.Pointer(&ret), js.Pointer(&exception), 919 callback.Ref(), 920 ) 921 922 return 923 } 924 925 // HasFuncEnableDesktop returns true if the function "WEBEXT.automationInternal.enableDesktop" exists. 926 func HasFuncEnableDesktop() bool { 927 return js.True == bindings.HasFuncEnableDesktop() 928 } 929 930 // FuncEnableDesktop returns the function "WEBEXT.automationInternal.enableDesktop". 931 func FuncEnableDesktop() (fn js.Func[func() js.Promise[js.String]]) { 932 bindings.FuncEnableDesktop( 933 js.Pointer(&fn), 934 ) 935 return 936 } 937 938 // EnableDesktop calls the function "WEBEXT.automationInternal.enableDesktop" directly. 939 func EnableDesktop() (ret js.Promise[js.String]) { 940 bindings.CallEnableDesktop( 941 js.Pointer(&ret), 942 ) 943 944 return 945 } 946 947 // TryEnableDesktop calls the function "WEBEXT.automationInternal.enableDesktop" 948 // in a try/catch block and returns (_, err, ok = false) when it went through 949 // the catch clause. 950 func TryEnableDesktop() (ret js.Promise[js.String], exception js.Any, ok bool) { 951 ok = js.True == bindings.TryEnableDesktop( 952 js.Pointer(&ret), js.Pointer(&exception), 953 ) 954 955 return 956 } 957 958 // HasFuncEnableTree returns true if the function "WEBEXT.automationInternal.enableTree" exists. 959 func HasFuncEnableTree() bool { 960 return js.True == bindings.HasFuncEnableTree() 961 } 962 963 // FuncEnableTree returns the function "WEBEXT.automationInternal.enableTree". 964 func FuncEnableTree() (fn js.Func[func(tree_id js.String)]) { 965 bindings.FuncEnableTree( 966 js.Pointer(&fn), 967 ) 968 return 969 } 970 971 // EnableTree calls the function "WEBEXT.automationInternal.enableTree" directly. 972 func EnableTree(tree_id js.String) (ret js.Void) { 973 bindings.CallEnableTree( 974 js.Pointer(&ret), 975 tree_id.Ref(), 976 ) 977 978 return 979 } 980 981 // TryEnableTree calls the function "WEBEXT.automationInternal.enableTree" 982 // in a try/catch block and returns (_, err, ok = false) when it went through 983 // the catch clause. 984 func TryEnableTree(tree_id js.String) (ret js.Void, exception js.Any, ok bool) { 985 ok = js.True == bindings.TryEnableTree( 986 js.Pointer(&ret), js.Pointer(&exception), 987 tree_id.Ref(), 988 ) 989 990 return 991 } 992 993 type OnAccessibilityEventEventCallbackFunc func(this js.Ref, update *AXEventParams) js.Ref 994 995 func (fn OnAccessibilityEventEventCallbackFunc) Register() js.Func[func(update *AXEventParams)] { 996 return js.RegisterCallback[func(update *AXEventParams)]( 997 fn, abi.FuncPCABIInternal(fn), 998 ) 999 } 1000 1001 func (fn OnAccessibilityEventEventCallbackFunc) DispatchCallback( 1002 targetPC uintptr, ctx *js.CallbackContext, 1003 ) { 1004 args := ctx.Args() 1005 if len(args) != 1+1 /* js this */ || 1006 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1007 js.ThrowInvalidCallbackInvocation() 1008 } 1009 var arg0 AXEventParams 1010 arg0.UpdateFrom(args[0+1]) 1011 defer arg0.FreeMembers(true) 1012 1013 if ctx.Return(fn( 1014 args[0], 1015 1016 mark.NoEscape(&arg0), 1017 )) { 1018 return 1019 } 1020 1021 js.ThrowCallbackValueNotReturned() 1022 } 1023 1024 type OnAccessibilityEventEventCallback[T any] struct { 1025 Fn func(arg T, this js.Ref, update *AXEventParams) js.Ref 1026 Arg T 1027 } 1028 1029 func (cb *OnAccessibilityEventEventCallback[T]) Register() js.Func[func(update *AXEventParams)] { 1030 return js.RegisterCallback[func(update *AXEventParams)]( 1031 cb, abi.FuncPCABIInternal(cb.Fn), 1032 ) 1033 } 1034 1035 func (cb *OnAccessibilityEventEventCallback[T]) DispatchCallback( 1036 targetPC uintptr, ctx *js.CallbackContext, 1037 ) { 1038 args := ctx.Args() 1039 if len(args) != 1+1 /* js this */ || 1040 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1041 js.ThrowInvalidCallbackInvocation() 1042 } 1043 var arg0 AXEventParams 1044 arg0.UpdateFrom(args[0+1]) 1045 defer arg0.FreeMembers(true) 1046 1047 if ctx.Return(cb.Fn( 1048 cb.Arg, 1049 args[0], 1050 1051 mark.NoEscape(&arg0), 1052 )) { 1053 return 1054 } 1055 1056 js.ThrowCallbackValueNotReturned() 1057 } 1058 1059 // HasFuncOnAccessibilityEvent returns true if the function "WEBEXT.automationInternal.onAccessibilityEvent.addListener" exists. 1060 func HasFuncOnAccessibilityEvent() bool { 1061 return js.True == bindings.HasFuncOnAccessibilityEvent() 1062 } 1063 1064 // FuncOnAccessibilityEvent returns the function "WEBEXT.automationInternal.onAccessibilityEvent.addListener". 1065 func FuncOnAccessibilityEvent() (fn js.Func[func(callback js.Func[func(update *AXEventParams)])]) { 1066 bindings.FuncOnAccessibilityEvent( 1067 js.Pointer(&fn), 1068 ) 1069 return 1070 } 1071 1072 // OnAccessibilityEvent calls the function "WEBEXT.automationInternal.onAccessibilityEvent.addListener" directly. 1073 func OnAccessibilityEvent(callback js.Func[func(update *AXEventParams)]) (ret js.Void) { 1074 bindings.CallOnAccessibilityEvent( 1075 js.Pointer(&ret), 1076 callback.Ref(), 1077 ) 1078 1079 return 1080 } 1081 1082 // TryOnAccessibilityEvent calls the function "WEBEXT.automationInternal.onAccessibilityEvent.addListener" 1083 // in a try/catch block and returns (_, err, ok = false) when it went through 1084 // the catch clause. 1085 func TryOnAccessibilityEvent(callback js.Func[func(update *AXEventParams)]) (ret js.Void, exception js.Any, ok bool) { 1086 ok = js.True == bindings.TryOnAccessibilityEvent( 1087 js.Pointer(&ret), js.Pointer(&exception), 1088 callback.Ref(), 1089 ) 1090 1091 return 1092 } 1093 1094 // HasFuncOffAccessibilityEvent returns true if the function "WEBEXT.automationInternal.onAccessibilityEvent.removeListener" exists. 1095 func HasFuncOffAccessibilityEvent() bool { 1096 return js.True == bindings.HasFuncOffAccessibilityEvent() 1097 } 1098 1099 // FuncOffAccessibilityEvent returns the function "WEBEXT.automationInternal.onAccessibilityEvent.removeListener". 1100 func FuncOffAccessibilityEvent() (fn js.Func[func(callback js.Func[func(update *AXEventParams)])]) { 1101 bindings.FuncOffAccessibilityEvent( 1102 js.Pointer(&fn), 1103 ) 1104 return 1105 } 1106 1107 // OffAccessibilityEvent calls the function "WEBEXT.automationInternal.onAccessibilityEvent.removeListener" directly. 1108 func OffAccessibilityEvent(callback js.Func[func(update *AXEventParams)]) (ret js.Void) { 1109 bindings.CallOffAccessibilityEvent( 1110 js.Pointer(&ret), 1111 callback.Ref(), 1112 ) 1113 1114 return 1115 } 1116 1117 // TryOffAccessibilityEvent calls the function "WEBEXT.automationInternal.onAccessibilityEvent.removeListener" 1118 // in a try/catch block and returns (_, err, ok = false) when it went through 1119 // the catch clause. 1120 func TryOffAccessibilityEvent(callback js.Func[func(update *AXEventParams)]) (ret js.Void, exception js.Any, ok bool) { 1121 ok = js.True == bindings.TryOffAccessibilityEvent( 1122 js.Pointer(&ret), js.Pointer(&exception), 1123 callback.Ref(), 1124 ) 1125 1126 return 1127 } 1128 1129 // HasFuncHasOnAccessibilityEvent returns true if the function "WEBEXT.automationInternal.onAccessibilityEvent.hasListener" exists. 1130 func HasFuncHasOnAccessibilityEvent() bool { 1131 return js.True == bindings.HasFuncHasOnAccessibilityEvent() 1132 } 1133 1134 // FuncHasOnAccessibilityEvent returns the function "WEBEXT.automationInternal.onAccessibilityEvent.hasListener". 1135 func FuncHasOnAccessibilityEvent() (fn js.Func[func(callback js.Func[func(update *AXEventParams)]) bool]) { 1136 bindings.FuncHasOnAccessibilityEvent( 1137 js.Pointer(&fn), 1138 ) 1139 return 1140 } 1141 1142 // HasOnAccessibilityEvent calls the function "WEBEXT.automationInternal.onAccessibilityEvent.hasListener" directly. 1143 func HasOnAccessibilityEvent(callback js.Func[func(update *AXEventParams)]) (ret bool) { 1144 bindings.CallHasOnAccessibilityEvent( 1145 js.Pointer(&ret), 1146 callback.Ref(), 1147 ) 1148 1149 return 1150 } 1151 1152 // TryHasOnAccessibilityEvent calls the function "WEBEXT.automationInternal.onAccessibilityEvent.hasListener" 1153 // in a try/catch block and returns (_, err, ok = false) when it went through 1154 // the catch clause. 1155 func TryHasOnAccessibilityEvent(callback js.Func[func(update *AXEventParams)]) (ret bool, exception js.Any, ok bool) { 1156 ok = js.True == bindings.TryHasOnAccessibilityEvent( 1157 js.Pointer(&ret), js.Pointer(&exception), 1158 callback.Ref(), 1159 ) 1160 1161 return 1162 } 1163 1164 type OnAccessibilityTreeDestroyedEventCallbackFunc func(this js.Ref, treeID js.String) js.Ref 1165 1166 func (fn OnAccessibilityTreeDestroyedEventCallbackFunc) Register() js.Func[func(treeID js.String)] { 1167 return js.RegisterCallback[func(treeID js.String)]( 1168 fn, abi.FuncPCABIInternal(fn), 1169 ) 1170 } 1171 1172 func (fn OnAccessibilityTreeDestroyedEventCallbackFunc) DispatchCallback( 1173 targetPC uintptr, ctx *js.CallbackContext, 1174 ) { 1175 args := ctx.Args() 1176 if len(args) != 1+1 /* js this */ || 1177 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1178 js.ThrowInvalidCallbackInvocation() 1179 } 1180 1181 if ctx.Return(fn( 1182 args[0], 1183 1184 js.String{}.FromRef(args[0+1]), 1185 )) { 1186 return 1187 } 1188 1189 js.ThrowCallbackValueNotReturned() 1190 } 1191 1192 type OnAccessibilityTreeDestroyedEventCallback[T any] struct { 1193 Fn func(arg T, this js.Ref, treeID js.String) js.Ref 1194 Arg T 1195 } 1196 1197 func (cb *OnAccessibilityTreeDestroyedEventCallback[T]) Register() js.Func[func(treeID js.String)] { 1198 return js.RegisterCallback[func(treeID js.String)]( 1199 cb, abi.FuncPCABIInternal(cb.Fn), 1200 ) 1201 } 1202 1203 func (cb *OnAccessibilityTreeDestroyedEventCallback[T]) DispatchCallback( 1204 targetPC uintptr, ctx *js.CallbackContext, 1205 ) { 1206 args := ctx.Args() 1207 if len(args) != 1+1 /* js this */ || 1208 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1209 js.ThrowInvalidCallbackInvocation() 1210 } 1211 1212 if ctx.Return(cb.Fn( 1213 cb.Arg, 1214 args[0], 1215 1216 js.String{}.FromRef(args[0+1]), 1217 )) { 1218 return 1219 } 1220 1221 js.ThrowCallbackValueNotReturned() 1222 } 1223 1224 // HasFuncOnAccessibilityTreeDestroyed returns true if the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener" exists. 1225 func HasFuncOnAccessibilityTreeDestroyed() bool { 1226 return js.True == bindings.HasFuncOnAccessibilityTreeDestroyed() 1227 } 1228 1229 // FuncOnAccessibilityTreeDestroyed returns the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener". 1230 func FuncOnAccessibilityTreeDestroyed() (fn js.Func[func(callback js.Func[func(treeID js.String)])]) { 1231 bindings.FuncOnAccessibilityTreeDestroyed( 1232 js.Pointer(&fn), 1233 ) 1234 return 1235 } 1236 1237 // OnAccessibilityTreeDestroyed calls the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener" directly. 1238 func OnAccessibilityTreeDestroyed(callback js.Func[func(treeID js.String)]) (ret js.Void) { 1239 bindings.CallOnAccessibilityTreeDestroyed( 1240 js.Pointer(&ret), 1241 callback.Ref(), 1242 ) 1243 1244 return 1245 } 1246 1247 // TryOnAccessibilityTreeDestroyed calls the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener" 1248 // in a try/catch block and returns (_, err, ok = false) when it went through 1249 // the catch clause. 1250 func TryOnAccessibilityTreeDestroyed(callback js.Func[func(treeID js.String)]) (ret js.Void, exception js.Any, ok bool) { 1251 ok = js.True == bindings.TryOnAccessibilityTreeDestroyed( 1252 js.Pointer(&ret), js.Pointer(&exception), 1253 callback.Ref(), 1254 ) 1255 1256 return 1257 } 1258 1259 // HasFuncOffAccessibilityTreeDestroyed returns true if the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener" exists. 1260 func HasFuncOffAccessibilityTreeDestroyed() bool { 1261 return js.True == bindings.HasFuncOffAccessibilityTreeDestroyed() 1262 } 1263 1264 // FuncOffAccessibilityTreeDestroyed returns the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener". 1265 func FuncOffAccessibilityTreeDestroyed() (fn js.Func[func(callback js.Func[func(treeID js.String)])]) { 1266 bindings.FuncOffAccessibilityTreeDestroyed( 1267 js.Pointer(&fn), 1268 ) 1269 return 1270 } 1271 1272 // OffAccessibilityTreeDestroyed calls the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener" directly. 1273 func OffAccessibilityTreeDestroyed(callback js.Func[func(treeID js.String)]) (ret js.Void) { 1274 bindings.CallOffAccessibilityTreeDestroyed( 1275 js.Pointer(&ret), 1276 callback.Ref(), 1277 ) 1278 1279 return 1280 } 1281 1282 // TryOffAccessibilityTreeDestroyed calls the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener" 1283 // in a try/catch block and returns (_, err, ok = false) when it went through 1284 // the catch clause. 1285 func TryOffAccessibilityTreeDestroyed(callback js.Func[func(treeID js.String)]) (ret js.Void, exception js.Any, ok bool) { 1286 ok = js.True == bindings.TryOffAccessibilityTreeDestroyed( 1287 js.Pointer(&ret), js.Pointer(&exception), 1288 callback.Ref(), 1289 ) 1290 1291 return 1292 } 1293 1294 // HasFuncHasOnAccessibilityTreeDestroyed returns true if the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener" exists. 1295 func HasFuncHasOnAccessibilityTreeDestroyed() bool { 1296 return js.True == bindings.HasFuncHasOnAccessibilityTreeDestroyed() 1297 } 1298 1299 // FuncHasOnAccessibilityTreeDestroyed returns the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener". 1300 func FuncHasOnAccessibilityTreeDestroyed() (fn js.Func[func(callback js.Func[func(treeID js.String)]) bool]) { 1301 bindings.FuncHasOnAccessibilityTreeDestroyed( 1302 js.Pointer(&fn), 1303 ) 1304 return 1305 } 1306 1307 // HasOnAccessibilityTreeDestroyed calls the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener" directly. 1308 func HasOnAccessibilityTreeDestroyed(callback js.Func[func(treeID js.String)]) (ret bool) { 1309 bindings.CallHasOnAccessibilityTreeDestroyed( 1310 js.Pointer(&ret), 1311 callback.Ref(), 1312 ) 1313 1314 return 1315 } 1316 1317 // TryHasOnAccessibilityTreeDestroyed calls the function "WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener" 1318 // in a try/catch block and returns (_, err, ok = false) when it went through 1319 // the catch clause. 1320 func TryHasOnAccessibilityTreeDestroyed(callback js.Func[func(treeID js.String)]) (ret bool, exception js.Any, ok bool) { 1321 ok = js.True == bindings.TryHasOnAccessibilityTreeDestroyed( 1322 js.Pointer(&ret), js.Pointer(&exception), 1323 callback.Ref(), 1324 ) 1325 1326 return 1327 } 1328 1329 type OnAccessibilityTreeSerializationErrorEventCallbackFunc func(this js.Ref, treeID js.String) js.Ref 1330 1331 func (fn OnAccessibilityTreeSerializationErrorEventCallbackFunc) Register() js.Func[func(treeID js.String)] { 1332 return js.RegisterCallback[func(treeID js.String)]( 1333 fn, abi.FuncPCABIInternal(fn), 1334 ) 1335 } 1336 1337 func (fn OnAccessibilityTreeSerializationErrorEventCallbackFunc) DispatchCallback( 1338 targetPC uintptr, ctx *js.CallbackContext, 1339 ) { 1340 args := ctx.Args() 1341 if len(args) != 1+1 /* js this */ || 1342 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1343 js.ThrowInvalidCallbackInvocation() 1344 } 1345 1346 if ctx.Return(fn( 1347 args[0], 1348 1349 js.String{}.FromRef(args[0+1]), 1350 )) { 1351 return 1352 } 1353 1354 js.ThrowCallbackValueNotReturned() 1355 } 1356 1357 type OnAccessibilityTreeSerializationErrorEventCallback[T any] struct { 1358 Fn func(arg T, this js.Ref, treeID js.String) js.Ref 1359 Arg T 1360 } 1361 1362 func (cb *OnAccessibilityTreeSerializationErrorEventCallback[T]) Register() js.Func[func(treeID js.String)] { 1363 return js.RegisterCallback[func(treeID js.String)]( 1364 cb, abi.FuncPCABIInternal(cb.Fn), 1365 ) 1366 } 1367 1368 func (cb *OnAccessibilityTreeSerializationErrorEventCallback[T]) DispatchCallback( 1369 targetPC uintptr, ctx *js.CallbackContext, 1370 ) { 1371 args := ctx.Args() 1372 if len(args) != 1+1 /* js this */ || 1373 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1374 js.ThrowInvalidCallbackInvocation() 1375 } 1376 1377 if ctx.Return(cb.Fn( 1378 cb.Arg, 1379 args[0], 1380 1381 js.String{}.FromRef(args[0+1]), 1382 )) { 1383 return 1384 } 1385 1386 js.ThrowCallbackValueNotReturned() 1387 } 1388 1389 // HasFuncOnAccessibilityTreeSerializationError returns true if the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener" exists. 1390 func HasFuncOnAccessibilityTreeSerializationError() bool { 1391 return js.True == bindings.HasFuncOnAccessibilityTreeSerializationError() 1392 } 1393 1394 // FuncOnAccessibilityTreeSerializationError returns the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener". 1395 func FuncOnAccessibilityTreeSerializationError() (fn js.Func[func(callback js.Func[func(treeID js.String)])]) { 1396 bindings.FuncOnAccessibilityTreeSerializationError( 1397 js.Pointer(&fn), 1398 ) 1399 return 1400 } 1401 1402 // OnAccessibilityTreeSerializationError calls the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener" directly. 1403 func OnAccessibilityTreeSerializationError(callback js.Func[func(treeID js.String)]) (ret js.Void) { 1404 bindings.CallOnAccessibilityTreeSerializationError( 1405 js.Pointer(&ret), 1406 callback.Ref(), 1407 ) 1408 1409 return 1410 } 1411 1412 // TryOnAccessibilityTreeSerializationError calls the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener" 1413 // in a try/catch block and returns (_, err, ok = false) when it went through 1414 // the catch clause. 1415 func TryOnAccessibilityTreeSerializationError(callback js.Func[func(treeID js.String)]) (ret js.Void, exception js.Any, ok bool) { 1416 ok = js.True == bindings.TryOnAccessibilityTreeSerializationError( 1417 js.Pointer(&ret), js.Pointer(&exception), 1418 callback.Ref(), 1419 ) 1420 1421 return 1422 } 1423 1424 // HasFuncOffAccessibilityTreeSerializationError returns true if the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener" exists. 1425 func HasFuncOffAccessibilityTreeSerializationError() bool { 1426 return js.True == bindings.HasFuncOffAccessibilityTreeSerializationError() 1427 } 1428 1429 // FuncOffAccessibilityTreeSerializationError returns the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener". 1430 func FuncOffAccessibilityTreeSerializationError() (fn js.Func[func(callback js.Func[func(treeID js.String)])]) { 1431 bindings.FuncOffAccessibilityTreeSerializationError( 1432 js.Pointer(&fn), 1433 ) 1434 return 1435 } 1436 1437 // OffAccessibilityTreeSerializationError calls the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener" directly. 1438 func OffAccessibilityTreeSerializationError(callback js.Func[func(treeID js.String)]) (ret js.Void) { 1439 bindings.CallOffAccessibilityTreeSerializationError( 1440 js.Pointer(&ret), 1441 callback.Ref(), 1442 ) 1443 1444 return 1445 } 1446 1447 // TryOffAccessibilityTreeSerializationError calls the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener" 1448 // in a try/catch block and returns (_, err, ok = false) when it went through 1449 // the catch clause. 1450 func TryOffAccessibilityTreeSerializationError(callback js.Func[func(treeID js.String)]) (ret js.Void, exception js.Any, ok bool) { 1451 ok = js.True == bindings.TryOffAccessibilityTreeSerializationError( 1452 js.Pointer(&ret), js.Pointer(&exception), 1453 callback.Ref(), 1454 ) 1455 1456 return 1457 } 1458 1459 // HasFuncHasOnAccessibilityTreeSerializationError returns true if the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener" exists. 1460 func HasFuncHasOnAccessibilityTreeSerializationError() bool { 1461 return js.True == bindings.HasFuncHasOnAccessibilityTreeSerializationError() 1462 } 1463 1464 // FuncHasOnAccessibilityTreeSerializationError returns the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener". 1465 func FuncHasOnAccessibilityTreeSerializationError() (fn js.Func[func(callback js.Func[func(treeID js.String)]) bool]) { 1466 bindings.FuncHasOnAccessibilityTreeSerializationError( 1467 js.Pointer(&fn), 1468 ) 1469 return 1470 } 1471 1472 // HasOnAccessibilityTreeSerializationError calls the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener" directly. 1473 func HasOnAccessibilityTreeSerializationError(callback js.Func[func(treeID js.String)]) (ret bool) { 1474 bindings.CallHasOnAccessibilityTreeSerializationError( 1475 js.Pointer(&ret), 1476 callback.Ref(), 1477 ) 1478 1479 return 1480 } 1481 1482 // TryHasOnAccessibilityTreeSerializationError calls the function "WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener" 1483 // in a try/catch block and returns (_, err, ok = false) when it went through 1484 // the catch clause. 1485 func TryHasOnAccessibilityTreeSerializationError(callback js.Func[func(treeID js.String)]) (ret bool, exception js.Any, ok bool) { 1486 ok = js.True == bindings.TryHasOnAccessibilityTreeSerializationError( 1487 js.Pointer(&ret), js.Pointer(&exception), 1488 callback.Ref(), 1489 ) 1490 1491 return 1492 } 1493 1494 type OnActionResultEventCallbackFunc func(this js.Ref, treeID js.String, requestID int32, result bool) js.Ref 1495 1496 func (fn OnActionResultEventCallbackFunc) Register() js.Func[func(treeID js.String, requestID int32, result bool)] { 1497 return js.RegisterCallback[func(treeID js.String, requestID int32, result bool)]( 1498 fn, abi.FuncPCABIInternal(fn), 1499 ) 1500 } 1501 1502 func (fn OnActionResultEventCallbackFunc) DispatchCallback( 1503 targetPC uintptr, ctx *js.CallbackContext, 1504 ) { 1505 args := ctx.Args() 1506 if len(args) != 3+1 /* js this */ || 1507 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1508 js.ThrowInvalidCallbackInvocation() 1509 } 1510 1511 if ctx.Return(fn( 1512 args[0], 1513 1514 js.String{}.FromRef(args[0+1]), 1515 js.Number[int32]{}.FromRef(args[1+1]).Get(), 1516 args[2+1] == js.True, 1517 )) { 1518 return 1519 } 1520 1521 js.ThrowCallbackValueNotReturned() 1522 } 1523 1524 type OnActionResultEventCallback[T any] struct { 1525 Fn func(arg T, this js.Ref, treeID js.String, requestID int32, result bool) js.Ref 1526 Arg T 1527 } 1528 1529 func (cb *OnActionResultEventCallback[T]) Register() js.Func[func(treeID js.String, requestID int32, result bool)] { 1530 return js.RegisterCallback[func(treeID js.String, requestID int32, result bool)]( 1531 cb, abi.FuncPCABIInternal(cb.Fn), 1532 ) 1533 } 1534 1535 func (cb *OnActionResultEventCallback[T]) DispatchCallback( 1536 targetPC uintptr, ctx *js.CallbackContext, 1537 ) { 1538 args := ctx.Args() 1539 if len(args) != 3+1 /* js this */ || 1540 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1541 js.ThrowInvalidCallbackInvocation() 1542 } 1543 1544 if ctx.Return(cb.Fn( 1545 cb.Arg, 1546 args[0], 1547 1548 js.String{}.FromRef(args[0+1]), 1549 js.Number[int32]{}.FromRef(args[1+1]).Get(), 1550 args[2+1] == js.True, 1551 )) { 1552 return 1553 } 1554 1555 js.ThrowCallbackValueNotReturned() 1556 } 1557 1558 // HasFuncOnActionResult returns true if the function "WEBEXT.automationInternal.onActionResult.addListener" exists. 1559 func HasFuncOnActionResult() bool { 1560 return js.True == bindings.HasFuncOnActionResult() 1561 } 1562 1563 // FuncOnActionResult returns the function "WEBEXT.automationInternal.onActionResult.addListener". 1564 func FuncOnActionResult() (fn js.Func[func(callback js.Func[func(treeID js.String, requestID int32, result bool)])]) { 1565 bindings.FuncOnActionResult( 1566 js.Pointer(&fn), 1567 ) 1568 return 1569 } 1570 1571 // OnActionResult calls the function "WEBEXT.automationInternal.onActionResult.addListener" directly. 1572 func OnActionResult(callback js.Func[func(treeID js.String, requestID int32, result bool)]) (ret js.Void) { 1573 bindings.CallOnActionResult( 1574 js.Pointer(&ret), 1575 callback.Ref(), 1576 ) 1577 1578 return 1579 } 1580 1581 // TryOnActionResult calls the function "WEBEXT.automationInternal.onActionResult.addListener" 1582 // in a try/catch block and returns (_, err, ok = false) when it went through 1583 // the catch clause. 1584 func TryOnActionResult(callback js.Func[func(treeID js.String, requestID int32, result bool)]) (ret js.Void, exception js.Any, ok bool) { 1585 ok = js.True == bindings.TryOnActionResult( 1586 js.Pointer(&ret), js.Pointer(&exception), 1587 callback.Ref(), 1588 ) 1589 1590 return 1591 } 1592 1593 // HasFuncOffActionResult returns true if the function "WEBEXT.automationInternal.onActionResult.removeListener" exists. 1594 func HasFuncOffActionResult() bool { 1595 return js.True == bindings.HasFuncOffActionResult() 1596 } 1597 1598 // FuncOffActionResult returns the function "WEBEXT.automationInternal.onActionResult.removeListener". 1599 func FuncOffActionResult() (fn js.Func[func(callback js.Func[func(treeID js.String, requestID int32, result bool)])]) { 1600 bindings.FuncOffActionResult( 1601 js.Pointer(&fn), 1602 ) 1603 return 1604 } 1605 1606 // OffActionResult calls the function "WEBEXT.automationInternal.onActionResult.removeListener" directly. 1607 func OffActionResult(callback js.Func[func(treeID js.String, requestID int32, result bool)]) (ret js.Void) { 1608 bindings.CallOffActionResult( 1609 js.Pointer(&ret), 1610 callback.Ref(), 1611 ) 1612 1613 return 1614 } 1615 1616 // TryOffActionResult calls the function "WEBEXT.automationInternal.onActionResult.removeListener" 1617 // in a try/catch block and returns (_, err, ok = false) when it went through 1618 // the catch clause. 1619 func TryOffActionResult(callback js.Func[func(treeID js.String, requestID int32, result bool)]) (ret js.Void, exception js.Any, ok bool) { 1620 ok = js.True == bindings.TryOffActionResult( 1621 js.Pointer(&ret), js.Pointer(&exception), 1622 callback.Ref(), 1623 ) 1624 1625 return 1626 } 1627 1628 // HasFuncHasOnActionResult returns true if the function "WEBEXT.automationInternal.onActionResult.hasListener" exists. 1629 func HasFuncHasOnActionResult() bool { 1630 return js.True == bindings.HasFuncHasOnActionResult() 1631 } 1632 1633 // FuncHasOnActionResult returns the function "WEBEXT.automationInternal.onActionResult.hasListener". 1634 func FuncHasOnActionResult() (fn js.Func[func(callback js.Func[func(treeID js.String, requestID int32, result bool)]) bool]) { 1635 bindings.FuncHasOnActionResult( 1636 js.Pointer(&fn), 1637 ) 1638 return 1639 } 1640 1641 // HasOnActionResult calls the function "WEBEXT.automationInternal.onActionResult.hasListener" directly. 1642 func HasOnActionResult(callback js.Func[func(treeID js.String, requestID int32, result bool)]) (ret bool) { 1643 bindings.CallHasOnActionResult( 1644 js.Pointer(&ret), 1645 callback.Ref(), 1646 ) 1647 1648 return 1649 } 1650 1651 // TryHasOnActionResult calls the function "WEBEXT.automationInternal.onActionResult.hasListener" 1652 // in a try/catch block and returns (_, err, ok = false) when it went through 1653 // the catch clause. 1654 func TryHasOnActionResult(callback js.Func[func(treeID js.String, requestID int32, result bool)]) (ret bool, exception js.Any, ok bool) { 1655 ok = js.True == bindings.TryHasOnActionResult( 1656 js.Pointer(&ret), js.Pointer(&exception), 1657 callback.Ref(), 1658 ) 1659 1660 return 1661 } 1662 1663 type OnAllAutomationEventListenersRemovedEventCallbackFunc func(this js.Ref) js.Ref 1664 1665 func (fn OnAllAutomationEventListenersRemovedEventCallbackFunc) Register() js.Func[func()] { 1666 return js.RegisterCallback[func()]( 1667 fn, abi.FuncPCABIInternal(fn), 1668 ) 1669 } 1670 1671 func (fn OnAllAutomationEventListenersRemovedEventCallbackFunc) DispatchCallback( 1672 targetPC uintptr, ctx *js.CallbackContext, 1673 ) { 1674 args := ctx.Args() 1675 if len(args) != 0+1 /* js this */ || 1676 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1677 js.ThrowInvalidCallbackInvocation() 1678 } 1679 1680 if ctx.Return(fn( 1681 args[0], 1682 )) { 1683 return 1684 } 1685 1686 js.ThrowCallbackValueNotReturned() 1687 } 1688 1689 type OnAllAutomationEventListenersRemovedEventCallback[T any] struct { 1690 Fn func(arg T, this js.Ref) js.Ref 1691 Arg T 1692 } 1693 1694 func (cb *OnAllAutomationEventListenersRemovedEventCallback[T]) Register() js.Func[func()] { 1695 return js.RegisterCallback[func()]( 1696 cb, abi.FuncPCABIInternal(cb.Fn), 1697 ) 1698 } 1699 1700 func (cb *OnAllAutomationEventListenersRemovedEventCallback[T]) DispatchCallback( 1701 targetPC uintptr, ctx *js.CallbackContext, 1702 ) { 1703 args := ctx.Args() 1704 if len(args) != 0+1 /* js this */ || 1705 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1706 js.ThrowInvalidCallbackInvocation() 1707 } 1708 1709 if ctx.Return(cb.Fn( 1710 cb.Arg, 1711 args[0], 1712 )) { 1713 return 1714 } 1715 1716 js.ThrowCallbackValueNotReturned() 1717 } 1718 1719 // HasFuncOnAllAutomationEventListenersRemoved returns true if the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener" exists. 1720 func HasFuncOnAllAutomationEventListenersRemoved() bool { 1721 return js.True == bindings.HasFuncOnAllAutomationEventListenersRemoved() 1722 } 1723 1724 // FuncOnAllAutomationEventListenersRemoved returns the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener". 1725 func FuncOnAllAutomationEventListenersRemoved() (fn js.Func[func(callback js.Func[func()])]) { 1726 bindings.FuncOnAllAutomationEventListenersRemoved( 1727 js.Pointer(&fn), 1728 ) 1729 return 1730 } 1731 1732 // OnAllAutomationEventListenersRemoved calls the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener" directly. 1733 func OnAllAutomationEventListenersRemoved(callback js.Func[func()]) (ret js.Void) { 1734 bindings.CallOnAllAutomationEventListenersRemoved( 1735 js.Pointer(&ret), 1736 callback.Ref(), 1737 ) 1738 1739 return 1740 } 1741 1742 // TryOnAllAutomationEventListenersRemoved calls the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener" 1743 // in a try/catch block and returns (_, err, ok = false) when it went through 1744 // the catch clause. 1745 func TryOnAllAutomationEventListenersRemoved(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 1746 ok = js.True == bindings.TryOnAllAutomationEventListenersRemoved( 1747 js.Pointer(&ret), js.Pointer(&exception), 1748 callback.Ref(), 1749 ) 1750 1751 return 1752 } 1753 1754 // HasFuncOffAllAutomationEventListenersRemoved returns true if the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener" exists. 1755 func HasFuncOffAllAutomationEventListenersRemoved() bool { 1756 return js.True == bindings.HasFuncOffAllAutomationEventListenersRemoved() 1757 } 1758 1759 // FuncOffAllAutomationEventListenersRemoved returns the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener". 1760 func FuncOffAllAutomationEventListenersRemoved() (fn js.Func[func(callback js.Func[func()])]) { 1761 bindings.FuncOffAllAutomationEventListenersRemoved( 1762 js.Pointer(&fn), 1763 ) 1764 return 1765 } 1766 1767 // OffAllAutomationEventListenersRemoved calls the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener" directly. 1768 func OffAllAutomationEventListenersRemoved(callback js.Func[func()]) (ret js.Void) { 1769 bindings.CallOffAllAutomationEventListenersRemoved( 1770 js.Pointer(&ret), 1771 callback.Ref(), 1772 ) 1773 1774 return 1775 } 1776 1777 // TryOffAllAutomationEventListenersRemoved calls the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener" 1778 // in a try/catch block and returns (_, err, ok = false) when it went through 1779 // the catch clause. 1780 func TryOffAllAutomationEventListenersRemoved(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 1781 ok = js.True == bindings.TryOffAllAutomationEventListenersRemoved( 1782 js.Pointer(&ret), js.Pointer(&exception), 1783 callback.Ref(), 1784 ) 1785 1786 return 1787 } 1788 1789 // HasFuncHasOnAllAutomationEventListenersRemoved returns true if the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener" exists. 1790 func HasFuncHasOnAllAutomationEventListenersRemoved() bool { 1791 return js.True == bindings.HasFuncHasOnAllAutomationEventListenersRemoved() 1792 } 1793 1794 // FuncHasOnAllAutomationEventListenersRemoved returns the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener". 1795 func FuncHasOnAllAutomationEventListenersRemoved() (fn js.Func[func(callback js.Func[func()]) bool]) { 1796 bindings.FuncHasOnAllAutomationEventListenersRemoved( 1797 js.Pointer(&fn), 1798 ) 1799 return 1800 } 1801 1802 // HasOnAllAutomationEventListenersRemoved calls the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener" directly. 1803 func HasOnAllAutomationEventListenersRemoved(callback js.Func[func()]) (ret bool) { 1804 bindings.CallHasOnAllAutomationEventListenersRemoved( 1805 js.Pointer(&ret), 1806 callback.Ref(), 1807 ) 1808 1809 return 1810 } 1811 1812 // TryHasOnAllAutomationEventListenersRemoved calls the function "WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener" 1813 // in a try/catch block and returns (_, err, ok = false) when it went through 1814 // the catch clause. 1815 func TryHasOnAllAutomationEventListenersRemoved(callback js.Func[func()]) (ret bool, exception js.Any, ok bool) { 1816 ok = js.True == bindings.TryHasOnAllAutomationEventListenersRemoved( 1817 js.Pointer(&ret), js.Pointer(&exception), 1818 callback.Ref(), 1819 ) 1820 1821 return 1822 } 1823 1824 type OnChildTreeIDEventCallbackFunc func(this js.Ref, treeID js.String) js.Ref 1825 1826 func (fn OnChildTreeIDEventCallbackFunc) Register() js.Func[func(treeID js.String)] { 1827 return js.RegisterCallback[func(treeID js.String)]( 1828 fn, abi.FuncPCABIInternal(fn), 1829 ) 1830 } 1831 1832 func (fn OnChildTreeIDEventCallbackFunc) DispatchCallback( 1833 targetPC uintptr, ctx *js.CallbackContext, 1834 ) { 1835 args := ctx.Args() 1836 if len(args) != 1+1 /* js this */ || 1837 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1838 js.ThrowInvalidCallbackInvocation() 1839 } 1840 1841 if ctx.Return(fn( 1842 args[0], 1843 1844 js.String{}.FromRef(args[0+1]), 1845 )) { 1846 return 1847 } 1848 1849 js.ThrowCallbackValueNotReturned() 1850 } 1851 1852 type OnChildTreeIDEventCallback[T any] struct { 1853 Fn func(arg T, this js.Ref, treeID js.String) js.Ref 1854 Arg T 1855 } 1856 1857 func (cb *OnChildTreeIDEventCallback[T]) Register() js.Func[func(treeID js.String)] { 1858 return js.RegisterCallback[func(treeID js.String)]( 1859 cb, abi.FuncPCABIInternal(cb.Fn), 1860 ) 1861 } 1862 1863 func (cb *OnChildTreeIDEventCallback[T]) DispatchCallback( 1864 targetPC uintptr, ctx *js.CallbackContext, 1865 ) { 1866 args := ctx.Args() 1867 if len(args) != 1+1 /* js this */ || 1868 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1869 js.ThrowInvalidCallbackInvocation() 1870 } 1871 1872 if ctx.Return(cb.Fn( 1873 cb.Arg, 1874 args[0], 1875 1876 js.String{}.FromRef(args[0+1]), 1877 )) { 1878 return 1879 } 1880 1881 js.ThrowCallbackValueNotReturned() 1882 } 1883 1884 // HasFuncOnChildTreeID returns true if the function "WEBEXT.automationInternal.onChildTreeID.addListener" exists. 1885 func HasFuncOnChildTreeID() bool { 1886 return js.True == bindings.HasFuncOnChildTreeID() 1887 } 1888 1889 // FuncOnChildTreeID returns the function "WEBEXT.automationInternal.onChildTreeID.addListener". 1890 func FuncOnChildTreeID() (fn js.Func[func(callback js.Func[func(treeID js.String)])]) { 1891 bindings.FuncOnChildTreeID( 1892 js.Pointer(&fn), 1893 ) 1894 return 1895 } 1896 1897 // OnChildTreeID calls the function "WEBEXT.automationInternal.onChildTreeID.addListener" directly. 1898 func OnChildTreeID(callback js.Func[func(treeID js.String)]) (ret js.Void) { 1899 bindings.CallOnChildTreeID( 1900 js.Pointer(&ret), 1901 callback.Ref(), 1902 ) 1903 1904 return 1905 } 1906 1907 // TryOnChildTreeID calls the function "WEBEXT.automationInternal.onChildTreeID.addListener" 1908 // in a try/catch block and returns (_, err, ok = false) when it went through 1909 // the catch clause. 1910 func TryOnChildTreeID(callback js.Func[func(treeID js.String)]) (ret js.Void, exception js.Any, ok bool) { 1911 ok = js.True == bindings.TryOnChildTreeID( 1912 js.Pointer(&ret), js.Pointer(&exception), 1913 callback.Ref(), 1914 ) 1915 1916 return 1917 } 1918 1919 // HasFuncOffChildTreeID returns true if the function "WEBEXT.automationInternal.onChildTreeID.removeListener" exists. 1920 func HasFuncOffChildTreeID() bool { 1921 return js.True == bindings.HasFuncOffChildTreeID() 1922 } 1923 1924 // FuncOffChildTreeID returns the function "WEBEXT.automationInternal.onChildTreeID.removeListener". 1925 func FuncOffChildTreeID() (fn js.Func[func(callback js.Func[func(treeID js.String)])]) { 1926 bindings.FuncOffChildTreeID( 1927 js.Pointer(&fn), 1928 ) 1929 return 1930 } 1931 1932 // OffChildTreeID calls the function "WEBEXT.automationInternal.onChildTreeID.removeListener" directly. 1933 func OffChildTreeID(callback js.Func[func(treeID js.String)]) (ret js.Void) { 1934 bindings.CallOffChildTreeID( 1935 js.Pointer(&ret), 1936 callback.Ref(), 1937 ) 1938 1939 return 1940 } 1941 1942 // TryOffChildTreeID calls the function "WEBEXT.automationInternal.onChildTreeID.removeListener" 1943 // in a try/catch block and returns (_, err, ok = false) when it went through 1944 // the catch clause. 1945 func TryOffChildTreeID(callback js.Func[func(treeID js.String)]) (ret js.Void, exception js.Any, ok bool) { 1946 ok = js.True == bindings.TryOffChildTreeID( 1947 js.Pointer(&ret), js.Pointer(&exception), 1948 callback.Ref(), 1949 ) 1950 1951 return 1952 } 1953 1954 // HasFuncHasOnChildTreeID returns true if the function "WEBEXT.automationInternal.onChildTreeID.hasListener" exists. 1955 func HasFuncHasOnChildTreeID() bool { 1956 return js.True == bindings.HasFuncHasOnChildTreeID() 1957 } 1958 1959 // FuncHasOnChildTreeID returns the function "WEBEXT.automationInternal.onChildTreeID.hasListener". 1960 func FuncHasOnChildTreeID() (fn js.Func[func(callback js.Func[func(treeID js.String)]) bool]) { 1961 bindings.FuncHasOnChildTreeID( 1962 js.Pointer(&fn), 1963 ) 1964 return 1965 } 1966 1967 // HasOnChildTreeID calls the function "WEBEXT.automationInternal.onChildTreeID.hasListener" directly. 1968 func HasOnChildTreeID(callback js.Func[func(treeID js.String)]) (ret bool) { 1969 bindings.CallHasOnChildTreeID( 1970 js.Pointer(&ret), 1971 callback.Ref(), 1972 ) 1973 1974 return 1975 } 1976 1977 // TryHasOnChildTreeID calls the function "WEBEXT.automationInternal.onChildTreeID.hasListener" 1978 // in a try/catch block and returns (_, err, ok = false) when it went through 1979 // the catch clause. 1980 func TryHasOnChildTreeID(callback js.Func[func(treeID js.String)]) (ret bool, exception js.Any, ok bool) { 1981 ok = js.True == bindings.TryHasOnChildTreeID( 1982 js.Pointer(&ret), js.Pointer(&exception), 1983 callback.Ref(), 1984 ) 1985 1986 return 1987 } 1988 1989 type OnGetTextLocationResultEventCallbackFunc func(this js.Ref, params *AXTextLocationParams) js.Ref 1990 1991 func (fn OnGetTextLocationResultEventCallbackFunc) Register() js.Func[func(params *AXTextLocationParams)] { 1992 return js.RegisterCallback[func(params *AXTextLocationParams)]( 1993 fn, abi.FuncPCABIInternal(fn), 1994 ) 1995 } 1996 1997 func (fn OnGetTextLocationResultEventCallbackFunc) DispatchCallback( 1998 targetPC uintptr, ctx *js.CallbackContext, 1999 ) { 2000 args := ctx.Args() 2001 if len(args) != 1+1 /* js this */ || 2002 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2003 js.ThrowInvalidCallbackInvocation() 2004 } 2005 var arg0 AXTextLocationParams 2006 arg0.UpdateFrom(args[0+1]) 2007 defer arg0.FreeMembers(true) 2008 2009 if ctx.Return(fn( 2010 args[0], 2011 2012 mark.NoEscape(&arg0), 2013 )) { 2014 return 2015 } 2016 2017 js.ThrowCallbackValueNotReturned() 2018 } 2019 2020 type OnGetTextLocationResultEventCallback[T any] struct { 2021 Fn func(arg T, this js.Ref, params *AXTextLocationParams) js.Ref 2022 Arg T 2023 } 2024 2025 func (cb *OnGetTextLocationResultEventCallback[T]) Register() js.Func[func(params *AXTextLocationParams)] { 2026 return js.RegisterCallback[func(params *AXTextLocationParams)]( 2027 cb, abi.FuncPCABIInternal(cb.Fn), 2028 ) 2029 } 2030 2031 func (cb *OnGetTextLocationResultEventCallback[T]) DispatchCallback( 2032 targetPC uintptr, ctx *js.CallbackContext, 2033 ) { 2034 args := ctx.Args() 2035 if len(args) != 1+1 /* js this */ || 2036 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2037 js.ThrowInvalidCallbackInvocation() 2038 } 2039 var arg0 AXTextLocationParams 2040 arg0.UpdateFrom(args[0+1]) 2041 defer arg0.FreeMembers(true) 2042 2043 if ctx.Return(cb.Fn( 2044 cb.Arg, 2045 args[0], 2046 2047 mark.NoEscape(&arg0), 2048 )) { 2049 return 2050 } 2051 2052 js.ThrowCallbackValueNotReturned() 2053 } 2054 2055 // HasFuncOnGetTextLocationResult returns true if the function "WEBEXT.automationInternal.onGetTextLocationResult.addListener" exists. 2056 func HasFuncOnGetTextLocationResult() bool { 2057 return js.True == bindings.HasFuncOnGetTextLocationResult() 2058 } 2059 2060 // FuncOnGetTextLocationResult returns the function "WEBEXT.automationInternal.onGetTextLocationResult.addListener". 2061 func FuncOnGetTextLocationResult() (fn js.Func[func(callback js.Func[func(params *AXTextLocationParams)])]) { 2062 bindings.FuncOnGetTextLocationResult( 2063 js.Pointer(&fn), 2064 ) 2065 return 2066 } 2067 2068 // OnGetTextLocationResult calls the function "WEBEXT.automationInternal.onGetTextLocationResult.addListener" directly. 2069 func OnGetTextLocationResult(callback js.Func[func(params *AXTextLocationParams)]) (ret js.Void) { 2070 bindings.CallOnGetTextLocationResult( 2071 js.Pointer(&ret), 2072 callback.Ref(), 2073 ) 2074 2075 return 2076 } 2077 2078 // TryOnGetTextLocationResult calls the function "WEBEXT.automationInternal.onGetTextLocationResult.addListener" 2079 // in a try/catch block and returns (_, err, ok = false) when it went through 2080 // the catch clause. 2081 func TryOnGetTextLocationResult(callback js.Func[func(params *AXTextLocationParams)]) (ret js.Void, exception js.Any, ok bool) { 2082 ok = js.True == bindings.TryOnGetTextLocationResult( 2083 js.Pointer(&ret), js.Pointer(&exception), 2084 callback.Ref(), 2085 ) 2086 2087 return 2088 } 2089 2090 // HasFuncOffGetTextLocationResult returns true if the function "WEBEXT.automationInternal.onGetTextLocationResult.removeListener" exists. 2091 func HasFuncOffGetTextLocationResult() bool { 2092 return js.True == bindings.HasFuncOffGetTextLocationResult() 2093 } 2094 2095 // FuncOffGetTextLocationResult returns the function "WEBEXT.automationInternal.onGetTextLocationResult.removeListener". 2096 func FuncOffGetTextLocationResult() (fn js.Func[func(callback js.Func[func(params *AXTextLocationParams)])]) { 2097 bindings.FuncOffGetTextLocationResult( 2098 js.Pointer(&fn), 2099 ) 2100 return 2101 } 2102 2103 // OffGetTextLocationResult calls the function "WEBEXT.automationInternal.onGetTextLocationResult.removeListener" directly. 2104 func OffGetTextLocationResult(callback js.Func[func(params *AXTextLocationParams)]) (ret js.Void) { 2105 bindings.CallOffGetTextLocationResult( 2106 js.Pointer(&ret), 2107 callback.Ref(), 2108 ) 2109 2110 return 2111 } 2112 2113 // TryOffGetTextLocationResult calls the function "WEBEXT.automationInternal.onGetTextLocationResult.removeListener" 2114 // in a try/catch block and returns (_, err, ok = false) when it went through 2115 // the catch clause. 2116 func TryOffGetTextLocationResult(callback js.Func[func(params *AXTextLocationParams)]) (ret js.Void, exception js.Any, ok bool) { 2117 ok = js.True == bindings.TryOffGetTextLocationResult( 2118 js.Pointer(&ret), js.Pointer(&exception), 2119 callback.Ref(), 2120 ) 2121 2122 return 2123 } 2124 2125 // HasFuncHasOnGetTextLocationResult returns true if the function "WEBEXT.automationInternal.onGetTextLocationResult.hasListener" exists. 2126 func HasFuncHasOnGetTextLocationResult() bool { 2127 return js.True == bindings.HasFuncHasOnGetTextLocationResult() 2128 } 2129 2130 // FuncHasOnGetTextLocationResult returns the function "WEBEXT.automationInternal.onGetTextLocationResult.hasListener". 2131 func FuncHasOnGetTextLocationResult() (fn js.Func[func(callback js.Func[func(params *AXTextLocationParams)]) bool]) { 2132 bindings.FuncHasOnGetTextLocationResult( 2133 js.Pointer(&fn), 2134 ) 2135 return 2136 } 2137 2138 // HasOnGetTextLocationResult calls the function "WEBEXT.automationInternal.onGetTextLocationResult.hasListener" directly. 2139 func HasOnGetTextLocationResult(callback js.Func[func(params *AXTextLocationParams)]) (ret bool) { 2140 bindings.CallHasOnGetTextLocationResult( 2141 js.Pointer(&ret), 2142 callback.Ref(), 2143 ) 2144 2145 return 2146 } 2147 2148 // TryHasOnGetTextLocationResult calls the function "WEBEXT.automationInternal.onGetTextLocationResult.hasListener" 2149 // in a try/catch block and returns (_, err, ok = false) when it went through 2150 // the catch clause. 2151 func TryHasOnGetTextLocationResult(callback js.Func[func(params *AXTextLocationParams)]) (ret bool, exception js.Any, ok bool) { 2152 ok = js.True == bindings.TryHasOnGetTextLocationResult( 2153 js.Pointer(&ret), js.Pointer(&exception), 2154 callback.Ref(), 2155 ) 2156 2157 return 2158 } 2159 2160 type OnNodesRemovedEventCallbackFunc func(this js.Ref, treeID js.String, nodeIDs js.Array[int32]) js.Ref 2161 2162 func (fn OnNodesRemovedEventCallbackFunc) Register() js.Func[func(treeID js.String, nodeIDs js.Array[int32])] { 2163 return js.RegisterCallback[func(treeID js.String, nodeIDs js.Array[int32])]( 2164 fn, abi.FuncPCABIInternal(fn), 2165 ) 2166 } 2167 2168 func (fn OnNodesRemovedEventCallbackFunc) DispatchCallback( 2169 targetPC uintptr, ctx *js.CallbackContext, 2170 ) { 2171 args := ctx.Args() 2172 if len(args) != 2+1 /* js this */ || 2173 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2174 js.ThrowInvalidCallbackInvocation() 2175 } 2176 2177 if ctx.Return(fn( 2178 args[0], 2179 2180 js.String{}.FromRef(args[0+1]), 2181 js.Array[int32]{}.FromRef(args[1+1]), 2182 )) { 2183 return 2184 } 2185 2186 js.ThrowCallbackValueNotReturned() 2187 } 2188 2189 type OnNodesRemovedEventCallback[T any] struct { 2190 Fn func(arg T, this js.Ref, treeID js.String, nodeIDs js.Array[int32]) js.Ref 2191 Arg T 2192 } 2193 2194 func (cb *OnNodesRemovedEventCallback[T]) Register() js.Func[func(treeID js.String, nodeIDs js.Array[int32])] { 2195 return js.RegisterCallback[func(treeID js.String, nodeIDs js.Array[int32])]( 2196 cb, abi.FuncPCABIInternal(cb.Fn), 2197 ) 2198 } 2199 2200 func (cb *OnNodesRemovedEventCallback[T]) DispatchCallback( 2201 targetPC uintptr, ctx *js.CallbackContext, 2202 ) { 2203 args := ctx.Args() 2204 if len(args) != 2+1 /* js this */ || 2205 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2206 js.ThrowInvalidCallbackInvocation() 2207 } 2208 2209 if ctx.Return(cb.Fn( 2210 cb.Arg, 2211 args[0], 2212 2213 js.String{}.FromRef(args[0+1]), 2214 js.Array[int32]{}.FromRef(args[1+1]), 2215 )) { 2216 return 2217 } 2218 2219 js.ThrowCallbackValueNotReturned() 2220 } 2221 2222 // HasFuncOnNodesRemoved returns true if the function "WEBEXT.automationInternal.onNodesRemoved.addListener" exists. 2223 func HasFuncOnNodesRemoved() bool { 2224 return js.True == bindings.HasFuncOnNodesRemoved() 2225 } 2226 2227 // FuncOnNodesRemoved returns the function "WEBEXT.automationInternal.onNodesRemoved.addListener". 2228 func FuncOnNodesRemoved() (fn js.Func[func(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])])]) { 2229 bindings.FuncOnNodesRemoved( 2230 js.Pointer(&fn), 2231 ) 2232 return 2233 } 2234 2235 // OnNodesRemoved calls the function "WEBEXT.automationInternal.onNodesRemoved.addListener" directly. 2236 func OnNodesRemoved(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) (ret js.Void) { 2237 bindings.CallOnNodesRemoved( 2238 js.Pointer(&ret), 2239 callback.Ref(), 2240 ) 2241 2242 return 2243 } 2244 2245 // TryOnNodesRemoved calls the function "WEBEXT.automationInternal.onNodesRemoved.addListener" 2246 // in a try/catch block and returns (_, err, ok = false) when it went through 2247 // the catch clause. 2248 func TryOnNodesRemoved(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) (ret js.Void, exception js.Any, ok bool) { 2249 ok = js.True == bindings.TryOnNodesRemoved( 2250 js.Pointer(&ret), js.Pointer(&exception), 2251 callback.Ref(), 2252 ) 2253 2254 return 2255 } 2256 2257 // HasFuncOffNodesRemoved returns true if the function "WEBEXT.automationInternal.onNodesRemoved.removeListener" exists. 2258 func HasFuncOffNodesRemoved() bool { 2259 return js.True == bindings.HasFuncOffNodesRemoved() 2260 } 2261 2262 // FuncOffNodesRemoved returns the function "WEBEXT.automationInternal.onNodesRemoved.removeListener". 2263 func FuncOffNodesRemoved() (fn js.Func[func(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])])]) { 2264 bindings.FuncOffNodesRemoved( 2265 js.Pointer(&fn), 2266 ) 2267 return 2268 } 2269 2270 // OffNodesRemoved calls the function "WEBEXT.automationInternal.onNodesRemoved.removeListener" directly. 2271 func OffNodesRemoved(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) (ret js.Void) { 2272 bindings.CallOffNodesRemoved( 2273 js.Pointer(&ret), 2274 callback.Ref(), 2275 ) 2276 2277 return 2278 } 2279 2280 // TryOffNodesRemoved calls the function "WEBEXT.automationInternal.onNodesRemoved.removeListener" 2281 // in a try/catch block and returns (_, err, ok = false) when it went through 2282 // the catch clause. 2283 func TryOffNodesRemoved(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) (ret js.Void, exception js.Any, ok bool) { 2284 ok = js.True == bindings.TryOffNodesRemoved( 2285 js.Pointer(&ret), js.Pointer(&exception), 2286 callback.Ref(), 2287 ) 2288 2289 return 2290 } 2291 2292 // HasFuncHasOnNodesRemoved returns true if the function "WEBEXT.automationInternal.onNodesRemoved.hasListener" exists. 2293 func HasFuncHasOnNodesRemoved() bool { 2294 return js.True == bindings.HasFuncHasOnNodesRemoved() 2295 } 2296 2297 // FuncHasOnNodesRemoved returns the function "WEBEXT.automationInternal.onNodesRemoved.hasListener". 2298 func FuncHasOnNodesRemoved() (fn js.Func[func(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) bool]) { 2299 bindings.FuncHasOnNodesRemoved( 2300 js.Pointer(&fn), 2301 ) 2302 return 2303 } 2304 2305 // HasOnNodesRemoved calls the function "WEBEXT.automationInternal.onNodesRemoved.hasListener" directly. 2306 func HasOnNodesRemoved(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) (ret bool) { 2307 bindings.CallHasOnNodesRemoved( 2308 js.Pointer(&ret), 2309 callback.Ref(), 2310 ) 2311 2312 return 2313 } 2314 2315 // TryHasOnNodesRemoved calls the function "WEBEXT.automationInternal.onNodesRemoved.hasListener" 2316 // in a try/catch block and returns (_, err, ok = false) when it went through 2317 // the catch clause. 2318 func TryHasOnNodesRemoved(callback js.Func[func(treeID js.String, nodeIDs js.Array[int32])]) (ret bool, exception js.Any, ok bool) { 2319 ok = js.True == bindings.TryHasOnNodesRemoved( 2320 js.Pointer(&ret), js.Pointer(&exception), 2321 callback.Ref(), 2322 ) 2323 2324 return 2325 } 2326 2327 type OnTreeChangeEventCallbackFunc func(this js.Ref, observerID int32, treeID js.String, nodeID int32, changeType js.String) js.Ref 2328 2329 func (fn OnTreeChangeEventCallbackFunc) Register() js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)] { 2330 return js.RegisterCallback[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]( 2331 fn, abi.FuncPCABIInternal(fn), 2332 ) 2333 } 2334 2335 func (fn OnTreeChangeEventCallbackFunc) DispatchCallback( 2336 targetPC uintptr, ctx *js.CallbackContext, 2337 ) { 2338 args := ctx.Args() 2339 if len(args) != 4+1 /* js this */ || 2340 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2341 js.ThrowInvalidCallbackInvocation() 2342 } 2343 2344 if ctx.Return(fn( 2345 args[0], 2346 2347 js.Number[int32]{}.FromRef(args[0+1]).Get(), 2348 js.String{}.FromRef(args[1+1]), 2349 js.Number[int32]{}.FromRef(args[2+1]).Get(), 2350 js.String{}.FromRef(args[3+1]), 2351 )) { 2352 return 2353 } 2354 2355 js.ThrowCallbackValueNotReturned() 2356 } 2357 2358 type OnTreeChangeEventCallback[T any] struct { 2359 Fn func(arg T, this js.Ref, observerID int32, treeID js.String, nodeID int32, changeType js.String) js.Ref 2360 Arg T 2361 } 2362 2363 func (cb *OnTreeChangeEventCallback[T]) Register() js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)] { 2364 return js.RegisterCallback[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]( 2365 cb, abi.FuncPCABIInternal(cb.Fn), 2366 ) 2367 } 2368 2369 func (cb *OnTreeChangeEventCallback[T]) DispatchCallback( 2370 targetPC uintptr, ctx *js.CallbackContext, 2371 ) { 2372 args := ctx.Args() 2373 if len(args) != 4+1 /* js this */ || 2374 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2375 js.ThrowInvalidCallbackInvocation() 2376 } 2377 2378 if ctx.Return(cb.Fn( 2379 cb.Arg, 2380 args[0], 2381 2382 js.Number[int32]{}.FromRef(args[0+1]).Get(), 2383 js.String{}.FromRef(args[1+1]), 2384 js.Number[int32]{}.FromRef(args[2+1]).Get(), 2385 js.String{}.FromRef(args[3+1]), 2386 )) { 2387 return 2388 } 2389 2390 js.ThrowCallbackValueNotReturned() 2391 } 2392 2393 // HasFuncOnTreeChange returns true if the function "WEBEXT.automationInternal.onTreeChange.addListener" exists. 2394 func HasFuncOnTreeChange() bool { 2395 return js.True == bindings.HasFuncOnTreeChange() 2396 } 2397 2398 // FuncOnTreeChange returns the function "WEBEXT.automationInternal.onTreeChange.addListener". 2399 func FuncOnTreeChange() (fn js.Func[func(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)])]) { 2400 bindings.FuncOnTreeChange( 2401 js.Pointer(&fn), 2402 ) 2403 return 2404 } 2405 2406 // OnTreeChange calls the function "WEBEXT.automationInternal.onTreeChange.addListener" directly. 2407 func OnTreeChange(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) (ret js.Void) { 2408 bindings.CallOnTreeChange( 2409 js.Pointer(&ret), 2410 callback.Ref(), 2411 ) 2412 2413 return 2414 } 2415 2416 // TryOnTreeChange calls the function "WEBEXT.automationInternal.onTreeChange.addListener" 2417 // in a try/catch block and returns (_, err, ok = false) when it went through 2418 // the catch clause. 2419 func TryOnTreeChange(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) (ret js.Void, exception js.Any, ok bool) { 2420 ok = js.True == bindings.TryOnTreeChange( 2421 js.Pointer(&ret), js.Pointer(&exception), 2422 callback.Ref(), 2423 ) 2424 2425 return 2426 } 2427 2428 // HasFuncOffTreeChange returns true if the function "WEBEXT.automationInternal.onTreeChange.removeListener" exists. 2429 func HasFuncOffTreeChange() bool { 2430 return js.True == bindings.HasFuncOffTreeChange() 2431 } 2432 2433 // FuncOffTreeChange returns the function "WEBEXT.automationInternal.onTreeChange.removeListener". 2434 func FuncOffTreeChange() (fn js.Func[func(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)])]) { 2435 bindings.FuncOffTreeChange( 2436 js.Pointer(&fn), 2437 ) 2438 return 2439 } 2440 2441 // OffTreeChange calls the function "WEBEXT.automationInternal.onTreeChange.removeListener" directly. 2442 func OffTreeChange(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) (ret js.Void) { 2443 bindings.CallOffTreeChange( 2444 js.Pointer(&ret), 2445 callback.Ref(), 2446 ) 2447 2448 return 2449 } 2450 2451 // TryOffTreeChange calls the function "WEBEXT.automationInternal.onTreeChange.removeListener" 2452 // in a try/catch block and returns (_, err, ok = false) when it went through 2453 // the catch clause. 2454 func TryOffTreeChange(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) (ret js.Void, exception js.Any, ok bool) { 2455 ok = js.True == bindings.TryOffTreeChange( 2456 js.Pointer(&ret), js.Pointer(&exception), 2457 callback.Ref(), 2458 ) 2459 2460 return 2461 } 2462 2463 // HasFuncHasOnTreeChange returns true if the function "WEBEXT.automationInternal.onTreeChange.hasListener" exists. 2464 func HasFuncHasOnTreeChange() bool { 2465 return js.True == bindings.HasFuncHasOnTreeChange() 2466 } 2467 2468 // FuncHasOnTreeChange returns the function "WEBEXT.automationInternal.onTreeChange.hasListener". 2469 func FuncHasOnTreeChange() (fn js.Func[func(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) bool]) { 2470 bindings.FuncHasOnTreeChange( 2471 js.Pointer(&fn), 2472 ) 2473 return 2474 } 2475 2476 // HasOnTreeChange calls the function "WEBEXT.automationInternal.onTreeChange.hasListener" directly. 2477 func HasOnTreeChange(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) (ret bool) { 2478 bindings.CallHasOnTreeChange( 2479 js.Pointer(&ret), 2480 callback.Ref(), 2481 ) 2482 2483 return 2484 } 2485 2486 // TryHasOnTreeChange calls the function "WEBEXT.automationInternal.onTreeChange.hasListener" 2487 // in a try/catch block and returns (_, err, ok = false) when it went through 2488 // the catch clause. 2489 func TryHasOnTreeChange(callback js.Func[func(observerID int32, treeID js.String, nodeID int32, changeType js.String)]) (ret bool, exception js.Any, ok bool) { 2490 ok = js.True == bindings.TryHasOnTreeChange( 2491 js.Pointer(&ret), js.Pointer(&exception), 2492 callback.Ref(), 2493 ) 2494 2495 return 2496 } 2497 2498 // HasFuncPerformAction returns true if the function "WEBEXT.automationInternal.performAction" exists. 2499 func HasFuncPerformAction() bool { 2500 return js.True == bindings.HasFuncPerformAction() 2501 } 2502 2503 // FuncPerformAction returns the function "WEBEXT.automationInternal.performAction". 2504 func FuncPerformAction() (fn js.Func[func(args PerformActionRequiredParams, opt_args js.Object)]) { 2505 bindings.FuncPerformAction( 2506 js.Pointer(&fn), 2507 ) 2508 return 2509 } 2510 2511 // PerformAction calls the function "WEBEXT.automationInternal.performAction" directly. 2512 func PerformAction(args PerformActionRequiredParams, opt_args js.Object) (ret js.Void) { 2513 bindings.CallPerformAction( 2514 js.Pointer(&ret), 2515 js.Pointer(&args), 2516 opt_args.Ref(), 2517 ) 2518 2519 return 2520 } 2521 2522 // TryPerformAction calls the function "WEBEXT.automationInternal.performAction" 2523 // in a try/catch block and returns (_, err, ok = false) when it went through 2524 // the catch clause. 2525 func TryPerformAction(args PerformActionRequiredParams, opt_args js.Object) (ret js.Void, exception js.Any, ok bool) { 2526 ok = js.True == bindings.TryPerformAction( 2527 js.Pointer(&ret), js.Pointer(&exception), 2528 js.Pointer(&args), 2529 opt_args.Ref(), 2530 ) 2531 2532 return 2533 }