github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/tabs/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package tabs 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/extensiontypes" 11 "github.com/primecitizens/pcz/std/plat/js/webext/tabs/bindings" 12 ) 13 14 type ConnectArgConnectInfo struct { 15 // DocumentId is "ConnectArgConnectInfo.documentId" 16 // 17 // Optional 18 DocumentId js.String 19 // FrameId is "ConnectArgConnectInfo.frameId" 20 // 21 // Optional 22 // 23 // NOTE: FFI_USE_FrameId MUST be set to true to make this field effective. 24 FrameId int64 25 // Name is "ConnectArgConnectInfo.name" 26 // 27 // Optional 28 Name js.String 29 30 FFI_USE_FrameId bool // for FrameId. 31 32 FFI_USE bool 33 } 34 35 // FromRef calls UpdateFrom and returns a ConnectArgConnectInfo with all fields set. 36 func (p ConnectArgConnectInfo) FromRef(ref js.Ref) ConnectArgConnectInfo { 37 p.UpdateFrom(ref) 38 return p 39 } 40 41 // New creates a new ConnectArgConnectInfo in the application heap. 42 func (p ConnectArgConnectInfo) New() js.Ref { 43 return bindings.ConnectArgConnectInfoJSLoad( 44 js.Pointer(&p), js.True, 0, 45 ) 46 } 47 48 // UpdateFrom copies value of all fields of the heap object to p. 49 func (p *ConnectArgConnectInfo) UpdateFrom(ref js.Ref) { 50 bindings.ConnectArgConnectInfoJSStore( 51 js.Pointer(p), ref, 52 ) 53 } 54 55 // Update writes all fields of the p to the heap object referenced by ref. 56 func (p *ConnectArgConnectInfo) Update(ref js.Ref) { 57 bindings.ConnectArgConnectInfoJSLoad( 58 js.Pointer(p), js.False, ref, 59 ) 60 } 61 62 // FreeMembers frees fields with heap reference, if recursive is true 63 // free all heap references reachable from p. 64 func (p *ConnectArgConnectInfo) FreeMembers(recursive bool) { 65 js.Free( 66 p.DocumentId.Ref(), 67 p.Name.Ref(), 68 ) 69 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 70 p.Name = p.Name.FromRef(js.Undefined) 71 } 72 73 type MutedInfoReason uint32 74 75 const ( 76 _ MutedInfoReason = iota 77 78 MutedInfoReason_USER 79 MutedInfoReason_CAPTURE 80 MutedInfoReason_EXTENSION 81 ) 82 83 func (MutedInfoReason) FromRef(str js.Ref) MutedInfoReason { 84 return MutedInfoReason(bindings.ConstOfMutedInfoReason(str)) 85 } 86 87 func (x MutedInfoReason) String() (string, bool) { 88 switch x { 89 case MutedInfoReason_USER: 90 return "user", true 91 case MutedInfoReason_CAPTURE: 92 return "capture", true 93 case MutedInfoReason_EXTENSION: 94 return "extension", true 95 default: 96 return "", false 97 } 98 } 99 100 type MutedInfo struct { 101 // ExtensionId is "MutedInfo.extensionId" 102 // 103 // Optional 104 ExtensionId js.String 105 // Muted is "MutedInfo.muted" 106 // 107 // Required 108 Muted bool 109 // Reason is "MutedInfo.reason" 110 // 111 // Optional 112 Reason MutedInfoReason 113 114 FFI_USE bool 115 } 116 117 // FromRef calls UpdateFrom and returns a MutedInfo with all fields set. 118 func (p MutedInfo) FromRef(ref js.Ref) MutedInfo { 119 p.UpdateFrom(ref) 120 return p 121 } 122 123 // New creates a new MutedInfo in the application heap. 124 func (p MutedInfo) New() js.Ref { 125 return bindings.MutedInfoJSLoad( 126 js.Pointer(&p), js.True, 0, 127 ) 128 } 129 130 // UpdateFrom copies value of all fields of the heap object to p. 131 func (p *MutedInfo) UpdateFrom(ref js.Ref) { 132 bindings.MutedInfoJSStore( 133 js.Pointer(p), ref, 134 ) 135 } 136 137 // Update writes all fields of the p to the heap object referenced by ref. 138 func (p *MutedInfo) Update(ref js.Ref) { 139 bindings.MutedInfoJSLoad( 140 js.Pointer(p), js.False, ref, 141 ) 142 } 143 144 // FreeMembers frees fields with heap reference, if recursive is true 145 // free all heap references reachable from p. 146 func (p *MutedInfo) FreeMembers(recursive bool) { 147 js.Free( 148 p.ExtensionId.Ref(), 149 ) 150 p.ExtensionId = p.ExtensionId.FromRef(js.Undefined) 151 } 152 153 type TabStatus uint32 154 155 const ( 156 _ TabStatus = iota 157 158 TabStatus_UNLOADED 159 TabStatus_LOADING 160 TabStatus_COMPLETE 161 ) 162 163 func (TabStatus) FromRef(str js.Ref) TabStatus { 164 return TabStatus(bindings.ConstOfTabStatus(str)) 165 } 166 167 func (x TabStatus) String() (string, bool) { 168 switch x { 169 case TabStatus_UNLOADED: 170 return "unloaded", true 171 case TabStatus_LOADING: 172 return "loading", true 173 case TabStatus_COMPLETE: 174 return "complete", true 175 default: 176 return "", false 177 } 178 } 179 180 type Tab struct { 181 // Active is "Tab.active" 182 // 183 // Required 184 Active bool 185 // Audible is "Tab.audible" 186 // 187 // Optional 188 // 189 // NOTE: FFI_USE_Audible MUST be set to true to make this field effective. 190 Audible bool 191 // AutoDiscardable is "Tab.autoDiscardable" 192 // 193 // Required 194 AutoDiscardable bool 195 // Discarded is "Tab.discarded" 196 // 197 // Required 198 Discarded bool 199 // FavIconUrl is "Tab.favIconUrl" 200 // 201 // Optional 202 FavIconUrl js.String 203 // GroupId is "Tab.groupId" 204 // 205 // Required 206 GroupId int64 207 // Height is "Tab.height" 208 // 209 // Optional 210 // 211 // NOTE: FFI_USE_Height MUST be set to true to make this field effective. 212 Height int64 213 // Highlighted is "Tab.highlighted" 214 // 215 // Required 216 Highlighted bool 217 // Id is "Tab.id" 218 // 219 // Optional 220 // 221 // NOTE: FFI_USE_Id MUST be set to true to make this field effective. 222 Id int64 223 // Incognito is "Tab.incognito" 224 // 225 // Required 226 Incognito bool 227 // Index is "Tab.index" 228 // 229 // Required 230 Index int64 231 // MutedInfo is "Tab.mutedInfo" 232 // 233 // Optional 234 // 235 // NOTE: MutedInfo.FFI_USE MUST be set to true to get MutedInfo used. 236 MutedInfo MutedInfo 237 // OpenerTabId is "Tab.openerTabId" 238 // 239 // Optional 240 // 241 // NOTE: FFI_USE_OpenerTabId MUST be set to true to make this field effective. 242 OpenerTabId int64 243 // PendingUrl is "Tab.pendingUrl" 244 // 245 // Optional 246 PendingUrl js.String 247 // Pinned is "Tab.pinned" 248 // 249 // Required 250 Pinned bool 251 // Selected is "Tab.selected" 252 // 253 // Required 254 Selected bool 255 // SessionId is "Tab.sessionId" 256 // 257 // Optional 258 SessionId js.String 259 // Status is "Tab.status" 260 // 261 // Optional 262 Status TabStatus 263 // Title is "Tab.title" 264 // 265 // Optional 266 Title js.String 267 // Url is "Tab.url" 268 // 269 // Optional 270 Url js.String 271 // Width is "Tab.width" 272 // 273 // Optional 274 // 275 // NOTE: FFI_USE_Width MUST be set to true to make this field effective. 276 Width int64 277 // WindowId is "Tab.windowId" 278 // 279 // Required 280 WindowId int64 281 282 FFI_USE_Audible bool // for Audible. 283 FFI_USE_Height bool // for Height. 284 FFI_USE_Id bool // for Id. 285 FFI_USE_OpenerTabId bool // for OpenerTabId. 286 FFI_USE_Width bool // for Width. 287 288 FFI_USE bool 289 } 290 291 // FromRef calls UpdateFrom and returns a Tab with all fields set. 292 func (p Tab) FromRef(ref js.Ref) Tab { 293 p.UpdateFrom(ref) 294 return p 295 } 296 297 // New creates a new Tab in the application heap. 298 func (p Tab) New() js.Ref { 299 return bindings.TabJSLoad( 300 js.Pointer(&p), js.True, 0, 301 ) 302 } 303 304 // UpdateFrom copies value of all fields of the heap object to p. 305 func (p *Tab) UpdateFrom(ref js.Ref) { 306 bindings.TabJSStore( 307 js.Pointer(p), ref, 308 ) 309 } 310 311 // Update writes all fields of the p to the heap object referenced by ref. 312 func (p *Tab) Update(ref js.Ref) { 313 bindings.TabJSLoad( 314 js.Pointer(p), js.False, ref, 315 ) 316 } 317 318 // FreeMembers frees fields with heap reference, if recursive is true 319 // free all heap references reachable from p. 320 func (p *Tab) FreeMembers(recursive bool) { 321 js.Free( 322 p.FavIconUrl.Ref(), 323 p.PendingUrl.Ref(), 324 p.SessionId.Ref(), 325 p.Title.Ref(), 326 p.Url.Ref(), 327 ) 328 p.FavIconUrl = p.FavIconUrl.FromRef(js.Undefined) 329 p.PendingUrl = p.PendingUrl.FromRef(js.Undefined) 330 p.SessionId = p.SessionId.FromRef(js.Undefined) 331 p.Title = p.Title.FromRef(js.Undefined) 332 p.Url = p.Url.FromRef(js.Undefined) 333 if recursive { 334 p.MutedInfo.FreeMembers(true) 335 } 336 } 337 338 type CreateArgCreateProperties struct { 339 // Active is "CreateArgCreateProperties.active" 340 // 341 // Optional 342 // 343 // NOTE: FFI_USE_Active MUST be set to true to make this field effective. 344 Active bool 345 // Index is "CreateArgCreateProperties.index" 346 // 347 // Optional 348 // 349 // NOTE: FFI_USE_Index MUST be set to true to make this field effective. 350 Index int64 351 // OpenerTabId is "CreateArgCreateProperties.openerTabId" 352 // 353 // Optional 354 // 355 // NOTE: FFI_USE_OpenerTabId MUST be set to true to make this field effective. 356 OpenerTabId int64 357 // Pinned is "CreateArgCreateProperties.pinned" 358 // 359 // Optional 360 // 361 // NOTE: FFI_USE_Pinned MUST be set to true to make this field effective. 362 Pinned bool 363 // Selected is "CreateArgCreateProperties.selected" 364 // 365 // Optional 366 // 367 // NOTE: FFI_USE_Selected MUST be set to true to make this field effective. 368 Selected bool 369 // Url is "CreateArgCreateProperties.url" 370 // 371 // Optional 372 Url js.String 373 // WindowId is "CreateArgCreateProperties.windowId" 374 // 375 // Optional 376 // 377 // NOTE: FFI_USE_WindowId MUST be set to true to make this field effective. 378 WindowId int64 379 380 FFI_USE_Active bool // for Active. 381 FFI_USE_Index bool // for Index. 382 FFI_USE_OpenerTabId bool // for OpenerTabId. 383 FFI_USE_Pinned bool // for Pinned. 384 FFI_USE_Selected bool // for Selected. 385 FFI_USE_WindowId bool // for WindowId. 386 387 FFI_USE bool 388 } 389 390 // FromRef calls UpdateFrom and returns a CreateArgCreateProperties with all fields set. 391 func (p CreateArgCreateProperties) FromRef(ref js.Ref) CreateArgCreateProperties { 392 p.UpdateFrom(ref) 393 return p 394 } 395 396 // New creates a new CreateArgCreateProperties in the application heap. 397 func (p CreateArgCreateProperties) New() js.Ref { 398 return bindings.CreateArgCreatePropertiesJSLoad( 399 js.Pointer(&p), js.True, 0, 400 ) 401 } 402 403 // UpdateFrom copies value of all fields of the heap object to p. 404 func (p *CreateArgCreateProperties) UpdateFrom(ref js.Ref) { 405 bindings.CreateArgCreatePropertiesJSStore( 406 js.Pointer(p), ref, 407 ) 408 } 409 410 // Update writes all fields of the p to the heap object referenced by ref. 411 func (p *CreateArgCreateProperties) Update(ref js.Ref) { 412 bindings.CreateArgCreatePropertiesJSLoad( 413 js.Pointer(p), js.False, ref, 414 ) 415 } 416 417 // FreeMembers frees fields with heap reference, if recursive is true 418 // free all heap references reachable from p. 419 func (p *CreateArgCreateProperties) FreeMembers(recursive bool) { 420 js.Free( 421 p.Url.Ref(), 422 ) 423 p.Url = p.Url.FromRef(js.Undefined) 424 } 425 426 type GroupArgOptionsFieldCreateProperties struct { 427 // WindowId is "GroupArgOptionsFieldCreateProperties.windowId" 428 // 429 // Optional 430 // 431 // NOTE: FFI_USE_WindowId MUST be set to true to make this field effective. 432 WindowId int64 433 434 FFI_USE_WindowId bool // for WindowId. 435 436 FFI_USE bool 437 } 438 439 // FromRef calls UpdateFrom and returns a GroupArgOptionsFieldCreateProperties with all fields set. 440 func (p GroupArgOptionsFieldCreateProperties) FromRef(ref js.Ref) GroupArgOptionsFieldCreateProperties { 441 p.UpdateFrom(ref) 442 return p 443 } 444 445 // New creates a new GroupArgOptionsFieldCreateProperties in the application heap. 446 func (p GroupArgOptionsFieldCreateProperties) New() js.Ref { 447 return bindings.GroupArgOptionsFieldCreatePropertiesJSLoad( 448 js.Pointer(&p), js.True, 0, 449 ) 450 } 451 452 // UpdateFrom copies value of all fields of the heap object to p. 453 func (p *GroupArgOptionsFieldCreateProperties) UpdateFrom(ref js.Ref) { 454 bindings.GroupArgOptionsFieldCreatePropertiesJSStore( 455 js.Pointer(p), ref, 456 ) 457 } 458 459 // Update writes all fields of the p to the heap object referenced by ref. 460 func (p *GroupArgOptionsFieldCreateProperties) Update(ref js.Ref) { 461 bindings.GroupArgOptionsFieldCreatePropertiesJSLoad( 462 js.Pointer(p), js.False, ref, 463 ) 464 } 465 466 // FreeMembers frees fields with heap reference, if recursive is true 467 // free all heap references reachable from p. 468 func (p *GroupArgOptionsFieldCreateProperties) FreeMembers(recursive bool) { 469 } 470 471 type OneOf_Int64_ArrayInt64 struct { 472 ref js.Ref 473 } 474 475 func (x OneOf_Int64_ArrayInt64) Ref() js.Ref { 476 return x.ref 477 } 478 479 func (x OneOf_Int64_ArrayInt64) Free() { 480 x.ref.Free() 481 } 482 483 func (x OneOf_Int64_ArrayInt64) FromRef(ref js.Ref) OneOf_Int64_ArrayInt64 { 484 return OneOf_Int64_ArrayInt64{ 485 ref: ref, 486 } 487 } 488 489 func (x OneOf_Int64_ArrayInt64) Int64() int64 { 490 return js.BigInt[int64]{}.FromRef(x.ref).Get() 491 } 492 493 func (x OneOf_Int64_ArrayInt64) ArrayInt64() js.Array[int64] { 494 return js.Array[int64]{}.FromRef(x.ref) 495 } 496 497 type GroupArgOptions struct { 498 // CreateProperties is "GroupArgOptions.createProperties" 499 // 500 // Optional 501 // 502 // NOTE: CreateProperties.FFI_USE MUST be set to true to get CreateProperties used. 503 CreateProperties GroupArgOptionsFieldCreateProperties 504 // GroupId is "GroupArgOptions.groupId" 505 // 506 // Optional 507 // 508 // NOTE: FFI_USE_GroupId MUST be set to true to make this field effective. 509 GroupId int64 510 // TabIds is "GroupArgOptions.tabIds" 511 // 512 // Required 513 TabIds OneOf_Int64_ArrayInt64 514 515 FFI_USE_GroupId bool // for GroupId. 516 517 FFI_USE bool 518 } 519 520 // FromRef calls UpdateFrom and returns a GroupArgOptions with all fields set. 521 func (p GroupArgOptions) FromRef(ref js.Ref) GroupArgOptions { 522 p.UpdateFrom(ref) 523 return p 524 } 525 526 // New creates a new GroupArgOptions in the application heap. 527 func (p GroupArgOptions) New() js.Ref { 528 return bindings.GroupArgOptionsJSLoad( 529 js.Pointer(&p), js.True, 0, 530 ) 531 } 532 533 // UpdateFrom copies value of all fields of the heap object to p. 534 func (p *GroupArgOptions) UpdateFrom(ref js.Ref) { 535 bindings.GroupArgOptionsJSStore( 536 js.Pointer(p), ref, 537 ) 538 } 539 540 // Update writes all fields of the p to the heap object referenced by ref. 541 func (p *GroupArgOptions) Update(ref js.Ref) { 542 bindings.GroupArgOptionsJSLoad( 543 js.Pointer(p), js.False, ref, 544 ) 545 } 546 547 // FreeMembers frees fields with heap reference, if recursive is true 548 // free all heap references reachable from p. 549 func (p *GroupArgOptions) FreeMembers(recursive bool) { 550 js.Free( 551 p.TabIds.Ref(), 552 ) 553 p.TabIds = p.TabIds.FromRef(js.Undefined) 554 if recursive { 555 p.CreateProperties.FreeMembers(true) 556 } 557 } 558 559 type OneOf_ArrayInt64_Int64 struct { 560 ref js.Ref 561 } 562 563 func (x OneOf_ArrayInt64_Int64) Ref() js.Ref { 564 return x.ref 565 } 566 567 func (x OneOf_ArrayInt64_Int64) Free() { 568 x.ref.Free() 569 } 570 571 func (x OneOf_ArrayInt64_Int64) FromRef(ref js.Ref) OneOf_ArrayInt64_Int64 { 572 return OneOf_ArrayInt64_Int64{ 573 ref: ref, 574 } 575 } 576 577 func (x OneOf_ArrayInt64_Int64) ArrayInt64() js.Array[int64] { 578 return js.Array[int64]{}.FromRef(x.ref) 579 } 580 581 func (x OneOf_ArrayInt64_Int64) Int64() int64 { 582 return js.BigInt[int64]{}.FromRef(x.ref).Get() 583 } 584 585 type HighlightArgHighlightInfo struct { 586 // Tabs is "HighlightArgHighlightInfo.tabs" 587 // 588 // Required 589 Tabs OneOf_ArrayInt64_Int64 590 // WindowId is "HighlightArgHighlightInfo.windowId" 591 // 592 // Optional 593 // 594 // NOTE: FFI_USE_WindowId MUST be set to true to make this field effective. 595 WindowId int64 596 597 FFI_USE_WindowId bool // for WindowId. 598 599 FFI_USE bool 600 } 601 602 // FromRef calls UpdateFrom and returns a HighlightArgHighlightInfo with all fields set. 603 func (p HighlightArgHighlightInfo) FromRef(ref js.Ref) HighlightArgHighlightInfo { 604 p.UpdateFrom(ref) 605 return p 606 } 607 608 // New creates a new HighlightArgHighlightInfo in the application heap. 609 func (p HighlightArgHighlightInfo) New() js.Ref { 610 return bindings.HighlightArgHighlightInfoJSLoad( 611 js.Pointer(&p), js.True, 0, 612 ) 613 } 614 615 // UpdateFrom copies value of all fields of the heap object to p. 616 func (p *HighlightArgHighlightInfo) UpdateFrom(ref js.Ref) { 617 bindings.HighlightArgHighlightInfoJSStore( 618 js.Pointer(p), ref, 619 ) 620 } 621 622 // Update writes all fields of the p to the heap object referenced by ref. 623 func (p *HighlightArgHighlightInfo) Update(ref js.Ref) { 624 bindings.HighlightArgHighlightInfoJSLoad( 625 js.Pointer(p), js.False, ref, 626 ) 627 } 628 629 // FreeMembers frees fields with heap reference, if recursive is true 630 // free all heap references reachable from p. 631 func (p *HighlightArgHighlightInfo) FreeMembers(recursive bool) { 632 js.Free( 633 p.Tabs.Ref(), 634 ) 635 p.Tabs = p.Tabs.FromRef(js.Undefined) 636 } 637 638 // MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND returns the value of property "WEBEXT.tabs.MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND". 639 // 640 // The returned bool will be false if there is no such property. 641 func MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND() (ret js.String, ok bool) { 642 ok = js.True == bindings.GetMAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND( 643 js.Pointer(&ret), 644 ) 645 646 return 647 } 648 649 // SetMAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND sets the value of property "WEBEXT.tabs.MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND" to val. 650 // 651 // It returns false if the property cannot be set. 652 func SetMAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND(val js.String) bool { 653 return js.True == bindings.SetMAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND( 654 val.Ref()) 655 } 656 657 type MoveArgMoveProperties struct { 658 // Index is "MoveArgMoveProperties.index" 659 // 660 // Required 661 Index int64 662 // WindowId is "MoveArgMoveProperties.windowId" 663 // 664 // Optional 665 // 666 // NOTE: FFI_USE_WindowId MUST be set to true to make this field effective. 667 WindowId int64 668 669 FFI_USE_WindowId bool // for WindowId. 670 671 FFI_USE bool 672 } 673 674 // FromRef calls UpdateFrom and returns a MoveArgMoveProperties with all fields set. 675 func (p MoveArgMoveProperties) FromRef(ref js.Ref) MoveArgMoveProperties { 676 p.UpdateFrom(ref) 677 return p 678 } 679 680 // New creates a new MoveArgMoveProperties in the application heap. 681 func (p MoveArgMoveProperties) New() js.Ref { 682 return bindings.MoveArgMovePropertiesJSLoad( 683 js.Pointer(&p), js.True, 0, 684 ) 685 } 686 687 // UpdateFrom copies value of all fields of the heap object to p. 688 func (p *MoveArgMoveProperties) UpdateFrom(ref js.Ref) { 689 bindings.MoveArgMovePropertiesJSStore( 690 js.Pointer(p), ref, 691 ) 692 } 693 694 // Update writes all fields of the p to the heap object referenced by ref. 695 func (p *MoveArgMoveProperties) Update(ref js.Ref) { 696 bindings.MoveArgMovePropertiesJSLoad( 697 js.Pointer(p), js.False, ref, 698 ) 699 } 700 701 // FreeMembers frees fields with heap reference, if recursive is true 702 // free all heap references reachable from p. 703 func (p *MoveArgMoveProperties) FreeMembers(recursive bool) { 704 } 705 706 type OnActivatedArgActiveInfo struct { 707 // TabId is "OnActivatedArgActiveInfo.tabId" 708 // 709 // Required 710 TabId int64 711 // WindowId is "OnActivatedArgActiveInfo.windowId" 712 // 713 // Required 714 WindowId int64 715 716 FFI_USE bool 717 } 718 719 // FromRef calls UpdateFrom and returns a OnActivatedArgActiveInfo with all fields set. 720 func (p OnActivatedArgActiveInfo) FromRef(ref js.Ref) OnActivatedArgActiveInfo { 721 p.UpdateFrom(ref) 722 return p 723 } 724 725 // New creates a new OnActivatedArgActiveInfo in the application heap. 726 func (p OnActivatedArgActiveInfo) New() js.Ref { 727 return bindings.OnActivatedArgActiveInfoJSLoad( 728 js.Pointer(&p), js.True, 0, 729 ) 730 } 731 732 // UpdateFrom copies value of all fields of the heap object to p. 733 func (p *OnActivatedArgActiveInfo) UpdateFrom(ref js.Ref) { 734 bindings.OnActivatedArgActiveInfoJSStore( 735 js.Pointer(p), ref, 736 ) 737 } 738 739 // Update writes all fields of the p to the heap object referenced by ref. 740 func (p *OnActivatedArgActiveInfo) Update(ref js.Ref) { 741 bindings.OnActivatedArgActiveInfoJSLoad( 742 js.Pointer(p), js.False, ref, 743 ) 744 } 745 746 // FreeMembers frees fields with heap reference, if recursive is true 747 // free all heap references reachable from p. 748 func (p *OnActivatedArgActiveInfo) FreeMembers(recursive bool) { 749 } 750 751 type OnActiveChangedArgSelectInfo struct { 752 // WindowId is "OnActiveChangedArgSelectInfo.windowId" 753 // 754 // Required 755 WindowId int64 756 757 FFI_USE bool 758 } 759 760 // FromRef calls UpdateFrom and returns a OnActiveChangedArgSelectInfo with all fields set. 761 func (p OnActiveChangedArgSelectInfo) FromRef(ref js.Ref) OnActiveChangedArgSelectInfo { 762 p.UpdateFrom(ref) 763 return p 764 } 765 766 // New creates a new OnActiveChangedArgSelectInfo in the application heap. 767 func (p OnActiveChangedArgSelectInfo) New() js.Ref { 768 return bindings.OnActiveChangedArgSelectInfoJSLoad( 769 js.Pointer(&p), js.True, 0, 770 ) 771 } 772 773 // UpdateFrom copies value of all fields of the heap object to p. 774 func (p *OnActiveChangedArgSelectInfo) UpdateFrom(ref js.Ref) { 775 bindings.OnActiveChangedArgSelectInfoJSStore( 776 js.Pointer(p), ref, 777 ) 778 } 779 780 // Update writes all fields of the p to the heap object referenced by ref. 781 func (p *OnActiveChangedArgSelectInfo) Update(ref js.Ref) { 782 bindings.OnActiveChangedArgSelectInfoJSLoad( 783 js.Pointer(p), js.False, ref, 784 ) 785 } 786 787 // FreeMembers frees fields with heap reference, if recursive is true 788 // free all heap references reachable from p. 789 func (p *OnActiveChangedArgSelectInfo) FreeMembers(recursive bool) { 790 } 791 792 type OnAttachedArgAttachInfo struct { 793 // NewPosition is "OnAttachedArgAttachInfo.newPosition" 794 // 795 // Required 796 NewPosition int64 797 // NewWindowId is "OnAttachedArgAttachInfo.newWindowId" 798 // 799 // Required 800 NewWindowId int64 801 802 FFI_USE bool 803 } 804 805 // FromRef calls UpdateFrom and returns a OnAttachedArgAttachInfo with all fields set. 806 func (p OnAttachedArgAttachInfo) FromRef(ref js.Ref) OnAttachedArgAttachInfo { 807 p.UpdateFrom(ref) 808 return p 809 } 810 811 // New creates a new OnAttachedArgAttachInfo in the application heap. 812 func (p OnAttachedArgAttachInfo) New() js.Ref { 813 return bindings.OnAttachedArgAttachInfoJSLoad( 814 js.Pointer(&p), js.True, 0, 815 ) 816 } 817 818 // UpdateFrom copies value of all fields of the heap object to p. 819 func (p *OnAttachedArgAttachInfo) UpdateFrom(ref js.Ref) { 820 bindings.OnAttachedArgAttachInfoJSStore( 821 js.Pointer(p), ref, 822 ) 823 } 824 825 // Update writes all fields of the p to the heap object referenced by ref. 826 func (p *OnAttachedArgAttachInfo) Update(ref js.Ref) { 827 bindings.OnAttachedArgAttachInfoJSLoad( 828 js.Pointer(p), js.False, ref, 829 ) 830 } 831 832 // FreeMembers frees fields with heap reference, if recursive is true 833 // free all heap references reachable from p. 834 func (p *OnAttachedArgAttachInfo) FreeMembers(recursive bool) { 835 } 836 837 type OnDetachedArgDetachInfo struct { 838 // OldPosition is "OnDetachedArgDetachInfo.oldPosition" 839 // 840 // Required 841 OldPosition int64 842 // OldWindowId is "OnDetachedArgDetachInfo.oldWindowId" 843 // 844 // Required 845 OldWindowId int64 846 847 FFI_USE bool 848 } 849 850 // FromRef calls UpdateFrom and returns a OnDetachedArgDetachInfo with all fields set. 851 func (p OnDetachedArgDetachInfo) FromRef(ref js.Ref) OnDetachedArgDetachInfo { 852 p.UpdateFrom(ref) 853 return p 854 } 855 856 // New creates a new OnDetachedArgDetachInfo in the application heap. 857 func (p OnDetachedArgDetachInfo) New() js.Ref { 858 return bindings.OnDetachedArgDetachInfoJSLoad( 859 js.Pointer(&p), js.True, 0, 860 ) 861 } 862 863 // UpdateFrom copies value of all fields of the heap object to p. 864 func (p *OnDetachedArgDetachInfo) UpdateFrom(ref js.Ref) { 865 bindings.OnDetachedArgDetachInfoJSStore( 866 js.Pointer(p), ref, 867 ) 868 } 869 870 // Update writes all fields of the p to the heap object referenced by ref. 871 func (p *OnDetachedArgDetachInfo) Update(ref js.Ref) { 872 bindings.OnDetachedArgDetachInfoJSLoad( 873 js.Pointer(p), js.False, ref, 874 ) 875 } 876 877 // FreeMembers frees fields with heap reference, if recursive is true 878 // free all heap references reachable from p. 879 func (p *OnDetachedArgDetachInfo) FreeMembers(recursive bool) { 880 } 881 882 type OnHighlightChangedArgSelectInfo struct { 883 // TabIds is "OnHighlightChangedArgSelectInfo.tabIds" 884 // 885 // Required 886 TabIds js.Array[int64] 887 // WindowId is "OnHighlightChangedArgSelectInfo.windowId" 888 // 889 // Required 890 WindowId int64 891 892 FFI_USE bool 893 } 894 895 // FromRef calls UpdateFrom and returns a OnHighlightChangedArgSelectInfo with all fields set. 896 func (p OnHighlightChangedArgSelectInfo) FromRef(ref js.Ref) OnHighlightChangedArgSelectInfo { 897 p.UpdateFrom(ref) 898 return p 899 } 900 901 // New creates a new OnHighlightChangedArgSelectInfo in the application heap. 902 func (p OnHighlightChangedArgSelectInfo) New() js.Ref { 903 return bindings.OnHighlightChangedArgSelectInfoJSLoad( 904 js.Pointer(&p), js.True, 0, 905 ) 906 } 907 908 // UpdateFrom copies value of all fields of the heap object to p. 909 func (p *OnHighlightChangedArgSelectInfo) UpdateFrom(ref js.Ref) { 910 bindings.OnHighlightChangedArgSelectInfoJSStore( 911 js.Pointer(p), ref, 912 ) 913 } 914 915 // Update writes all fields of the p to the heap object referenced by ref. 916 func (p *OnHighlightChangedArgSelectInfo) Update(ref js.Ref) { 917 bindings.OnHighlightChangedArgSelectInfoJSLoad( 918 js.Pointer(p), js.False, ref, 919 ) 920 } 921 922 // FreeMembers frees fields with heap reference, if recursive is true 923 // free all heap references reachable from p. 924 func (p *OnHighlightChangedArgSelectInfo) FreeMembers(recursive bool) { 925 js.Free( 926 p.TabIds.Ref(), 927 ) 928 p.TabIds = p.TabIds.FromRef(js.Undefined) 929 } 930 931 type OnHighlightedArgHighlightInfo struct { 932 // TabIds is "OnHighlightedArgHighlightInfo.tabIds" 933 // 934 // Required 935 TabIds js.Array[int64] 936 // WindowId is "OnHighlightedArgHighlightInfo.windowId" 937 // 938 // Required 939 WindowId int64 940 941 FFI_USE bool 942 } 943 944 // FromRef calls UpdateFrom and returns a OnHighlightedArgHighlightInfo with all fields set. 945 func (p OnHighlightedArgHighlightInfo) FromRef(ref js.Ref) OnHighlightedArgHighlightInfo { 946 p.UpdateFrom(ref) 947 return p 948 } 949 950 // New creates a new OnHighlightedArgHighlightInfo in the application heap. 951 func (p OnHighlightedArgHighlightInfo) New() js.Ref { 952 return bindings.OnHighlightedArgHighlightInfoJSLoad( 953 js.Pointer(&p), js.True, 0, 954 ) 955 } 956 957 // UpdateFrom copies value of all fields of the heap object to p. 958 func (p *OnHighlightedArgHighlightInfo) UpdateFrom(ref js.Ref) { 959 bindings.OnHighlightedArgHighlightInfoJSStore( 960 js.Pointer(p), ref, 961 ) 962 } 963 964 // Update writes all fields of the p to the heap object referenced by ref. 965 func (p *OnHighlightedArgHighlightInfo) Update(ref js.Ref) { 966 bindings.OnHighlightedArgHighlightInfoJSLoad( 967 js.Pointer(p), js.False, ref, 968 ) 969 } 970 971 // FreeMembers frees fields with heap reference, if recursive is true 972 // free all heap references reachable from p. 973 func (p *OnHighlightedArgHighlightInfo) FreeMembers(recursive bool) { 974 js.Free( 975 p.TabIds.Ref(), 976 ) 977 p.TabIds = p.TabIds.FromRef(js.Undefined) 978 } 979 980 type OnMovedArgMoveInfo struct { 981 // FromIndex is "OnMovedArgMoveInfo.fromIndex" 982 // 983 // Required 984 FromIndex int64 985 // ToIndex is "OnMovedArgMoveInfo.toIndex" 986 // 987 // Required 988 ToIndex int64 989 // WindowId is "OnMovedArgMoveInfo.windowId" 990 // 991 // Required 992 WindowId int64 993 994 FFI_USE bool 995 } 996 997 // FromRef calls UpdateFrom and returns a OnMovedArgMoveInfo with all fields set. 998 func (p OnMovedArgMoveInfo) FromRef(ref js.Ref) OnMovedArgMoveInfo { 999 p.UpdateFrom(ref) 1000 return p 1001 } 1002 1003 // New creates a new OnMovedArgMoveInfo in the application heap. 1004 func (p OnMovedArgMoveInfo) New() js.Ref { 1005 return bindings.OnMovedArgMoveInfoJSLoad( 1006 js.Pointer(&p), js.True, 0, 1007 ) 1008 } 1009 1010 // UpdateFrom copies value of all fields of the heap object to p. 1011 func (p *OnMovedArgMoveInfo) UpdateFrom(ref js.Ref) { 1012 bindings.OnMovedArgMoveInfoJSStore( 1013 js.Pointer(p), ref, 1014 ) 1015 } 1016 1017 // Update writes all fields of the p to the heap object referenced by ref. 1018 func (p *OnMovedArgMoveInfo) Update(ref js.Ref) { 1019 bindings.OnMovedArgMoveInfoJSLoad( 1020 js.Pointer(p), js.False, ref, 1021 ) 1022 } 1023 1024 // FreeMembers frees fields with heap reference, if recursive is true 1025 // free all heap references reachable from p. 1026 func (p *OnMovedArgMoveInfo) FreeMembers(recursive bool) { 1027 } 1028 1029 type OnRemovedArgRemoveInfo struct { 1030 // IsWindowClosing is "OnRemovedArgRemoveInfo.isWindowClosing" 1031 // 1032 // Required 1033 IsWindowClosing bool 1034 // WindowId is "OnRemovedArgRemoveInfo.windowId" 1035 // 1036 // Required 1037 WindowId int64 1038 1039 FFI_USE bool 1040 } 1041 1042 // FromRef calls UpdateFrom and returns a OnRemovedArgRemoveInfo with all fields set. 1043 func (p OnRemovedArgRemoveInfo) FromRef(ref js.Ref) OnRemovedArgRemoveInfo { 1044 p.UpdateFrom(ref) 1045 return p 1046 } 1047 1048 // New creates a new OnRemovedArgRemoveInfo in the application heap. 1049 func (p OnRemovedArgRemoveInfo) New() js.Ref { 1050 return bindings.OnRemovedArgRemoveInfoJSLoad( 1051 js.Pointer(&p), js.True, 0, 1052 ) 1053 } 1054 1055 // UpdateFrom copies value of all fields of the heap object to p. 1056 func (p *OnRemovedArgRemoveInfo) UpdateFrom(ref js.Ref) { 1057 bindings.OnRemovedArgRemoveInfoJSStore( 1058 js.Pointer(p), ref, 1059 ) 1060 } 1061 1062 // Update writes all fields of the p to the heap object referenced by ref. 1063 func (p *OnRemovedArgRemoveInfo) Update(ref js.Ref) { 1064 bindings.OnRemovedArgRemoveInfoJSLoad( 1065 js.Pointer(p), js.False, ref, 1066 ) 1067 } 1068 1069 // FreeMembers frees fields with heap reference, if recursive is true 1070 // free all heap references reachable from p. 1071 func (p *OnRemovedArgRemoveInfo) FreeMembers(recursive bool) { 1072 } 1073 1074 type OnSelectionChangedArgSelectInfo struct { 1075 // WindowId is "OnSelectionChangedArgSelectInfo.windowId" 1076 // 1077 // Required 1078 WindowId int64 1079 1080 FFI_USE bool 1081 } 1082 1083 // FromRef calls UpdateFrom and returns a OnSelectionChangedArgSelectInfo with all fields set. 1084 func (p OnSelectionChangedArgSelectInfo) FromRef(ref js.Ref) OnSelectionChangedArgSelectInfo { 1085 p.UpdateFrom(ref) 1086 return p 1087 } 1088 1089 // New creates a new OnSelectionChangedArgSelectInfo in the application heap. 1090 func (p OnSelectionChangedArgSelectInfo) New() js.Ref { 1091 return bindings.OnSelectionChangedArgSelectInfoJSLoad( 1092 js.Pointer(&p), js.True, 0, 1093 ) 1094 } 1095 1096 // UpdateFrom copies value of all fields of the heap object to p. 1097 func (p *OnSelectionChangedArgSelectInfo) UpdateFrom(ref js.Ref) { 1098 bindings.OnSelectionChangedArgSelectInfoJSStore( 1099 js.Pointer(p), ref, 1100 ) 1101 } 1102 1103 // Update writes all fields of the p to the heap object referenced by ref. 1104 func (p *OnSelectionChangedArgSelectInfo) Update(ref js.Ref) { 1105 bindings.OnSelectionChangedArgSelectInfoJSLoad( 1106 js.Pointer(p), js.False, ref, 1107 ) 1108 } 1109 1110 // FreeMembers frees fields with heap reference, if recursive is true 1111 // free all heap references reachable from p. 1112 func (p *OnSelectionChangedArgSelectInfo) FreeMembers(recursive bool) { 1113 } 1114 1115 type OnUpdatedArgChangeInfo struct { 1116 // Audible is "OnUpdatedArgChangeInfo.audible" 1117 // 1118 // Optional 1119 // 1120 // NOTE: FFI_USE_Audible MUST be set to true to make this field effective. 1121 Audible bool 1122 // AutoDiscardable is "OnUpdatedArgChangeInfo.autoDiscardable" 1123 // 1124 // Optional 1125 // 1126 // NOTE: FFI_USE_AutoDiscardable MUST be set to true to make this field effective. 1127 AutoDiscardable bool 1128 // Discarded is "OnUpdatedArgChangeInfo.discarded" 1129 // 1130 // Optional 1131 // 1132 // NOTE: FFI_USE_Discarded MUST be set to true to make this field effective. 1133 Discarded bool 1134 // FavIconUrl is "OnUpdatedArgChangeInfo.favIconUrl" 1135 // 1136 // Optional 1137 FavIconUrl js.String 1138 // GroupId is "OnUpdatedArgChangeInfo.groupId" 1139 // 1140 // Optional 1141 // 1142 // NOTE: FFI_USE_GroupId MUST be set to true to make this field effective. 1143 GroupId int64 1144 // MutedInfo is "OnUpdatedArgChangeInfo.mutedInfo" 1145 // 1146 // Optional 1147 // 1148 // NOTE: MutedInfo.FFI_USE MUST be set to true to get MutedInfo used. 1149 MutedInfo MutedInfo 1150 // Pinned is "OnUpdatedArgChangeInfo.pinned" 1151 // 1152 // Optional 1153 // 1154 // NOTE: FFI_USE_Pinned MUST be set to true to make this field effective. 1155 Pinned bool 1156 // Status is "OnUpdatedArgChangeInfo.status" 1157 // 1158 // Optional 1159 Status TabStatus 1160 // Title is "OnUpdatedArgChangeInfo.title" 1161 // 1162 // Optional 1163 Title js.String 1164 // Url is "OnUpdatedArgChangeInfo.url" 1165 // 1166 // Optional 1167 Url js.String 1168 1169 FFI_USE_Audible bool // for Audible. 1170 FFI_USE_AutoDiscardable bool // for AutoDiscardable. 1171 FFI_USE_Discarded bool // for Discarded. 1172 FFI_USE_GroupId bool // for GroupId. 1173 FFI_USE_Pinned bool // for Pinned. 1174 1175 FFI_USE bool 1176 } 1177 1178 // FromRef calls UpdateFrom and returns a OnUpdatedArgChangeInfo with all fields set. 1179 func (p OnUpdatedArgChangeInfo) FromRef(ref js.Ref) OnUpdatedArgChangeInfo { 1180 p.UpdateFrom(ref) 1181 return p 1182 } 1183 1184 // New creates a new OnUpdatedArgChangeInfo in the application heap. 1185 func (p OnUpdatedArgChangeInfo) New() js.Ref { 1186 return bindings.OnUpdatedArgChangeInfoJSLoad( 1187 js.Pointer(&p), js.True, 0, 1188 ) 1189 } 1190 1191 // UpdateFrom copies value of all fields of the heap object to p. 1192 func (p *OnUpdatedArgChangeInfo) UpdateFrom(ref js.Ref) { 1193 bindings.OnUpdatedArgChangeInfoJSStore( 1194 js.Pointer(p), ref, 1195 ) 1196 } 1197 1198 // Update writes all fields of the p to the heap object referenced by ref. 1199 func (p *OnUpdatedArgChangeInfo) Update(ref js.Ref) { 1200 bindings.OnUpdatedArgChangeInfoJSLoad( 1201 js.Pointer(p), js.False, ref, 1202 ) 1203 } 1204 1205 // FreeMembers frees fields with heap reference, if recursive is true 1206 // free all heap references reachable from p. 1207 func (p *OnUpdatedArgChangeInfo) FreeMembers(recursive bool) { 1208 js.Free( 1209 p.FavIconUrl.Ref(), 1210 p.Title.Ref(), 1211 p.Url.Ref(), 1212 ) 1213 p.FavIconUrl = p.FavIconUrl.FromRef(js.Undefined) 1214 p.Title = p.Title.FromRef(js.Undefined) 1215 p.Url = p.Url.FromRef(js.Undefined) 1216 if recursive { 1217 p.MutedInfo.FreeMembers(true) 1218 } 1219 } 1220 1221 type ZoomSettingsMode uint32 1222 1223 const ( 1224 _ ZoomSettingsMode = iota 1225 1226 ZoomSettingsMode_AUTOMATIC 1227 ZoomSettingsMode_MANUAL 1228 ZoomSettingsMode_DISABLED 1229 ) 1230 1231 func (ZoomSettingsMode) FromRef(str js.Ref) ZoomSettingsMode { 1232 return ZoomSettingsMode(bindings.ConstOfZoomSettingsMode(str)) 1233 } 1234 1235 func (x ZoomSettingsMode) String() (string, bool) { 1236 switch x { 1237 case ZoomSettingsMode_AUTOMATIC: 1238 return "automatic", true 1239 case ZoomSettingsMode_MANUAL: 1240 return "manual", true 1241 case ZoomSettingsMode_DISABLED: 1242 return "disabled", true 1243 default: 1244 return "", false 1245 } 1246 } 1247 1248 type ZoomSettingsScope uint32 1249 1250 const ( 1251 _ ZoomSettingsScope = iota 1252 1253 ZoomSettingsScope_PER_ORIGIN 1254 ZoomSettingsScope_PER_TAB 1255 ) 1256 1257 func (ZoomSettingsScope) FromRef(str js.Ref) ZoomSettingsScope { 1258 return ZoomSettingsScope(bindings.ConstOfZoomSettingsScope(str)) 1259 } 1260 1261 func (x ZoomSettingsScope) String() (string, bool) { 1262 switch x { 1263 case ZoomSettingsScope_PER_ORIGIN: 1264 return "per-origin", true 1265 case ZoomSettingsScope_PER_TAB: 1266 return "per-tab", true 1267 default: 1268 return "", false 1269 } 1270 } 1271 1272 type ZoomSettings struct { 1273 // DefaultZoomFactor is "ZoomSettings.defaultZoomFactor" 1274 // 1275 // Optional 1276 // 1277 // NOTE: FFI_USE_DefaultZoomFactor MUST be set to true to make this field effective. 1278 DefaultZoomFactor float64 1279 // Mode is "ZoomSettings.mode" 1280 // 1281 // Optional 1282 Mode ZoomSettingsMode 1283 // Scope is "ZoomSettings.scope" 1284 // 1285 // Optional 1286 Scope ZoomSettingsScope 1287 1288 FFI_USE_DefaultZoomFactor bool // for DefaultZoomFactor. 1289 1290 FFI_USE bool 1291 } 1292 1293 // FromRef calls UpdateFrom and returns a ZoomSettings with all fields set. 1294 func (p ZoomSettings) FromRef(ref js.Ref) ZoomSettings { 1295 p.UpdateFrom(ref) 1296 return p 1297 } 1298 1299 // New creates a new ZoomSettings in the application heap. 1300 func (p ZoomSettings) New() js.Ref { 1301 return bindings.ZoomSettingsJSLoad( 1302 js.Pointer(&p), js.True, 0, 1303 ) 1304 } 1305 1306 // UpdateFrom copies value of all fields of the heap object to p. 1307 func (p *ZoomSettings) UpdateFrom(ref js.Ref) { 1308 bindings.ZoomSettingsJSStore( 1309 js.Pointer(p), ref, 1310 ) 1311 } 1312 1313 // Update writes all fields of the p to the heap object referenced by ref. 1314 func (p *ZoomSettings) Update(ref js.Ref) { 1315 bindings.ZoomSettingsJSLoad( 1316 js.Pointer(p), js.False, ref, 1317 ) 1318 } 1319 1320 // FreeMembers frees fields with heap reference, if recursive is true 1321 // free all heap references reachable from p. 1322 func (p *ZoomSettings) FreeMembers(recursive bool) { 1323 } 1324 1325 type OnZoomChangeArgZoomChangeInfo struct { 1326 // NewZoomFactor is "OnZoomChangeArgZoomChangeInfo.newZoomFactor" 1327 // 1328 // Required 1329 NewZoomFactor float64 1330 // OldZoomFactor is "OnZoomChangeArgZoomChangeInfo.oldZoomFactor" 1331 // 1332 // Required 1333 OldZoomFactor float64 1334 // TabId is "OnZoomChangeArgZoomChangeInfo.tabId" 1335 // 1336 // Required 1337 TabId int64 1338 // ZoomSettings is "OnZoomChangeArgZoomChangeInfo.zoomSettings" 1339 // 1340 // Required 1341 // 1342 // NOTE: ZoomSettings.FFI_USE MUST be set to true to get ZoomSettings used. 1343 ZoomSettings ZoomSettings 1344 1345 FFI_USE bool 1346 } 1347 1348 // FromRef calls UpdateFrom and returns a OnZoomChangeArgZoomChangeInfo with all fields set. 1349 func (p OnZoomChangeArgZoomChangeInfo) FromRef(ref js.Ref) OnZoomChangeArgZoomChangeInfo { 1350 p.UpdateFrom(ref) 1351 return p 1352 } 1353 1354 // New creates a new OnZoomChangeArgZoomChangeInfo in the application heap. 1355 func (p OnZoomChangeArgZoomChangeInfo) New() js.Ref { 1356 return bindings.OnZoomChangeArgZoomChangeInfoJSLoad( 1357 js.Pointer(&p), js.True, 0, 1358 ) 1359 } 1360 1361 // UpdateFrom copies value of all fields of the heap object to p. 1362 func (p *OnZoomChangeArgZoomChangeInfo) UpdateFrom(ref js.Ref) { 1363 bindings.OnZoomChangeArgZoomChangeInfoJSStore( 1364 js.Pointer(p), ref, 1365 ) 1366 } 1367 1368 // Update writes all fields of the p to the heap object referenced by ref. 1369 func (p *OnZoomChangeArgZoomChangeInfo) Update(ref js.Ref) { 1370 bindings.OnZoomChangeArgZoomChangeInfoJSLoad( 1371 js.Pointer(p), js.False, ref, 1372 ) 1373 } 1374 1375 // FreeMembers frees fields with heap reference, if recursive is true 1376 // free all heap references reachable from p. 1377 func (p *OnZoomChangeArgZoomChangeInfo) FreeMembers(recursive bool) { 1378 if recursive { 1379 p.ZoomSettings.FreeMembers(true) 1380 } 1381 } 1382 1383 type OneOf_String_ArrayString struct { 1384 ref js.Ref 1385 } 1386 1387 func (x OneOf_String_ArrayString) Ref() js.Ref { 1388 return x.ref 1389 } 1390 1391 func (x OneOf_String_ArrayString) Free() { 1392 x.ref.Free() 1393 } 1394 1395 func (x OneOf_String_ArrayString) FromRef(ref js.Ref) OneOf_String_ArrayString { 1396 return OneOf_String_ArrayString{ 1397 ref: ref, 1398 } 1399 } 1400 1401 func (x OneOf_String_ArrayString) String() js.String { 1402 return js.String{}.FromRef(x.ref) 1403 } 1404 1405 func (x OneOf_String_ArrayString) ArrayString() js.Array[js.String] { 1406 return js.Array[js.String]{}.FromRef(x.ref) 1407 } 1408 1409 type WindowType uint32 1410 1411 const ( 1412 _ WindowType = iota 1413 1414 WindowType_NORMAL 1415 WindowType_POPUP 1416 WindowType_PANEL 1417 WindowType_APP 1418 WindowType_DEVTOOLS 1419 ) 1420 1421 func (WindowType) FromRef(str js.Ref) WindowType { 1422 return WindowType(bindings.ConstOfWindowType(str)) 1423 } 1424 1425 func (x WindowType) String() (string, bool) { 1426 switch x { 1427 case WindowType_NORMAL: 1428 return "normal", true 1429 case WindowType_POPUP: 1430 return "popup", true 1431 case WindowType_PANEL: 1432 return "panel", true 1433 case WindowType_APP: 1434 return "app", true 1435 case WindowType_DEVTOOLS: 1436 return "devtools", true 1437 default: 1438 return "", false 1439 } 1440 } 1441 1442 type QueryArgQueryInfo struct { 1443 // Active is "QueryArgQueryInfo.active" 1444 // 1445 // Optional 1446 // 1447 // NOTE: FFI_USE_Active MUST be set to true to make this field effective. 1448 Active bool 1449 // Audible is "QueryArgQueryInfo.audible" 1450 // 1451 // Optional 1452 // 1453 // NOTE: FFI_USE_Audible MUST be set to true to make this field effective. 1454 Audible bool 1455 // AutoDiscardable is "QueryArgQueryInfo.autoDiscardable" 1456 // 1457 // Optional 1458 // 1459 // NOTE: FFI_USE_AutoDiscardable MUST be set to true to make this field effective. 1460 AutoDiscardable bool 1461 // CurrentWindow is "QueryArgQueryInfo.currentWindow" 1462 // 1463 // Optional 1464 // 1465 // NOTE: FFI_USE_CurrentWindow MUST be set to true to make this field effective. 1466 CurrentWindow bool 1467 // Discarded is "QueryArgQueryInfo.discarded" 1468 // 1469 // Optional 1470 // 1471 // NOTE: FFI_USE_Discarded MUST be set to true to make this field effective. 1472 Discarded bool 1473 // GroupId is "QueryArgQueryInfo.groupId" 1474 // 1475 // Optional 1476 // 1477 // NOTE: FFI_USE_GroupId MUST be set to true to make this field effective. 1478 GroupId int64 1479 // Highlighted is "QueryArgQueryInfo.highlighted" 1480 // 1481 // Optional 1482 // 1483 // NOTE: FFI_USE_Highlighted MUST be set to true to make this field effective. 1484 Highlighted bool 1485 // Index is "QueryArgQueryInfo.index" 1486 // 1487 // Optional 1488 // 1489 // NOTE: FFI_USE_Index MUST be set to true to make this field effective. 1490 Index int64 1491 // LastFocusedWindow is "QueryArgQueryInfo.lastFocusedWindow" 1492 // 1493 // Optional 1494 // 1495 // NOTE: FFI_USE_LastFocusedWindow MUST be set to true to make this field effective. 1496 LastFocusedWindow bool 1497 // Muted is "QueryArgQueryInfo.muted" 1498 // 1499 // Optional 1500 // 1501 // NOTE: FFI_USE_Muted MUST be set to true to make this field effective. 1502 Muted bool 1503 // Pinned is "QueryArgQueryInfo.pinned" 1504 // 1505 // Optional 1506 // 1507 // NOTE: FFI_USE_Pinned MUST be set to true to make this field effective. 1508 Pinned bool 1509 // Status is "QueryArgQueryInfo.status" 1510 // 1511 // Optional 1512 Status TabStatus 1513 // Title is "QueryArgQueryInfo.title" 1514 // 1515 // Optional 1516 Title js.String 1517 // Url is "QueryArgQueryInfo.url" 1518 // 1519 // Optional 1520 Url OneOf_String_ArrayString 1521 // WindowId is "QueryArgQueryInfo.windowId" 1522 // 1523 // Optional 1524 // 1525 // NOTE: FFI_USE_WindowId MUST be set to true to make this field effective. 1526 WindowId int64 1527 // WindowType is "QueryArgQueryInfo.windowType" 1528 // 1529 // Optional 1530 WindowType WindowType 1531 1532 FFI_USE_Active bool // for Active. 1533 FFI_USE_Audible bool // for Audible. 1534 FFI_USE_AutoDiscardable bool // for AutoDiscardable. 1535 FFI_USE_CurrentWindow bool // for CurrentWindow. 1536 FFI_USE_Discarded bool // for Discarded. 1537 FFI_USE_GroupId bool // for GroupId. 1538 FFI_USE_Highlighted bool // for Highlighted. 1539 FFI_USE_Index bool // for Index. 1540 FFI_USE_LastFocusedWindow bool // for LastFocusedWindow. 1541 FFI_USE_Muted bool // for Muted. 1542 FFI_USE_Pinned bool // for Pinned. 1543 FFI_USE_WindowId bool // for WindowId. 1544 1545 FFI_USE bool 1546 } 1547 1548 // FromRef calls UpdateFrom and returns a QueryArgQueryInfo with all fields set. 1549 func (p QueryArgQueryInfo) FromRef(ref js.Ref) QueryArgQueryInfo { 1550 p.UpdateFrom(ref) 1551 return p 1552 } 1553 1554 // New creates a new QueryArgQueryInfo in the application heap. 1555 func (p QueryArgQueryInfo) New() js.Ref { 1556 return bindings.QueryArgQueryInfoJSLoad( 1557 js.Pointer(&p), js.True, 0, 1558 ) 1559 } 1560 1561 // UpdateFrom copies value of all fields of the heap object to p. 1562 func (p *QueryArgQueryInfo) UpdateFrom(ref js.Ref) { 1563 bindings.QueryArgQueryInfoJSStore( 1564 js.Pointer(p), ref, 1565 ) 1566 } 1567 1568 // Update writes all fields of the p to the heap object referenced by ref. 1569 func (p *QueryArgQueryInfo) Update(ref js.Ref) { 1570 bindings.QueryArgQueryInfoJSLoad( 1571 js.Pointer(p), js.False, ref, 1572 ) 1573 } 1574 1575 // FreeMembers frees fields with heap reference, if recursive is true 1576 // free all heap references reachable from p. 1577 func (p *QueryArgQueryInfo) FreeMembers(recursive bool) { 1578 js.Free( 1579 p.Title.Ref(), 1580 p.Url.Ref(), 1581 ) 1582 p.Title = p.Title.FromRef(js.Undefined) 1583 p.Url = p.Url.FromRef(js.Undefined) 1584 } 1585 1586 type ReloadArgReloadProperties struct { 1587 // BypassCache is "ReloadArgReloadProperties.bypassCache" 1588 // 1589 // Optional 1590 // 1591 // NOTE: FFI_USE_BypassCache MUST be set to true to make this field effective. 1592 BypassCache bool 1593 1594 FFI_USE_BypassCache bool // for BypassCache. 1595 1596 FFI_USE bool 1597 } 1598 1599 // FromRef calls UpdateFrom and returns a ReloadArgReloadProperties with all fields set. 1600 func (p ReloadArgReloadProperties) FromRef(ref js.Ref) ReloadArgReloadProperties { 1601 p.UpdateFrom(ref) 1602 return p 1603 } 1604 1605 // New creates a new ReloadArgReloadProperties in the application heap. 1606 func (p ReloadArgReloadProperties) New() js.Ref { 1607 return bindings.ReloadArgReloadPropertiesJSLoad( 1608 js.Pointer(&p), js.True, 0, 1609 ) 1610 } 1611 1612 // UpdateFrom copies value of all fields of the heap object to p. 1613 func (p *ReloadArgReloadProperties) UpdateFrom(ref js.Ref) { 1614 bindings.ReloadArgReloadPropertiesJSStore( 1615 js.Pointer(p), ref, 1616 ) 1617 } 1618 1619 // Update writes all fields of the p to the heap object referenced by ref. 1620 func (p *ReloadArgReloadProperties) Update(ref js.Ref) { 1621 bindings.ReloadArgReloadPropertiesJSLoad( 1622 js.Pointer(p), js.False, ref, 1623 ) 1624 } 1625 1626 // FreeMembers frees fields with heap reference, if recursive is true 1627 // free all heap references reachable from p. 1628 func (p *ReloadArgReloadProperties) FreeMembers(recursive bool) { 1629 } 1630 1631 type SendMessageArgOptions struct { 1632 // DocumentId is "SendMessageArgOptions.documentId" 1633 // 1634 // Optional 1635 DocumentId js.String 1636 // FrameId is "SendMessageArgOptions.frameId" 1637 // 1638 // Optional 1639 // 1640 // NOTE: FFI_USE_FrameId MUST be set to true to make this field effective. 1641 FrameId int64 1642 1643 FFI_USE_FrameId bool // for FrameId. 1644 1645 FFI_USE bool 1646 } 1647 1648 // FromRef calls UpdateFrom and returns a SendMessageArgOptions with all fields set. 1649 func (p SendMessageArgOptions) FromRef(ref js.Ref) SendMessageArgOptions { 1650 p.UpdateFrom(ref) 1651 return p 1652 } 1653 1654 // New creates a new SendMessageArgOptions in the application heap. 1655 func (p SendMessageArgOptions) New() js.Ref { 1656 return bindings.SendMessageArgOptionsJSLoad( 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 *SendMessageArgOptions) UpdateFrom(ref js.Ref) { 1663 bindings.SendMessageArgOptionsJSStore( 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 *SendMessageArgOptions) Update(ref js.Ref) { 1670 bindings.SendMessageArgOptionsJSLoad( 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 *SendMessageArgOptions) FreeMembers(recursive bool) { 1678 js.Free( 1679 p.DocumentId.Ref(), 1680 ) 1681 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 1682 } 1683 1684 // TAB_ID_NONE returns the value of property "WEBEXT.tabs.TAB_ID_NONE". 1685 // 1686 // The returned bool will be false if there is no such property. 1687 func TAB_ID_NONE() (ret js.String, ok bool) { 1688 ok = js.True == bindings.GetTAB_ID_NONE( 1689 js.Pointer(&ret), 1690 ) 1691 1692 return 1693 } 1694 1695 // SetTAB_ID_NONE sets the value of property "WEBEXT.tabs.TAB_ID_NONE" to val. 1696 // 1697 // It returns false if the property cannot be set. 1698 func SetTAB_ID_NONE(val js.String) bool { 1699 return js.True == bindings.SetTAB_ID_NONE( 1700 val.Ref()) 1701 } 1702 1703 type UpdateArgUpdateProperties struct { 1704 // Active is "UpdateArgUpdateProperties.active" 1705 // 1706 // Optional 1707 // 1708 // NOTE: FFI_USE_Active MUST be set to true to make this field effective. 1709 Active bool 1710 // AutoDiscardable is "UpdateArgUpdateProperties.autoDiscardable" 1711 // 1712 // Optional 1713 // 1714 // NOTE: FFI_USE_AutoDiscardable MUST be set to true to make this field effective. 1715 AutoDiscardable bool 1716 // Highlighted is "UpdateArgUpdateProperties.highlighted" 1717 // 1718 // Optional 1719 // 1720 // NOTE: FFI_USE_Highlighted MUST be set to true to make this field effective. 1721 Highlighted bool 1722 // Muted is "UpdateArgUpdateProperties.muted" 1723 // 1724 // Optional 1725 // 1726 // NOTE: FFI_USE_Muted MUST be set to true to make this field effective. 1727 Muted bool 1728 // OpenerTabId is "UpdateArgUpdateProperties.openerTabId" 1729 // 1730 // Optional 1731 // 1732 // NOTE: FFI_USE_OpenerTabId MUST be set to true to make this field effective. 1733 OpenerTabId int64 1734 // Pinned is "UpdateArgUpdateProperties.pinned" 1735 // 1736 // Optional 1737 // 1738 // NOTE: FFI_USE_Pinned MUST be set to true to make this field effective. 1739 Pinned bool 1740 // Selected is "UpdateArgUpdateProperties.selected" 1741 // 1742 // Optional 1743 // 1744 // NOTE: FFI_USE_Selected MUST be set to true to make this field effective. 1745 Selected bool 1746 // Url is "UpdateArgUpdateProperties.url" 1747 // 1748 // Optional 1749 Url js.String 1750 1751 FFI_USE_Active bool // for Active. 1752 FFI_USE_AutoDiscardable bool // for AutoDiscardable. 1753 FFI_USE_Highlighted bool // for Highlighted. 1754 FFI_USE_Muted bool // for Muted. 1755 FFI_USE_OpenerTabId bool // for OpenerTabId. 1756 FFI_USE_Pinned bool // for Pinned. 1757 FFI_USE_Selected bool // for Selected. 1758 1759 FFI_USE bool 1760 } 1761 1762 // FromRef calls UpdateFrom and returns a UpdateArgUpdateProperties with all fields set. 1763 func (p UpdateArgUpdateProperties) FromRef(ref js.Ref) UpdateArgUpdateProperties { 1764 p.UpdateFrom(ref) 1765 return p 1766 } 1767 1768 // New creates a new UpdateArgUpdateProperties in the application heap. 1769 func (p UpdateArgUpdateProperties) New() js.Ref { 1770 return bindings.UpdateArgUpdatePropertiesJSLoad( 1771 js.Pointer(&p), js.True, 0, 1772 ) 1773 } 1774 1775 // UpdateFrom copies value of all fields of the heap object to p. 1776 func (p *UpdateArgUpdateProperties) UpdateFrom(ref js.Ref) { 1777 bindings.UpdateArgUpdatePropertiesJSStore( 1778 js.Pointer(p), ref, 1779 ) 1780 } 1781 1782 // Update writes all fields of the p to the heap object referenced by ref. 1783 func (p *UpdateArgUpdateProperties) Update(ref js.Ref) { 1784 bindings.UpdateArgUpdatePropertiesJSLoad( 1785 js.Pointer(p), js.False, ref, 1786 ) 1787 } 1788 1789 // FreeMembers frees fields with heap reference, if recursive is true 1790 // free all heap references reachable from p. 1791 func (p *UpdateArgUpdateProperties) FreeMembers(recursive bool) { 1792 js.Free( 1793 p.Url.Ref(), 1794 ) 1795 p.Url = p.Url.FromRef(js.Undefined) 1796 } 1797 1798 // HasFuncCaptureVisibleTab returns true if the function "WEBEXT.tabs.captureVisibleTab" exists. 1799 func HasFuncCaptureVisibleTab() bool { 1800 return js.True == bindings.HasFuncCaptureVisibleTab() 1801 } 1802 1803 // FuncCaptureVisibleTab returns the function "WEBEXT.tabs.captureVisibleTab". 1804 func FuncCaptureVisibleTab() (fn js.Func[func(windowId int64, options extensiontypes.ImageDetails) js.Promise[js.String]]) { 1805 bindings.FuncCaptureVisibleTab( 1806 js.Pointer(&fn), 1807 ) 1808 return 1809 } 1810 1811 // CaptureVisibleTab calls the function "WEBEXT.tabs.captureVisibleTab" directly. 1812 func CaptureVisibleTab(windowId int64, options extensiontypes.ImageDetails) (ret js.Promise[js.String]) { 1813 bindings.CallCaptureVisibleTab( 1814 js.Pointer(&ret), 1815 float64(windowId), 1816 js.Pointer(&options), 1817 ) 1818 1819 return 1820 } 1821 1822 // TryCaptureVisibleTab calls the function "WEBEXT.tabs.captureVisibleTab" 1823 // in a try/catch block and returns (_, err, ok = false) when it went through 1824 // the catch clause. 1825 func TryCaptureVisibleTab(windowId int64, options extensiontypes.ImageDetails) (ret js.Promise[js.String], exception js.Any, ok bool) { 1826 ok = js.True == bindings.TryCaptureVisibleTab( 1827 js.Pointer(&ret), js.Pointer(&exception), 1828 float64(windowId), 1829 js.Pointer(&options), 1830 ) 1831 1832 return 1833 } 1834 1835 // HasFuncCreate returns true if the function "WEBEXT.tabs.create" exists. 1836 func HasFuncCreate() bool { 1837 return js.True == bindings.HasFuncCreate() 1838 } 1839 1840 // FuncCreate returns the function "WEBEXT.tabs.create". 1841 func FuncCreate() (fn js.Func[func(createProperties CreateArgCreateProperties) js.Promise[Tab]]) { 1842 bindings.FuncCreate( 1843 js.Pointer(&fn), 1844 ) 1845 return 1846 } 1847 1848 // Create calls the function "WEBEXT.tabs.create" directly. 1849 func Create(createProperties CreateArgCreateProperties) (ret js.Promise[Tab]) { 1850 bindings.CallCreate( 1851 js.Pointer(&ret), 1852 js.Pointer(&createProperties), 1853 ) 1854 1855 return 1856 } 1857 1858 // TryCreate calls the function "WEBEXT.tabs.create" 1859 // in a try/catch block and returns (_, err, ok = false) when it went through 1860 // the catch clause. 1861 func TryCreate(createProperties CreateArgCreateProperties) (ret js.Promise[Tab], exception js.Any, ok bool) { 1862 ok = js.True == bindings.TryCreate( 1863 js.Pointer(&ret), js.Pointer(&exception), 1864 js.Pointer(&createProperties), 1865 ) 1866 1867 return 1868 } 1869 1870 // HasFuncDetectLanguage returns true if the function "WEBEXT.tabs.detectLanguage" exists. 1871 func HasFuncDetectLanguage() bool { 1872 return js.True == bindings.HasFuncDetectLanguage() 1873 } 1874 1875 // FuncDetectLanguage returns the function "WEBEXT.tabs.detectLanguage". 1876 func FuncDetectLanguage() (fn js.Func[func(tabId int64) js.Promise[js.String]]) { 1877 bindings.FuncDetectLanguage( 1878 js.Pointer(&fn), 1879 ) 1880 return 1881 } 1882 1883 // DetectLanguage calls the function "WEBEXT.tabs.detectLanguage" directly. 1884 func DetectLanguage(tabId int64) (ret js.Promise[js.String]) { 1885 bindings.CallDetectLanguage( 1886 js.Pointer(&ret), 1887 float64(tabId), 1888 ) 1889 1890 return 1891 } 1892 1893 // TryDetectLanguage calls the function "WEBEXT.tabs.detectLanguage" 1894 // in a try/catch block and returns (_, err, ok = false) when it went through 1895 // the catch clause. 1896 func TryDetectLanguage(tabId int64) (ret js.Promise[js.String], exception js.Any, ok bool) { 1897 ok = js.True == bindings.TryDetectLanguage( 1898 js.Pointer(&ret), js.Pointer(&exception), 1899 float64(tabId), 1900 ) 1901 1902 return 1903 } 1904 1905 // HasFuncDiscard returns true if the function "WEBEXT.tabs.discard" exists. 1906 func HasFuncDiscard() bool { 1907 return js.True == bindings.HasFuncDiscard() 1908 } 1909 1910 // FuncDiscard returns the function "WEBEXT.tabs.discard". 1911 func FuncDiscard() (fn js.Func[func(tabId int64) js.Promise[Tab]]) { 1912 bindings.FuncDiscard( 1913 js.Pointer(&fn), 1914 ) 1915 return 1916 } 1917 1918 // Discard calls the function "WEBEXT.tabs.discard" directly. 1919 func Discard(tabId int64) (ret js.Promise[Tab]) { 1920 bindings.CallDiscard( 1921 js.Pointer(&ret), 1922 float64(tabId), 1923 ) 1924 1925 return 1926 } 1927 1928 // TryDiscard calls the function "WEBEXT.tabs.discard" 1929 // in a try/catch block and returns (_, err, ok = false) when it went through 1930 // the catch clause. 1931 func TryDiscard(tabId int64) (ret js.Promise[Tab], exception js.Any, ok bool) { 1932 ok = js.True == bindings.TryDiscard( 1933 js.Pointer(&ret), js.Pointer(&exception), 1934 float64(tabId), 1935 ) 1936 1937 return 1938 } 1939 1940 // HasFuncDuplicate returns true if the function "WEBEXT.tabs.duplicate" exists. 1941 func HasFuncDuplicate() bool { 1942 return js.True == bindings.HasFuncDuplicate() 1943 } 1944 1945 // FuncDuplicate returns the function "WEBEXT.tabs.duplicate". 1946 func FuncDuplicate() (fn js.Func[func(tabId int64) js.Promise[Tab]]) { 1947 bindings.FuncDuplicate( 1948 js.Pointer(&fn), 1949 ) 1950 return 1951 } 1952 1953 // Duplicate calls the function "WEBEXT.tabs.duplicate" directly. 1954 func Duplicate(tabId int64) (ret js.Promise[Tab]) { 1955 bindings.CallDuplicate( 1956 js.Pointer(&ret), 1957 float64(tabId), 1958 ) 1959 1960 return 1961 } 1962 1963 // TryDuplicate calls the function "WEBEXT.tabs.duplicate" 1964 // in a try/catch block and returns (_, err, ok = false) when it went through 1965 // the catch clause. 1966 func TryDuplicate(tabId int64) (ret js.Promise[Tab], exception js.Any, ok bool) { 1967 ok = js.True == bindings.TryDuplicate( 1968 js.Pointer(&ret), js.Pointer(&exception), 1969 float64(tabId), 1970 ) 1971 1972 return 1973 } 1974 1975 // HasFuncExecuteScript returns true if the function "WEBEXT.tabs.executeScript" exists. 1976 func HasFuncExecuteScript() bool { 1977 return js.True == bindings.HasFuncExecuteScript() 1978 } 1979 1980 // FuncExecuteScript returns the function "WEBEXT.tabs.executeScript". 1981 func FuncExecuteScript() (fn js.Func[func(tabId int64, details extensiontypes.InjectDetails) js.Promise[js.Array[js.Any]]]) { 1982 bindings.FuncExecuteScript( 1983 js.Pointer(&fn), 1984 ) 1985 return 1986 } 1987 1988 // ExecuteScript calls the function "WEBEXT.tabs.executeScript" directly. 1989 func ExecuteScript(tabId int64, details extensiontypes.InjectDetails) (ret js.Promise[js.Array[js.Any]]) { 1990 bindings.CallExecuteScript( 1991 js.Pointer(&ret), 1992 float64(tabId), 1993 js.Pointer(&details), 1994 ) 1995 1996 return 1997 } 1998 1999 // TryExecuteScript calls the function "WEBEXT.tabs.executeScript" 2000 // in a try/catch block and returns (_, err, ok = false) when it went through 2001 // the catch clause. 2002 func TryExecuteScript(tabId int64, details extensiontypes.InjectDetails) (ret js.Promise[js.Array[js.Any]], exception js.Any, ok bool) { 2003 ok = js.True == bindings.TryExecuteScript( 2004 js.Pointer(&ret), js.Pointer(&exception), 2005 float64(tabId), 2006 js.Pointer(&details), 2007 ) 2008 2009 return 2010 } 2011 2012 // HasFuncGet returns true if the function "WEBEXT.tabs.get" exists. 2013 func HasFuncGet() bool { 2014 return js.True == bindings.HasFuncGet() 2015 } 2016 2017 // FuncGet returns the function "WEBEXT.tabs.get". 2018 func FuncGet() (fn js.Func[func(tabId int64) js.Promise[Tab]]) { 2019 bindings.FuncGet( 2020 js.Pointer(&fn), 2021 ) 2022 return 2023 } 2024 2025 // Get calls the function "WEBEXT.tabs.get" directly. 2026 func Get(tabId int64) (ret js.Promise[Tab]) { 2027 bindings.CallGet( 2028 js.Pointer(&ret), 2029 float64(tabId), 2030 ) 2031 2032 return 2033 } 2034 2035 // TryGet calls the function "WEBEXT.tabs.get" 2036 // in a try/catch block and returns (_, err, ok = false) when it went through 2037 // the catch clause. 2038 func TryGet(tabId int64) (ret js.Promise[Tab], exception js.Any, ok bool) { 2039 ok = js.True == bindings.TryGet( 2040 js.Pointer(&ret), js.Pointer(&exception), 2041 float64(tabId), 2042 ) 2043 2044 return 2045 } 2046 2047 // HasFuncGetAllInWindow returns true if the function "WEBEXT.tabs.getAllInWindow" exists. 2048 func HasFuncGetAllInWindow() bool { 2049 return js.True == bindings.HasFuncGetAllInWindow() 2050 } 2051 2052 // FuncGetAllInWindow returns the function "WEBEXT.tabs.getAllInWindow". 2053 func FuncGetAllInWindow() (fn js.Func[func(windowId int64) js.Promise[js.Array[Tab]]]) { 2054 bindings.FuncGetAllInWindow( 2055 js.Pointer(&fn), 2056 ) 2057 return 2058 } 2059 2060 // GetAllInWindow calls the function "WEBEXT.tabs.getAllInWindow" directly. 2061 func GetAllInWindow(windowId int64) (ret js.Promise[js.Array[Tab]]) { 2062 bindings.CallGetAllInWindow( 2063 js.Pointer(&ret), 2064 float64(windowId), 2065 ) 2066 2067 return 2068 } 2069 2070 // TryGetAllInWindow calls the function "WEBEXT.tabs.getAllInWindow" 2071 // in a try/catch block and returns (_, err, ok = false) when it went through 2072 // the catch clause. 2073 func TryGetAllInWindow(windowId int64) (ret js.Promise[js.Array[Tab]], exception js.Any, ok bool) { 2074 ok = js.True == bindings.TryGetAllInWindow( 2075 js.Pointer(&ret), js.Pointer(&exception), 2076 float64(windowId), 2077 ) 2078 2079 return 2080 } 2081 2082 // HasFuncGetCurrent returns true if the function "WEBEXT.tabs.getCurrent" exists. 2083 func HasFuncGetCurrent() bool { 2084 return js.True == bindings.HasFuncGetCurrent() 2085 } 2086 2087 // FuncGetCurrent returns the function "WEBEXT.tabs.getCurrent". 2088 func FuncGetCurrent() (fn js.Func[func() js.Promise[Tab]]) { 2089 bindings.FuncGetCurrent( 2090 js.Pointer(&fn), 2091 ) 2092 return 2093 } 2094 2095 // GetCurrent calls the function "WEBEXT.tabs.getCurrent" directly. 2096 func GetCurrent() (ret js.Promise[Tab]) { 2097 bindings.CallGetCurrent( 2098 js.Pointer(&ret), 2099 ) 2100 2101 return 2102 } 2103 2104 // TryGetCurrent calls the function "WEBEXT.tabs.getCurrent" 2105 // in a try/catch block and returns (_, err, ok = false) when it went through 2106 // the catch clause. 2107 func TryGetCurrent() (ret js.Promise[Tab], exception js.Any, ok bool) { 2108 ok = js.True == bindings.TryGetCurrent( 2109 js.Pointer(&ret), js.Pointer(&exception), 2110 ) 2111 2112 return 2113 } 2114 2115 // HasFuncGetSelected returns true if the function "WEBEXT.tabs.getSelected" exists. 2116 func HasFuncGetSelected() bool { 2117 return js.True == bindings.HasFuncGetSelected() 2118 } 2119 2120 // FuncGetSelected returns the function "WEBEXT.tabs.getSelected". 2121 func FuncGetSelected() (fn js.Func[func(windowId int64) js.Promise[Tab]]) { 2122 bindings.FuncGetSelected( 2123 js.Pointer(&fn), 2124 ) 2125 return 2126 } 2127 2128 // GetSelected calls the function "WEBEXT.tabs.getSelected" directly. 2129 func GetSelected(windowId int64) (ret js.Promise[Tab]) { 2130 bindings.CallGetSelected( 2131 js.Pointer(&ret), 2132 float64(windowId), 2133 ) 2134 2135 return 2136 } 2137 2138 // TryGetSelected calls the function "WEBEXT.tabs.getSelected" 2139 // in a try/catch block and returns (_, err, ok = false) when it went through 2140 // the catch clause. 2141 func TryGetSelected(windowId int64) (ret js.Promise[Tab], exception js.Any, ok bool) { 2142 ok = js.True == bindings.TryGetSelected( 2143 js.Pointer(&ret), js.Pointer(&exception), 2144 float64(windowId), 2145 ) 2146 2147 return 2148 } 2149 2150 // HasFuncGetZoom returns true if the function "WEBEXT.tabs.getZoom" exists. 2151 func HasFuncGetZoom() bool { 2152 return js.True == bindings.HasFuncGetZoom() 2153 } 2154 2155 // FuncGetZoom returns the function "WEBEXT.tabs.getZoom". 2156 func FuncGetZoom() (fn js.Func[func(tabId int64) js.Promise[js.Number[float64]]]) { 2157 bindings.FuncGetZoom( 2158 js.Pointer(&fn), 2159 ) 2160 return 2161 } 2162 2163 // GetZoom calls the function "WEBEXT.tabs.getZoom" directly. 2164 func GetZoom(tabId int64) (ret js.Promise[js.Number[float64]]) { 2165 bindings.CallGetZoom( 2166 js.Pointer(&ret), 2167 float64(tabId), 2168 ) 2169 2170 return 2171 } 2172 2173 // TryGetZoom calls the function "WEBEXT.tabs.getZoom" 2174 // in a try/catch block and returns (_, err, ok = false) when it went through 2175 // the catch clause. 2176 func TryGetZoom(tabId int64) (ret js.Promise[js.Number[float64]], exception js.Any, ok bool) { 2177 ok = js.True == bindings.TryGetZoom( 2178 js.Pointer(&ret), js.Pointer(&exception), 2179 float64(tabId), 2180 ) 2181 2182 return 2183 } 2184 2185 // HasFuncGetZoomSettings returns true if the function "WEBEXT.tabs.getZoomSettings" exists. 2186 func HasFuncGetZoomSettings() bool { 2187 return js.True == bindings.HasFuncGetZoomSettings() 2188 } 2189 2190 // FuncGetZoomSettings returns the function "WEBEXT.tabs.getZoomSettings". 2191 func FuncGetZoomSettings() (fn js.Func[func(tabId int64) js.Promise[ZoomSettings]]) { 2192 bindings.FuncGetZoomSettings( 2193 js.Pointer(&fn), 2194 ) 2195 return 2196 } 2197 2198 // GetZoomSettings calls the function "WEBEXT.tabs.getZoomSettings" directly. 2199 func GetZoomSettings(tabId int64) (ret js.Promise[ZoomSettings]) { 2200 bindings.CallGetZoomSettings( 2201 js.Pointer(&ret), 2202 float64(tabId), 2203 ) 2204 2205 return 2206 } 2207 2208 // TryGetZoomSettings calls the function "WEBEXT.tabs.getZoomSettings" 2209 // in a try/catch block and returns (_, err, ok = false) when it went through 2210 // the catch clause. 2211 func TryGetZoomSettings(tabId int64) (ret js.Promise[ZoomSettings], exception js.Any, ok bool) { 2212 ok = js.True == bindings.TryGetZoomSettings( 2213 js.Pointer(&ret), js.Pointer(&exception), 2214 float64(tabId), 2215 ) 2216 2217 return 2218 } 2219 2220 // HasFuncGoBack returns true if the function "WEBEXT.tabs.goBack" exists. 2221 func HasFuncGoBack() bool { 2222 return js.True == bindings.HasFuncGoBack() 2223 } 2224 2225 // FuncGoBack returns the function "WEBEXT.tabs.goBack". 2226 func FuncGoBack() (fn js.Func[func(tabId int64) js.Promise[js.Void]]) { 2227 bindings.FuncGoBack( 2228 js.Pointer(&fn), 2229 ) 2230 return 2231 } 2232 2233 // GoBack calls the function "WEBEXT.tabs.goBack" directly. 2234 func GoBack(tabId int64) (ret js.Promise[js.Void]) { 2235 bindings.CallGoBack( 2236 js.Pointer(&ret), 2237 float64(tabId), 2238 ) 2239 2240 return 2241 } 2242 2243 // TryGoBack calls the function "WEBEXT.tabs.goBack" 2244 // in a try/catch block and returns (_, err, ok = false) when it went through 2245 // the catch clause. 2246 func TryGoBack(tabId int64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2247 ok = js.True == bindings.TryGoBack( 2248 js.Pointer(&ret), js.Pointer(&exception), 2249 float64(tabId), 2250 ) 2251 2252 return 2253 } 2254 2255 // HasFuncGoForward returns true if the function "WEBEXT.tabs.goForward" exists. 2256 func HasFuncGoForward() bool { 2257 return js.True == bindings.HasFuncGoForward() 2258 } 2259 2260 // FuncGoForward returns the function "WEBEXT.tabs.goForward". 2261 func FuncGoForward() (fn js.Func[func(tabId int64) js.Promise[js.Void]]) { 2262 bindings.FuncGoForward( 2263 js.Pointer(&fn), 2264 ) 2265 return 2266 } 2267 2268 // GoForward calls the function "WEBEXT.tabs.goForward" directly. 2269 func GoForward(tabId int64) (ret js.Promise[js.Void]) { 2270 bindings.CallGoForward( 2271 js.Pointer(&ret), 2272 float64(tabId), 2273 ) 2274 2275 return 2276 } 2277 2278 // TryGoForward calls the function "WEBEXT.tabs.goForward" 2279 // in a try/catch block and returns (_, err, ok = false) when it went through 2280 // the catch clause. 2281 func TryGoForward(tabId int64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2282 ok = js.True == bindings.TryGoForward( 2283 js.Pointer(&ret), js.Pointer(&exception), 2284 float64(tabId), 2285 ) 2286 2287 return 2288 } 2289 2290 // HasFuncGroup returns true if the function "WEBEXT.tabs.group" exists. 2291 func HasFuncGroup() bool { 2292 return js.True == bindings.HasFuncGroup() 2293 } 2294 2295 // FuncGroup returns the function "WEBEXT.tabs.group". 2296 func FuncGroup() (fn js.Func[func(options GroupArgOptions) js.Promise[js.BigInt[int64]]]) { 2297 bindings.FuncGroup( 2298 js.Pointer(&fn), 2299 ) 2300 return 2301 } 2302 2303 // Group calls the function "WEBEXT.tabs.group" directly. 2304 func Group(options GroupArgOptions) (ret js.Promise[js.BigInt[int64]]) { 2305 bindings.CallGroup( 2306 js.Pointer(&ret), 2307 js.Pointer(&options), 2308 ) 2309 2310 return 2311 } 2312 2313 // TryGroup calls the function "WEBEXT.tabs.group" 2314 // in a try/catch block and returns (_, err, ok = false) when it went through 2315 // the catch clause. 2316 func TryGroup(options GroupArgOptions) (ret js.Promise[js.BigInt[int64]], exception js.Any, ok bool) { 2317 ok = js.True == bindings.TryGroup( 2318 js.Pointer(&ret), js.Pointer(&exception), 2319 js.Pointer(&options), 2320 ) 2321 2322 return 2323 } 2324 2325 // HasFuncInsertCSS returns true if the function "WEBEXT.tabs.insertCSS" exists. 2326 func HasFuncInsertCSS() bool { 2327 return js.True == bindings.HasFuncInsertCSS() 2328 } 2329 2330 // FuncInsertCSS returns the function "WEBEXT.tabs.insertCSS". 2331 func FuncInsertCSS() (fn js.Func[func(tabId int64, details extensiontypes.InjectDetails) js.Promise[js.Void]]) { 2332 bindings.FuncInsertCSS( 2333 js.Pointer(&fn), 2334 ) 2335 return 2336 } 2337 2338 // InsertCSS calls the function "WEBEXT.tabs.insertCSS" directly. 2339 func InsertCSS(tabId int64, details extensiontypes.InjectDetails) (ret js.Promise[js.Void]) { 2340 bindings.CallInsertCSS( 2341 js.Pointer(&ret), 2342 float64(tabId), 2343 js.Pointer(&details), 2344 ) 2345 2346 return 2347 } 2348 2349 // TryInsertCSS calls the function "WEBEXT.tabs.insertCSS" 2350 // in a try/catch block and returns (_, err, ok = false) when it went through 2351 // the catch clause. 2352 func TryInsertCSS(tabId int64, details extensiontypes.InjectDetails) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2353 ok = js.True == bindings.TryInsertCSS( 2354 js.Pointer(&ret), js.Pointer(&exception), 2355 float64(tabId), 2356 js.Pointer(&details), 2357 ) 2358 2359 return 2360 } 2361 2362 type OneOf_Tab_ArrayTab struct { 2363 ref js.Ref 2364 } 2365 2366 func (x OneOf_Tab_ArrayTab) Ref() js.Ref { 2367 return x.ref 2368 } 2369 2370 func (x OneOf_Tab_ArrayTab) Free() { 2371 x.ref.Free() 2372 } 2373 2374 func (x OneOf_Tab_ArrayTab) FromRef(ref js.Ref) OneOf_Tab_ArrayTab { 2375 return OneOf_Tab_ArrayTab{ 2376 ref: ref, 2377 } 2378 } 2379 2380 func (x OneOf_Tab_ArrayTab) Tab() Tab { 2381 var ret Tab 2382 ret.UpdateFrom(x.ref) 2383 return ret 2384 } 2385 2386 func (x OneOf_Tab_ArrayTab) ArrayTab() js.Array[Tab] { 2387 return js.Array[Tab]{}.FromRef(x.ref) 2388 } 2389 2390 // HasFuncMove returns true if the function "WEBEXT.tabs.move" exists. 2391 func HasFuncMove() bool { 2392 return js.True == bindings.HasFuncMove() 2393 } 2394 2395 // FuncMove returns the function "WEBEXT.tabs.move". 2396 func FuncMove() (fn js.Func[func(tabIds OneOf_Int64_ArrayInt64, moveProperties MoveArgMoveProperties) js.Promise[OneOf_Tab_ArrayTab]]) { 2397 bindings.FuncMove( 2398 js.Pointer(&fn), 2399 ) 2400 return 2401 } 2402 2403 // Move calls the function "WEBEXT.tabs.move" directly. 2404 func Move(tabIds OneOf_Int64_ArrayInt64, moveProperties MoveArgMoveProperties) (ret js.Promise[OneOf_Tab_ArrayTab]) { 2405 bindings.CallMove( 2406 js.Pointer(&ret), 2407 tabIds.Ref(), 2408 js.Pointer(&moveProperties), 2409 ) 2410 2411 return 2412 } 2413 2414 // TryMove calls the function "WEBEXT.tabs.move" 2415 // in a try/catch block and returns (_, err, ok = false) when it went through 2416 // the catch clause. 2417 func TryMove(tabIds OneOf_Int64_ArrayInt64, moveProperties MoveArgMoveProperties) (ret js.Promise[OneOf_Tab_ArrayTab], exception js.Any, ok bool) { 2418 ok = js.True == bindings.TryMove( 2419 js.Pointer(&ret), js.Pointer(&exception), 2420 tabIds.Ref(), 2421 js.Pointer(&moveProperties), 2422 ) 2423 2424 return 2425 } 2426 2427 type OnActivatedEventCallbackFunc func(this js.Ref, activeInfo *OnActivatedArgActiveInfo) js.Ref 2428 2429 func (fn OnActivatedEventCallbackFunc) Register() js.Func[func(activeInfo *OnActivatedArgActiveInfo)] { 2430 return js.RegisterCallback[func(activeInfo *OnActivatedArgActiveInfo)]( 2431 fn, abi.FuncPCABIInternal(fn), 2432 ) 2433 } 2434 2435 func (fn OnActivatedEventCallbackFunc) DispatchCallback( 2436 targetPC uintptr, ctx *js.CallbackContext, 2437 ) { 2438 args := ctx.Args() 2439 if len(args) != 1+1 /* js this */ || 2440 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2441 js.ThrowInvalidCallbackInvocation() 2442 } 2443 var arg0 OnActivatedArgActiveInfo 2444 arg0.UpdateFrom(args[0+1]) 2445 defer arg0.FreeMembers(true) 2446 2447 if ctx.Return(fn( 2448 args[0], 2449 2450 mark.NoEscape(&arg0), 2451 )) { 2452 return 2453 } 2454 2455 js.ThrowCallbackValueNotReturned() 2456 } 2457 2458 type OnActivatedEventCallback[T any] struct { 2459 Fn func(arg T, this js.Ref, activeInfo *OnActivatedArgActiveInfo) js.Ref 2460 Arg T 2461 } 2462 2463 func (cb *OnActivatedEventCallback[T]) Register() js.Func[func(activeInfo *OnActivatedArgActiveInfo)] { 2464 return js.RegisterCallback[func(activeInfo *OnActivatedArgActiveInfo)]( 2465 cb, abi.FuncPCABIInternal(cb.Fn), 2466 ) 2467 } 2468 2469 func (cb *OnActivatedEventCallback[T]) DispatchCallback( 2470 targetPC uintptr, ctx *js.CallbackContext, 2471 ) { 2472 args := ctx.Args() 2473 if len(args) != 1+1 /* js this */ || 2474 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2475 js.ThrowInvalidCallbackInvocation() 2476 } 2477 var arg0 OnActivatedArgActiveInfo 2478 arg0.UpdateFrom(args[0+1]) 2479 defer arg0.FreeMembers(true) 2480 2481 if ctx.Return(cb.Fn( 2482 cb.Arg, 2483 args[0], 2484 2485 mark.NoEscape(&arg0), 2486 )) { 2487 return 2488 } 2489 2490 js.ThrowCallbackValueNotReturned() 2491 } 2492 2493 // HasFuncOnActivated returns true if the function "WEBEXT.tabs.onActivated.addListener" exists. 2494 func HasFuncOnActivated() bool { 2495 return js.True == bindings.HasFuncOnActivated() 2496 } 2497 2498 // FuncOnActivated returns the function "WEBEXT.tabs.onActivated.addListener". 2499 func FuncOnActivated() (fn js.Func[func(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)])]) { 2500 bindings.FuncOnActivated( 2501 js.Pointer(&fn), 2502 ) 2503 return 2504 } 2505 2506 // OnActivated calls the function "WEBEXT.tabs.onActivated.addListener" directly. 2507 func OnActivated(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) (ret js.Void) { 2508 bindings.CallOnActivated( 2509 js.Pointer(&ret), 2510 callback.Ref(), 2511 ) 2512 2513 return 2514 } 2515 2516 // TryOnActivated calls the function "WEBEXT.tabs.onActivated.addListener" 2517 // in a try/catch block and returns (_, err, ok = false) when it went through 2518 // the catch clause. 2519 func TryOnActivated(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) (ret js.Void, exception js.Any, ok bool) { 2520 ok = js.True == bindings.TryOnActivated( 2521 js.Pointer(&ret), js.Pointer(&exception), 2522 callback.Ref(), 2523 ) 2524 2525 return 2526 } 2527 2528 // HasFuncOffActivated returns true if the function "WEBEXT.tabs.onActivated.removeListener" exists. 2529 func HasFuncOffActivated() bool { 2530 return js.True == bindings.HasFuncOffActivated() 2531 } 2532 2533 // FuncOffActivated returns the function "WEBEXT.tabs.onActivated.removeListener". 2534 func FuncOffActivated() (fn js.Func[func(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)])]) { 2535 bindings.FuncOffActivated( 2536 js.Pointer(&fn), 2537 ) 2538 return 2539 } 2540 2541 // OffActivated calls the function "WEBEXT.tabs.onActivated.removeListener" directly. 2542 func OffActivated(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) (ret js.Void) { 2543 bindings.CallOffActivated( 2544 js.Pointer(&ret), 2545 callback.Ref(), 2546 ) 2547 2548 return 2549 } 2550 2551 // TryOffActivated calls the function "WEBEXT.tabs.onActivated.removeListener" 2552 // in a try/catch block and returns (_, err, ok = false) when it went through 2553 // the catch clause. 2554 func TryOffActivated(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) (ret js.Void, exception js.Any, ok bool) { 2555 ok = js.True == bindings.TryOffActivated( 2556 js.Pointer(&ret), js.Pointer(&exception), 2557 callback.Ref(), 2558 ) 2559 2560 return 2561 } 2562 2563 // HasFuncHasOnActivated returns true if the function "WEBEXT.tabs.onActivated.hasListener" exists. 2564 func HasFuncHasOnActivated() bool { 2565 return js.True == bindings.HasFuncHasOnActivated() 2566 } 2567 2568 // FuncHasOnActivated returns the function "WEBEXT.tabs.onActivated.hasListener". 2569 func FuncHasOnActivated() (fn js.Func[func(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) bool]) { 2570 bindings.FuncHasOnActivated( 2571 js.Pointer(&fn), 2572 ) 2573 return 2574 } 2575 2576 // HasOnActivated calls the function "WEBEXT.tabs.onActivated.hasListener" directly. 2577 func HasOnActivated(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) (ret bool) { 2578 bindings.CallHasOnActivated( 2579 js.Pointer(&ret), 2580 callback.Ref(), 2581 ) 2582 2583 return 2584 } 2585 2586 // TryHasOnActivated calls the function "WEBEXT.tabs.onActivated.hasListener" 2587 // in a try/catch block and returns (_, err, ok = false) when it went through 2588 // the catch clause. 2589 func TryHasOnActivated(callback js.Func[func(activeInfo *OnActivatedArgActiveInfo)]) (ret bool, exception js.Any, ok bool) { 2590 ok = js.True == bindings.TryHasOnActivated( 2591 js.Pointer(&ret), js.Pointer(&exception), 2592 callback.Ref(), 2593 ) 2594 2595 return 2596 } 2597 2598 type OnActiveChangedEventCallbackFunc func(this js.Ref, tabId int64, selectInfo *OnActiveChangedArgSelectInfo) js.Ref 2599 2600 func (fn OnActiveChangedEventCallbackFunc) Register() js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)] { 2601 return js.RegisterCallback[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]( 2602 fn, abi.FuncPCABIInternal(fn), 2603 ) 2604 } 2605 2606 func (fn OnActiveChangedEventCallbackFunc) DispatchCallback( 2607 targetPC uintptr, ctx *js.CallbackContext, 2608 ) { 2609 args := ctx.Args() 2610 if len(args) != 2+1 /* js this */ || 2611 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2612 js.ThrowInvalidCallbackInvocation() 2613 } 2614 var arg1 OnActiveChangedArgSelectInfo 2615 arg1.UpdateFrom(args[1+1]) 2616 defer arg1.FreeMembers(true) 2617 2618 if ctx.Return(fn( 2619 args[0], 2620 2621 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 2622 mark.NoEscape(&arg1), 2623 )) { 2624 return 2625 } 2626 2627 js.ThrowCallbackValueNotReturned() 2628 } 2629 2630 type OnActiveChangedEventCallback[T any] struct { 2631 Fn func(arg T, this js.Ref, tabId int64, selectInfo *OnActiveChangedArgSelectInfo) js.Ref 2632 Arg T 2633 } 2634 2635 func (cb *OnActiveChangedEventCallback[T]) Register() js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)] { 2636 return js.RegisterCallback[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]( 2637 cb, abi.FuncPCABIInternal(cb.Fn), 2638 ) 2639 } 2640 2641 func (cb *OnActiveChangedEventCallback[T]) DispatchCallback( 2642 targetPC uintptr, ctx *js.CallbackContext, 2643 ) { 2644 args := ctx.Args() 2645 if len(args) != 2+1 /* js this */ || 2646 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2647 js.ThrowInvalidCallbackInvocation() 2648 } 2649 var arg1 OnActiveChangedArgSelectInfo 2650 arg1.UpdateFrom(args[1+1]) 2651 defer arg1.FreeMembers(true) 2652 2653 if ctx.Return(cb.Fn( 2654 cb.Arg, 2655 args[0], 2656 2657 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 2658 mark.NoEscape(&arg1), 2659 )) { 2660 return 2661 } 2662 2663 js.ThrowCallbackValueNotReturned() 2664 } 2665 2666 // HasFuncOnActiveChanged returns true if the function "WEBEXT.tabs.onActiveChanged.addListener" exists. 2667 func HasFuncOnActiveChanged() bool { 2668 return js.True == bindings.HasFuncOnActiveChanged() 2669 } 2670 2671 // FuncOnActiveChanged returns the function "WEBEXT.tabs.onActiveChanged.addListener". 2672 func FuncOnActiveChanged() (fn js.Func[func(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)])]) { 2673 bindings.FuncOnActiveChanged( 2674 js.Pointer(&fn), 2675 ) 2676 return 2677 } 2678 2679 // OnActiveChanged calls the function "WEBEXT.tabs.onActiveChanged.addListener" directly. 2680 func OnActiveChanged(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) (ret js.Void) { 2681 bindings.CallOnActiveChanged( 2682 js.Pointer(&ret), 2683 callback.Ref(), 2684 ) 2685 2686 return 2687 } 2688 2689 // TryOnActiveChanged calls the function "WEBEXT.tabs.onActiveChanged.addListener" 2690 // in a try/catch block and returns (_, err, ok = false) when it went through 2691 // the catch clause. 2692 func TryOnActiveChanged(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) (ret js.Void, exception js.Any, ok bool) { 2693 ok = js.True == bindings.TryOnActiveChanged( 2694 js.Pointer(&ret), js.Pointer(&exception), 2695 callback.Ref(), 2696 ) 2697 2698 return 2699 } 2700 2701 // HasFuncOffActiveChanged returns true if the function "WEBEXT.tabs.onActiveChanged.removeListener" exists. 2702 func HasFuncOffActiveChanged() bool { 2703 return js.True == bindings.HasFuncOffActiveChanged() 2704 } 2705 2706 // FuncOffActiveChanged returns the function "WEBEXT.tabs.onActiveChanged.removeListener". 2707 func FuncOffActiveChanged() (fn js.Func[func(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)])]) { 2708 bindings.FuncOffActiveChanged( 2709 js.Pointer(&fn), 2710 ) 2711 return 2712 } 2713 2714 // OffActiveChanged calls the function "WEBEXT.tabs.onActiveChanged.removeListener" directly. 2715 func OffActiveChanged(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) (ret js.Void) { 2716 bindings.CallOffActiveChanged( 2717 js.Pointer(&ret), 2718 callback.Ref(), 2719 ) 2720 2721 return 2722 } 2723 2724 // TryOffActiveChanged calls the function "WEBEXT.tabs.onActiveChanged.removeListener" 2725 // in a try/catch block and returns (_, err, ok = false) when it went through 2726 // the catch clause. 2727 func TryOffActiveChanged(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) (ret js.Void, exception js.Any, ok bool) { 2728 ok = js.True == bindings.TryOffActiveChanged( 2729 js.Pointer(&ret), js.Pointer(&exception), 2730 callback.Ref(), 2731 ) 2732 2733 return 2734 } 2735 2736 // HasFuncHasOnActiveChanged returns true if the function "WEBEXT.tabs.onActiveChanged.hasListener" exists. 2737 func HasFuncHasOnActiveChanged() bool { 2738 return js.True == bindings.HasFuncHasOnActiveChanged() 2739 } 2740 2741 // FuncHasOnActiveChanged returns the function "WEBEXT.tabs.onActiveChanged.hasListener". 2742 func FuncHasOnActiveChanged() (fn js.Func[func(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) bool]) { 2743 bindings.FuncHasOnActiveChanged( 2744 js.Pointer(&fn), 2745 ) 2746 return 2747 } 2748 2749 // HasOnActiveChanged calls the function "WEBEXT.tabs.onActiveChanged.hasListener" directly. 2750 func HasOnActiveChanged(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) (ret bool) { 2751 bindings.CallHasOnActiveChanged( 2752 js.Pointer(&ret), 2753 callback.Ref(), 2754 ) 2755 2756 return 2757 } 2758 2759 // TryHasOnActiveChanged calls the function "WEBEXT.tabs.onActiveChanged.hasListener" 2760 // in a try/catch block and returns (_, err, ok = false) when it went through 2761 // the catch clause. 2762 func TryHasOnActiveChanged(callback js.Func[func(tabId int64, selectInfo *OnActiveChangedArgSelectInfo)]) (ret bool, exception js.Any, ok bool) { 2763 ok = js.True == bindings.TryHasOnActiveChanged( 2764 js.Pointer(&ret), js.Pointer(&exception), 2765 callback.Ref(), 2766 ) 2767 2768 return 2769 } 2770 2771 type OnAttachedEventCallbackFunc func(this js.Ref, tabId int64, attachInfo *OnAttachedArgAttachInfo) js.Ref 2772 2773 func (fn OnAttachedEventCallbackFunc) Register() js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)] { 2774 return js.RegisterCallback[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]( 2775 fn, abi.FuncPCABIInternal(fn), 2776 ) 2777 } 2778 2779 func (fn OnAttachedEventCallbackFunc) DispatchCallback( 2780 targetPC uintptr, ctx *js.CallbackContext, 2781 ) { 2782 args := ctx.Args() 2783 if len(args) != 2+1 /* js this */ || 2784 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2785 js.ThrowInvalidCallbackInvocation() 2786 } 2787 var arg1 OnAttachedArgAttachInfo 2788 arg1.UpdateFrom(args[1+1]) 2789 defer arg1.FreeMembers(true) 2790 2791 if ctx.Return(fn( 2792 args[0], 2793 2794 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 2795 mark.NoEscape(&arg1), 2796 )) { 2797 return 2798 } 2799 2800 js.ThrowCallbackValueNotReturned() 2801 } 2802 2803 type OnAttachedEventCallback[T any] struct { 2804 Fn func(arg T, this js.Ref, tabId int64, attachInfo *OnAttachedArgAttachInfo) js.Ref 2805 Arg T 2806 } 2807 2808 func (cb *OnAttachedEventCallback[T]) Register() js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)] { 2809 return js.RegisterCallback[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]( 2810 cb, abi.FuncPCABIInternal(cb.Fn), 2811 ) 2812 } 2813 2814 func (cb *OnAttachedEventCallback[T]) DispatchCallback( 2815 targetPC uintptr, ctx *js.CallbackContext, 2816 ) { 2817 args := ctx.Args() 2818 if len(args) != 2+1 /* js this */ || 2819 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2820 js.ThrowInvalidCallbackInvocation() 2821 } 2822 var arg1 OnAttachedArgAttachInfo 2823 arg1.UpdateFrom(args[1+1]) 2824 defer arg1.FreeMembers(true) 2825 2826 if ctx.Return(cb.Fn( 2827 cb.Arg, 2828 args[0], 2829 2830 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 2831 mark.NoEscape(&arg1), 2832 )) { 2833 return 2834 } 2835 2836 js.ThrowCallbackValueNotReturned() 2837 } 2838 2839 // HasFuncOnAttached returns true if the function "WEBEXT.tabs.onAttached.addListener" exists. 2840 func HasFuncOnAttached() bool { 2841 return js.True == bindings.HasFuncOnAttached() 2842 } 2843 2844 // FuncOnAttached returns the function "WEBEXT.tabs.onAttached.addListener". 2845 func FuncOnAttached() (fn js.Func[func(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)])]) { 2846 bindings.FuncOnAttached( 2847 js.Pointer(&fn), 2848 ) 2849 return 2850 } 2851 2852 // OnAttached calls the function "WEBEXT.tabs.onAttached.addListener" directly. 2853 func OnAttached(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) (ret js.Void) { 2854 bindings.CallOnAttached( 2855 js.Pointer(&ret), 2856 callback.Ref(), 2857 ) 2858 2859 return 2860 } 2861 2862 // TryOnAttached calls the function "WEBEXT.tabs.onAttached.addListener" 2863 // in a try/catch block and returns (_, err, ok = false) when it went through 2864 // the catch clause. 2865 func TryOnAttached(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) (ret js.Void, exception js.Any, ok bool) { 2866 ok = js.True == bindings.TryOnAttached( 2867 js.Pointer(&ret), js.Pointer(&exception), 2868 callback.Ref(), 2869 ) 2870 2871 return 2872 } 2873 2874 // HasFuncOffAttached returns true if the function "WEBEXT.tabs.onAttached.removeListener" exists. 2875 func HasFuncOffAttached() bool { 2876 return js.True == bindings.HasFuncOffAttached() 2877 } 2878 2879 // FuncOffAttached returns the function "WEBEXT.tabs.onAttached.removeListener". 2880 func FuncOffAttached() (fn js.Func[func(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)])]) { 2881 bindings.FuncOffAttached( 2882 js.Pointer(&fn), 2883 ) 2884 return 2885 } 2886 2887 // OffAttached calls the function "WEBEXT.tabs.onAttached.removeListener" directly. 2888 func OffAttached(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) (ret js.Void) { 2889 bindings.CallOffAttached( 2890 js.Pointer(&ret), 2891 callback.Ref(), 2892 ) 2893 2894 return 2895 } 2896 2897 // TryOffAttached calls the function "WEBEXT.tabs.onAttached.removeListener" 2898 // in a try/catch block and returns (_, err, ok = false) when it went through 2899 // the catch clause. 2900 func TryOffAttached(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) (ret js.Void, exception js.Any, ok bool) { 2901 ok = js.True == bindings.TryOffAttached( 2902 js.Pointer(&ret), js.Pointer(&exception), 2903 callback.Ref(), 2904 ) 2905 2906 return 2907 } 2908 2909 // HasFuncHasOnAttached returns true if the function "WEBEXT.tabs.onAttached.hasListener" exists. 2910 func HasFuncHasOnAttached() bool { 2911 return js.True == bindings.HasFuncHasOnAttached() 2912 } 2913 2914 // FuncHasOnAttached returns the function "WEBEXT.tabs.onAttached.hasListener". 2915 func FuncHasOnAttached() (fn js.Func[func(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) bool]) { 2916 bindings.FuncHasOnAttached( 2917 js.Pointer(&fn), 2918 ) 2919 return 2920 } 2921 2922 // HasOnAttached calls the function "WEBEXT.tabs.onAttached.hasListener" directly. 2923 func HasOnAttached(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) (ret bool) { 2924 bindings.CallHasOnAttached( 2925 js.Pointer(&ret), 2926 callback.Ref(), 2927 ) 2928 2929 return 2930 } 2931 2932 // TryHasOnAttached calls the function "WEBEXT.tabs.onAttached.hasListener" 2933 // in a try/catch block and returns (_, err, ok = false) when it went through 2934 // the catch clause. 2935 func TryHasOnAttached(callback js.Func[func(tabId int64, attachInfo *OnAttachedArgAttachInfo)]) (ret bool, exception js.Any, ok bool) { 2936 ok = js.True == bindings.TryHasOnAttached( 2937 js.Pointer(&ret), js.Pointer(&exception), 2938 callback.Ref(), 2939 ) 2940 2941 return 2942 } 2943 2944 type OnCreatedEventCallbackFunc func(this js.Ref, tab *Tab) js.Ref 2945 2946 func (fn OnCreatedEventCallbackFunc) Register() js.Func[func(tab *Tab)] { 2947 return js.RegisterCallback[func(tab *Tab)]( 2948 fn, abi.FuncPCABIInternal(fn), 2949 ) 2950 } 2951 2952 func (fn OnCreatedEventCallbackFunc) DispatchCallback( 2953 targetPC uintptr, ctx *js.CallbackContext, 2954 ) { 2955 args := ctx.Args() 2956 if len(args) != 1+1 /* js this */ || 2957 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2958 js.ThrowInvalidCallbackInvocation() 2959 } 2960 var arg0 Tab 2961 arg0.UpdateFrom(args[0+1]) 2962 defer arg0.FreeMembers(true) 2963 2964 if ctx.Return(fn( 2965 args[0], 2966 2967 mark.NoEscape(&arg0), 2968 )) { 2969 return 2970 } 2971 2972 js.ThrowCallbackValueNotReturned() 2973 } 2974 2975 type OnCreatedEventCallback[T any] struct { 2976 Fn func(arg T, this js.Ref, tab *Tab) js.Ref 2977 Arg T 2978 } 2979 2980 func (cb *OnCreatedEventCallback[T]) Register() js.Func[func(tab *Tab)] { 2981 return js.RegisterCallback[func(tab *Tab)]( 2982 cb, abi.FuncPCABIInternal(cb.Fn), 2983 ) 2984 } 2985 2986 func (cb *OnCreatedEventCallback[T]) DispatchCallback( 2987 targetPC uintptr, ctx *js.CallbackContext, 2988 ) { 2989 args := ctx.Args() 2990 if len(args) != 1+1 /* js this */ || 2991 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2992 js.ThrowInvalidCallbackInvocation() 2993 } 2994 var arg0 Tab 2995 arg0.UpdateFrom(args[0+1]) 2996 defer arg0.FreeMembers(true) 2997 2998 if ctx.Return(cb.Fn( 2999 cb.Arg, 3000 args[0], 3001 3002 mark.NoEscape(&arg0), 3003 )) { 3004 return 3005 } 3006 3007 js.ThrowCallbackValueNotReturned() 3008 } 3009 3010 // HasFuncOnCreated returns true if the function "WEBEXT.tabs.onCreated.addListener" exists. 3011 func HasFuncOnCreated() bool { 3012 return js.True == bindings.HasFuncOnCreated() 3013 } 3014 3015 // FuncOnCreated returns the function "WEBEXT.tabs.onCreated.addListener". 3016 func FuncOnCreated() (fn js.Func[func(callback js.Func[func(tab *Tab)])]) { 3017 bindings.FuncOnCreated( 3018 js.Pointer(&fn), 3019 ) 3020 return 3021 } 3022 3023 // OnCreated calls the function "WEBEXT.tabs.onCreated.addListener" directly. 3024 func OnCreated(callback js.Func[func(tab *Tab)]) (ret js.Void) { 3025 bindings.CallOnCreated( 3026 js.Pointer(&ret), 3027 callback.Ref(), 3028 ) 3029 3030 return 3031 } 3032 3033 // TryOnCreated calls the function "WEBEXT.tabs.onCreated.addListener" 3034 // in a try/catch block and returns (_, err, ok = false) when it went through 3035 // the catch clause. 3036 func TryOnCreated(callback js.Func[func(tab *Tab)]) (ret js.Void, exception js.Any, ok bool) { 3037 ok = js.True == bindings.TryOnCreated( 3038 js.Pointer(&ret), js.Pointer(&exception), 3039 callback.Ref(), 3040 ) 3041 3042 return 3043 } 3044 3045 // HasFuncOffCreated returns true if the function "WEBEXT.tabs.onCreated.removeListener" exists. 3046 func HasFuncOffCreated() bool { 3047 return js.True == bindings.HasFuncOffCreated() 3048 } 3049 3050 // FuncOffCreated returns the function "WEBEXT.tabs.onCreated.removeListener". 3051 func FuncOffCreated() (fn js.Func[func(callback js.Func[func(tab *Tab)])]) { 3052 bindings.FuncOffCreated( 3053 js.Pointer(&fn), 3054 ) 3055 return 3056 } 3057 3058 // OffCreated calls the function "WEBEXT.tabs.onCreated.removeListener" directly. 3059 func OffCreated(callback js.Func[func(tab *Tab)]) (ret js.Void) { 3060 bindings.CallOffCreated( 3061 js.Pointer(&ret), 3062 callback.Ref(), 3063 ) 3064 3065 return 3066 } 3067 3068 // TryOffCreated calls the function "WEBEXT.tabs.onCreated.removeListener" 3069 // in a try/catch block and returns (_, err, ok = false) when it went through 3070 // the catch clause. 3071 func TryOffCreated(callback js.Func[func(tab *Tab)]) (ret js.Void, exception js.Any, ok bool) { 3072 ok = js.True == bindings.TryOffCreated( 3073 js.Pointer(&ret), js.Pointer(&exception), 3074 callback.Ref(), 3075 ) 3076 3077 return 3078 } 3079 3080 // HasFuncHasOnCreated returns true if the function "WEBEXT.tabs.onCreated.hasListener" exists. 3081 func HasFuncHasOnCreated() bool { 3082 return js.True == bindings.HasFuncHasOnCreated() 3083 } 3084 3085 // FuncHasOnCreated returns the function "WEBEXT.tabs.onCreated.hasListener". 3086 func FuncHasOnCreated() (fn js.Func[func(callback js.Func[func(tab *Tab)]) bool]) { 3087 bindings.FuncHasOnCreated( 3088 js.Pointer(&fn), 3089 ) 3090 return 3091 } 3092 3093 // HasOnCreated calls the function "WEBEXT.tabs.onCreated.hasListener" directly. 3094 func HasOnCreated(callback js.Func[func(tab *Tab)]) (ret bool) { 3095 bindings.CallHasOnCreated( 3096 js.Pointer(&ret), 3097 callback.Ref(), 3098 ) 3099 3100 return 3101 } 3102 3103 // TryHasOnCreated calls the function "WEBEXT.tabs.onCreated.hasListener" 3104 // in a try/catch block and returns (_, err, ok = false) when it went through 3105 // the catch clause. 3106 func TryHasOnCreated(callback js.Func[func(tab *Tab)]) (ret bool, exception js.Any, ok bool) { 3107 ok = js.True == bindings.TryHasOnCreated( 3108 js.Pointer(&ret), js.Pointer(&exception), 3109 callback.Ref(), 3110 ) 3111 3112 return 3113 } 3114 3115 type OnDetachedEventCallbackFunc func(this js.Ref, tabId int64, detachInfo *OnDetachedArgDetachInfo) js.Ref 3116 3117 func (fn OnDetachedEventCallbackFunc) Register() js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)] { 3118 return js.RegisterCallback[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]( 3119 fn, abi.FuncPCABIInternal(fn), 3120 ) 3121 } 3122 3123 func (fn OnDetachedEventCallbackFunc) DispatchCallback( 3124 targetPC uintptr, ctx *js.CallbackContext, 3125 ) { 3126 args := ctx.Args() 3127 if len(args) != 2+1 /* js this */ || 3128 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3129 js.ThrowInvalidCallbackInvocation() 3130 } 3131 var arg1 OnDetachedArgDetachInfo 3132 arg1.UpdateFrom(args[1+1]) 3133 defer arg1.FreeMembers(true) 3134 3135 if ctx.Return(fn( 3136 args[0], 3137 3138 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3139 mark.NoEscape(&arg1), 3140 )) { 3141 return 3142 } 3143 3144 js.ThrowCallbackValueNotReturned() 3145 } 3146 3147 type OnDetachedEventCallback[T any] struct { 3148 Fn func(arg T, this js.Ref, tabId int64, detachInfo *OnDetachedArgDetachInfo) js.Ref 3149 Arg T 3150 } 3151 3152 func (cb *OnDetachedEventCallback[T]) Register() js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)] { 3153 return js.RegisterCallback[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]( 3154 cb, abi.FuncPCABIInternal(cb.Fn), 3155 ) 3156 } 3157 3158 func (cb *OnDetachedEventCallback[T]) DispatchCallback( 3159 targetPC uintptr, ctx *js.CallbackContext, 3160 ) { 3161 args := ctx.Args() 3162 if len(args) != 2+1 /* js this */ || 3163 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3164 js.ThrowInvalidCallbackInvocation() 3165 } 3166 var arg1 OnDetachedArgDetachInfo 3167 arg1.UpdateFrom(args[1+1]) 3168 defer arg1.FreeMembers(true) 3169 3170 if ctx.Return(cb.Fn( 3171 cb.Arg, 3172 args[0], 3173 3174 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3175 mark.NoEscape(&arg1), 3176 )) { 3177 return 3178 } 3179 3180 js.ThrowCallbackValueNotReturned() 3181 } 3182 3183 // HasFuncOnDetached returns true if the function "WEBEXT.tabs.onDetached.addListener" exists. 3184 func HasFuncOnDetached() bool { 3185 return js.True == bindings.HasFuncOnDetached() 3186 } 3187 3188 // FuncOnDetached returns the function "WEBEXT.tabs.onDetached.addListener". 3189 func FuncOnDetached() (fn js.Func[func(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)])]) { 3190 bindings.FuncOnDetached( 3191 js.Pointer(&fn), 3192 ) 3193 return 3194 } 3195 3196 // OnDetached calls the function "WEBEXT.tabs.onDetached.addListener" directly. 3197 func OnDetached(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) (ret js.Void) { 3198 bindings.CallOnDetached( 3199 js.Pointer(&ret), 3200 callback.Ref(), 3201 ) 3202 3203 return 3204 } 3205 3206 // TryOnDetached calls the function "WEBEXT.tabs.onDetached.addListener" 3207 // in a try/catch block and returns (_, err, ok = false) when it went through 3208 // the catch clause. 3209 func TryOnDetached(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) (ret js.Void, exception js.Any, ok bool) { 3210 ok = js.True == bindings.TryOnDetached( 3211 js.Pointer(&ret), js.Pointer(&exception), 3212 callback.Ref(), 3213 ) 3214 3215 return 3216 } 3217 3218 // HasFuncOffDetached returns true if the function "WEBEXT.tabs.onDetached.removeListener" exists. 3219 func HasFuncOffDetached() bool { 3220 return js.True == bindings.HasFuncOffDetached() 3221 } 3222 3223 // FuncOffDetached returns the function "WEBEXT.tabs.onDetached.removeListener". 3224 func FuncOffDetached() (fn js.Func[func(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)])]) { 3225 bindings.FuncOffDetached( 3226 js.Pointer(&fn), 3227 ) 3228 return 3229 } 3230 3231 // OffDetached calls the function "WEBEXT.tabs.onDetached.removeListener" directly. 3232 func OffDetached(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) (ret js.Void) { 3233 bindings.CallOffDetached( 3234 js.Pointer(&ret), 3235 callback.Ref(), 3236 ) 3237 3238 return 3239 } 3240 3241 // TryOffDetached calls the function "WEBEXT.tabs.onDetached.removeListener" 3242 // in a try/catch block and returns (_, err, ok = false) when it went through 3243 // the catch clause. 3244 func TryOffDetached(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) (ret js.Void, exception js.Any, ok bool) { 3245 ok = js.True == bindings.TryOffDetached( 3246 js.Pointer(&ret), js.Pointer(&exception), 3247 callback.Ref(), 3248 ) 3249 3250 return 3251 } 3252 3253 // HasFuncHasOnDetached returns true if the function "WEBEXT.tabs.onDetached.hasListener" exists. 3254 func HasFuncHasOnDetached() bool { 3255 return js.True == bindings.HasFuncHasOnDetached() 3256 } 3257 3258 // FuncHasOnDetached returns the function "WEBEXT.tabs.onDetached.hasListener". 3259 func FuncHasOnDetached() (fn js.Func[func(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) bool]) { 3260 bindings.FuncHasOnDetached( 3261 js.Pointer(&fn), 3262 ) 3263 return 3264 } 3265 3266 // HasOnDetached calls the function "WEBEXT.tabs.onDetached.hasListener" directly. 3267 func HasOnDetached(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) (ret bool) { 3268 bindings.CallHasOnDetached( 3269 js.Pointer(&ret), 3270 callback.Ref(), 3271 ) 3272 3273 return 3274 } 3275 3276 // TryHasOnDetached calls the function "WEBEXT.tabs.onDetached.hasListener" 3277 // in a try/catch block and returns (_, err, ok = false) when it went through 3278 // the catch clause. 3279 func TryHasOnDetached(callback js.Func[func(tabId int64, detachInfo *OnDetachedArgDetachInfo)]) (ret bool, exception js.Any, ok bool) { 3280 ok = js.True == bindings.TryHasOnDetached( 3281 js.Pointer(&ret), js.Pointer(&exception), 3282 callback.Ref(), 3283 ) 3284 3285 return 3286 } 3287 3288 type OnHighlightChangedEventCallbackFunc func(this js.Ref, selectInfo *OnHighlightChangedArgSelectInfo) js.Ref 3289 3290 func (fn OnHighlightChangedEventCallbackFunc) Register() js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)] { 3291 return js.RegisterCallback[func(selectInfo *OnHighlightChangedArgSelectInfo)]( 3292 fn, abi.FuncPCABIInternal(fn), 3293 ) 3294 } 3295 3296 func (fn OnHighlightChangedEventCallbackFunc) DispatchCallback( 3297 targetPC uintptr, ctx *js.CallbackContext, 3298 ) { 3299 args := ctx.Args() 3300 if len(args) != 1+1 /* js this */ || 3301 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3302 js.ThrowInvalidCallbackInvocation() 3303 } 3304 var arg0 OnHighlightChangedArgSelectInfo 3305 arg0.UpdateFrom(args[0+1]) 3306 defer arg0.FreeMembers(true) 3307 3308 if ctx.Return(fn( 3309 args[0], 3310 3311 mark.NoEscape(&arg0), 3312 )) { 3313 return 3314 } 3315 3316 js.ThrowCallbackValueNotReturned() 3317 } 3318 3319 type OnHighlightChangedEventCallback[T any] struct { 3320 Fn func(arg T, this js.Ref, selectInfo *OnHighlightChangedArgSelectInfo) js.Ref 3321 Arg T 3322 } 3323 3324 func (cb *OnHighlightChangedEventCallback[T]) Register() js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)] { 3325 return js.RegisterCallback[func(selectInfo *OnHighlightChangedArgSelectInfo)]( 3326 cb, abi.FuncPCABIInternal(cb.Fn), 3327 ) 3328 } 3329 3330 func (cb *OnHighlightChangedEventCallback[T]) DispatchCallback( 3331 targetPC uintptr, ctx *js.CallbackContext, 3332 ) { 3333 args := ctx.Args() 3334 if len(args) != 1+1 /* js this */ || 3335 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3336 js.ThrowInvalidCallbackInvocation() 3337 } 3338 var arg0 OnHighlightChangedArgSelectInfo 3339 arg0.UpdateFrom(args[0+1]) 3340 defer arg0.FreeMembers(true) 3341 3342 if ctx.Return(cb.Fn( 3343 cb.Arg, 3344 args[0], 3345 3346 mark.NoEscape(&arg0), 3347 )) { 3348 return 3349 } 3350 3351 js.ThrowCallbackValueNotReturned() 3352 } 3353 3354 // HasFuncOnHighlightChanged returns true if the function "WEBEXT.tabs.onHighlightChanged.addListener" exists. 3355 func HasFuncOnHighlightChanged() bool { 3356 return js.True == bindings.HasFuncOnHighlightChanged() 3357 } 3358 3359 // FuncOnHighlightChanged returns the function "WEBEXT.tabs.onHighlightChanged.addListener". 3360 func FuncOnHighlightChanged() (fn js.Func[func(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)])]) { 3361 bindings.FuncOnHighlightChanged( 3362 js.Pointer(&fn), 3363 ) 3364 return 3365 } 3366 3367 // OnHighlightChanged calls the function "WEBEXT.tabs.onHighlightChanged.addListener" directly. 3368 func OnHighlightChanged(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) (ret js.Void) { 3369 bindings.CallOnHighlightChanged( 3370 js.Pointer(&ret), 3371 callback.Ref(), 3372 ) 3373 3374 return 3375 } 3376 3377 // TryOnHighlightChanged calls the function "WEBEXT.tabs.onHighlightChanged.addListener" 3378 // in a try/catch block and returns (_, err, ok = false) when it went through 3379 // the catch clause. 3380 func TryOnHighlightChanged(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) (ret js.Void, exception js.Any, ok bool) { 3381 ok = js.True == bindings.TryOnHighlightChanged( 3382 js.Pointer(&ret), js.Pointer(&exception), 3383 callback.Ref(), 3384 ) 3385 3386 return 3387 } 3388 3389 // HasFuncOffHighlightChanged returns true if the function "WEBEXT.tabs.onHighlightChanged.removeListener" exists. 3390 func HasFuncOffHighlightChanged() bool { 3391 return js.True == bindings.HasFuncOffHighlightChanged() 3392 } 3393 3394 // FuncOffHighlightChanged returns the function "WEBEXT.tabs.onHighlightChanged.removeListener". 3395 func FuncOffHighlightChanged() (fn js.Func[func(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)])]) { 3396 bindings.FuncOffHighlightChanged( 3397 js.Pointer(&fn), 3398 ) 3399 return 3400 } 3401 3402 // OffHighlightChanged calls the function "WEBEXT.tabs.onHighlightChanged.removeListener" directly. 3403 func OffHighlightChanged(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) (ret js.Void) { 3404 bindings.CallOffHighlightChanged( 3405 js.Pointer(&ret), 3406 callback.Ref(), 3407 ) 3408 3409 return 3410 } 3411 3412 // TryOffHighlightChanged calls the function "WEBEXT.tabs.onHighlightChanged.removeListener" 3413 // in a try/catch block and returns (_, err, ok = false) when it went through 3414 // the catch clause. 3415 func TryOffHighlightChanged(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) (ret js.Void, exception js.Any, ok bool) { 3416 ok = js.True == bindings.TryOffHighlightChanged( 3417 js.Pointer(&ret), js.Pointer(&exception), 3418 callback.Ref(), 3419 ) 3420 3421 return 3422 } 3423 3424 // HasFuncHasOnHighlightChanged returns true if the function "WEBEXT.tabs.onHighlightChanged.hasListener" exists. 3425 func HasFuncHasOnHighlightChanged() bool { 3426 return js.True == bindings.HasFuncHasOnHighlightChanged() 3427 } 3428 3429 // FuncHasOnHighlightChanged returns the function "WEBEXT.tabs.onHighlightChanged.hasListener". 3430 func FuncHasOnHighlightChanged() (fn js.Func[func(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) bool]) { 3431 bindings.FuncHasOnHighlightChanged( 3432 js.Pointer(&fn), 3433 ) 3434 return 3435 } 3436 3437 // HasOnHighlightChanged calls the function "WEBEXT.tabs.onHighlightChanged.hasListener" directly. 3438 func HasOnHighlightChanged(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) (ret bool) { 3439 bindings.CallHasOnHighlightChanged( 3440 js.Pointer(&ret), 3441 callback.Ref(), 3442 ) 3443 3444 return 3445 } 3446 3447 // TryHasOnHighlightChanged calls the function "WEBEXT.tabs.onHighlightChanged.hasListener" 3448 // in a try/catch block and returns (_, err, ok = false) when it went through 3449 // the catch clause. 3450 func TryHasOnHighlightChanged(callback js.Func[func(selectInfo *OnHighlightChangedArgSelectInfo)]) (ret bool, exception js.Any, ok bool) { 3451 ok = js.True == bindings.TryHasOnHighlightChanged( 3452 js.Pointer(&ret), js.Pointer(&exception), 3453 callback.Ref(), 3454 ) 3455 3456 return 3457 } 3458 3459 type OnHighlightedEventCallbackFunc func(this js.Ref, highlightInfo *OnHighlightedArgHighlightInfo) js.Ref 3460 3461 func (fn OnHighlightedEventCallbackFunc) Register() js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)] { 3462 return js.RegisterCallback[func(highlightInfo *OnHighlightedArgHighlightInfo)]( 3463 fn, abi.FuncPCABIInternal(fn), 3464 ) 3465 } 3466 3467 func (fn OnHighlightedEventCallbackFunc) DispatchCallback( 3468 targetPC uintptr, ctx *js.CallbackContext, 3469 ) { 3470 args := ctx.Args() 3471 if len(args) != 1+1 /* js this */ || 3472 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3473 js.ThrowInvalidCallbackInvocation() 3474 } 3475 var arg0 OnHighlightedArgHighlightInfo 3476 arg0.UpdateFrom(args[0+1]) 3477 defer arg0.FreeMembers(true) 3478 3479 if ctx.Return(fn( 3480 args[0], 3481 3482 mark.NoEscape(&arg0), 3483 )) { 3484 return 3485 } 3486 3487 js.ThrowCallbackValueNotReturned() 3488 } 3489 3490 type OnHighlightedEventCallback[T any] struct { 3491 Fn func(arg T, this js.Ref, highlightInfo *OnHighlightedArgHighlightInfo) js.Ref 3492 Arg T 3493 } 3494 3495 func (cb *OnHighlightedEventCallback[T]) Register() js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)] { 3496 return js.RegisterCallback[func(highlightInfo *OnHighlightedArgHighlightInfo)]( 3497 cb, abi.FuncPCABIInternal(cb.Fn), 3498 ) 3499 } 3500 3501 func (cb *OnHighlightedEventCallback[T]) DispatchCallback( 3502 targetPC uintptr, ctx *js.CallbackContext, 3503 ) { 3504 args := ctx.Args() 3505 if len(args) != 1+1 /* js this */ || 3506 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3507 js.ThrowInvalidCallbackInvocation() 3508 } 3509 var arg0 OnHighlightedArgHighlightInfo 3510 arg0.UpdateFrom(args[0+1]) 3511 defer arg0.FreeMembers(true) 3512 3513 if ctx.Return(cb.Fn( 3514 cb.Arg, 3515 args[0], 3516 3517 mark.NoEscape(&arg0), 3518 )) { 3519 return 3520 } 3521 3522 js.ThrowCallbackValueNotReturned() 3523 } 3524 3525 // HasFuncOnHighlighted returns true if the function "WEBEXT.tabs.onHighlighted.addListener" exists. 3526 func HasFuncOnHighlighted() bool { 3527 return js.True == bindings.HasFuncOnHighlighted() 3528 } 3529 3530 // FuncOnHighlighted returns the function "WEBEXT.tabs.onHighlighted.addListener". 3531 func FuncOnHighlighted() (fn js.Func[func(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)])]) { 3532 bindings.FuncOnHighlighted( 3533 js.Pointer(&fn), 3534 ) 3535 return 3536 } 3537 3538 // OnHighlighted calls the function "WEBEXT.tabs.onHighlighted.addListener" directly. 3539 func OnHighlighted(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) (ret js.Void) { 3540 bindings.CallOnHighlighted( 3541 js.Pointer(&ret), 3542 callback.Ref(), 3543 ) 3544 3545 return 3546 } 3547 3548 // TryOnHighlighted calls the function "WEBEXT.tabs.onHighlighted.addListener" 3549 // in a try/catch block and returns (_, err, ok = false) when it went through 3550 // the catch clause. 3551 func TryOnHighlighted(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) (ret js.Void, exception js.Any, ok bool) { 3552 ok = js.True == bindings.TryOnHighlighted( 3553 js.Pointer(&ret), js.Pointer(&exception), 3554 callback.Ref(), 3555 ) 3556 3557 return 3558 } 3559 3560 // HasFuncOffHighlighted returns true if the function "WEBEXT.tabs.onHighlighted.removeListener" exists. 3561 func HasFuncOffHighlighted() bool { 3562 return js.True == bindings.HasFuncOffHighlighted() 3563 } 3564 3565 // FuncOffHighlighted returns the function "WEBEXT.tabs.onHighlighted.removeListener". 3566 func FuncOffHighlighted() (fn js.Func[func(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)])]) { 3567 bindings.FuncOffHighlighted( 3568 js.Pointer(&fn), 3569 ) 3570 return 3571 } 3572 3573 // OffHighlighted calls the function "WEBEXT.tabs.onHighlighted.removeListener" directly. 3574 func OffHighlighted(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) (ret js.Void) { 3575 bindings.CallOffHighlighted( 3576 js.Pointer(&ret), 3577 callback.Ref(), 3578 ) 3579 3580 return 3581 } 3582 3583 // TryOffHighlighted calls the function "WEBEXT.tabs.onHighlighted.removeListener" 3584 // in a try/catch block and returns (_, err, ok = false) when it went through 3585 // the catch clause. 3586 func TryOffHighlighted(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) (ret js.Void, exception js.Any, ok bool) { 3587 ok = js.True == bindings.TryOffHighlighted( 3588 js.Pointer(&ret), js.Pointer(&exception), 3589 callback.Ref(), 3590 ) 3591 3592 return 3593 } 3594 3595 // HasFuncHasOnHighlighted returns true if the function "WEBEXT.tabs.onHighlighted.hasListener" exists. 3596 func HasFuncHasOnHighlighted() bool { 3597 return js.True == bindings.HasFuncHasOnHighlighted() 3598 } 3599 3600 // FuncHasOnHighlighted returns the function "WEBEXT.tabs.onHighlighted.hasListener". 3601 func FuncHasOnHighlighted() (fn js.Func[func(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) bool]) { 3602 bindings.FuncHasOnHighlighted( 3603 js.Pointer(&fn), 3604 ) 3605 return 3606 } 3607 3608 // HasOnHighlighted calls the function "WEBEXT.tabs.onHighlighted.hasListener" directly. 3609 func HasOnHighlighted(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) (ret bool) { 3610 bindings.CallHasOnHighlighted( 3611 js.Pointer(&ret), 3612 callback.Ref(), 3613 ) 3614 3615 return 3616 } 3617 3618 // TryHasOnHighlighted calls the function "WEBEXT.tabs.onHighlighted.hasListener" 3619 // in a try/catch block and returns (_, err, ok = false) when it went through 3620 // the catch clause. 3621 func TryHasOnHighlighted(callback js.Func[func(highlightInfo *OnHighlightedArgHighlightInfo)]) (ret bool, exception js.Any, ok bool) { 3622 ok = js.True == bindings.TryHasOnHighlighted( 3623 js.Pointer(&ret), js.Pointer(&exception), 3624 callback.Ref(), 3625 ) 3626 3627 return 3628 } 3629 3630 type OnMovedEventCallbackFunc func(this js.Ref, tabId int64, moveInfo *OnMovedArgMoveInfo) js.Ref 3631 3632 func (fn OnMovedEventCallbackFunc) Register() js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)] { 3633 return js.RegisterCallback[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]( 3634 fn, abi.FuncPCABIInternal(fn), 3635 ) 3636 } 3637 3638 func (fn OnMovedEventCallbackFunc) DispatchCallback( 3639 targetPC uintptr, ctx *js.CallbackContext, 3640 ) { 3641 args := ctx.Args() 3642 if len(args) != 2+1 /* js this */ || 3643 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3644 js.ThrowInvalidCallbackInvocation() 3645 } 3646 var arg1 OnMovedArgMoveInfo 3647 arg1.UpdateFrom(args[1+1]) 3648 defer arg1.FreeMembers(true) 3649 3650 if ctx.Return(fn( 3651 args[0], 3652 3653 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3654 mark.NoEscape(&arg1), 3655 )) { 3656 return 3657 } 3658 3659 js.ThrowCallbackValueNotReturned() 3660 } 3661 3662 type OnMovedEventCallback[T any] struct { 3663 Fn func(arg T, this js.Ref, tabId int64, moveInfo *OnMovedArgMoveInfo) js.Ref 3664 Arg T 3665 } 3666 3667 func (cb *OnMovedEventCallback[T]) Register() js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)] { 3668 return js.RegisterCallback[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]( 3669 cb, abi.FuncPCABIInternal(cb.Fn), 3670 ) 3671 } 3672 3673 func (cb *OnMovedEventCallback[T]) DispatchCallback( 3674 targetPC uintptr, ctx *js.CallbackContext, 3675 ) { 3676 args := ctx.Args() 3677 if len(args) != 2+1 /* js this */ || 3678 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3679 js.ThrowInvalidCallbackInvocation() 3680 } 3681 var arg1 OnMovedArgMoveInfo 3682 arg1.UpdateFrom(args[1+1]) 3683 defer arg1.FreeMembers(true) 3684 3685 if ctx.Return(cb.Fn( 3686 cb.Arg, 3687 args[0], 3688 3689 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3690 mark.NoEscape(&arg1), 3691 )) { 3692 return 3693 } 3694 3695 js.ThrowCallbackValueNotReturned() 3696 } 3697 3698 // HasFuncOnMoved returns true if the function "WEBEXT.tabs.onMoved.addListener" exists. 3699 func HasFuncOnMoved() bool { 3700 return js.True == bindings.HasFuncOnMoved() 3701 } 3702 3703 // FuncOnMoved returns the function "WEBEXT.tabs.onMoved.addListener". 3704 func FuncOnMoved() (fn js.Func[func(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)])]) { 3705 bindings.FuncOnMoved( 3706 js.Pointer(&fn), 3707 ) 3708 return 3709 } 3710 3711 // OnMoved calls the function "WEBEXT.tabs.onMoved.addListener" directly. 3712 func OnMoved(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) (ret js.Void) { 3713 bindings.CallOnMoved( 3714 js.Pointer(&ret), 3715 callback.Ref(), 3716 ) 3717 3718 return 3719 } 3720 3721 // TryOnMoved calls the function "WEBEXT.tabs.onMoved.addListener" 3722 // in a try/catch block and returns (_, err, ok = false) when it went through 3723 // the catch clause. 3724 func TryOnMoved(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) (ret js.Void, exception js.Any, ok bool) { 3725 ok = js.True == bindings.TryOnMoved( 3726 js.Pointer(&ret), js.Pointer(&exception), 3727 callback.Ref(), 3728 ) 3729 3730 return 3731 } 3732 3733 // HasFuncOffMoved returns true if the function "WEBEXT.tabs.onMoved.removeListener" exists. 3734 func HasFuncOffMoved() bool { 3735 return js.True == bindings.HasFuncOffMoved() 3736 } 3737 3738 // FuncOffMoved returns the function "WEBEXT.tabs.onMoved.removeListener". 3739 func FuncOffMoved() (fn js.Func[func(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)])]) { 3740 bindings.FuncOffMoved( 3741 js.Pointer(&fn), 3742 ) 3743 return 3744 } 3745 3746 // OffMoved calls the function "WEBEXT.tabs.onMoved.removeListener" directly. 3747 func OffMoved(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) (ret js.Void) { 3748 bindings.CallOffMoved( 3749 js.Pointer(&ret), 3750 callback.Ref(), 3751 ) 3752 3753 return 3754 } 3755 3756 // TryOffMoved calls the function "WEBEXT.tabs.onMoved.removeListener" 3757 // in a try/catch block and returns (_, err, ok = false) when it went through 3758 // the catch clause. 3759 func TryOffMoved(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) (ret js.Void, exception js.Any, ok bool) { 3760 ok = js.True == bindings.TryOffMoved( 3761 js.Pointer(&ret), js.Pointer(&exception), 3762 callback.Ref(), 3763 ) 3764 3765 return 3766 } 3767 3768 // HasFuncHasOnMoved returns true if the function "WEBEXT.tabs.onMoved.hasListener" exists. 3769 func HasFuncHasOnMoved() bool { 3770 return js.True == bindings.HasFuncHasOnMoved() 3771 } 3772 3773 // FuncHasOnMoved returns the function "WEBEXT.tabs.onMoved.hasListener". 3774 func FuncHasOnMoved() (fn js.Func[func(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) bool]) { 3775 bindings.FuncHasOnMoved( 3776 js.Pointer(&fn), 3777 ) 3778 return 3779 } 3780 3781 // HasOnMoved calls the function "WEBEXT.tabs.onMoved.hasListener" directly. 3782 func HasOnMoved(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) (ret bool) { 3783 bindings.CallHasOnMoved( 3784 js.Pointer(&ret), 3785 callback.Ref(), 3786 ) 3787 3788 return 3789 } 3790 3791 // TryHasOnMoved calls the function "WEBEXT.tabs.onMoved.hasListener" 3792 // in a try/catch block and returns (_, err, ok = false) when it went through 3793 // the catch clause. 3794 func TryHasOnMoved(callback js.Func[func(tabId int64, moveInfo *OnMovedArgMoveInfo)]) (ret bool, exception js.Any, ok bool) { 3795 ok = js.True == bindings.TryHasOnMoved( 3796 js.Pointer(&ret), js.Pointer(&exception), 3797 callback.Ref(), 3798 ) 3799 3800 return 3801 } 3802 3803 type OnRemovedEventCallbackFunc func(this js.Ref, tabId int64, removeInfo *OnRemovedArgRemoveInfo) js.Ref 3804 3805 func (fn OnRemovedEventCallbackFunc) Register() js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)] { 3806 return js.RegisterCallback[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]( 3807 fn, abi.FuncPCABIInternal(fn), 3808 ) 3809 } 3810 3811 func (fn OnRemovedEventCallbackFunc) DispatchCallback( 3812 targetPC uintptr, ctx *js.CallbackContext, 3813 ) { 3814 args := ctx.Args() 3815 if len(args) != 2+1 /* js this */ || 3816 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3817 js.ThrowInvalidCallbackInvocation() 3818 } 3819 var arg1 OnRemovedArgRemoveInfo 3820 arg1.UpdateFrom(args[1+1]) 3821 defer arg1.FreeMembers(true) 3822 3823 if ctx.Return(fn( 3824 args[0], 3825 3826 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3827 mark.NoEscape(&arg1), 3828 )) { 3829 return 3830 } 3831 3832 js.ThrowCallbackValueNotReturned() 3833 } 3834 3835 type OnRemovedEventCallback[T any] struct { 3836 Fn func(arg T, this js.Ref, tabId int64, removeInfo *OnRemovedArgRemoveInfo) js.Ref 3837 Arg T 3838 } 3839 3840 func (cb *OnRemovedEventCallback[T]) Register() js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)] { 3841 return js.RegisterCallback[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]( 3842 cb, abi.FuncPCABIInternal(cb.Fn), 3843 ) 3844 } 3845 3846 func (cb *OnRemovedEventCallback[T]) DispatchCallback( 3847 targetPC uintptr, ctx *js.CallbackContext, 3848 ) { 3849 args := ctx.Args() 3850 if len(args) != 2+1 /* js this */ || 3851 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3852 js.ThrowInvalidCallbackInvocation() 3853 } 3854 var arg1 OnRemovedArgRemoveInfo 3855 arg1.UpdateFrom(args[1+1]) 3856 defer arg1.FreeMembers(true) 3857 3858 if ctx.Return(cb.Fn( 3859 cb.Arg, 3860 args[0], 3861 3862 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3863 mark.NoEscape(&arg1), 3864 )) { 3865 return 3866 } 3867 3868 js.ThrowCallbackValueNotReturned() 3869 } 3870 3871 // HasFuncOnRemoved returns true if the function "WEBEXT.tabs.onRemoved.addListener" exists. 3872 func HasFuncOnRemoved() bool { 3873 return js.True == bindings.HasFuncOnRemoved() 3874 } 3875 3876 // FuncOnRemoved returns the function "WEBEXT.tabs.onRemoved.addListener". 3877 func FuncOnRemoved() (fn js.Func[func(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)])]) { 3878 bindings.FuncOnRemoved( 3879 js.Pointer(&fn), 3880 ) 3881 return 3882 } 3883 3884 // OnRemoved calls the function "WEBEXT.tabs.onRemoved.addListener" directly. 3885 func OnRemoved(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) (ret js.Void) { 3886 bindings.CallOnRemoved( 3887 js.Pointer(&ret), 3888 callback.Ref(), 3889 ) 3890 3891 return 3892 } 3893 3894 // TryOnRemoved calls the function "WEBEXT.tabs.onRemoved.addListener" 3895 // in a try/catch block and returns (_, err, ok = false) when it went through 3896 // the catch clause. 3897 func TryOnRemoved(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) (ret js.Void, exception js.Any, ok bool) { 3898 ok = js.True == bindings.TryOnRemoved( 3899 js.Pointer(&ret), js.Pointer(&exception), 3900 callback.Ref(), 3901 ) 3902 3903 return 3904 } 3905 3906 // HasFuncOffRemoved returns true if the function "WEBEXT.tabs.onRemoved.removeListener" exists. 3907 func HasFuncOffRemoved() bool { 3908 return js.True == bindings.HasFuncOffRemoved() 3909 } 3910 3911 // FuncOffRemoved returns the function "WEBEXT.tabs.onRemoved.removeListener". 3912 func FuncOffRemoved() (fn js.Func[func(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)])]) { 3913 bindings.FuncOffRemoved( 3914 js.Pointer(&fn), 3915 ) 3916 return 3917 } 3918 3919 // OffRemoved calls the function "WEBEXT.tabs.onRemoved.removeListener" directly. 3920 func OffRemoved(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) (ret js.Void) { 3921 bindings.CallOffRemoved( 3922 js.Pointer(&ret), 3923 callback.Ref(), 3924 ) 3925 3926 return 3927 } 3928 3929 // TryOffRemoved calls the function "WEBEXT.tabs.onRemoved.removeListener" 3930 // in a try/catch block and returns (_, err, ok = false) when it went through 3931 // the catch clause. 3932 func TryOffRemoved(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) (ret js.Void, exception js.Any, ok bool) { 3933 ok = js.True == bindings.TryOffRemoved( 3934 js.Pointer(&ret), js.Pointer(&exception), 3935 callback.Ref(), 3936 ) 3937 3938 return 3939 } 3940 3941 // HasFuncHasOnRemoved returns true if the function "WEBEXT.tabs.onRemoved.hasListener" exists. 3942 func HasFuncHasOnRemoved() bool { 3943 return js.True == bindings.HasFuncHasOnRemoved() 3944 } 3945 3946 // FuncHasOnRemoved returns the function "WEBEXT.tabs.onRemoved.hasListener". 3947 func FuncHasOnRemoved() (fn js.Func[func(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) bool]) { 3948 bindings.FuncHasOnRemoved( 3949 js.Pointer(&fn), 3950 ) 3951 return 3952 } 3953 3954 // HasOnRemoved calls the function "WEBEXT.tabs.onRemoved.hasListener" directly. 3955 func HasOnRemoved(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) (ret bool) { 3956 bindings.CallHasOnRemoved( 3957 js.Pointer(&ret), 3958 callback.Ref(), 3959 ) 3960 3961 return 3962 } 3963 3964 // TryHasOnRemoved calls the function "WEBEXT.tabs.onRemoved.hasListener" 3965 // in a try/catch block and returns (_, err, ok = false) when it went through 3966 // the catch clause. 3967 func TryHasOnRemoved(callback js.Func[func(tabId int64, removeInfo *OnRemovedArgRemoveInfo)]) (ret bool, exception js.Any, ok bool) { 3968 ok = js.True == bindings.TryHasOnRemoved( 3969 js.Pointer(&ret), js.Pointer(&exception), 3970 callback.Ref(), 3971 ) 3972 3973 return 3974 } 3975 3976 type OnReplacedEventCallbackFunc func(this js.Ref, addedTabId int64, removedTabId int64) js.Ref 3977 3978 func (fn OnReplacedEventCallbackFunc) Register() js.Func[func(addedTabId int64, removedTabId int64)] { 3979 return js.RegisterCallback[func(addedTabId int64, removedTabId int64)]( 3980 fn, abi.FuncPCABIInternal(fn), 3981 ) 3982 } 3983 3984 func (fn OnReplacedEventCallbackFunc) DispatchCallback( 3985 targetPC uintptr, ctx *js.CallbackContext, 3986 ) { 3987 args := ctx.Args() 3988 if len(args) != 2+1 /* js this */ || 3989 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3990 js.ThrowInvalidCallbackInvocation() 3991 } 3992 3993 if ctx.Return(fn( 3994 args[0], 3995 3996 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 3997 js.BigInt[int64]{}.FromRef(args[1+1]).Get(), 3998 )) { 3999 return 4000 } 4001 4002 js.ThrowCallbackValueNotReturned() 4003 } 4004 4005 type OnReplacedEventCallback[T any] struct { 4006 Fn func(arg T, this js.Ref, addedTabId int64, removedTabId int64) js.Ref 4007 Arg T 4008 } 4009 4010 func (cb *OnReplacedEventCallback[T]) Register() js.Func[func(addedTabId int64, removedTabId int64)] { 4011 return js.RegisterCallback[func(addedTabId int64, removedTabId int64)]( 4012 cb, abi.FuncPCABIInternal(cb.Fn), 4013 ) 4014 } 4015 4016 func (cb *OnReplacedEventCallback[T]) DispatchCallback( 4017 targetPC uintptr, ctx *js.CallbackContext, 4018 ) { 4019 args := ctx.Args() 4020 if len(args) != 2+1 /* js this */ || 4021 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 4022 js.ThrowInvalidCallbackInvocation() 4023 } 4024 4025 if ctx.Return(cb.Fn( 4026 cb.Arg, 4027 args[0], 4028 4029 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 4030 js.BigInt[int64]{}.FromRef(args[1+1]).Get(), 4031 )) { 4032 return 4033 } 4034 4035 js.ThrowCallbackValueNotReturned() 4036 } 4037 4038 // HasFuncOnReplaced returns true if the function "WEBEXT.tabs.onReplaced.addListener" exists. 4039 func HasFuncOnReplaced() bool { 4040 return js.True == bindings.HasFuncOnReplaced() 4041 } 4042 4043 // FuncOnReplaced returns the function "WEBEXT.tabs.onReplaced.addListener". 4044 func FuncOnReplaced() (fn js.Func[func(callback js.Func[func(addedTabId int64, removedTabId int64)])]) { 4045 bindings.FuncOnReplaced( 4046 js.Pointer(&fn), 4047 ) 4048 return 4049 } 4050 4051 // OnReplaced calls the function "WEBEXT.tabs.onReplaced.addListener" directly. 4052 func OnReplaced(callback js.Func[func(addedTabId int64, removedTabId int64)]) (ret js.Void) { 4053 bindings.CallOnReplaced( 4054 js.Pointer(&ret), 4055 callback.Ref(), 4056 ) 4057 4058 return 4059 } 4060 4061 // TryOnReplaced calls the function "WEBEXT.tabs.onReplaced.addListener" 4062 // in a try/catch block and returns (_, err, ok = false) when it went through 4063 // the catch clause. 4064 func TryOnReplaced(callback js.Func[func(addedTabId int64, removedTabId int64)]) (ret js.Void, exception js.Any, ok bool) { 4065 ok = js.True == bindings.TryOnReplaced( 4066 js.Pointer(&ret), js.Pointer(&exception), 4067 callback.Ref(), 4068 ) 4069 4070 return 4071 } 4072 4073 // HasFuncOffReplaced returns true if the function "WEBEXT.tabs.onReplaced.removeListener" exists. 4074 func HasFuncOffReplaced() bool { 4075 return js.True == bindings.HasFuncOffReplaced() 4076 } 4077 4078 // FuncOffReplaced returns the function "WEBEXT.tabs.onReplaced.removeListener". 4079 func FuncOffReplaced() (fn js.Func[func(callback js.Func[func(addedTabId int64, removedTabId int64)])]) { 4080 bindings.FuncOffReplaced( 4081 js.Pointer(&fn), 4082 ) 4083 return 4084 } 4085 4086 // OffReplaced calls the function "WEBEXT.tabs.onReplaced.removeListener" directly. 4087 func OffReplaced(callback js.Func[func(addedTabId int64, removedTabId int64)]) (ret js.Void) { 4088 bindings.CallOffReplaced( 4089 js.Pointer(&ret), 4090 callback.Ref(), 4091 ) 4092 4093 return 4094 } 4095 4096 // TryOffReplaced calls the function "WEBEXT.tabs.onReplaced.removeListener" 4097 // in a try/catch block and returns (_, err, ok = false) when it went through 4098 // the catch clause. 4099 func TryOffReplaced(callback js.Func[func(addedTabId int64, removedTabId int64)]) (ret js.Void, exception js.Any, ok bool) { 4100 ok = js.True == bindings.TryOffReplaced( 4101 js.Pointer(&ret), js.Pointer(&exception), 4102 callback.Ref(), 4103 ) 4104 4105 return 4106 } 4107 4108 // HasFuncHasOnReplaced returns true if the function "WEBEXT.tabs.onReplaced.hasListener" exists. 4109 func HasFuncHasOnReplaced() bool { 4110 return js.True == bindings.HasFuncHasOnReplaced() 4111 } 4112 4113 // FuncHasOnReplaced returns the function "WEBEXT.tabs.onReplaced.hasListener". 4114 func FuncHasOnReplaced() (fn js.Func[func(callback js.Func[func(addedTabId int64, removedTabId int64)]) bool]) { 4115 bindings.FuncHasOnReplaced( 4116 js.Pointer(&fn), 4117 ) 4118 return 4119 } 4120 4121 // HasOnReplaced calls the function "WEBEXT.tabs.onReplaced.hasListener" directly. 4122 func HasOnReplaced(callback js.Func[func(addedTabId int64, removedTabId int64)]) (ret bool) { 4123 bindings.CallHasOnReplaced( 4124 js.Pointer(&ret), 4125 callback.Ref(), 4126 ) 4127 4128 return 4129 } 4130 4131 // TryHasOnReplaced calls the function "WEBEXT.tabs.onReplaced.hasListener" 4132 // in a try/catch block and returns (_, err, ok = false) when it went through 4133 // the catch clause. 4134 func TryHasOnReplaced(callback js.Func[func(addedTabId int64, removedTabId int64)]) (ret bool, exception js.Any, ok bool) { 4135 ok = js.True == bindings.TryHasOnReplaced( 4136 js.Pointer(&ret), js.Pointer(&exception), 4137 callback.Ref(), 4138 ) 4139 4140 return 4141 } 4142 4143 type OnSelectionChangedEventCallbackFunc func(this js.Ref, tabId int64, selectInfo *OnSelectionChangedArgSelectInfo) js.Ref 4144 4145 func (fn OnSelectionChangedEventCallbackFunc) Register() js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)] { 4146 return js.RegisterCallback[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]( 4147 fn, abi.FuncPCABIInternal(fn), 4148 ) 4149 } 4150 4151 func (fn OnSelectionChangedEventCallbackFunc) DispatchCallback( 4152 targetPC uintptr, ctx *js.CallbackContext, 4153 ) { 4154 args := ctx.Args() 4155 if len(args) != 2+1 /* js this */ || 4156 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 4157 js.ThrowInvalidCallbackInvocation() 4158 } 4159 var arg1 OnSelectionChangedArgSelectInfo 4160 arg1.UpdateFrom(args[1+1]) 4161 defer arg1.FreeMembers(true) 4162 4163 if ctx.Return(fn( 4164 args[0], 4165 4166 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 4167 mark.NoEscape(&arg1), 4168 )) { 4169 return 4170 } 4171 4172 js.ThrowCallbackValueNotReturned() 4173 } 4174 4175 type OnSelectionChangedEventCallback[T any] struct { 4176 Fn func(arg T, this js.Ref, tabId int64, selectInfo *OnSelectionChangedArgSelectInfo) js.Ref 4177 Arg T 4178 } 4179 4180 func (cb *OnSelectionChangedEventCallback[T]) Register() js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)] { 4181 return js.RegisterCallback[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]( 4182 cb, abi.FuncPCABIInternal(cb.Fn), 4183 ) 4184 } 4185 4186 func (cb *OnSelectionChangedEventCallback[T]) DispatchCallback( 4187 targetPC uintptr, ctx *js.CallbackContext, 4188 ) { 4189 args := ctx.Args() 4190 if len(args) != 2+1 /* js this */ || 4191 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 4192 js.ThrowInvalidCallbackInvocation() 4193 } 4194 var arg1 OnSelectionChangedArgSelectInfo 4195 arg1.UpdateFrom(args[1+1]) 4196 defer arg1.FreeMembers(true) 4197 4198 if ctx.Return(cb.Fn( 4199 cb.Arg, 4200 args[0], 4201 4202 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 4203 mark.NoEscape(&arg1), 4204 )) { 4205 return 4206 } 4207 4208 js.ThrowCallbackValueNotReturned() 4209 } 4210 4211 // HasFuncOnSelectionChanged returns true if the function "WEBEXT.tabs.onSelectionChanged.addListener" exists. 4212 func HasFuncOnSelectionChanged() bool { 4213 return js.True == bindings.HasFuncOnSelectionChanged() 4214 } 4215 4216 // FuncOnSelectionChanged returns the function "WEBEXT.tabs.onSelectionChanged.addListener". 4217 func FuncOnSelectionChanged() (fn js.Func[func(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)])]) { 4218 bindings.FuncOnSelectionChanged( 4219 js.Pointer(&fn), 4220 ) 4221 return 4222 } 4223 4224 // OnSelectionChanged calls the function "WEBEXT.tabs.onSelectionChanged.addListener" directly. 4225 func OnSelectionChanged(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) (ret js.Void) { 4226 bindings.CallOnSelectionChanged( 4227 js.Pointer(&ret), 4228 callback.Ref(), 4229 ) 4230 4231 return 4232 } 4233 4234 // TryOnSelectionChanged calls the function "WEBEXT.tabs.onSelectionChanged.addListener" 4235 // in a try/catch block and returns (_, err, ok = false) when it went through 4236 // the catch clause. 4237 func TryOnSelectionChanged(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) (ret js.Void, exception js.Any, ok bool) { 4238 ok = js.True == bindings.TryOnSelectionChanged( 4239 js.Pointer(&ret), js.Pointer(&exception), 4240 callback.Ref(), 4241 ) 4242 4243 return 4244 } 4245 4246 // HasFuncOffSelectionChanged returns true if the function "WEBEXT.tabs.onSelectionChanged.removeListener" exists. 4247 func HasFuncOffSelectionChanged() bool { 4248 return js.True == bindings.HasFuncOffSelectionChanged() 4249 } 4250 4251 // FuncOffSelectionChanged returns the function "WEBEXT.tabs.onSelectionChanged.removeListener". 4252 func FuncOffSelectionChanged() (fn js.Func[func(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)])]) { 4253 bindings.FuncOffSelectionChanged( 4254 js.Pointer(&fn), 4255 ) 4256 return 4257 } 4258 4259 // OffSelectionChanged calls the function "WEBEXT.tabs.onSelectionChanged.removeListener" directly. 4260 func OffSelectionChanged(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) (ret js.Void) { 4261 bindings.CallOffSelectionChanged( 4262 js.Pointer(&ret), 4263 callback.Ref(), 4264 ) 4265 4266 return 4267 } 4268 4269 // TryOffSelectionChanged calls the function "WEBEXT.tabs.onSelectionChanged.removeListener" 4270 // in a try/catch block and returns (_, err, ok = false) when it went through 4271 // the catch clause. 4272 func TryOffSelectionChanged(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) (ret js.Void, exception js.Any, ok bool) { 4273 ok = js.True == bindings.TryOffSelectionChanged( 4274 js.Pointer(&ret), js.Pointer(&exception), 4275 callback.Ref(), 4276 ) 4277 4278 return 4279 } 4280 4281 // HasFuncHasOnSelectionChanged returns true if the function "WEBEXT.tabs.onSelectionChanged.hasListener" exists. 4282 func HasFuncHasOnSelectionChanged() bool { 4283 return js.True == bindings.HasFuncHasOnSelectionChanged() 4284 } 4285 4286 // FuncHasOnSelectionChanged returns the function "WEBEXT.tabs.onSelectionChanged.hasListener". 4287 func FuncHasOnSelectionChanged() (fn js.Func[func(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) bool]) { 4288 bindings.FuncHasOnSelectionChanged( 4289 js.Pointer(&fn), 4290 ) 4291 return 4292 } 4293 4294 // HasOnSelectionChanged calls the function "WEBEXT.tabs.onSelectionChanged.hasListener" directly. 4295 func HasOnSelectionChanged(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) (ret bool) { 4296 bindings.CallHasOnSelectionChanged( 4297 js.Pointer(&ret), 4298 callback.Ref(), 4299 ) 4300 4301 return 4302 } 4303 4304 // TryHasOnSelectionChanged calls the function "WEBEXT.tabs.onSelectionChanged.hasListener" 4305 // in a try/catch block and returns (_, err, ok = false) when it went through 4306 // the catch clause. 4307 func TryHasOnSelectionChanged(callback js.Func[func(tabId int64, selectInfo *OnSelectionChangedArgSelectInfo)]) (ret bool, exception js.Any, ok bool) { 4308 ok = js.True == bindings.TryHasOnSelectionChanged( 4309 js.Pointer(&ret), js.Pointer(&exception), 4310 callback.Ref(), 4311 ) 4312 4313 return 4314 } 4315 4316 type OnUpdatedEventCallbackFunc func(this js.Ref, tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab) js.Ref 4317 4318 func (fn OnUpdatedEventCallbackFunc) Register() js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)] { 4319 return js.RegisterCallback[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]( 4320 fn, abi.FuncPCABIInternal(fn), 4321 ) 4322 } 4323 4324 func (fn OnUpdatedEventCallbackFunc) DispatchCallback( 4325 targetPC uintptr, ctx *js.CallbackContext, 4326 ) { 4327 args := ctx.Args() 4328 if len(args) != 3+1 /* js this */ || 4329 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 4330 js.ThrowInvalidCallbackInvocation() 4331 } 4332 var arg1 OnUpdatedArgChangeInfo 4333 arg1.UpdateFrom(args[1+1]) 4334 defer arg1.FreeMembers(true) 4335 var arg2 Tab 4336 arg2.UpdateFrom(args[2+1]) 4337 defer arg2.FreeMembers(true) 4338 4339 if ctx.Return(fn( 4340 args[0], 4341 4342 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 4343 mark.NoEscape(&arg1), 4344 mark.NoEscape(&arg2), 4345 )) { 4346 return 4347 } 4348 4349 js.ThrowCallbackValueNotReturned() 4350 } 4351 4352 type OnUpdatedEventCallback[T any] struct { 4353 Fn func(arg T, this js.Ref, tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab) js.Ref 4354 Arg T 4355 } 4356 4357 func (cb *OnUpdatedEventCallback[T]) Register() js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)] { 4358 return js.RegisterCallback[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]( 4359 cb, abi.FuncPCABIInternal(cb.Fn), 4360 ) 4361 } 4362 4363 func (cb *OnUpdatedEventCallback[T]) DispatchCallback( 4364 targetPC uintptr, ctx *js.CallbackContext, 4365 ) { 4366 args := ctx.Args() 4367 if len(args) != 3+1 /* js this */ || 4368 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 4369 js.ThrowInvalidCallbackInvocation() 4370 } 4371 var arg1 OnUpdatedArgChangeInfo 4372 arg1.UpdateFrom(args[1+1]) 4373 defer arg1.FreeMembers(true) 4374 var arg2 Tab 4375 arg2.UpdateFrom(args[2+1]) 4376 defer arg2.FreeMembers(true) 4377 4378 if ctx.Return(cb.Fn( 4379 cb.Arg, 4380 args[0], 4381 4382 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 4383 mark.NoEscape(&arg1), 4384 mark.NoEscape(&arg2), 4385 )) { 4386 return 4387 } 4388 4389 js.ThrowCallbackValueNotReturned() 4390 } 4391 4392 // HasFuncOnUpdated returns true if the function "WEBEXT.tabs.onUpdated.addListener" exists. 4393 func HasFuncOnUpdated() bool { 4394 return js.True == bindings.HasFuncOnUpdated() 4395 } 4396 4397 // FuncOnUpdated returns the function "WEBEXT.tabs.onUpdated.addListener". 4398 func FuncOnUpdated() (fn js.Func[func(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)])]) { 4399 bindings.FuncOnUpdated( 4400 js.Pointer(&fn), 4401 ) 4402 return 4403 } 4404 4405 // OnUpdated calls the function "WEBEXT.tabs.onUpdated.addListener" directly. 4406 func OnUpdated(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) (ret js.Void) { 4407 bindings.CallOnUpdated( 4408 js.Pointer(&ret), 4409 callback.Ref(), 4410 ) 4411 4412 return 4413 } 4414 4415 // TryOnUpdated calls the function "WEBEXT.tabs.onUpdated.addListener" 4416 // in a try/catch block and returns (_, err, ok = false) when it went through 4417 // the catch clause. 4418 func TryOnUpdated(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) (ret js.Void, exception js.Any, ok bool) { 4419 ok = js.True == bindings.TryOnUpdated( 4420 js.Pointer(&ret), js.Pointer(&exception), 4421 callback.Ref(), 4422 ) 4423 4424 return 4425 } 4426 4427 // HasFuncOffUpdated returns true if the function "WEBEXT.tabs.onUpdated.removeListener" exists. 4428 func HasFuncOffUpdated() bool { 4429 return js.True == bindings.HasFuncOffUpdated() 4430 } 4431 4432 // FuncOffUpdated returns the function "WEBEXT.tabs.onUpdated.removeListener". 4433 func FuncOffUpdated() (fn js.Func[func(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)])]) { 4434 bindings.FuncOffUpdated( 4435 js.Pointer(&fn), 4436 ) 4437 return 4438 } 4439 4440 // OffUpdated calls the function "WEBEXT.tabs.onUpdated.removeListener" directly. 4441 func OffUpdated(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) (ret js.Void) { 4442 bindings.CallOffUpdated( 4443 js.Pointer(&ret), 4444 callback.Ref(), 4445 ) 4446 4447 return 4448 } 4449 4450 // TryOffUpdated calls the function "WEBEXT.tabs.onUpdated.removeListener" 4451 // in a try/catch block and returns (_, err, ok = false) when it went through 4452 // the catch clause. 4453 func TryOffUpdated(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) (ret js.Void, exception js.Any, ok bool) { 4454 ok = js.True == bindings.TryOffUpdated( 4455 js.Pointer(&ret), js.Pointer(&exception), 4456 callback.Ref(), 4457 ) 4458 4459 return 4460 } 4461 4462 // HasFuncHasOnUpdated returns true if the function "WEBEXT.tabs.onUpdated.hasListener" exists. 4463 func HasFuncHasOnUpdated() bool { 4464 return js.True == bindings.HasFuncHasOnUpdated() 4465 } 4466 4467 // FuncHasOnUpdated returns the function "WEBEXT.tabs.onUpdated.hasListener". 4468 func FuncHasOnUpdated() (fn js.Func[func(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) bool]) { 4469 bindings.FuncHasOnUpdated( 4470 js.Pointer(&fn), 4471 ) 4472 return 4473 } 4474 4475 // HasOnUpdated calls the function "WEBEXT.tabs.onUpdated.hasListener" directly. 4476 func HasOnUpdated(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) (ret bool) { 4477 bindings.CallHasOnUpdated( 4478 js.Pointer(&ret), 4479 callback.Ref(), 4480 ) 4481 4482 return 4483 } 4484 4485 // TryHasOnUpdated calls the function "WEBEXT.tabs.onUpdated.hasListener" 4486 // in a try/catch block and returns (_, err, ok = false) when it went through 4487 // the catch clause. 4488 func TryHasOnUpdated(callback js.Func[func(tabId int64, changeInfo *OnUpdatedArgChangeInfo, tab *Tab)]) (ret bool, exception js.Any, ok bool) { 4489 ok = js.True == bindings.TryHasOnUpdated( 4490 js.Pointer(&ret), js.Pointer(&exception), 4491 callback.Ref(), 4492 ) 4493 4494 return 4495 } 4496 4497 type OnZoomChangeEventCallbackFunc func(this js.Ref, ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo) js.Ref 4498 4499 func (fn OnZoomChangeEventCallbackFunc) Register() js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)] { 4500 return js.RegisterCallback[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]( 4501 fn, abi.FuncPCABIInternal(fn), 4502 ) 4503 } 4504 4505 func (fn OnZoomChangeEventCallbackFunc) DispatchCallback( 4506 targetPC uintptr, ctx *js.CallbackContext, 4507 ) { 4508 args := ctx.Args() 4509 if len(args) != 1+1 /* js this */ || 4510 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 4511 js.ThrowInvalidCallbackInvocation() 4512 } 4513 var arg0 OnZoomChangeArgZoomChangeInfo 4514 arg0.UpdateFrom(args[0+1]) 4515 defer arg0.FreeMembers(true) 4516 4517 if ctx.Return(fn( 4518 args[0], 4519 4520 mark.NoEscape(&arg0), 4521 )) { 4522 return 4523 } 4524 4525 js.ThrowCallbackValueNotReturned() 4526 } 4527 4528 type OnZoomChangeEventCallback[T any] struct { 4529 Fn func(arg T, this js.Ref, ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo) js.Ref 4530 Arg T 4531 } 4532 4533 func (cb *OnZoomChangeEventCallback[T]) Register() js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)] { 4534 return js.RegisterCallback[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]( 4535 cb, abi.FuncPCABIInternal(cb.Fn), 4536 ) 4537 } 4538 4539 func (cb *OnZoomChangeEventCallback[T]) DispatchCallback( 4540 targetPC uintptr, ctx *js.CallbackContext, 4541 ) { 4542 args := ctx.Args() 4543 if len(args) != 1+1 /* js this */ || 4544 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 4545 js.ThrowInvalidCallbackInvocation() 4546 } 4547 var arg0 OnZoomChangeArgZoomChangeInfo 4548 arg0.UpdateFrom(args[0+1]) 4549 defer arg0.FreeMembers(true) 4550 4551 if ctx.Return(cb.Fn( 4552 cb.Arg, 4553 args[0], 4554 4555 mark.NoEscape(&arg0), 4556 )) { 4557 return 4558 } 4559 4560 js.ThrowCallbackValueNotReturned() 4561 } 4562 4563 // HasFuncOnZoomChange returns true if the function "WEBEXT.tabs.onZoomChange.addListener" exists. 4564 func HasFuncOnZoomChange() bool { 4565 return js.True == bindings.HasFuncOnZoomChange() 4566 } 4567 4568 // FuncOnZoomChange returns the function "WEBEXT.tabs.onZoomChange.addListener". 4569 func FuncOnZoomChange() (fn js.Func[func(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)])]) { 4570 bindings.FuncOnZoomChange( 4571 js.Pointer(&fn), 4572 ) 4573 return 4574 } 4575 4576 // OnZoomChange calls the function "WEBEXT.tabs.onZoomChange.addListener" directly. 4577 func OnZoomChange(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) (ret js.Void) { 4578 bindings.CallOnZoomChange( 4579 js.Pointer(&ret), 4580 callback.Ref(), 4581 ) 4582 4583 return 4584 } 4585 4586 // TryOnZoomChange calls the function "WEBEXT.tabs.onZoomChange.addListener" 4587 // in a try/catch block and returns (_, err, ok = false) when it went through 4588 // the catch clause. 4589 func TryOnZoomChange(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) (ret js.Void, exception js.Any, ok bool) { 4590 ok = js.True == bindings.TryOnZoomChange( 4591 js.Pointer(&ret), js.Pointer(&exception), 4592 callback.Ref(), 4593 ) 4594 4595 return 4596 } 4597 4598 // HasFuncOffZoomChange returns true if the function "WEBEXT.tabs.onZoomChange.removeListener" exists. 4599 func HasFuncOffZoomChange() bool { 4600 return js.True == bindings.HasFuncOffZoomChange() 4601 } 4602 4603 // FuncOffZoomChange returns the function "WEBEXT.tabs.onZoomChange.removeListener". 4604 func FuncOffZoomChange() (fn js.Func[func(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)])]) { 4605 bindings.FuncOffZoomChange( 4606 js.Pointer(&fn), 4607 ) 4608 return 4609 } 4610 4611 // OffZoomChange calls the function "WEBEXT.tabs.onZoomChange.removeListener" directly. 4612 func OffZoomChange(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) (ret js.Void) { 4613 bindings.CallOffZoomChange( 4614 js.Pointer(&ret), 4615 callback.Ref(), 4616 ) 4617 4618 return 4619 } 4620 4621 // TryOffZoomChange calls the function "WEBEXT.tabs.onZoomChange.removeListener" 4622 // in a try/catch block and returns (_, err, ok = false) when it went through 4623 // the catch clause. 4624 func TryOffZoomChange(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) (ret js.Void, exception js.Any, ok bool) { 4625 ok = js.True == bindings.TryOffZoomChange( 4626 js.Pointer(&ret), js.Pointer(&exception), 4627 callback.Ref(), 4628 ) 4629 4630 return 4631 } 4632 4633 // HasFuncHasOnZoomChange returns true if the function "WEBEXT.tabs.onZoomChange.hasListener" exists. 4634 func HasFuncHasOnZoomChange() bool { 4635 return js.True == bindings.HasFuncHasOnZoomChange() 4636 } 4637 4638 // FuncHasOnZoomChange returns the function "WEBEXT.tabs.onZoomChange.hasListener". 4639 func FuncHasOnZoomChange() (fn js.Func[func(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) bool]) { 4640 bindings.FuncHasOnZoomChange( 4641 js.Pointer(&fn), 4642 ) 4643 return 4644 } 4645 4646 // HasOnZoomChange calls the function "WEBEXT.tabs.onZoomChange.hasListener" directly. 4647 func HasOnZoomChange(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) (ret bool) { 4648 bindings.CallHasOnZoomChange( 4649 js.Pointer(&ret), 4650 callback.Ref(), 4651 ) 4652 4653 return 4654 } 4655 4656 // TryHasOnZoomChange calls the function "WEBEXT.tabs.onZoomChange.hasListener" 4657 // in a try/catch block and returns (_, err, ok = false) when it went through 4658 // the catch clause. 4659 func TryHasOnZoomChange(callback js.Func[func(ZoomChangeInfo *OnZoomChangeArgZoomChangeInfo)]) (ret bool, exception js.Any, ok bool) { 4660 ok = js.True == bindings.TryHasOnZoomChange( 4661 js.Pointer(&ret), js.Pointer(&exception), 4662 callback.Ref(), 4663 ) 4664 4665 return 4666 } 4667 4668 // HasFuncQuery returns true if the function "WEBEXT.tabs.query" exists. 4669 func HasFuncQuery() bool { 4670 return js.True == bindings.HasFuncQuery() 4671 } 4672 4673 // FuncQuery returns the function "WEBEXT.tabs.query". 4674 func FuncQuery() (fn js.Func[func(queryInfo QueryArgQueryInfo) js.Promise[js.Array[Tab]]]) { 4675 bindings.FuncQuery( 4676 js.Pointer(&fn), 4677 ) 4678 return 4679 } 4680 4681 // Query calls the function "WEBEXT.tabs.query" directly. 4682 func Query(queryInfo QueryArgQueryInfo) (ret js.Promise[js.Array[Tab]]) { 4683 bindings.CallQuery( 4684 js.Pointer(&ret), 4685 js.Pointer(&queryInfo), 4686 ) 4687 4688 return 4689 } 4690 4691 // TryQuery calls the function "WEBEXT.tabs.query" 4692 // in a try/catch block and returns (_, err, ok = false) when it went through 4693 // the catch clause. 4694 func TryQuery(queryInfo QueryArgQueryInfo) (ret js.Promise[js.Array[Tab]], exception js.Any, ok bool) { 4695 ok = js.True == bindings.TryQuery( 4696 js.Pointer(&ret), js.Pointer(&exception), 4697 js.Pointer(&queryInfo), 4698 ) 4699 4700 return 4701 } 4702 4703 // HasFuncReload returns true if the function "WEBEXT.tabs.reload" exists. 4704 func HasFuncReload() bool { 4705 return js.True == bindings.HasFuncReload() 4706 } 4707 4708 // FuncReload returns the function "WEBEXT.tabs.reload". 4709 func FuncReload() (fn js.Func[func(tabId int64, reloadProperties ReloadArgReloadProperties) js.Promise[js.Void]]) { 4710 bindings.FuncReload( 4711 js.Pointer(&fn), 4712 ) 4713 return 4714 } 4715 4716 // Reload calls the function "WEBEXT.tabs.reload" directly. 4717 func Reload(tabId int64, reloadProperties ReloadArgReloadProperties) (ret js.Promise[js.Void]) { 4718 bindings.CallReload( 4719 js.Pointer(&ret), 4720 float64(tabId), 4721 js.Pointer(&reloadProperties), 4722 ) 4723 4724 return 4725 } 4726 4727 // TryReload calls the function "WEBEXT.tabs.reload" 4728 // in a try/catch block and returns (_, err, ok = false) when it went through 4729 // the catch clause. 4730 func TryReload(tabId int64, reloadProperties ReloadArgReloadProperties) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4731 ok = js.True == bindings.TryReload( 4732 js.Pointer(&ret), js.Pointer(&exception), 4733 float64(tabId), 4734 js.Pointer(&reloadProperties), 4735 ) 4736 4737 return 4738 } 4739 4740 // HasFuncRemove returns true if the function "WEBEXT.tabs.remove" exists. 4741 func HasFuncRemove() bool { 4742 return js.True == bindings.HasFuncRemove() 4743 } 4744 4745 // FuncRemove returns the function "WEBEXT.tabs.remove". 4746 func FuncRemove() (fn js.Func[func(tabIds OneOf_Int64_ArrayInt64) js.Promise[js.Void]]) { 4747 bindings.FuncRemove( 4748 js.Pointer(&fn), 4749 ) 4750 return 4751 } 4752 4753 // Remove calls the function "WEBEXT.tabs.remove" directly. 4754 func Remove(tabIds OneOf_Int64_ArrayInt64) (ret js.Promise[js.Void]) { 4755 bindings.CallRemove( 4756 js.Pointer(&ret), 4757 tabIds.Ref(), 4758 ) 4759 4760 return 4761 } 4762 4763 // TryRemove calls the function "WEBEXT.tabs.remove" 4764 // in a try/catch block and returns (_, err, ok = false) when it went through 4765 // the catch clause. 4766 func TryRemove(tabIds OneOf_Int64_ArrayInt64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4767 ok = js.True == bindings.TryRemove( 4768 js.Pointer(&ret), js.Pointer(&exception), 4769 tabIds.Ref(), 4770 ) 4771 4772 return 4773 } 4774 4775 // HasFuncRemoveCSS returns true if the function "WEBEXT.tabs.removeCSS" exists. 4776 func HasFuncRemoveCSS() bool { 4777 return js.True == bindings.HasFuncRemoveCSS() 4778 } 4779 4780 // FuncRemoveCSS returns the function "WEBEXT.tabs.removeCSS". 4781 func FuncRemoveCSS() (fn js.Func[func(tabId int64, details extensiontypes.DeleteInjectionDetails) js.Promise[js.Void]]) { 4782 bindings.FuncRemoveCSS( 4783 js.Pointer(&fn), 4784 ) 4785 return 4786 } 4787 4788 // RemoveCSS calls the function "WEBEXT.tabs.removeCSS" directly. 4789 func RemoveCSS(tabId int64, details extensiontypes.DeleteInjectionDetails) (ret js.Promise[js.Void]) { 4790 bindings.CallRemoveCSS( 4791 js.Pointer(&ret), 4792 float64(tabId), 4793 js.Pointer(&details), 4794 ) 4795 4796 return 4797 } 4798 4799 // TryRemoveCSS calls the function "WEBEXT.tabs.removeCSS" 4800 // in a try/catch block and returns (_, err, ok = false) when it went through 4801 // the catch clause. 4802 func TryRemoveCSS(tabId int64, details extensiontypes.DeleteInjectionDetails) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4803 ok = js.True == bindings.TryRemoveCSS( 4804 js.Pointer(&ret), js.Pointer(&exception), 4805 float64(tabId), 4806 js.Pointer(&details), 4807 ) 4808 4809 return 4810 } 4811 4812 // HasFuncSendMessage returns true if the function "WEBEXT.tabs.sendMessage" exists. 4813 func HasFuncSendMessage() bool { 4814 return js.True == bindings.HasFuncSendMessage() 4815 } 4816 4817 // FuncSendMessage returns the function "WEBEXT.tabs.sendMessage". 4818 func FuncSendMessage() (fn js.Func[func(tabId int64, message js.Any, options SendMessageArgOptions) js.Promise[js.Any]]) { 4819 bindings.FuncSendMessage( 4820 js.Pointer(&fn), 4821 ) 4822 return 4823 } 4824 4825 // SendMessage calls the function "WEBEXT.tabs.sendMessage" directly. 4826 func SendMessage(tabId int64, message js.Any, options SendMessageArgOptions) (ret js.Promise[js.Any]) { 4827 bindings.CallSendMessage( 4828 js.Pointer(&ret), 4829 float64(tabId), 4830 message.Ref(), 4831 js.Pointer(&options), 4832 ) 4833 4834 return 4835 } 4836 4837 // TrySendMessage calls the function "WEBEXT.tabs.sendMessage" 4838 // in a try/catch block and returns (_, err, ok = false) when it went through 4839 // the catch clause. 4840 func TrySendMessage(tabId int64, message js.Any, options SendMessageArgOptions) (ret js.Promise[js.Any], exception js.Any, ok bool) { 4841 ok = js.True == bindings.TrySendMessage( 4842 js.Pointer(&ret), js.Pointer(&exception), 4843 float64(tabId), 4844 message.Ref(), 4845 js.Pointer(&options), 4846 ) 4847 4848 return 4849 } 4850 4851 // HasFuncSendRequest returns true if the function "WEBEXT.tabs.sendRequest" exists. 4852 func HasFuncSendRequest() bool { 4853 return js.True == bindings.HasFuncSendRequest() 4854 } 4855 4856 // FuncSendRequest returns the function "WEBEXT.tabs.sendRequest". 4857 func FuncSendRequest() (fn js.Func[func(tabId int64, request js.Any) js.Promise[js.Any]]) { 4858 bindings.FuncSendRequest( 4859 js.Pointer(&fn), 4860 ) 4861 return 4862 } 4863 4864 // SendRequest calls the function "WEBEXT.tabs.sendRequest" directly. 4865 func SendRequest(tabId int64, request js.Any) (ret js.Promise[js.Any]) { 4866 bindings.CallSendRequest( 4867 js.Pointer(&ret), 4868 float64(tabId), 4869 request.Ref(), 4870 ) 4871 4872 return 4873 } 4874 4875 // TrySendRequest calls the function "WEBEXT.tabs.sendRequest" 4876 // in a try/catch block and returns (_, err, ok = false) when it went through 4877 // the catch clause. 4878 func TrySendRequest(tabId int64, request js.Any) (ret js.Promise[js.Any], exception js.Any, ok bool) { 4879 ok = js.True == bindings.TrySendRequest( 4880 js.Pointer(&ret), js.Pointer(&exception), 4881 float64(tabId), 4882 request.Ref(), 4883 ) 4884 4885 return 4886 } 4887 4888 // HasFuncSetZoom returns true if the function "WEBEXT.tabs.setZoom" exists. 4889 func HasFuncSetZoom() bool { 4890 return js.True == bindings.HasFuncSetZoom() 4891 } 4892 4893 // FuncSetZoom returns the function "WEBEXT.tabs.setZoom". 4894 func FuncSetZoom() (fn js.Func[func(tabId int64, zoomFactor float64) js.Promise[js.Void]]) { 4895 bindings.FuncSetZoom( 4896 js.Pointer(&fn), 4897 ) 4898 return 4899 } 4900 4901 // SetZoom calls the function "WEBEXT.tabs.setZoom" directly. 4902 func SetZoom(tabId int64, zoomFactor float64) (ret js.Promise[js.Void]) { 4903 bindings.CallSetZoom( 4904 js.Pointer(&ret), 4905 float64(tabId), 4906 float64(zoomFactor), 4907 ) 4908 4909 return 4910 } 4911 4912 // TrySetZoom calls the function "WEBEXT.tabs.setZoom" 4913 // in a try/catch block and returns (_, err, ok = false) when it went through 4914 // the catch clause. 4915 func TrySetZoom(tabId int64, zoomFactor float64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4916 ok = js.True == bindings.TrySetZoom( 4917 js.Pointer(&ret), js.Pointer(&exception), 4918 float64(tabId), 4919 float64(zoomFactor), 4920 ) 4921 4922 return 4923 } 4924 4925 // HasFuncSetZoomSettings returns true if the function "WEBEXT.tabs.setZoomSettings" exists. 4926 func HasFuncSetZoomSettings() bool { 4927 return js.True == bindings.HasFuncSetZoomSettings() 4928 } 4929 4930 // FuncSetZoomSettings returns the function "WEBEXT.tabs.setZoomSettings". 4931 func FuncSetZoomSettings() (fn js.Func[func(tabId int64, zoomSettings ZoomSettings) js.Promise[js.Void]]) { 4932 bindings.FuncSetZoomSettings( 4933 js.Pointer(&fn), 4934 ) 4935 return 4936 } 4937 4938 // SetZoomSettings calls the function "WEBEXT.tabs.setZoomSettings" directly. 4939 func SetZoomSettings(tabId int64, zoomSettings ZoomSettings) (ret js.Promise[js.Void]) { 4940 bindings.CallSetZoomSettings( 4941 js.Pointer(&ret), 4942 float64(tabId), 4943 js.Pointer(&zoomSettings), 4944 ) 4945 4946 return 4947 } 4948 4949 // TrySetZoomSettings calls the function "WEBEXT.tabs.setZoomSettings" 4950 // in a try/catch block and returns (_, err, ok = false) when it went through 4951 // the catch clause. 4952 func TrySetZoomSettings(tabId int64, zoomSettings ZoomSettings) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4953 ok = js.True == bindings.TrySetZoomSettings( 4954 js.Pointer(&ret), js.Pointer(&exception), 4955 float64(tabId), 4956 js.Pointer(&zoomSettings), 4957 ) 4958 4959 return 4960 } 4961 4962 // HasFuncUngroup returns true if the function "WEBEXT.tabs.ungroup" exists. 4963 func HasFuncUngroup() bool { 4964 return js.True == bindings.HasFuncUngroup() 4965 } 4966 4967 // FuncUngroup returns the function "WEBEXT.tabs.ungroup". 4968 func FuncUngroup() (fn js.Func[func(tabIds OneOf_Int64_ArrayInt64) js.Promise[js.Void]]) { 4969 bindings.FuncUngroup( 4970 js.Pointer(&fn), 4971 ) 4972 return 4973 } 4974 4975 // Ungroup calls the function "WEBEXT.tabs.ungroup" directly. 4976 func Ungroup(tabIds OneOf_Int64_ArrayInt64) (ret js.Promise[js.Void]) { 4977 bindings.CallUngroup( 4978 js.Pointer(&ret), 4979 tabIds.Ref(), 4980 ) 4981 4982 return 4983 } 4984 4985 // TryUngroup calls the function "WEBEXT.tabs.ungroup" 4986 // in a try/catch block and returns (_, err, ok = false) when it went through 4987 // the catch clause. 4988 func TryUngroup(tabIds OneOf_Int64_ArrayInt64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4989 ok = js.True == bindings.TryUngroup( 4990 js.Pointer(&ret), js.Pointer(&exception), 4991 tabIds.Ref(), 4992 ) 4993 4994 return 4995 } 4996 4997 // HasFuncUpdate returns true if the function "WEBEXT.tabs.update" exists. 4998 func HasFuncUpdate() bool { 4999 return js.True == bindings.HasFuncUpdate() 5000 } 5001 5002 // FuncUpdate returns the function "WEBEXT.tabs.update". 5003 func FuncUpdate() (fn js.Func[func(tabId int64, updateProperties UpdateArgUpdateProperties) js.Promise[Tab]]) { 5004 bindings.FuncUpdate( 5005 js.Pointer(&fn), 5006 ) 5007 return 5008 } 5009 5010 // Update calls the function "WEBEXT.tabs.update" directly. 5011 func Update(tabId int64, updateProperties UpdateArgUpdateProperties) (ret js.Promise[Tab]) { 5012 bindings.CallUpdate( 5013 js.Pointer(&ret), 5014 float64(tabId), 5015 js.Pointer(&updateProperties), 5016 ) 5017 5018 return 5019 } 5020 5021 // TryUpdate calls the function "WEBEXT.tabs.update" 5022 // in a try/catch block and returns (_, err, ok = false) when it went through 5023 // the catch clause. 5024 func TryUpdate(tabId int64, updateProperties UpdateArgUpdateProperties) (ret js.Promise[Tab], exception js.Any, ok bool) { 5025 ok = js.True == bindings.TryUpdate( 5026 js.Pointer(&ret), js.Pointer(&exception), 5027 float64(tabId), 5028 js.Pointer(&updateProperties), 5029 ) 5030 5031 return 5032 }