github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/webnavigation/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package webnavigation 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/webnavigation/bindings" 12 ) 13 14 type GetAllFramesArgDetails struct { 15 // TabId is "GetAllFramesArgDetails.tabId" 16 // 17 // Required 18 TabId int64 19 20 FFI_USE bool 21 } 22 23 // FromRef calls UpdateFrom and returns a GetAllFramesArgDetails with all fields set. 24 func (p GetAllFramesArgDetails) FromRef(ref js.Ref) GetAllFramesArgDetails { 25 p.UpdateFrom(ref) 26 return p 27 } 28 29 // New creates a new GetAllFramesArgDetails in the application heap. 30 func (p GetAllFramesArgDetails) New() js.Ref { 31 return bindings.GetAllFramesArgDetailsJSLoad( 32 js.Pointer(&p), js.True, 0, 33 ) 34 } 35 36 // UpdateFrom copies value of all fields of the heap object to p. 37 func (p *GetAllFramesArgDetails) UpdateFrom(ref js.Ref) { 38 bindings.GetAllFramesArgDetailsJSStore( 39 js.Pointer(p), ref, 40 ) 41 } 42 43 // Update writes all fields of the p to the heap object referenced by ref. 44 func (p *GetAllFramesArgDetails) Update(ref js.Ref) { 45 bindings.GetAllFramesArgDetailsJSLoad( 46 js.Pointer(p), js.False, ref, 47 ) 48 } 49 50 // FreeMembers frees fields with heap reference, if recursive is true 51 // free all heap references reachable from p. 52 func (p *GetAllFramesArgDetails) FreeMembers(recursive bool) { 53 } 54 55 type GetAllFramesReturnTypeElem struct { 56 // DocumentId is "GetAllFramesReturnTypeElem.documentId" 57 // 58 // Required 59 DocumentId js.String 60 // DocumentLifecycle is "GetAllFramesReturnTypeElem.documentLifecycle" 61 // 62 // Required 63 DocumentLifecycle extensiontypes.DocumentLifecycle 64 // ErrorOccurred is "GetAllFramesReturnTypeElem.errorOccurred" 65 // 66 // Required 67 ErrorOccurred bool 68 // FrameId is "GetAllFramesReturnTypeElem.frameId" 69 // 70 // Required 71 FrameId int64 72 // FrameType is "GetAllFramesReturnTypeElem.frameType" 73 // 74 // Required 75 FrameType extensiontypes.FrameType 76 // ParentDocumentId is "GetAllFramesReturnTypeElem.parentDocumentId" 77 // 78 // Optional 79 ParentDocumentId js.String 80 // ParentFrameId is "GetAllFramesReturnTypeElem.parentFrameId" 81 // 82 // Required 83 ParentFrameId int64 84 // ProcessId is "GetAllFramesReturnTypeElem.processId" 85 // 86 // Required 87 ProcessId int64 88 // Url is "GetAllFramesReturnTypeElem.url" 89 // 90 // Required 91 Url js.String 92 93 FFI_USE bool 94 } 95 96 // FromRef calls UpdateFrom and returns a GetAllFramesReturnTypeElem with all fields set. 97 func (p GetAllFramesReturnTypeElem) FromRef(ref js.Ref) GetAllFramesReturnTypeElem { 98 p.UpdateFrom(ref) 99 return p 100 } 101 102 // New creates a new GetAllFramesReturnTypeElem in the application heap. 103 func (p GetAllFramesReturnTypeElem) New() js.Ref { 104 return bindings.GetAllFramesReturnTypeElemJSLoad( 105 js.Pointer(&p), js.True, 0, 106 ) 107 } 108 109 // UpdateFrom copies value of all fields of the heap object to p. 110 func (p *GetAllFramesReturnTypeElem) UpdateFrom(ref js.Ref) { 111 bindings.GetAllFramesReturnTypeElemJSStore( 112 js.Pointer(p), ref, 113 ) 114 } 115 116 // Update writes all fields of the p to the heap object referenced by ref. 117 func (p *GetAllFramesReturnTypeElem) Update(ref js.Ref) { 118 bindings.GetAllFramesReturnTypeElemJSLoad( 119 js.Pointer(p), js.False, ref, 120 ) 121 } 122 123 // FreeMembers frees fields with heap reference, if recursive is true 124 // free all heap references reachable from p. 125 func (p *GetAllFramesReturnTypeElem) FreeMembers(recursive bool) { 126 js.Free( 127 p.DocumentId.Ref(), 128 p.ParentDocumentId.Ref(), 129 p.Url.Ref(), 130 ) 131 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 132 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 133 p.Url = p.Url.FromRef(js.Undefined) 134 } 135 136 type GetFrameArgDetails struct { 137 // DocumentId is "GetFrameArgDetails.documentId" 138 // 139 // Optional 140 DocumentId js.String 141 // FrameId is "GetFrameArgDetails.frameId" 142 // 143 // Optional 144 // 145 // NOTE: FFI_USE_FrameId MUST be set to true to make this field effective. 146 FrameId int64 147 // ProcessId is "GetFrameArgDetails.processId" 148 // 149 // Optional 150 // 151 // NOTE: FFI_USE_ProcessId MUST be set to true to make this field effective. 152 ProcessId int64 153 // TabId is "GetFrameArgDetails.tabId" 154 // 155 // Optional 156 // 157 // NOTE: FFI_USE_TabId MUST be set to true to make this field effective. 158 TabId int64 159 160 FFI_USE_FrameId bool // for FrameId. 161 FFI_USE_ProcessId bool // for ProcessId. 162 FFI_USE_TabId bool // for TabId. 163 164 FFI_USE bool 165 } 166 167 // FromRef calls UpdateFrom and returns a GetFrameArgDetails with all fields set. 168 func (p GetFrameArgDetails) FromRef(ref js.Ref) GetFrameArgDetails { 169 p.UpdateFrom(ref) 170 return p 171 } 172 173 // New creates a new GetFrameArgDetails in the application heap. 174 func (p GetFrameArgDetails) New() js.Ref { 175 return bindings.GetFrameArgDetailsJSLoad( 176 js.Pointer(&p), js.True, 0, 177 ) 178 } 179 180 // UpdateFrom copies value of all fields of the heap object to p. 181 func (p *GetFrameArgDetails) UpdateFrom(ref js.Ref) { 182 bindings.GetFrameArgDetailsJSStore( 183 js.Pointer(p), ref, 184 ) 185 } 186 187 // Update writes all fields of the p to the heap object referenced by ref. 188 func (p *GetFrameArgDetails) Update(ref js.Ref) { 189 bindings.GetFrameArgDetailsJSLoad( 190 js.Pointer(p), js.False, ref, 191 ) 192 } 193 194 // FreeMembers frees fields with heap reference, if recursive is true 195 // free all heap references reachable from p. 196 func (p *GetFrameArgDetails) FreeMembers(recursive bool) { 197 js.Free( 198 p.DocumentId.Ref(), 199 ) 200 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 201 } 202 203 type GetFrameReturnType struct { 204 // DocumentId is "GetFrameReturnType.documentId" 205 // 206 // Required 207 DocumentId js.String 208 // DocumentLifecycle is "GetFrameReturnType.documentLifecycle" 209 // 210 // Required 211 DocumentLifecycle extensiontypes.DocumentLifecycle 212 // ErrorOccurred is "GetFrameReturnType.errorOccurred" 213 // 214 // Required 215 ErrorOccurred bool 216 // FrameType is "GetFrameReturnType.frameType" 217 // 218 // Required 219 FrameType extensiontypes.FrameType 220 // ParentDocumentId is "GetFrameReturnType.parentDocumentId" 221 // 222 // Optional 223 ParentDocumentId js.String 224 // ParentFrameId is "GetFrameReturnType.parentFrameId" 225 // 226 // Required 227 ParentFrameId int64 228 // Url is "GetFrameReturnType.url" 229 // 230 // Required 231 Url js.String 232 233 FFI_USE bool 234 } 235 236 // FromRef calls UpdateFrom and returns a GetFrameReturnType with all fields set. 237 func (p GetFrameReturnType) FromRef(ref js.Ref) GetFrameReturnType { 238 p.UpdateFrom(ref) 239 return p 240 } 241 242 // New creates a new GetFrameReturnType in the application heap. 243 func (p GetFrameReturnType) New() js.Ref { 244 return bindings.GetFrameReturnTypeJSLoad( 245 js.Pointer(&p), js.True, 0, 246 ) 247 } 248 249 // UpdateFrom copies value of all fields of the heap object to p. 250 func (p *GetFrameReturnType) UpdateFrom(ref js.Ref) { 251 bindings.GetFrameReturnTypeJSStore( 252 js.Pointer(p), ref, 253 ) 254 } 255 256 // Update writes all fields of the p to the heap object referenced by ref. 257 func (p *GetFrameReturnType) Update(ref js.Ref) { 258 bindings.GetFrameReturnTypeJSLoad( 259 js.Pointer(p), js.False, ref, 260 ) 261 } 262 263 // FreeMembers frees fields with heap reference, if recursive is true 264 // free all heap references reachable from p. 265 func (p *GetFrameReturnType) FreeMembers(recursive bool) { 266 js.Free( 267 p.DocumentId.Ref(), 268 p.ParentDocumentId.Ref(), 269 p.Url.Ref(), 270 ) 271 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 272 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 273 p.Url = p.Url.FromRef(js.Undefined) 274 } 275 276 type OnBeforeNavigateArgDetails struct { 277 // DocumentLifecycle is "OnBeforeNavigateArgDetails.documentLifecycle" 278 // 279 // Required 280 DocumentLifecycle extensiontypes.DocumentLifecycle 281 // FrameId is "OnBeforeNavigateArgDetails.frameId" 282 // 283 // Required 284 FrameId int64 285 // FrameType is "OnBeforeNavigateArgDetails.frameType" 286 // 287 // Required 288 FrameType extensiontypes.FrameType 289 // ParentDocumentId is "OnBeforeNavigateArgDetails.parentDocumentId" 290 // 291 // Optional 292 ParentDocumentId js.String 293 // ParentFrameId is "OnBeforeNavigateArgDetails.parentFrameId" 294 // 295 // Required 296 ParentFrameId int64 297 // ProcessId is "OnBeforeNavigateArgDetails.processId" 298 // 299 // Required 300 ProcessId int64 301 // TabId is "OnBeforeNavigateArgDetails.tabId" 302 // 303 // Required 304 TabId int64 305 // TimeStamp is "OnBeforeNavigateArgDetails.timeStamp" 306 // 307 // Required 308 TimeStamp float64 309 // Url is "OnBeforeNavigateArgDetails.url" 310 // 311 // Required 312 Url js.String 313 314 FFI_USE bool 315 } 316 317 // FromRef calls UpdateFrom and returns a OnBeforeNavigateArgDetails with all fields set. 318 func (p OnBeforeNavigateArgDetails) FromRef(ref js.Ref) OnBeforeNavigateArgDetails { 319 p.UpdateFrom(ref) 320 return p 321 } 322 323 // New creates a new OnBeforeNavigateArgDetails in the application heap. 324 func (p OnBeforeNavigateArgDetails) New() js.Ref { 325 return bindings.OnBeforeNavigateArgDetailsJSLoad( 326 js.Pointer(&p), js.True, 0, 327 ) 328 } 329 330 // UpdateFrom copies value of all fields of the heap object to p. 331 func (p *OnBeforeNavigateArgDetails) UpdateFrom(ref js.Ref) { 332 bindings.OnBeforeNavigateArgDetailsJSStore( 333 js.Pointer(p), ref, 334 ) 335 } 336 337 // Update writes all fields of the p to the heap object referenced by ref. 338 func (p *OnBeforeNavigateArgDetails) Update(ref js.Ref) { 339 bindings.OnBeforeNavigateArgDetailsJSLoad( 340 js.Pointer(p), js.False, ref, 341 ) 342 } 343 344 // FreeMembers frees fields with heap reference, if recursive is true 345 // free all heap references reachable from p. 346 func (p *OnBeforeNavigateArgDetails) FreeMembers(recursive bool) { 347 js.Free( 348 p.ParentDocumentId.Ref(), 349 p.Url.Ref(), 350 ) 351 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 352 p.Url = p.Url.FromRef(js.Undefined) 353 } 354 355 type TransitionQualifier uint32 356 357 const ( 358 _ TransitionQualifier = iota 359 360 TransitionQualifier_CLIENT_REDIRECT 361 TransitionQualifier_SERVER_REDIRECT 362 TransitionQualifier_FORWARD_BACK 363 TransitionQualifier_FROM_ADDRESS_BAR 364 ) 365 366 func (TransitionQualifier) FromRef(str js.Ref) TransitionQualifier { 367 return TransitionQualifier(bindings.ConstOfTransitionQualifier(str)) 368 } 369 370 func (x TransitionQualifier) String() (string, bool) { 371 switch x { 372 case TransitionQualifier_CLIENT_REDIRECT: 373 return "client_redirect", true 374 case TransitionQualifier_SERVER_REDIRECT: 375 return "server_redirect", true 376 case TransitionQualifier_FORWARD_BACK: 377 return "forward_back", true 378 case TransitionQualifier_FROM_ADDRESS_BAR: 379 return "from_address_bar", true 380 default: 381 return "", false 382 } 383 } 384 385 type TransitionType uint32 386 387 const ( 388 _ TransitionType = iota 389 390 TransitionType_LINK 391 TransitionType_TYPED 392 TransitionType_AUTO_BOOKMARK 393 TransitionType_AUTO_SUBFRAME 394 TransitionType_MANUAL_SUBFRAME 395 TransitionType_GENERATED 396 TransitionType_START_PAGE 397 TransitionType_FORM_SUBMIT 398 TransitionType_RELOAD 399 TransitionType_KEYWORD 400 TransitionType_KEYWORD_GENERATED 401 ) 402 403 func (TransitionType) FromRef(str js.Ref) TransitionType { 404 return TransitionType(bindings.ConstOfTransitionType(str)) 405 } 406 407 func (x TransitionType) String() (string, bool) { 408 switch x { 409 case TransitionType_LINK: 410 return "link", true 411 case TransitionType_TYPED: 412 return "typed", true 413 case TransitionType_AUTO_BOOKMARK: 414 return "auto_bookmark", true 415 case TransitionType_AUTO_SUBFRAME: 416 return "auto_subframe", true 417 case TransitionType_MANUAL_SUBFRAME: 418 return "manual_subframe", true 419 case TransitionType_GENERATED: 420 return "generated", true 421 case TransitionType_START_PAGE: 422 return "start_page", true 423 case TransitionType_FORM_SUBMIT: 424 return "form_submit", true 425 case TransitionType_RELOAD: 426 return "reload", true 427 case TransitionType_KEYWORD: 428 return "keyword", true 429 case TransitionType_KEYWORD_GENERATED: 430 return "keyword_generated", true 431 default: 432 return "", false 433 } 434 } 435 436 type OnCommittedArgDetails struct { 437 // DocumentId is "OnCommittedArgDetails.documentId" 438 // 439 // Required 440 DocumentId js.String 441 // DocumentLifecycle is "OnCommittedArgDetails.documentLifecycle" 442 // 443 // Required 444 DocumentLifecycle extensiontypes.DocumentLifecycle 445 // FrameId is "OnCommittedArgDetails.frameId" 446 // 447 // Required 448 FrameId int64 449 // FrameType is "OnCommittedArgDetails.frameType" 450 // 451 // Required 452 FrameType extensiontypes.FrameType 453 // ParentDocumentId is "OnCommittedArgDetails.parentDocumentId" 454 // 455 // Optional 456 ParentDocumentId js.String 457 // ParentFrameId is "OnCommittedArgDetails.parentFrameId" 458 // 459 // Required 460 ParentFrameId int64 461 // ProcessId is "OnCommittedArgDetails.processId" 462 // 463 // Required 464 ProcessId int64 465 // TabId is "OnCommittedArgDetails.tabId" 466 // 467 // Required 468 TabId int64 469 // TimeStamp is "OnCommittedArgDetails.timeStamp" 470 // 471 // Required 472 TimeStamp float64 473 // TransitionQualifiers is "OnCommittedArgDetails.transitionQualifiers" 474 // 475 // Required 476 TransitionQualifiers js.Array[TransitionQualifier] 477 // TransitionType is "OnCommittedArgDetails.transitionType" 478 // 479 // Required 480 TransitionType TransitionType 481 // Url is "OnCommittedArgDetails.url" 482 // 483 // Required 484 Url js.String 485 486 FFI_USE bool 487 } 488 489 // FromRef calls UpdateFrom and returns a OnCommittedArgDetails with all fields set. 490 func (p OnCommittedArgDetails) FromRef(ref js.Ref) OnCommittedArgDetails { 491 p.UpdateFrom(ref) 492 return p 493 } 494 495 // New creates a new OnCommittedArgDetails in the application heap. 496 func (p OnCommittedArgDetails) New() js.Ref { 497 return bindings.OnCommittedArgDetailsJSLoad( 498 js.Pointer(&p), js.True, 0, 499 ) 500 } 501 502 // UpdateFrom copies value of all fields of the heap object to p. 503 func (p *OnCommittedArgDetails) UpdateFrom(ref js.Ref) { 504 bindings.OnCommittedArgDetailsJSStore( 505 js.Pointer(p), ref, 506 ) 507 } 508 509 // Update writes all fields of the p to the heap object referenced by ref. 510 func (p *OnCommittedArgDetails) Update(ref js.Ref) { 511 bindings.OnCommittedArgDetailsJSLoad( 512 js.Pointer(p), js.False, ref, 513 ) 514 } 515 516 // FreeMembers frees fields with heap reference, if recursive is true 517 // free all heap references reachable from p. 518 func (p *OnCommittedArgDetails) FreeMembers(recursive bool) { 519 js.Free( 520 p.DocumentId.Ref(), 521 p.ParentDocumentId.Ref(), 522 p.TransitionQualifiers.Ref(), 523 p.Url.Ref(), 524 ) 525 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 526 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 527 p.TransitionQualifiers = p.TransitionQualifiers.FromRef(js.Undefined) 528 p.Url = p.Url.FromRef(js.Undefined) 529 } 530 531 type OnCompletedArgDetails struct { 532 // DocumentId is "OnCompletedArgDetails.documentId" 533 // 534 // Required 535 DocumentId js.String 536 // DocumentLifecycle is "OnCompletedArgDetails.documentLifecycle" 537 // 538 // Required 539 DocumentLifecycle extensiontypes.DocumentLifecycle 540 // FrameId is "OnCompletedArgDetails.frameId" 541 // 542 // Required 543 FrameId int64 544 // FrameType is "OnCompletedArgDetails.frameType" 545 // 546 // Required 547 FrameType extensiontypes.FrameType 548 // ParentDocumentId is "OnCompletedArgDetails.parentDocumentId" 549 // 550 // Optional 551 ParentDocumentId js.String 552 // ParentFrameId is "OnCompletedArgDetails.parentFrameId" 553 // 554 // Required 555 ParentFrameId int64 556 // ProcessId is "OnCompletedArgDetails.processId" 557 // 558 // Required 559 ProcessId int64 560 // TabId is "OnCompletedArgDetails.tabId" 561 // 562 // Required 563 TabId int64 564 // TimeStamp is "OnCompletedArgDetails.timeStamp" 565 // 566 // Required 567 TimeStamp float64 568 // Url is "OnCompletedArgDetails.url" 569 // 570 // Required 571 Url js.String 572 573 FFI_USE bool 574 } 575 576 // FromRef calls UpdateFrom and returns a OnCompletedArgDetails with all fields set. 577 func (p OnCompletedArgDetails) FromRef(ref js.Ref) OnCompletedArgDetails { 578 p.UpdateFrom(ref) 579 return p 580 } 581 582 // New creates a new OnCompletedArgDetails in the application heap. 583 func (p OnCompletedArgDetails) New() js.Ref { 584 return bindings.OnCompletedArgDetailsJSLoad( 585 js.Pointer(&p), js.True, 0, 586 ) 587 } 588 589 // UpdateFrom copies value of all fields of the heap object to p. 590 func (p *OnCompletedArgDetails) UpdateFrom(ref js.Ref) { 591 bindings.OnCompletedArgDetailsJSStore( 592 js.Pointer(p), ref, 593 ) 594 } 595 596 // Update writes all fields of the p to the heap object referenced by ref. 597 func (p *OnCompletedArgDetails) Update(ref js.Ref) { 598 bindings.OnCompletedArgDetailsJSLoad( 599 js.Pointer(p), js.False, ref, 600 ) 601 } 602 603 // FreeMembers frees fields with heap reference, if recursive is true 604 // free all heap references reachable from p. 605 func (p *OnCompletedArgDetails) FreeMembers(recursive bool) { 606 js.Free( 607 p.DocumentId.Ref(), 608 p.ParentDocumentId.Ref(), 609 p.Url.Ref(), 610 ) 611 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 612 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 613 p.Url = p.Url.FromRef(js.Undefined) 614 } 615 616 type OnCreatedNavigationTargetArgDetails struct { 617 // SourceFrameId is "OnCreatedNavigationTargetArgDetails.sourceFrameId" 618 // 619 // Required 620 SourceFrameId int64 621 // SourceProcessId is "OnCreatedNavigationTargetArgDetails.sourceProcessId" 622 // 623 // Required 624 SourceProcessId int64 625 // SourceTabId is "OnCreatedNavigationTargetArgDetails.sourceTabId" 626 // 627 // Required 628 SourceTabId int64 629 // TabId is "OnCreatedNavigationTargetArgDetails.tabId" 630 // 631 // Required 632 TabId int64 633 // TimeStamp is "OnCreatedNavigationTargetArgDetails.timeStamp" 634 // 635 // Required 636 TimeStamp float64 637 // Url is "OnCreatedNavigationTargetArgDetails.url" 638 // 639 // Required 640 Url js.String 641 642 FFI_USE bool 643 } 644 645 // FromRef calls UpdateFrom and returns a OnCreatedNavigationTargetArgDetails with all fields set. 646 func (p OnCreatedNavigationTargetArgDetails) FromRef(ref js.Ref) OnCreatedNavigationTargetArgDetails { 647 p.UpdateFrom(ref) 648 return p 649 } 650 651 // New creates a new OnCreatedNavigationTargetArgDetails in the application heap. 652 func (p OnCreatedNavigationTargetArgDetails) New() js.Ref { 653 return bindings.OnCreatedNavigationTargetArgDetailsJSLoad( 654 js.Pointer(&p), js.True, 0, 655 ) 656 } 657 658 // UpdateFrom copies value of all fields of the heap object to p. 659 func (p *OnCreatedNavigationTargetArgDetails) UpdateFrom(ref js.Ref) { 660 bindings.OnCreatedNavigationTargetArgDetailsJSStore( 661 js.Pointer(p), ref, 662 ) 663 } 664 665 // Update writes all fields of the p to the heap object referenced by ref. 666 func (p *OnCreatedNavigationTargetArgDetails) Update(ref js.Ref) { 667 bindings.OnCreatedNavigationTargetArgDetailsJSLoad( 668 js.Pointer(p), js.False, ref, 669 ) 670 } 671 672 // FreeMembers frees fields with heap reference, if recursive is true 673 // free all heap references reachable from p. 674 func (p *OnCreatedNavigationTargetArgDetails) FreeMembers(recursive bool) { 675 js.Free( 676 p.Url.Ref(), 677 ) 678 p.Url = p.Url.FromRef(js.Undefined) 679 } 680 681 type OnDOMContentLoadedArgDetails struct { 682 // DocumentId is "OnDOMContentLoadedArgDetails.documentId" 683 // 684 // Required 685 DocumentId js.String 686 // DocumentLifecycle is "OnDOMContentLoadedArgDetails.documentLifecycle" 687 // 688 // Required 689 DocumentLifecycle extensiontypes.DocumentLifecycle 690 // FrameId is "OnDOMContentLoadedArgDetails.frameId" 691 // 692 // Required 693 FrameId int64 694 // FrameType is "OnDOMContentLoadedArgDetails.frameType" 695 // 696 // Required 697 FrameType extensiontypes.FrameType 698 // ParentDocumentId is "OnDOMContentLoadedArgDetails.parentDocumentId" 699 // 700 // Optional 701 ParentDocumentId js.String 702 // ParentFrameId is "OnDOMContentLoadedArgDetails.parentFrameId" 703 // 704 // Required 705 ParentFrameId int64 706 // ProcessId is "OnDOMContentLoadedArgDetails.processId" 707 // 708 // Required 709 ProcessId int64 710 // TabId is "OnDOMContentLoadedArgDetails.tabId" 711 // 712 // Required 713 TabId int64 714 // TimeStamp is "OnDOMContentLoadedArgDetails.timeStamp" 715 // 716 // Required 717 TimeStamp float64 718 // Url is "OnDOMContentLoadedArgDetails.url" 719 // 720 // Required 721 Url js.String 722 723 FFI_USE bool 724 } 725 726 // FromRef calls UpdateFrom and returns a OnDOMContentLoadedArgDetails with all fields set. 727 func (p OnDOMContentLoadedArgDetails) FromRef(ref js.Ref) OnDOMContentLoadedArgDetails { 728 p.UpdateFrom(ref) 729 return p 730 } 731 732 // New creates a new OnDOMContentLoadedArgDetails in the application heap. 733 func (p OnDOMContentLoadedArgDetails) New() js.Ref { 734 return bindings.OnDOMContentLoadedArgDetailsJSLoad( 735 js.Pointer(&p), js.True, 0, 736 ) 737 } 738 739 // UpdateFrom copies value of all fields of the heap object to p. 740 func (p *OnDOMContentLoadedArgDetails) UpdateFrom(ref js.Ref) { 741 bindings.OnDOMContentLoadedArgDetailsJSStore( 742 js.Pointer(p), ref, 743 ) 744 } 745 746 // Update writes all fields of the p to the heap object referenced by ref. 747 func (p *OnDOMContentLoadedArgDetails) Update(ref js.Ref) { 748 bindings.OnDOMContentLoadedArgDetailsJSLoad( 749 js.Pointer(p), js.False, ref, 750 ) 751 } 752 753 // FreeMembers frees fields with heap reference, if recursive is true 754 // free all heap references reachable from p. 755 func (p *OnDOMContentLoadedArgDetails) FreeMembers(recursive bool) { 756 js.Free( 757 p.DocumentId.Ref(), 758 p.ParentDocumentId.Ref(), 759 p.Url.Ref(), 760 ) 761 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 762 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 763 p.Url = p.Url.FromRef(js.Undefined) 764 } 765 766 type OnErrorOccurredArgDetails struct { 767 // DocumentId is "OnErrorOccurredArgDetails.documentId" 768 // 769 // Required 770 DocumentId js.String 771 // DocumentLifecycle is "OnErrorOccurredArgDetails.documentLifecycle" 772 // 773 // Required 774 DocumentLifecycle extensiontypes.DocumentLifecycle 775 // Error is "OnErrorOccurredArgDetails.error" 776 // 777 // Required 778 Error js.String 779 // FrameId is "OnErrorOccurredArgDetails.frameId" 780 // 781 // Required 782 FrameId int64 783 // FrameType is "OnErrorOccurredArgDetails.frameType" 784 // 785 // Required 786 FrameType extensiontypes.FrameType 787 // ParentDocumentId is "OnErrorOccurredArgDetails.parentDocumentId" 788 // 789 // Optional 790 ParentDocumentId js.String 791 // ParentFrameId is "OnErrorOccurredArgDetails.parentFrameId" 792 // 793 // Required 794 ParentFrameId int64 795 // ProcessId is "OnErrorOccurredArgDetails.processId" 796 // 797 // Required 798 ProcessId int64 799 // TabId is "OnErrorOccurredArgDetails.tabId" 800 // 801 // Required 802 TabId int64 803 // TimeStamp is "OnErrorOccurredArgDetails.timeStamp" 804 // 805 // Required 806 TimeStamp float64 807 // Url is "OnErrorOccurredArgDetails.url" 808 // 809 // Required 810 Url js.String 811 812 FFI_USE bool 813 } 814 815 // FromRef calls UpdateFrom and returns a OnErrorOccurredArgDetails with all fields set. 816 func (p OnErrorOccurredArgDetails) FromRef(ref js.Ref) OnErrorOccurredArgDetails { 817 p.UpdateFrom(ref) 818 return p 819 } 820 821 // New creates a new OnErrorOccurredArgDetails in the application heap. 822 func (p OnErrorOccurredArgDetails) New() js.Ref { 823 return bindings.OnErrorOccurredArgDetailsJSLoad( 824 js.Pointer(&p), js.True, 0, 825 ) 826 } 827 828 // UpdateFrom copies value of all fields of the heap object to p. 829 func (p *OnErrorOccurredArgDetails) UpdateFrom(ref js.Ref) { 830 bindings.OnErrorOccurredArgDetailsJSStore( 831 js.Pointer(p), ref, 832 ) 833 } 834 835 // Update writes all fields of the p to the heap object referenced by ref. 836 func (p *OnErrorOccurredArgDetails) Update(ref js.Ref) { 837 bindings.OnErrorOccurredArgDetailsJSLoad( 838 js.Pointer(p), js.False, ref, 839 ) 840 } 841 842 // FreeMembers frees fields with heap reference, if recursive is true 843 // free all heap references reachable from p. 844 func (p *OnErrorOccurredArgDetails) FreeMembers(recursive bool) { 845 js.Free( 846 p.DocumentId.Ref(), 847 p.Error.Ref(), 848 p.ParentDocumentId.Ref(), 849 p.Url.Ref(), 850 ) 851 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 852 p.Error = p.Error.FromRef(js.Undefined) 853 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 854 p.Url = p.Url.FromRef(js.Undefined) 855 } 856 857 type OnHistoryStateUpdatedArgDetails struct { 858 // DocumentId is "OnHistoryStateUpdatedArgDetails.documentId" 859 // 860 // Required 861 DocumentId js.String 862 // DocumentLifecycle is "OnHistoryStateUpdatedArgDetails.documentLifecycle" 863 // 864 // Required 865 DocumentLifecycle extensiontypes.DocumentLifecycle 866 // FrameId is "OnHistoryStateUpdatedArgDetails.frameId" 867 // 868 // Required 869 FrameId int64 870 // FrameType is "OnHistoryStateUpdatedArgDetails.frameType" 871 // 872 // Required 873 FrameType extensiontypes.FrameType 874 // ParentDocumentId is "OnHistoryStateUpdatedArgDetails.parentDocumentId" 875 // 876 // Optional 877 ParentDocumentId js.String 878 // ParentFrameId is "OnHistoryStateUpdatedArgDetails.parentFrameId" 879 // 880 // Required 881 ParentFrameId int64 882 // ProcessId is "OnHistoryStateUpdatedArgDetails.processId" 883 // 884 // Required 885 ProcessId int64 886 // TabId is "OnHistoryStateUpdatedArgDetails.tabId" 887 // 888 // Required 889 TabId int64 890 // TimeStamp is "OnHistoryStateUpdatedArgDetails.timeStamp" 891 // 892 // Required 893 TimeStamp float64 894 // TransitionQualifiers is "OnHistoryStateUpdatedArgDetails.transitionQualifiers" 895 // 896 // Required 897 TransitionQualifiers js.Array[TransitionQualifier] 898 // TransitionType is "OnHistoryStateUpdatedArgDetails.transitionType" 899 // 900 // Required 901 TransitionType TransitionType 902 // Url is "OnHistoryStateUpdatedArgDetails.url" 903 // 904 // Required 905 Url js.String 906 907 FFI_USE bool 908 } 909 910 // FromRef calls UpdateFrom and returns a OnHistoryStateUpdatedArgDetails with all fields set. 911 func (p OnHistoryStateUpdatedArgDetails) FromRef(ref js.Ref) OnHistoryStateUpdatedArgDetails { 912 p.UpdateFrom(ref) 913 return p 914 } 915 916 // New creates a new OnHistoryStateUpdatedArgDetails in the application heap. 917 func (p OnHistoryStateUpdatedArgDetails) New() js.Ref { 918 return bindings.OnHistoryStateUpdatedArgDetailsJSLoad( 919 js.Pointer(&p), js.True, 0, 920 ) 921 } 922 923 // UpdateFrom copies value of all fields of the heap object to p. 924 func (p *OnHistoryStateUpdatedArgDetails) UpdateFrom(ref js.Ref) { 925 bindings.OnHistoryStateUpdatedArgDetailsJSStore( 926 js.Pointer(p), ref, 927 ) 928 } 929 930 // Update writes all fields of the p to the heap object referenced by ref. 931 func (p *OnHistoryStateUpdatedArgDetails) Update(ref js.Ref) { 932 bindings.OnHistoryStateUpdatedArgDetailsJSLoad( 933 js.Pointer(p), js.False, ref, 934 ) 935 } 936 937 // FreeMembers frees fields with heap reference, if recursive is true 938 // free all heap references reachable from p. 939 func (p *OnHistoryStateUpdatedArgDetails) FreeMembers(recursive bool) { 940 js.Free( 941 p.DocumentId.Ref(), 942 p.ParentDocumentId.Ref(), 943 p.TransitionQualifiers.Ref(), 944 p.Url.Ref(), 945 ) 946 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 947 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 948 p.TransitionQualifiers = p.TransitionQualifiers.FromRef(js.Undefined) 949 p.Url = p.Url.FromRef(js.Undefined) 950 } 951 952 type OnReferenceFragmentUpdatedArgDetails struct { 953 // DocumentId is "OnReferenceFragmentUpdatedArgDetails.documentId" 954 // 955 // Required 956 DocumentId js.String 957 // DocumentLifecycle is "OnReferenceFragmentUpdatedArgDetails.documentLifecycle" 958 // 959 // Required 960 DocumentLifecycle extensiontypes.DocumentLifecycle 961 // FrameId is "OnReferenceFragmentUpdatedArgDetails.frameId" 962 // 963 // Required 964 FrameId int64 965 // FrameType is "OnReferenceFragmentUpdatedArgDetails.frameType" 966 // 967 // Required 968 FrameType extensiontypes.FrameType 969 // ParentDocumentId is "OnReferenceFragmentUpdatedArgDetails.parentDocumentId" 970 // 971 // Optional 972 ParentDocumentId js.String 973 // ParentFrameId is "OnReferenceFragmentUpdatedArgDetails.parentFrameId" 974 // 975 // Required 976 ParentFrameId int64 977 // ProcessId is "OnReferenceFragmentUpdatedArgDetails.processId" 978 // 979 // Required 980 ProcessId int64 981 // TabId is "OnReferenceFragmentUpdatedArgDetails.tabId" 982 // 983 // Required 984 TabId int64 985 // TimeStamp is "OnReferenceFragmentUpdatedArgDetails.timeStamp" 986 // 987 // Required 988 TimeStamp float64 989 // TransitionQualifiers is "OnReferenceFragmentUpdatedArgDetails.transitionQualifiers" 990 // 991 // Required 992 TransitionQualifiers js.Array[TransitionQualifier] 993 // TransitionType is "OnReferenceFragmentUpdatedArgDetails.transitionType" 994 // 995 // Required 996 TransitionType TransitionType 997 // Url is "OnReferenceFragmentUpdatedArgDetails.url" 998 // 999 // Required 1000 Url js.String 1001 1002 FFI_USE bool 1003 } 1004 1005 // FromRef calls UpdateFrom and returns a OnReferenceFragmentUpdatedArgDetails with all fields set. 1006 func (p OnReferenceFragmentUpdatedArgDetails) FromRef(ref js.Ref) OnReferenceFragmentUpdatedArgDetails { 1007 p.UpdateFrom(ref) 1008 return p 1009 } 1010 1011 // New creates a new OnReferenceFragmentUpdatedArgDetails in the application heap. 1012 func (p OnReferenceFragmentUpdatedArgDetails) New() js.Ref { 1013 return bindings.OnReferenceFragmentUpdatedArgDetailsJSLoad( 1014 js.Pointer(&p), js.True, 0, 1015 ) 1016 } 1017 1018 // UpdateFrom copies value of all fields of the heap object to p. 1019 func (p *OnReferenceFragmentUpdatedArgDetails) UpdateFrom(ref js.Ref) { 1020 bindings.OnReferenceFragmentUpdatedArgDetailsJSStore( 1021 js.Pointer(p), ref, 1022 ) 1023 } 1024 1025 // Update writes all fields of the p to the heap object referenced by ref. 1026 func (p *OnReferenceFragmentUpdatedArgDetails) Update(ref js.Ref) { 1027 bindings.OnReferenceFragmentUpdatedArgDetailsJSLoad( 1028 js.Pointer(p), js.False, ref, 1029 ) 1030 } 1031 1032 // FreeMembers frees fields with heap reference, if recursive is true 1033 // free all heap references reachable from p. 1034 func (p *OnReferenceFragmentUpdatedArgDetails) FreeMembers(recursive bool) { 1035 js.Free( 1036 p.DocumentId.Ref(), 1037 p.ParentDocumentId.Ref(), 1038 p.TransitionQualifiers.Ref(), 1039 p.Url.Ref(), 1040 ) 1041 p.DocumentId = p.DocumentId.FromRef(js.Undefined) 1042 p.ParentDocumentId = p.ParentDocumentId.FromRef(js.Undefined) 1043 p.TransitionQualifiers = p.TransitionQualifiers.FromRef(js.Undefined) 1044 p.Url = p.Url.FromRef(js.Undefined) 1045 } 1046 1047 type OnTabReplacedArgDetails struct { 1048 // ReplacedTabId is "OnTabReplacedArgDetails.replacedTabId" 1049 // 1050 // Required 1051 ReplacedTabId int64 1052 // TabId is "OnTabReplacedArgDetails.tabId" 1053 // 1054 // Required 1055 TabId int64 1056 // TimeStamp is "OnTabReplacedArgDetails.timeStamp" 1057 // 1058 // Required 1059 TimeStamp float64 1060 1061 FFI_USE bool 1062 } 1063 1064 // FromRef calls UpdateFrom and returns a OnTabReplacedArgDetails with all fields set. 1065 func (p OnTabReplacedArgDetails) FromRef(ref js.Ref) OnTabReplacedArgDetails { 1066 p.UpdateFrom(ref) 1067 return p 1068 } 1069 1070 // New creates a new OnTabReplacedArgDetails in the application heap. 1071 func (p OnTabReplacedArgDetails) New() js.Ref { 1072 return bindings.OnTabReplacedArgDetailsJSLoad( 1073 js.Pointer(&p), js.True, 0, 1074 ) 1075 } 1076 1077 // UpdateFrom copies value of all fields of the heap object to p. 1078 func (p *OnTabReplacedArgDetails) UpdateFrom(ref js.Ref) { 1079 bindings.OnTabReplacedArgDetailsJSStore( 1080 js.Pointer(p), ref, 1081 ) 1082 } 1083 1084 // Update writes all fields of the p to the heap object referenced by ref. 1085 func (p *OnTabReplacedArgDetails) Update(ref js.Ref) { 1086 bindings.OnTabReplacedArgDetailsJSLoad( 1087 js.Pointer(p), js.False, ref, 1088 ) 1089 } 1090 1091 // FreeMembers frees fields with heap reference, if recursive is true 1092 // free all heap references reachable from p. 1093 func (p *OnTabReplacedArgDetails) FreeMembers(recursive bool) { 1094 } 1095 1096 // HasFuncGetAllFrames returns true if the function "WEBEXT.webNavigation.getAllFrames" exists. 1097 func HasFuncGetAllFrames() bool { 1098 return js.True == bindings.HasFuncGetAllFrames() 1099 } 1100 1101 // FuncGetAllFrames returns the function "WEBEXT.webNavigation.getAllFrames". 1102 func FuncGetAllFrames() (fn js.Func[func(details GetAllFramesArgDetails) js.Promise[js.Array[GetAllFramesReturnTypeElem]]]) { 1103 bindings.FuncGetAllFrames( 1104 js.Pointer(&fn), 1105 ) 1106 return 1107 } 1108 1109 // GetAllFrames calls the function "WEBEXT.webNavigation.getAllFrames" directly. 1110 func GetAllFrames(details GetAllFramesArgDetails) (ret js.Promise[js.Array[GetAllFramesReturnTypeElem]]) { 1111 bindings.CallGetAllFrames( 1112 js.Pointer(&ret), 1113 js.Pointer(&details), 1114 ) 1115 1116 return 1117 } 1118 1119 // TryGetAllFrames calls the function "WEBEXT.webNavigation.getAllFrames" 1120 // in a try/catch block and returns (_, err, ok = false) when it went through 1121 // the catch clause. 1122 func TryGetAllFrames(details GetAllFramesArgDetails) (ret js.Promise[js.Array[GetAllFramesReturnTypeElem]], exception js.Any, ok bool) { 1123 ok = js.True == bindings.TryGetAllFrames( 1124 js.Pointer(&ret), js.Pointer(&exception), 1125 js.Pointer(&details), 1126 ) 1127 1128 return 1129 } 1130 1131 // HasFuncGetFrame returns true if the function "WEBEXT.webNavigation.getFrame" exists. 1132 func HasFuncGetFrame() bool { 1133 return js.True == bindings.HasFuncGetFrame() 1134 } 1135 1136 // FuncGetFrame returns the function "WEBEXT.webNavigation.getFrame". 1137 func FuncGetFrame() (fn js.Func[func(details GetFrameArgDetails) js.Promise[GetFrameReturnType]]) { 1138 bindings.FuncGetFrame( 1139 js.Pointer(&fn), 1140 ) 1141 return 1142 } 1143 1144 // GetFrame calls the function "WEBEXT.webNavigation.getFrame" directly. 1145 func GetFrame(details GetFrameArgDetails) (ret js.Promise[GetFrameReturnType]) { 1146 bindings.CallGetFrame( 1147 js.Pointer(&ret), 1148 js.Pointer(&details), 1149 ) 1150 1151 return 1152 } 1153 1154 // TryGetFrame calls the function "WEBEXT.webNavigation.getFrame" 1155 // in a try/catch block and returns (_, err, ok = false) when it went through 1156 // the catch clause. 1157 func TryGetFrame(details GetFrameArgDetails) (ret js.Promise[GetFrameReturnType], exception js.Any, ok bool) { 1158 ok = js.True == bindings.TryGetFrame( 1159 js.Pointer(&ret), js.Pointer(&exception), 1160 js.Pointer(&details), 1161 ) 1162 1163 return 1164 } 1165 1166 type OnBeforeNavigateEventCallbackFunc func(this js.Ref, details *OnBeforeNavigateArgDetails) js.Ref 1167 1168 func (fn OnBeforeNavigateEventCallbackFunc) Register() js.Func[func(details *OnBeforeNavigateArgDetails)] { 1169 return js.RegisterCallback[func(details *OnBeforeNavigateArgDetails)]( 1170 fn, abi.FuncPCABIInternal(fn), 1171 ) 1172 } 1173 1174 func (fn OnBeforeNavigateEventCallbackFunc) DispatchCallback( 1175 targetPC uintptr, ctx *js.CallbackContext, 1176 ) { 1177 args := ctx.Args() 1178 if len(args) != 1+1 /* js this */ || 1179 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1180 js.ThrowInvalidCallbackInvocation() 1181 } 1182 var arg0 OnBeforeNavigateArgDetails 1183 arg0.UpdateFrom(args[0+1]) 1184 defer arg0.FreeMembers(true) 1185 1186 if ctx.Return(fn( 1187 args[0], 1188 1189 mark.NoEscape(&arg0), 1190 )) { 1191 return 1192 } 1193 1194 js.ThrowCallbackValueNotReturned() 1195 } 1196 1197 type OnBeforeNavigateEventCallback[T any] struct { 1198 Fn func(arg T, this js.Ref, details *OnBeforeNavigateArgDetails) js.Ref 1199 Arg T 1200 } 1201 1202 func (cb *OnBeforeNavigateEventCallback[T]) Register() js.Func[func(details *OnBeforeNavigateArgDetails)] { 1203 return js.RegisterCallback[func(details *OnBeforeNavigateArgDetails)]( 1204 cb, abi.FuncPCABIInternal(cb.Fn), 1205 ) 1206 } 1207 1208 func (cb *OnBeforeNavigateEventCallback[T]) DispatchCallback( 1209 targetPC uintptr, ctx *js.CallbackContext, 1210 ) { 1211 args := ctx.Args() 1212 if len(args) != 1+1 /* js this */ || 1213 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1214 js.ThrowInvalidCallbackInvocation() 1215 } 1216 var arg0 OnBeforeNavigateArgDetails 1217 arg0.UpdateFrom(args[0+1]) 1218 defer arg0.FreeMembers(true) 1219 1220 if ctx.Return(cb.Fn( 1221 cb.Arg, 1222 args[0], 1223 1224 mark.NoEscape(&arg0), 1225 )) { 1226 return 1227 } 1228 1229 js.ThrowCallbackValueNotReturned() 1230 } 1231 1232 // HasFuncOnBeforeNavigate returns true if the function "WEBEXT.webNavigation.onBeforeNavigate.addListener" exists. 1233 func HasFuncOnBeforeNavigate() bool { 1234 return js.True == bindings.HasFuncOnBeforeNavigate() 1235 } 1236 1237 // FuncOnBeforeNavigate returns the function "WEBEXT.webNavigation.onBeforeNavigate.addListener". 1238 func FuncOnBeforeNavigate() (fn js.Func[func(callback js.Func[func(details *OnBeforeNavigateArgDetails)])]) { 1239 bindings.FuncOnBeforeNavigate( 1240 js.Pointer(&fn), 1241 ) 1242 return 1243 } 1244 1245 // OnBeforeNavigate calls the function "WEBEXT.webNavigation.onBeforeNavigate.addListener" directly. 1246 func OnBeforeNavigate(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) (ret js.Void) { 1247 bindings.CallOnBeforeNavigate( 1248 js.Pointer(&ret), 1249 callback.Ref(), 1250 ) 1251 1252 return 1253 } 1254 1255 // TryOnBeforeNavigate calls the function "WEBEXT.webNavigation.onBeforeNavigate.addListener" 1256 // in a try/catch block and returns (_, err, ok = false) when it went through 1257 // the catch clause. 1258 func TryOnBeforeNavigate(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1259 ok = js.True == bindings.TryOnBeforeNavigate( 1260 js.Pointer(&ret), js.Pointer(&exception), 1261 callback.Ref(), 1262 ) 1263 1264 return 1265 } 1266 1267 // HasFuncOffBeforeNavigate returns true if the function "WEBEXT.webNavigation.onBeforeNavigate.removeListener" exists. 1268 func HasFuncOffBeforeNavigate() bool { 1269 return js.True == bindings.HasFuncOffBeforeNavigate() 1270 } 1271 1272 // FuncOffBeforeNavigate returns the function "WEBEXT.webNavigation.onBeforeNavigate.removeListener". 1273 func FuncOffBeforeNavigate() (fn js.Func[func(callback js.Func[func(details *OnBeforeNavigateArgDetails)])]) { 1274 bindings.FuncOffBeforeNavigate( 1275 js.Pointer(&fn), 1276 ) 1277 return 1278 } 1279 1280 // OffBeforeNavigate calls the function "WEBEXT.webNavigation.onBeforeNavigate.removeListener" directly. 1281 func OffBeforeNavigate(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) (ret js.Void) { 1282 bindings.CallOffBeforeNavigate( 1283 js.Pointer(&ret), 1284 callback.Ref(), 1285 ) 1286 1287 return 1288 } 1289 1290 // TryOffBeforeNavigate calls the function "WEBEXT.webNavigation.onBeforeNavigate.removeListener" 1291 // in a try/catch block and returns (_, err, ok = false) when it went through 1292 // the catch clause. 1293 func TryOffBeforeNavigate(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1294 ok = js.True == bindings.TryOffBeforeNavigate( 1295 js.Pointer(&ret), js.Pointer(&exception), 1296 callback.Ref(), 1297 ) 1298 1299 return 1300 } 1301 1302 // HasFuncHasOnBeforeNavigate returns true if the function "WEBEXT.webNavigation.onBeforeNavigate.hasListener" exists. 1303 func HasFuncHasOnBeforeNavigate() bool { 1304 return js.True == bindings.HasFuncHasOnBeforeNavigate() 1305 } 1306 1307 // FuncHasOnBeforeNavigate returns the function "WEBEXT.webNavigation.onBeforeNavigate.hasListener". 1308 func FuncHasOnBeforeNavigate() (fn js.Func[func(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) bool]) { 1309 bindings.FuncHasOnBeforeNavigate( 1310 js.Pointer(&fn), 1311 ) 1312 return 1313 } 1314 1315 // HasOnBeforeNavigate calls the function "WEBEXT.webNavigation.onBeforeNavigate.hasListener" directly. 1316 func HasOnBeforeNavigate(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) (ret bool) { 1317 bindings.CallHasOnBeforeNavigate( 1318 js.Pointer(&ret), 1319 callback.Ref(), 1320 ) 1321 1322 return 1323 } 1324 1325 // TryHasOnBeforeNavigate calls the function "WEBEXT.webNavigation.onBeforeNavigate.hasListener" 1326 // in a try/catch block and returns (_, err, ok = false) when it went through 1327 // the catch clause. 1328 func TryHasOnBeforeNavigate(callback js.Func[func(details *OnBeforeNavigateArgDetails)]) (ret bool, exception js.Any, ok bool) { 1329 ok = js.True == bindings.TryHasOnBeforeNavigate( 1330 js.Pointer(&ret), js.Pointer(&exception), 1331 callback.Ref(), 1332 ) 1333 1334 return 1335 } 1336 1337 type OnCommittedEventCallbackFunc func(this js.Ref, details *OnCommittedArgDetails) js.Ref 1338 1339 func (fn OnCommittedEventCallbackFunc) Register() js.Func[func(details *OnCommittedArgDetails)] { 1340 return js.RegisterCallback[func(details *OnCommittedArgDetails)]( 1341 fn, abi.FuncPCABIInternal(fn), 1342 ) 1343 } 1344 1345 func (fn OnCommittedEventCallbackFunc) DispatchCallback( 1346 targetPC uintptr, ctx *js.CallbackContext, 1347 ) { 1348 args := ctx.Args() 1349 if len(args) != 1+1 /* js this */ || 1350 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1351 js.ThrowInvalidCallbackInvocation() 1352 } 1353 var arg0 OnCommittedArgDetails 1354 arg0.UpdateFrom(args[0+1]) 1355 defer arg0.FreeMembers(true) 1356 1357 if ctx.Return(fn( 1358 args[0], 1359 1360 mark.NoEscape(&arg0), 1361 )) { 1362 return 1363 } 1364 1365 js.ThrowCallbackValueNotReturned() 1366 } 1367 1368 type OnCommittedEventCallback[T any] struct { 1369 Fn func(arg T, this js.Ref, details *OnCommittedArgDetails) js.Ref 1370 Arg T 1371 } 1372 1373 func (cb *OnCommittedEventCallback[T]) Register() js.Func[func(details *OnCommittedArgDetails)] { 1374 return js.RegisterCallback[func(details *OnCommittedArgDetails)]( 1375 cb, abi.FuncPCABIInternal(cb.Fn), 1376 ) 1377 } 1378 1379 func (cb *OnCommittedEventCallback[T]) DispatchCallback( 1380 targetPC uintptr, ctx *js.CallbackContext, 1381 ) { 1382 args := ctx.Args() 1383 if len(args) != 1+1 /* js this */ || 1384 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1385 js.ThrowInvalidCallbackInvocation() 1386 } 1387 var arg0 OnCommittedArgDetails 1388 arg0.UpdateFrom(args[0+1]) 1389 defer arg0.FreeMembers(true) 1390 1391 if ctx.Return(cb.Fn( 1392 cb.Arg, 1393 args[0], 1394 1395 mark.NoEscape(&arg0), 1396 )) { 1397 return 1398 } 1399 1400 js.ThrowCallbackValueNotReturned() 1401 } 1402 1403 // HasFuncOnCommitted returns true if the function "WEBEXT.webNavigation.onCommitted.addListener" exists. 1404 func HasFuncOnCommitted() bool { 1405 return js.True == bindings.HasFuncOnCommitted() 1406 } 1407 1408 // FuncOnCommitted returns the function "WEBEXT.webNavigation.onCommitted.addListener". 1409 func FuncOnCommitted() (fn js.Func[func(callback js.Func[func(details *OnCommittedArgDetails)])]) { 1410 bindings.FuncOnCommitted( 1411 js.Pointer(&fn), 1412 ) 1413 return 1414 } 1415 1416 // OnCommitted calls the function "WEBEXT.webNavigation.onCommitted.addListener" directly. 1417 func OnCommitted(callback js.Func[func(details *OnCommittedArgDetails)]) (ret js.Void) { 1418 bindings.CallOnCommitted( 1419 js.Pointer(&ret), 1420 callback.Ref(), 1421 ) 1422 1423 return 1424 } 1425 1426 // TryOnCommitted calls the function "WEBEXT.webNavigation.onCommitted.addListener" 1427 // in a try/catch block and returns (_, err, ok = false) when it went through 1428 // the catch clause. 1429 func TryOnCommitted(callback js.Func[func(details *OnCommittedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1430 ok = js.True == bindings.TryOnCommitted( 1431 js.Pointer(&ret), js.Pointer(&exception), 1432 callback.Ref(), 1433 ) 1434 1435 return 1436 } 1437 1438 // HasFuncOffCommitted returns true if the function "WEBEXT.webNavigation.onCommitted.removeListener" exists. 1439 func HasFuncOffCommitted() bool { 1440 return js.True == bindings.HasFuncOffCommitted() 1441 } 1442 1443 // FuncOffCommitted returns the function "WEBEXT.webNavigation.onCommitted.removeListener". 1444 func FuncOffCommitted() (fn js.Func[func(callback js.Func[func(details *OnCommittedArgDetails)])]) { 1445 bindings.FuncOffCommitted( 1446 js.Pointer(&fn), 1447 ) 1448 return 1449 } 1450 1451 // OffCommitted calls the function "WEBEXT.webNavigation.onCommitted.removeListener" directly. 1452 func OffCommitted(callback js.Func[func(details *OnCommittedArgDetails)]) (ret js.Void) { 1453 bindings.CallOffCommitted( 1454 js.Pointer(&ret), 1455 callback.Ref(), 1456 ) 1457 1458 return 1459 } 1460 1461 // TryOffCommitted calls the function "WEBEXT.webNavigation.onCommitted.removeListener" 1462 // in a try/catch block and returns (_, err, ok = false) when it went through 1463 // the catch clause. 1464 func TryOffCommitted(callback js.Func[func(details *OnCommittedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1465 ok = js.True == bindings.TryOffCommitted( 1466 js.Pointer(&ret), js.Pointer(&exception), 1467 callback.Ref(), 1468 ) 1469 1470 return 1471 } 1472 1473 // HasFuncHasOnCommitted returns true if the function "WEBEXT.webNavigation.onCommitted.hasListener" exists. 1474 func HasFuncHasOnCommitted() bool { 1475 return js.True == bindings.HasFuncHasOnCommitted() 1476 } 1477 1478 // FuncHasOnCommitted returns the function "WEBEXT.webNavigation.onCommitted.hasListener". 1479 func FuncHasOnCommitted() (fn js.Func[func(callback js.Func[func(details *OnCommittedArgDetails)]) bool]) { 1480 bindings.FuncHasOnCommitted( 1481 js.Pointer(&fn), 1482 ) 1483 return 1484 } 1485 1486 // HasOnCommitted calls the function "WEBEXT.webNavigation.onCommitted.hasListener" directly. 1487 func HasOnCommitted(callback js.Func[func(details *OnCommittedArgDetails)]) (ret bool) { 1488 bindings.CallHasOnCommitted( 1489 js.Pointer(&ret), 1490 callback.Ref(), 1491 ) 1492 1493 return 1494 } 1495 1496 // TryHasOnCommitted calls the function "WEBEXT.webNavigation.onCommitted.hasListener" 1497 // in a try/catch block and returns (_, err, ok = false) when it went through 1498 // the catch clause. 1499 func TryHasOnCommitted(callback js.Func[func(details *OnCommittedArgDetails)]) (ret bool, exception js.Any, ok bool) { 1500 ok = js.True == bindings.TryHasOnCommitted( 1501 js.Pointer(&ret), js.Pointer(&exception), 1502 callback.Ref(), 1503 ) 1504 1505 return 1506 } 1507 1508 type OnCompletedEventCallbackFunc func(this js.Ref, details *OnCompletedArgDetails) js.Ref 1509 1510 func (fn OnCompletedEventCallbackFunc) Register() js.Func[func(details *OnCompletedArgDetails)] { 1511 return js.RegisterCallback[func(details *OnCompletedArgDetails)]( 1512 fn, abi.FuncPCABIInternal(fn), 1513 ) 1514 } 1515 1516 func (fn OnCompletedEventCallbackFunc) DispatchCallback( 1517 targetPC uintptr, ctx *js.CallbackContext, 1518 ) { 1519 args := ctx.Args() 1520 if len(args) != 1+1 /* js this */ || 1521 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1522 js.ThrowInvalidCallbackInvocation() 1523 } 1524 var arg0 OnCompletedArgDetails 1525 arg0.UpdateFrom(args[0+1]) 1526 defer arg0.FreeMembers(true) 1527 1528 if ctx.Return(fn( 1529 args[0], 1530 1531 mark.NoEscape(&arg0), 1532 )) { 1533 return 1534 } 1535 1536 js.ThrowCallbackValueNotReturned() 1537 } 1538 1539 type OnCompletedEventCallback[T any] struct { 1540 Fn func(arg T, this js.Ref, details *OnCompletedArgDetails) js.Ref 1541 Arg T 1542 } 1543 1544 func (cb *OnCompletedEventCallback[T]) Register() js.Func[func(details *OnCompletedArgDetails)] { 1545 return js.RegisterCallback[func(details *OnCompletedArgDetails)]( 1546 cb, abi.FuncPCABIInternal(cb.Fn), 1547 ) 1548 } 1549 1550 func (cb *OnCompletedEventCallback[T]) DispatchCallback( 1551 targetPC uintptr, ctx *js.CallbackContext, 1552 ) { 1553 args := ctx.Args() 1554 if len(args) != 1+1 /* js this */ || 1555 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1556 js.ThrowInvalidCallbackInvocation() 1557 } 1558 var arg0 OnCompletedArgDetails 1559 arg0.UpdateFrom(args[0+1]) 1560 defer arg0.FreeMembers(true) 1561 1562 if ctx.Return(cb.Fn( 1563 cb.Arg, 1564 args[0], 1565 1566 mark.NoEscape(&arg0), 1567 )) { 1568 return 1569 } 1570 1571 js.ThrowCallbackValueNotReturned() 1572 } 1573 1574 // HasFuncOnCompleted returns true if the function "WEBEXT.webNavigation.onCompleted.addListener" exists. 1575 func HasFuncOnCompleted() bool { 1576 return js.True == bindings.HasFuncOnCompleted() 1577 } 1578 1579 // FuncOnCompleted returns the function "WEBEXT.webNavigation.onCompleted.addListener". 1580 func FuncOnCompleted() (fn js.Func[func(callback js.Func[func(details *OnCompletedArgDetails)])]) { 1581 bindings.FuncOnCompleted( 1582 js.Pointer(&fn), 1583 ) 1584 return 1585 } 1586 1587 // OnCompleted calls the function "WEBEXT.webNavigation.onCompleted.addListener" directly. 1588 func OnCompleted(callback js.Func[func(details *OnCompletedArgDetails)]) (ret js.Void) { 1589 bindings.CallOnCompleted( 1590 js.Pointer(&ret), 1591 callback.Ref(), 1592 ) 1593 1594 return 1595 } 1596 1597 // TryOnCompleted calls the function "WEBEXT.webNavigation.onCompleted.addListener" 1598 // in a try/catch block and returns (_, err, ok = false) when it went through 1599 // the catch clause. 1600 func TryOnCompleted(callback js.Func[func(details *OnCompletedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1601 ok = js.True == bindings.TryOnCompleted( 1602 js.Pointer(&ret), js.Pointer(&exception), 1603 callback.Ref(), 1604 ) 1605 1606 return 1607 } 1608 1609 // HasFuncOffCompleted returns true if the function "WEBEXT.webNavigation.onCompleted.removeListener" exists. 1610 func HasFuncOffCompleted() bool { 1611 return js.True == bindings.HasFuncOffCompleted() 1612 } 1613 1614 // FuncOffCompleted returns the function "WEBEXT.webNavigation.onCompleted.removeListener". 1615 func FuncOffCompleted() (fn js.Func[func(callback js.Func[func(details *OnCompletedArgDetails)])]) { 1616 bindings.FuncOffCompleted( 1617 js.Pointer(&fn), 1618 ) 1619 return 1620 } 1621 1622 // OffCompleted calls the function "WEBEXT.webNavigation.onCompleted.removeListener" directly. 1623 func OffCompleted(callback js.Func[func(details *OnCompletedArgDetails)]) (ret js.Void) { 1624 bindings.CallOffCompleted( 1625 js.Pointer(&ret), 1626 callback.Ref(), 1627 ) 1628 1629 return 1630 } 1631 1632 // TryOffCompleted calls the function "WEBEXT.webNavigation.onCompleted.removeListener" 1633 // in a try/catch block and returns (_, err, ok = false) when it went through 1634 // the catch clause. 1635 func TryOffCompleted(callback js.Func[func(details *OnCompletedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1636 ok = js.True == bindings.TryOffCompleted( 1637 js.Pointer(&ret), js.Pointer(&exception), 1638 callback.Ref(), 1639 ) 1640 1641 return 1642 } 1643 1644 // HasFuncHasOnCompleted returns true if the function "WEBEXT.webNavigation.onCompleted.hasListener" exists. 1645 func HasFuncHasOnCompleted() bool { 1646 return js.True == bindings.HasFuncHasOnCompleted() 1647 } 1648 1649 // FuncHasOnCompleted returns the function "WEBEXT.webNavigation.onCompleted.hasListener". 1650 func FuncHasOnCompleted() (fn js.Func[func(callback js.Func[func(details *OnCompletedArgDetails)]) bool]) { 1651 bindings.FuncHasOnCompleted( 1652 js.Pointer(&fn), 1653 ) 1654 return 1655 } 1656 1657 // HasOnCompleted calls the function "WEBEXT.webNavigation.onCompleted.hasListener" directly. 1658 func HasOnCompleted(callback js.Func[func(details *OnCompletedArgDetails)]) (ret bool) { 1659 bindings.CallHasOnCompleted( 1660 js.Pointer(&ret), 1661 callback.Ref(), 1662 ) 1663 1664 return 1665 } 1666 1667 // TryHasOnCompleted calls the function "WEBEXT.webNavigation.onCompleted.hasListener" 1668 // in a try/catch block and returns (_, err, ok = false) when it went through 1669 // the catch clause. 1670 func TryHasOnCompleted(callback js.Func[func(details *OnCompletedArgDetails)]) (ret bool, exception js.Any, ok bool) { 1671 ok = js.True == bindings.TryHasOnCompleted( 1672 js.Pointer(&ret), js.Pointer(&exception), 1673 callback.Ref(), 1674 ) 1675 1676 return 1677 } 1678 1679 type OnCreatedNavigationTargetEventCallbackFunc func(this js.Ref, details *OnCreatedNavigationTargetArgDetails) js.Ref 1680 1681 func (fn OnCreatedNavigationTargetEventCallbackFunc) Register() js.Func[func(details *OnCreatedNavigationTargetArgDetails)] { 1682 return js.RegisterCallback[func(details *OnCreatedNavigationTargetArgDetails)]( 1683 fn, abi.FuncPCABIInternal(fn), 1684 ) 1685 } 1686 1687 func (fn OnCreatedNavigationTargetEventCallbackFunc) DispatchCallback( 1688 targetPC uintptr, ctx *js.CallbackContext, 1689 ) { 1690 args := ctx.Args() 1691 if len(args) != 1+1 /* js this */ || 1692 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1693 js.ThrowInvalidCallbackInvocation() 1694 } 1695 var arg0 OnCreatedNavigationTargetArgDetails 1696 arg0.UpdateFrom(args[0+1]) 1697 defer arg0.FreeMembers(true) 1698 1699 if ctx.Return(fn( 1700 args[0], 1701 1702 mark.NoEscape(&arg0), 1703 )) { 1704 return 1705 } 1706 1707 js.ThrowCallbackValueNotReturned() 1708 } 1709 1710 type OnCreatedNavigationTargetEventCallback[T any] struct { 1711 Fn func(arg T, this js.Ref, details *OnCreatedNavigationTargetArgDetails) js.Ref 1712 Arg T 1713 } 1714 1715 func (cb *OnCreatedNavigationTargetEventCallback[T]) Register() js.Func[func(details *OnCreatedNavigationTargetArgDetails)] { 1716 return js.RegisterCallback[func(details *OnCreatedNavigationTargetArgDetails)]( 1717 cb, abi.FuncPCABIInternal(cb.Fn), 1718 ) 1719 } 1720 1721 func (cb *OnCreatedNavigationTargetEventCallback[T]) DispatchCallback( 1722 targetPC uintptr, ctx *js.CallbackContext, 1723 ) { 1724 args := ctx.Args() 1725 if len(args) != 1+1 /* js this */ || 1726 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1727 js.ThrowInvalidCallbackInvocation() 1728 } 1729 var arg0 OnCreatedNavigationTargetArgDetails 1730 arg0.UpdateFrom(args[0+1]) 1731 defer arg0.FreeMembers(true) 1732 1733 if ctx.Return(cb.Fn( 1734 cb.Arg, 1735 args[0], 1736 1737 mark.NoEscape(&arg0), 1738 )) { 1739 return 1740 } 1741 1742 js.ThrowCallbackValueNotReturned() 1743 } 1744 1745 // HasFuncOnCreatedNavigationTarget returns true if the function "WEBEXT.webNavigation.onCreatedNavigationTarget.addListener" exists. 1746 func HasFuncOnCreatedNavigationTarget() bool { 1747 return js.True == bindings.HasFuncOnCreatedNavigationTarget() 1748 } 1749 1750 // FuncOnCreatedNavigationTarget returns the function "WEBEXT.webNavigation.onCreatedNavigationTarget.addListener". 1751 func FuncOnCreatedNavigationTarget() (fn js.Func[func(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)])]) { 1752 bindings.FuncOnCreatedNavigationTarget( 1753 js.Pointer(&fn), 1754 ) 1755 return 1756 } 1757 1758 // OnCreatedNavigationTarget calls the function "WEBEXT.webNavigation.onCreatedNavigationTarget.addListener" directly. 1759 func OnCreatedNavigationTarget(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) (ret js.Void) { 1760 bindings.CallOnCreatedNavigationTarget( 1761 js.Pointer(&ret), 1762 callback.Ref(), 1763 ) 1764 1765 return 1766 } 1767 1768 // TryOnCreatedNavigationTarget calls the function "WEBEXT.webNavigation.onCreatedNavigationTarget.addListener" 1769 // in a try/catch block and returns (_, err, ok = false) when it went through 1770 // the catch clause. 1771 func TryOnCreatedNavigationTarget(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1772 ok = js.True == bindings.TryOnCreatedNavigationTarget( 1773 js.Pointer(&ret), js.Pointer(&exception), 1774 callback.Ref(), 1775 ) 1776 1777 return 1778 } 1779 1780 // HasFuncOffCreatedNavigationTarget returns true if the function "WEBEXT.webNavigation.onCreatedNavigationTarget.removeListener" exists. 1781 func HasFuncOffCreatedNavigationTarget() bool { 1782 return js.True == bindings.HasFuncOffCreatedNavigationTarget() 1783 } 1784 1785 // FuncOffCreatedNavigationTarget returns the function "WEBEXT.webNavigation.onCreatedNavigationTarget.removeListener". 1786 func FuncOffCreatedNavigationTarget() (fn js.Func[func(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)])]) { 1787 bindings.FuncOffCreatedNavigationTarget( 1788 js.Pointer(&fn), 1789 ) 1790 return 1791 } 1792 1793 // OffCreatedNavigationTarget calls the function "WEBEXT.webNavigation.onCreatedNavigationTarget.removeListener" directly. 1794 func OffCreatedNavigationTarget(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) (ret js.Void) { 1795 bindings.CallOffCreatedNavigationTarget( 1796 js.Pointer(&ret), 1797 callback.Ref(), 1798 ) 1799 1800 return 1801 } 1802 1803 // TryOffCreatedNavigationTarget calls the function "WEBEXT.webNavigation.onCreatedNavigationTarget.removeListener" 1804 // in a try/catch block and returns (_, err, ok = false) when it went through 1805 // the catch clause. 1806 func TryOffCreatedNavigationTarget(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1807 ok = js.True == bindings.TryOffCreatedNavigationTarget( 1808 js.Pointer(&ret), js.Pointer(&exception), 1809 callback.Ref(), 1810 ) 1811 1812 return 1813 } 1814 1815 // HasFuncHasOnCreatedNavigationTarget returns true if the function "WEBEXT.webNavigation.onCreatedNavigationTarget.hasListener" exists. 1816 func HasFuncHasOnCreatedNavigationTarget() bool { 1817 return js.True == bindings.HasFuncHasOnCreatedNavigationTarget() 1818 } 1819 1820 // FuncHasOnCreatedNavigationTarget returns the function "WEBEXT.webNavigation.onCreatedNavigationTarget.hasListener". 1821 func FuncHasOnCreatedNavigationTarget() (fn js.Func[func(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) bool]) { 1822 bindings.FuncHasOnCreatedNavigationTarget( 1823 js.Pointer(&fn), 1824 ) 1825 return 1826 } 1827 1828 // HasOnCreatedNavigationTarget calls the function "WEBEXT.webNavigation.onCreatedNavigationTarget.hasListener" directly. 1829 func HasOnCreatedNavigationTarget(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) (ret bool) { 1830 bindings.CallHasOnCreatedNavigationTarget( 1831 js.Pointer(&ret), 1832 callback.Ref(), 1833 ) 1834 1835 return 1836 } 1837 1838 // TryHasOnCreatedNavigationTarget calls the function "WEBEXT.webNavigation.onCreatedNavigationTarget.hasListener" 1839 // in a try/catch block and returns (_, err, ok = false) when it went through 1840 // the catch clause. 1841 func TryHasOnCreatedNavigationTarget(callback js.Func[func(details *OnCreatedNavigationTargetArgDetails)]) (ret bool, exception js.Any, ok bool) { 1842 ok = js.True == bindings.TryHasOnCreatedNavigationTarget( 1843 js.Pointer(&ret), js.Pointer(&exception), 1844 callback.Ref(), 1845 ) 1846 1847 return 1848 } 1849 1850 type OnDOMContentLoadedEventCallbackFunc func(this js.Ref, details *OnDOMContentLoadedArgDetails) js.Ref 1851 1852 func (fn OnDOMContentLoadedEventCallbackFunc) Register() js.Func[func(details *OnDOMContentLoadedArgDetails)] { 1853 return js.RegisterCallback[func(details *OnDOMContentLoadedArgDetails)]( 1854 fn, abi.FuncPCABIInternal(fn), 1855 ) 1856 } 1857 1858 func (fn OnDOMContentLoadedEventCallbackFunc) DispatchCallback( 1859 targetPC uintptr, ctx *js.CallbackContext, 1860 ) { 1861 args := ctx.Args() 1862 if len(args) != 1+1 /* js this */ || 1863 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1864 js.ThrowInvalidCallbackInvocation() 1865 } 1866 var arg0 OnDOMContentLoadedArgDetails 1867 arg0.UpdateFrom(args[0+1]) 1868 defer arg0.FreeMembers(true) 1869 1870 if ctx.Return(fn( 1871 args[0], 1872 1873 mark.NoEscape(&arg0), 1874 )) { 1875 return 1876 } 1877 1878 js.ThrowCallbackValueNotReturned() 1879 } 1880 1881 type OnDOMContentLoadedEventCallback[T any] struct { 1882 Fn func(arg T, this js.Ref, details *OnDOMContentLoadedArgDetails) js.Ref 1883 Arg T 1884 } 1885 1886 func (cb *OnDOMContentLoadedEventCallback[T]) Register() js.Func[func(details *OnDOMContentLoadedArgDetails)] { 1887 return js.RegisterCallback[func(details *OnDOMContentLoadedArgDetails)]( 1888 cb, abi.FuncPCABIInternal(cb.Fn), 1889 ) 1890 } 1891 1892 func (cb *OnDOMContentLoadedEventCallback[T]) DispatchCallback( 1893 targetPC uintptr, ctx *js.CallbackContext, 1894 ) { 1895 args := ctx.Args() 1896 if len(args) != 1+1 /* js this */ || 1897 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1898 js.ThrowInvalidCallbackInvocation() 1899 } 1900 var arg0 OnDOMContentLoadedArgDetails 1901 arg0.UpdateFrom(args[0+1]) 1902 defer arg0.FreeMembers(true) 1903 1904 if ctx.Return(cb.Fn( 1905 cb.Arg, 1906 args[0], 1907 1908 mark.NoEscape(&arg0), 1909 )) { 1910 return 1911 } 1912 1913 js.ThrowCallbackValueNotReturned() 1914 } 1915 1916 // HasFuncOnDOMContentLoaded returns true if the function "WEBEXT.webNavigation.onDOMContentLoaded.addListener" exists. 1917 func HasFuncOnDOMContentLoaded() bool { 1918 return js.True == bindings.HasFuncOnDOMContentLoaded() 1919 } 1920 1921 // FuncOnDOMContentLoaded returns the function "WEBEXT.webNavigation.onDOMContentLoaded.addListener". 1922 func FuncOnDOMContentLoaded() (fn js.Func[func(callback js.Func[func(details *OnDOMContentLoadedArgDetails)])]) { 1923 bindings.FuncOnDOMContentLoaded( 1924 js.Pointer(&fn), 1925 ) 1926 return 1927 } 1928 1929 // OnDOMContentLoaded calls the function "WEBEXT.webNavigation.onDOMContentLoaded.addListener" directly. 1930 func OnDOMContentLoaded(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) (ret js.Void) { 1931 bindings.CallOnDOMContentLoaded( 1932 js.Pointer(&ret), 1933 callback.Ref(), 1934 ) 1935 1936 return 1937 } 1938 1939 // TryOnDOMContentLoaded calls the function "WEBEXT.webNavigation.onDOMContentLoaded.addListener" 1940 // in a try/catch block and returns (_, err, ok = false) when it went through 1941 // the catch clause. 1942 func TryOnDOMContentLoaded(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1943 ok = js.True == bindings.TryOnDOMContentLoaded( 1944 js.Pointer(&ret), js.Pointer(&exception), 1945 callback.Ref(), 1946 ) 1947 1948 return 1949 } 1950 1951 // HasFuncOffDOMContentLoaded returns true if the function "WEBEXT.webNavigation.onDOMContentLoaded.removeListener" exists. 1952 func HasFuncOffDOMContentLoaded() bool { 1953 return js.True == bindings.HasFuncOffDOMContentLoaded() 1954 } 1955 1956 // FuncOffDOMContentLoaded returns the function "WEBEXT.webNavigation.onDOMContentLoaded.removeListener". 1957 func FuncOffDOMContentLoaded() (fn js.Func[func(callback js.Func[func(details *OnDOMContentLoadedArgDetails)])]) { 1958 bindings.FuncOffDOMContentLoaded( 1959 js.Pointer(&fn), 1960 ) 1961 return 1962 } 1963 1964 // OffDOMContentLoaded calls the function "WEBEXT.webNavigation.onDOMContentLoaded.removeListener" directly. 1965 func OffDOMContentLoaded(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) (ret js.Void) { 1966 bindings.CallOffDOMContentLoaded( 1967 js.Pointer(&ret), 1968 callback.Ref(), 1969 ) 1970 1971 return 1972 } 1973 1974 // TryOffDOMContentLoaded calls the function "WEBEXT.webNavigation.onDOMContentLoaded.removeListener" 1975 // in a try/catch block and returns (_, err, ok = false) when it went through 1976 // the catch clause. 1977 func TryOffDOMContentLoaded(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1978 ok = js.True == bindings.TryOffDOMContentLoaded( 1979 js.Pointer(&ret), js.Pointer(&exception), 1980 callback.Ref(), 1981 ) 1982 1983 return 1984 } 1985 1986 // HasFuncHasOnDOMContentLoaded returns true if the function "WEBEXT.webNavigation.onDOMContentLoaded.hasListener" exists. 1987 func HasFuncHasOnDOMContentLoaded() bool { 1988 return js.True == bindings.HasFuncHasOnDOMContentLoaded() 1989 } 1990 1991 // FuncHasOnDOMContentLoaded returns the function "WEBEXT.webNavigation.onDOMContentLoaded.hasListener". 1992 func FuncHasOnDOMContentLoaded() (fn js.Func[func(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) bool]) { 1993 bindings.FuncHasOnDOMContentLoaded( 1994 js.Pointer(&fn), 1995 ) 1996 return 1997 } 1998 1999 // HasOnDOMContentLoaded calls the function "WEBEXT.webNavigation.onDOMContentLoaded.hasListener" directly. 2000 func HasOnDOMContentLoaded(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) (ret bool) { 2001 bindings.CallHasOnDOMContentLoaded( 2002 js.Pointer(&ret), 2003 callback.Ref(), 2004 ) 2005 2006 return 2007 } 2008 2009 // TryHasOnDOMContentLoaded calls the function "WEBEXT.webNavigation.onDOMContentLoaded.hasListener" 2010 // in a try/catch block and returns (_, err, ok = false) when it went through 2011 // the catch clause. 2012 func TryHasOnDOMContentLoaded(callback js.Func[func(details *OnDOMContentLoadedArgDetails)]) (ret bool, exception js.Any, ok bool) { 2013 ok = js.True == bindings.TryHasOnDOMContentLoaded( 2014 js.Pointer(&ret), js.Pointer(&exception), 2015 callback.Ref(), 2016 ) 2017 2018 return 2019 } 2020 2021 type OnErrorOccurredEventCallbackFunc func(this js.Ref, details *OnErrorOccurredArgDetails) js.Ref 2022 2023 func (fn OnErrorOccurredEventCallbackFunc) Register() js.Func[func(details *OnErrorOccurredArgDetails)] { 2024 return js.RegisterCallback[func(details *OnErrorOccurredArgDetails)]( 2025 fn, abi.FuncPCABIInternal(fn), 2026 ) 2027 } 2028 2029 func (fn OnErrorOccurredEventCallbackFunc) DispatchCallback( 2030 targetPC uintptr, ctx *js.CallbackContext, 2031 ) { 2032 args := ctx.Args() 2033 if len(args) != 1+1 /* js this */ || 2034 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2035 js.ThrowInvalidCallbackInvocation() 2036 } 2037 var arg0 OnErrorOccurredArgDetails 2038 arg0.UpdateFrom(args[0+1]) 2039 defer arg0.FreeMembers(true) 2040 2041 if ctx.Return(fn( 2042 args[0], 2043 2044 mark.NoEscape(&arg0), 2045 )) { 2046 return 2047 } 2048 2049 js.ThrowCallbackValueNotReturned() 2050 } 2051 2052 type OnErrorOccurredEventCallback[T any] struct { 2053 Fn func(arg T, this js.Ref, details *OnErrorOccurredArgDetails) js.Ref 2054 Arg T 2055 } 2056 2057 func (cb *OnErrorOccurredEventCallback[T]) Register() js.Func[func(details *OnErrorOccurredArgDetails)] { 2058 return js.RegisterCallback[func(details *OnErrorOccurredArgDetails)]( 2059 cb, abi.FuncPCABIInternal(cb.Fn), 2060 ) 2061 } 2062 2063 func (cb *OnErrorOccurredEventCallback[T]) DispatchCallback( 2064 targetPC uintptr, ctx *js.CallbackContext, 2065 ) { 2066 args := ctx.Args() 2067 if len(args) != 1+1 /* js this */ || 2068 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2069 js.ThrowInvalidCallbackInvocation() 2070 } 2071 var arg0 OnErrorOccurredArgDetails 2072 arg0.UpdateFrom(args[0+1]) 2073 defer arg0.FreeMembers(true) 2074 2075 if ctx.Return(cb.Fn( 2076 cb.Arg, 2077 args[0], 2078 2079 mark.NoEscape(&arg0), 2080 )) { 2081 return 2082 } 2083 2084 js.ThrowCallbackValueNotReturned() 2085 } 2086 2087 // HasFuncOnErrorOccurred returns true if the function "WEBEXT.webNavigation.onErrorOccurred.addListener" exists. 2088 func HasFuncOnErrorOccurred() bool { 2089 return js.True == bindings.HasFuncOnErrorOccurred() 2090 } 2091 2092 // FuncOnErrorOccurred returns the function "WEBEXT.webNavigation.onErrorOccurred.addListener". 2093 func FuncOnErrorOccurred() (fn js.Func[func(callback js.Func[func(details *OnErrorOccurredArgDetails)])]) { 2094 bindings.FuncOnErrorOccurred( 2095 js.Pointer(&fn), 2096 ) 2097 return 2098 } 2099 2100 // OnErrorOccurred calls the function "WEBEXT.webNavigation.onErrorOccurred.addListener" directly. 2101 func OnErrorOccurred(callback js.Func[func(details *OnErrorOccurredArgDetails)]) (ret js.Void) { 2102 bindings.CallOnErrorOccurred( 2103 js.Pointer(&ret), 2104 callback.Ref(), 2105 ) 2106 2107 return 2108 } 2109 2110 // TryOnErrorOccurred calls the function "WEBEXT.webNavigation.onErrorOccurred.addListener" 2111 // in a try/catch block and returns (_, err, ok = false) when it went through 2112 // the catch clause. 2113 func TryOnErrorOccurred(callback js.Func[func(details *OnErrorOccurredArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2114 ok = js.True == bindings.TryOnErrorOccurred( 2115 js.Pointer(&ret), js.Pointer(&exception), 2116 callback.Ref(), 2117 ) 2118 2119 return 2120 } 2121 2122 // HasFuncOffErrorOccurred returns true if the function "WEBEXT.webNavigation.onErrorOccurred.removeListener" exists. 2123 func HasFuncOffErrorOccurred() bool { 2124 return js.True == bindings.HasFuncOffErrorOccurred() 2125 } 2126 2127 // FuncOffErrorOccurred returns the function "WEBEXT.webNavigation.onErrorOccurred.removeListener". 2128 func FuncOffErrorOccurred() (fn js.Func[func(callback js.Func[func(details *OnErrorOccurredArgDetails)])]) { 2129 bindings.FuncOffErrorOccurred( 2130 js.Pointer(&fn), 2131 ) 2132 return 2133 } 2134 2135 // OffErrorOccurred calls the function "WEBEXT.webNavigation.onErrorOccurred.removeListener" directly. 2136 func OffErrorOccurred(callback js.Func[func(details *OnErrorOccurredArgDetails)]) (ret js.Void) { 2137 bindings.CallOffErrorOccurred( 2138 js.Pointer(&ret), 2139 callback.Ref(), 2140 ) 2141 2142 return 2143 } 2144 2145 // TryOffErrorOccurred calls the function "WEBEXT.webNavigation.onErrorOccurred.removeListener" 2146 // in a try/catch block and returns (_, err, ok = false) when it went through 2147 // the catch clause. 2148 func TryOffErrorOccurred(callback js.Func[func(details *OnErrorOccurredArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2149 ok = js.True == bindings.TryOffErrorOccurred( 2150 js.Pointer(&ret), js.Pointer(&exception), 2151 callback.Ref(), 2152 ) 2153 2154 return 2155 } 2156 2157 // HasFuncHasOnErrorOccurred returns true if the function "WEBEXT.webNavigation.onErrorOccurred.hasListener" exists. 2158 func HasFuncHasOnErrorOccurred() bool { 2159 return js.True == bindings.HasFuncHasOnErrorOccurred() 2160 } 2161 2162 // FuncHasOnErrorOccurred returns the function "WEBEXT.webNavigation.onErrorOccurred.hasListener". 2163 func FuncHasOnErrorOccurred() (fn js.Func[func(callback js.Func[func(details *OnErrorOccurredArgDetails)]) bool]) { 2164 bindings.FuncHasOnErrorOccurred( 2165 js.Pointer(&fn), 2166 ) 2167 return 2168 } 2169 2170 // HasOnErrorOccurred calls the function "WEBEXT.webNavigation.onErrorOccurred.hasListener" directly. 2171 func HasOnErrorOccurred(callback js.Func[func(details *OnErrorOccurredArgDetails)]) (ret bool) { 2172 bindings.CallHasOnErrorOccurred( 2173 js.Pointer(&ret), 2174 callback.Ref(), 2175 ) 2176 2177 return 2178 } 2179 2180 // TryHasOnErrorOccurred calls the function "WEBEXT.webNavigation.onErrorOccurred.hasListener" 2181 // in a try/catch block and returns (_, err, ok = false) when it went through 2182 // the catch clause. 2183 func TryHasOnErrorOccurred(callback js.Func[func(details *OnErrorOccurredArgDetails)]) (ret bool, exception js.Any, ok bool) { 2184 ok = js.True == bindings.TryHasOnErrorOccurred( 2185 js.Pointer(&ret), js.Pointer(&exception), 2186 callback.Ref(), 2187 ) 2188 2189 return 2190 } 2191 2192 type OnHistoryStateUpdatedEventCallbackFunc func(this js.Ref, details *OnHistoryStateUpdatedArgDetails) js.Ref 2193 2194 func (fn OnHistoryStateUpdatedEventCallbackFunc) Register() js.Func[func(details *OnHistoryStateUpdatedArgDetails)] { 2195 return js.RegisterCallback[func(details *OnHistoryStateUpdatedArgDetails)]( 2196 fn, abi.FuncPCABIInternal(fn), 2197 ) 2198 } 2199 2200 func (fn OnHistoryStateUpdatedEventCallbackFunc) DispatchCallback( 2201 targetPC uintptr, ctx *js.CallbackContext, 2202 ) { 2203 args := ctx.Args() 2204 if len(args) != 1+1 /* js this */ || 2205 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2206 js.ThrowInvalidCallbackInvocation() 2207 } 2208 var arg0 OnHistoryStateUpdatedArgDetails 2209 arg0.UpdateFrom(args[0+1]) 2210 defer arg0.FreeMembers(true) 2211 2212 if ctx.Return(fn( 2213 args[0], 2214 2215 mark.NoEscape(&arg0), 2216 )) { 2217 return 2218 } 2219 2220 js.ThrowCallbackValueNotReturned() 2221 } 2222 2223 type OnHistoryStateUpdatedEventCallback[T any] struct { 2224 Fn func(arg T, this js.Ref, details *OnHistoryStateUpdatedArgDetails) js.Ref 2225 Arg T 2226 } 2227 2228 func (cb *OnHistoryStateUpdatedEventCallback[T]) Register() js.Func[func(details *OnHistoryStateUpdatedArgDetails)] { 2229 return js.RegisterCallback[func(details *OnHistoryStateUpdatedArgDetails)]( 2230 cb, abi.FuncPCABIInternal(cb.Fn), 2231 ) 2232 } 2233 2234 func (cb *OnHistoryStateUpdatedEventCallback[T]) DispatchCallback( 2235 targetPC uintptr, ctx *js.CallbackContext, 2236 ) { 2237 args := ctx.Args() 2238 if len(args) != 1+1 /* js this */ || 2239 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2240 js.ThrowInvalidCallbackInvocation() 2241 } 2242 var arg0 OnHistoryStateUpdatedArgDetails 2243 arg0.UpdateFrom(args[0+1]) 2244 defer arg0.FreeMembers(true) 2245 2246 if ctx.Return(cb.Fn( 2247 cb.Arg, 2248 args[0], 2249 2250 mark.NoEscape(&arg0), 2251 )) { 2252 return 2253 } 2254 2255 js.ThrowCallbackValueNotReturned() 2256 } 2257 2258 // HasFuncOnHistoryStateUpdated returns true if the function "WEBEXT.webNavigation.onHistoryStateUpdated.addListener" exists. 2259 func HasFuncOnHistoryStateUpdated() bool { 2260 return js.True == bindings.HasFuncOnHistoryStateUpdated() 2261 } 2262 2263 // FuncOnHistoryStateUpdated returns the function "WEBEXT.webNavigation.onHistoryStateUpdated.addListener". 2264 func FuncOnHistoryStateUpdated() (fn js.Func[func(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)])]) { 2265 bindings.FuncOnHistoryStateUpdated( 2266 js.Pointer(&fn), 2267 ) 2268 return 2269 } 2270 2271 // OnHistoryStateUpdated calls the function "WEBEXT.webNavigation.onHistoryStateUpdated.addListener" directly. 2272 func OnHistoryStateUpdated(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) (ret js.Void) { 2273 bindings.CallOnHistoryStateUpdated( 2274 js.Pointer(&ret), 2275 callback.Ref(), 2276 ) 2277 2278 return 2279 } 2280 2281 // TryOnHistoryStateUpdated calls the function "WEBEXT.webNavigation.onHistoryStateUpdated.addListener" 2282 // in a try/catch block and returns (_, err, ok = false) when it went through 2283 // the catch clause. 2284 func TryOnHistoryStateUpdated(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2285 ok = js.True == bindings.TryOnHistoryStateUpdated( 2286 js.Pointer(&ret), js.Pointer(&exception), 2287 callback.Ref(), 2288 ) 2289 2290 return 2291 } 2292 2293 // HasFuncOffHistoryStateUpdated returns true if the function "WEBEXT.webNavigation.onHistoryStateUpdated.removeListener" exists. 2294 func HasFuncOffHistoryStateUpdated() bool { 2295 return js.True == bindings.HasFuncOffHistoryStateUpdated() 2296 } 2297 2298 // FuncOffHistoryStateUpdated returns the function "WEBEXT.webNavigation.onHistoryStateUpdated.removeListener". 2299 func FuncOffHistoryStateUpdated() (fn js.Func[func(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)])]) { 2300 bindings.FuncOffHistoryStateUpdated( 2301 js.Pointer(&fn), 2302 ) 2303 return 2304 } 2305 2306 // OffHistoryStateUpdated calls the function "WEBEXT.webNavigation.onHistoryStateUpdated.removeListener" directly. 2307 func OffHistoryStateUpdated(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) (ret js.Void) { 2308 bindings.CallOffHistoryStateUpdated( 2309 js.Pointer(&ret), 2310 callback.Ref(), 2311 ) 2312 2313 return 2314 } 2315 2316 // TryOffHistoryStateUpdated calls the function "WEBEXT.webNavigation.onHistoryStateUpdated.removeListener" 2317 // in a try/catch block and returns (_, err, ok = false) when it went through 2318 // the catch clause. 2319 func TryOffHistoryStateUpdated(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2320 ok = js.True == bindings.TryOffHistoryStateUpdated( 2321 js.Pointer(&ret), js.Pointer(&exception), 2322 callback.Ref(), 2323 ) 2324 2325 return 2326 } 2327 2328 // HasFuncHasOnHistoryStateUpdated returns true if the function "WEBEXT.webNavigation.onHistoryStateUpdated.hasListener" exists. 2329 func HasFuncHasOnHistoryStateUpdated() bool { 2330 return js.True == bindings.HasFuncHasOnHistoryStateUpdated() 2331 } 2332 2333 // FuncHasOnHistoryStateUpdated returns the function "WEBEXT.webNavigation.onHistoryStateUpdated.hasListener". 2334 func FuncHasOnHistoryStateUpdated() (fn js.Func[func(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) bool]) { 2335 bindings.FuncHasOnHistoryStateUpdated( 2336 js.Pointer(&fn), 2337 ) 2338 return 2339 } 2340 2341 // HasOnHistoryStateUpdated calls the function "WEBEXT.webNavigation.onHistoryStateUpdated.hasListener" directly. 2342 func HasOnHistoryStateUpdated(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) (ret bool) { 2343 bindings.CallHasOnHistoryStateUpdated( 2344 js.Pointer(&ret), 2345 callback.Ref(), 2346 ) 2347 2348 return 2349 } 2350 2351 // TryHasOnHistoryStateUpdated calls the function "WEBEXT.webNavigation.onHistoryStateUpdated.hasListener" 2352 // in a try/catch block and returns (_, err, ok = false) when it went through 2353 // the catch clause. 2354 func TryHasOnHistoryStateUpdated(callback js.Func[func(details *OnHistoryStateUpdatedArgDetails)]) (ret bool, exception js.Any, ok bool) { 2355 ok = js.True == bindings.TryHasOnHistoryStateUpdated( 2356 js.Pointer(&ret), js.Pointer(&exception), 2357 callback.Ref(), 2358 ) 2359 2360 return 2361 } 2362 2363 type OnReferenceFragmentUpdatedEventCallbackFunc func(this js.Ref, details *OnReferenceFragmentUpdatedArgDetails) js.Ref 2364 2365 func (fn OnReferenceFragmentUpdatedEventCallbackFunc) Register() js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)] { 2366 return js.RegisterCallback[func(details *OnReferenceFragmentUpdatedArgDetails)]( 2367 fn, abi.FuncPCABIInternal(fn), 2368 ) 2369 } 2370 2371 func (fn OnReferenceFragmentUpdatedEventCallbackFunc) DispatchCallback( 2372 targetPC uintptr, ctx *js.CallbackContext, 2373 ) { 2374 args := ctx.Args() 2375 if len(args) != 1+1 /* js this */ || 2376 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2377 js.ThrowInvalidCallbackInvocation() 2378 } 2379 var arg0 OnReferenceFragmentUpdatedArgDetails 2380 arg0.UpdateFrom(args[0+1]) 2381 defer arg0.FreeMembers(true) 2382 2383 if ctx.Return(fn( 2384 args[0], 2385 2386 mark.NoEscape(&arg0), 2387 )) { 2388 return 2389 } 2390 2391 js.ThrowCallbackValueNotReturned() 2392 } 2393 2394 type OnReferenceFragmentUpdatedEventCallback[T any] struct { 2395 Fn func(arg T, this js.Ref, details *OnReferenceFragmentUpdatedArgDetails) js.Ref 2396 Arg T 2397 } 2398 2399 func (cb *OnReferenceFragmentUpdatedEventCallback[T]) Register() js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)] { 2400 return js.RegisterCallback[func(details *OnReferenceFragmentUpdatedArgDetails)]( 2401 cb, abi.FuncPCABIInternal(cb.Fn), 2402 ) 2403 } 2404 2405 func (cb *OnReferenceFragmentUpdatedEventCallback[T]) DispatchCallback( 2406 targetPC uintptr, ctx *js.CallbackContext, 2407 ) { 2408 args := ctx.Args() 2409 if len(args) != 1+1 /* js this */ || 2410 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2411 js.ThrowInvalidCallbackInvocation() 2412 } 2413 var arg0 OnReferenceFragmentUpdatedArgDetails 2414 arg0.UpdateFrom(args[0+1]) 2415 defer arg0.FreeMembers(true) 2416 2417 if ctx.Return(cb.Fn( 2418 cb.Arg, 2419 args[0], 2420 2421 mark.NoEscape(&arg0), 2422 )) { 2423 return 2424 } 2425 2426 js.ThrowCallbackValueNotReturned() 2427 } 2428 2429 // HasFuncOnReferenceFragmentUpdated returns true if the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.addListener" exists. 2430 func HasFuncOnReferenceFragmentUpdated() bool { 2431 return js.True == bindings.HasFuncOnReferenceFragmentUpdated() 2432 } 2433 2434 // FuncOnReferenceFragmentUpdated returns the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.addListener". 2435 func FuncOnReferenceFragmentUpdated() (fn js.Func[func(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)])]) { 2436 bindings.FuncOnReferenceFragmentUpdated( 2437 js.Pointer(&fn), 2438 ) 2439 return 2440 } 2441 2442 // OnReferenceFragmentUpdated calls the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.addListener" directly. 2443 func OnReferenceFragmentUpdated(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) (ret js.Void) { 2444 bindings.CallOnReferenceFragmentUpdated( 2445 js.Pointer(&ret), 2446 callback.Ref(), 2447 ) 2448 2449 return 2450 } 2451 2452 // TryOnReferenceFragmentUpdated calls the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.addListener" 2453 // in a try/catch block and returns (_, err, ok = false) when it went through 2454 // the catch clause. 2455 func TryOnReferenceFragmentUpdated(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2456 ok = js.True == bindings.TryOnReferenceFragmentUpdated( 2457 js.Pointer(&ret), js.Pointer(&exception), 2458 callback.Ref(), 2459 ) 2460 2461 return 2462 } 2463 2464 // HasFuncOffReferenceFragmentUpdated returns true if the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.removeListener" exists. 2465 func HasFuncOffReferenceFragmentUpdated() bool { 2466 return js.True == bindings.HasFuncOffReferenceFragmentUpdated() 2467 } 2468 2469 // FuncOffReferenceFragmentUpdated returns the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.removeListener". 2470 func FuncOffReferenceFragmentUpdated() (fn js.Func[func(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)])]) { 2471 bindings.FuncOffReferenceFragmentUpdated( 2472 js.Pointer(&fn), 2473 ) 2474 return 2475 } 2476 2477 // OffReferenceFragmentUpdated calls the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.removeListener" directly. 2478 func OffReferenceFragmentUpdated(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) (ret js.Void) { 2479 bindings.CallOffReferenceFragmentUpdated( 2480 js.Pointer(&ret), 2481 callback.Ref(), 2482 ) 2483 2484 return 2485 } 2486 2487 // TryOffReferenceFragmentUpdated calls the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.removeListener" 2488 // in a try/catch block and returns (_, err, ok = false) when it went through 2489 // the catch clause. 2490 func TryOffReferenceFragmentUpdated(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2491 ok = js.True == bindings.TryOffReferenceFragmentUpdated( 2492 js.Pointer(&ret), js.Pointer(&exception), 2493 callback.Ref(), 2494 ) 2495 2496 return 2497 } 2498 2499 // HasFuncHasOnReferenceFragmentUpdated returns true if the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.hasListener" exists. 2500 func HasFuncHasOnReferenceFragmentUpdated() bool { 2501 return js.True == bindings.HasFuncHasOnReferenceFragmentUpdated() 2502 } 2503 2504 // FuncHasOnReferenceFragmentUpdated returns the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.hasListener". 2505 func FuncHasOnReferenceFragmentUpdated() (fn js.Func[func(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) bool]) { 2506 bindings.FuncHasOnReferenceFragmentUpdated( 2507 js.Pointer(&fn), 2508 ) 2509 return 2510 } 2511 2512 // HasOnReferenceFragmentUpdated calls the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.hasListener" directly. 2513 func HasOnReferenceFragmentUpdated(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) (ret bool) { 2514 bindings.CallHasOnReferenceFragmentUpdated( 2515 js.Pointer(&ret), 2516 callback.Ref(), 2517 ) 2518 2519 return 2520 } 2521 2522 // TryHasOnReferenceFragmentUpdated calls the function "WEBEXT.webNavigation.onReferenceFragmentUpdated.hasListener" 2523 // in a try/catch block and returns (_, err, ok = false) when it went through 2524 // the catch clause. 2525 func TryHasOnReferenceFragmentUpdated(callback js.Func[func(details *OnReferenceFragmentUpdatedArgDetails)]) (ret bool, exception js.Any, ok bool) { 2526 ok = js.True == bindings.TryHasOnReferenceFragmentUpdated( 2527 js.Pointer(&ret), js.Pointer(&exception), 2528 callback.Ref(), 2529 ) 2530 2531 return 2532 } 2533 2534 type OnTabReplacedEventCallbackFunc func(this js.Ref, details *OnTabReplacedArgDetails) js.Ref 2535 2536 func (fn OnTabReplacedEventCallbackFunc) Register() js.Func[func(details *OnTabReplacedArgDetails)] { 2537 return js.RegisterCallback[func(details *OnTabReplacedArgDetails)]( 2538 fn, abi.FuncPCABIInternal(fn), 2539 ) 2540 } 2541 2542 func (fn OnTabReplacedEventCallbackFunc) DispatchCallback( 2543 targetPC uintptr, ctx *js.CallbackContext, 2544 ) { 2545 args := ctx.Args() 2546 if len(args) != 1+1 /* js this */ || 2547 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2548 js.ThrowInvalidCallbackInvocation() 2549 } 2550 var arg0 OnTabReplacedArgDetails 2551 arg0.UpdateFrom(args[0+1]) 2552 defer arg0.FreeMembers(true) 2553 2554 if ctx.Return(fn( 2555 args[0], 2556 2557 mark.NoEscape(&arg0), 2558 )) { 2559 return 2560 } 2561 2562 js.ThrowCallbackValueNotReturned() 2563 } 2564 2565 type OnTabReplacedEventCallback[T any] struct { 2566 Fn func(arg T, this js.Ref, details *OnTabReplacedArgDetails) js.Ref 2567 Arg T 2568 } 2569 2570 func (cb *OnTabReplacedEventCallback[T]) Register() js.Func[func(details *OnTabReplacedArgDetails)] { 2571 return js.RegisterCallback[func(details *OnTabReplacedArgDetails)]( 2572 cb, abi.FuncPCABIInternal(cb.Fn), 2573 ) 2574 } 2575 2576 func (cb *OnTabReplacedEventCallback[T]) DispatchCallback( 2577 targetPC uintptr, ctx *js.CallbackContext, 2578 ) { 2579 args := ctx.Args() 2580 if len(args) != 1+1 /* js this */ || 2581 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2582 js.ThrowInvalidCallbackInvocation() 2583 } 2584 var arg0 OnTabReplacedArgDetails 2585 arg0.UpdateFrom(args[0+1]) 2586 defer arg0.FreeMembers(true) 2587 2588 if ctx.Return(cb.Fn( 2589 cb.Arg, 2590 args[0], 2591 2592 mark.NoEscape(&arg0), 2593 )) { 2594 return 2595 } 2596 2597 js.ThrowCallbackValueNotReturned() 2598 } 2599 2600 // HasFuncOnTabReplaced returns true if the function "WEBEXT.webNavigation.onTabReplaced.addListener" exists. 2601 func HasFuncOnTabReplaced() bool { 2602 return js.True == bindings.HasFuncOnTabReplaced() 2603 } 2604 2605 // FuncOnTabReplaced returns the function "WEBEXT.webNavigation.onTabReplaced.addListener". 2606 func FuncOnTabReplaced() (fn js.Func[func(callback js.Func[func(details *OnTabReplacedArgDetails)])]) { 2607 bindings.FuncOnTabReplaced( 2608 js.Pointer(&fn), 2609 ) 2610 return 2611 } 2612 2613 // OnTabReplaced calls the function "WEBEXT.webNavigation.onTabReplaced.addListener" directly. 2614 func OnTabReplaced(callback js.Func[func(details *OnTabReplacedArgDetails)]) (ret js.Void) { 2615 bindings.CallOnTabReplaced( 2616 js.Pointer(&ret), 2617 callback.Ref(), 2618 ) 2619 2620 return 2621 } 2622 2623 // TryOnTabReplaced calls the function "WEBEXT.webNavigation.onTabReplaced.addListener" 2624 // in a try/catch block and returns (_, err, ok = false) when it went through 2625 // the catch clause. 2626 func TryOnTabReplaced(callback js.Func[func(details *OnTabReplacedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2627 ok = js.True == bindings.TryOnTabReplaced( 2628 js.Pointer(&ret), js.Pointer(&exception), 2629 callback.Ref(), 2630 ) 2631 2632 return 2633 } 2634 2635 // HasFuncOffTabReplaced returns true if the function "WEBEXT.webNavigation.onTabReplaced.removeListener" exists. 2636 func HasFuncOffTabReplaced() bool { 2637 return js.True == bindings.HasFuncOffTabReplaced() 2638 } 2639 2640 // FuncOffTabReplaced returns the function "WEBEXT.webNavigation.onTabReplaced.removeListener". 2641 func FuncOffTabReplaced() (fn js.Func[func(callback js.Func[func(details *OnTabReplacedArgDetails)])]) { 2642 bindings.FuncOffTabReplaced( 2643 js.Pointer(&fn), 2644 ) 2645 return 2646 } 2647 2648 // OffTabReplaced calls the function "WEBEXT.webNavigation.onTabReplaced.removeListener" directly. 2649 func OffTabReplaced(callback js.Func[func(details *OnTabReplacedArgDetails)]) (ret js.Void) { 2650 bindings.CallOffTabReplaced( 2651 js.Pointer(&ret), 2652 callback.Ref(), 2653 ) 2654 2655 return 2656 } 2657 2658 // TryOffTabReplaced calls the function "WEBEXT.webNavigation.onTabReplaced.removeListener" 2659 // in a try/catch block and returns (_, err, ok = false) when it went through 2660 // the catch clause. 2661 func TryOffTabReplaced(callback js.Func[func(details *OnTabReplacedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2662 ok = js.True == bindings.TryOffTabReplaced( 2663 js.Pointer(&ret), js.Pointer(&exception), 2664 callback.Ref(), 2665 ) 2666 2667 return 2668 } 2669 2670 // HasFuncHasOnTabReplaced returns true if the function "WEBEXT.webNavigation.onTabReplaced.hasListener" exists. 2671 func HasFuncHasOnTabReplaced() bool { 2672 return js.True == bindings.HasFuncHasOnTabReplaced() 2673 } 2674 2675 // FuncHasOnTabReplaced returns the function "WEBEXT.webNavigation.onTabReplaced.hasListener". 2676 func FuncHasOnTabReplaced() (fn js.Func[func(callback js.Func[func(details *OnTabReplacedArgDetails)]) bool]) { 2677 bindings.FuncHasOnTabReplaced( 2678 js.Pointer(&fn), 2679 ) 2680 return 2681 } 2682 2683 // HasOnTabReplaced calls the function "WEBEXT.webNavigation.onTabReplaced.hasListener" directly. 2684 func HasOnTabReplaced(callback js.Func[func(details *OnTabReplacedArgDetails)]) (ret bool) { 2685 bindings.CallHasOnTabReplaced( 2686 js.Pointer(&ret), 2687 callback.Ref(), 2688 ) 2689 2690 return 2691 } 2692 2693 // TryHasOnTabReplaced calls the function "WEBEXT.webNavigation.onTabReplaced.hasListener" 2694 // in a try/catch block and returns (_, err, ok = false) when it went through 2695 // the catch clause. 2696 func TryHasOnTabReplaced(callback js.Func[func(details *OnTabReplacedArgDetails)]) (ret bool, exception js.Any, ok bool) { 2697 ok = js.True == bindings.TryHasOnTabReplaced( 2698 js.Pointer(&ret), js.Pointer(&exception), 2699 callback.Ref(), 2700 ) 2701 2702 return 2703 }