github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/passwordsprivate/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package passwordsprivate 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/passwordsprivate/bindings" 11 ) 12 13 type AddPasswordOptions struct { 14 // Url is "AddPasswordOptions.url" 15 // 16 // Optional 17 Url js.String 18 // Username is "AddPasswordOptions.username" 19 // 20 // Optional 21 Username js.String 22 // Password is "AddPasswordOptions.password" 23 // 24 // Optional 25 Password js.String 26 // Note is "AddPasswordOptions.note" 27 // 28 // Optional 29 Note js.String 30 // UseAccountStore is "AddPasswordOptions.useAccountStore" 31 // 32 // Optional 33 // 34 // NOTE: FFI_USE_UseAccountStore MUST be set to true to make this field effective. 35 UseAccountStore bool 36 37 FFI_USE_UseAccountStore bool // for UseAccountStore. 38 39 FFI_USE bool 40 } 41 42 // FromRef calls UpdateFrom and returns a AddPasswordOptions with all fields set. 43 func (p AddPasswordOptions) FromRef(ref js.Ref) AddPasswordOptions { 44 p.UpdateFrom(ref) 45 return p 46 } 47 48 // New creates a new AddPasswordOptions in the application heap. 49 func (p AddPasswordOptions) New() js.Ref { 50 return bindings.AddPasswordOptionsJSLoad( 51 js.Pointer(&p), js.True, 0, 52 ) 53 } 54 55 // UpdateFrom copies value of all fields of the heap object to p. 56 func (p *AddPasswordOptions) UpdateFrom(ref js.Ref) { 57 bindings.AddPasswordOptionsJSStore( 58 js.Pointer(p), ref, 59 ) 60 } 61 62 // Update writes all fields of the p to the heap object referenced by ref. 63 func (p *AddPasswordOptions) Update(ref js.Ref) { 64 bindings.AddPasswordOptionsJSLoad( 65 js.Pointer(p), js.False, ref, 66 ) 67 } 68 69 // FreeMembers frees fields with heap reference, if recursive is true 70 // free all heap references reachable from p. 71 func (p *AddPasswordOptions) FreeMembers(recursive bool) { 72 js.Free( 73 p.Url.Ref(), 74 p.Username.Ref(), 75 p.Password.Ref(), 76 p.Note.Ref(), 77 ) 78 p.Url = p.Url.FromRef(js.Undefined) 79 p.Username = p.Username.FromRef(js.Undefined) 80 p.Password = p.Password.FromRef(js.Undefined) 81 p.Note = p.Note.FromRef(js.Undefined) 82 } 83 84 type CompromiseType uint32 85 86 const ( 87 _ CompromiseType = iota 88 89 CompromiseType_LEAKED 90 CompromiseType_PHISHED 91 CompromiseType_REUSED 92 CompromiseType_WEAK 93 ) 94 95 func (CompromiseType) FromRef(str js.Ref) CompromiseType { 96 return CompromiseType(bindings.ConstOfCompromiseType(str)) 97 } 98 99 func (x CompromiseType) String() (string, bool) { 100 switch x { 101 case CompromiseType_LEAKED: 102 return "LEAKED", true 103 case CompromiseType_PHISHED: 104 return "PHISHED", true 105 case CompromiseType_REUSED: 106 return "REUSED", true 107 case CompromiseType_WEAK: 108 return "WEAK", true 109 default: 110 return "", false 111 } 112 } 113 114 type CompromisedInfo struct { 115 // CompromiseTime is "CompromisedInfo.compromiseTime" 116 // 117 // Optional 118 // 119 // NOTE: FFI_USE_CompromiseTime MUST be set to true to make this field effective. 120 CompromiseTime float64 121 // ElapsedTimeSinceCompromise is "CompromisedInfo.elapsedTimeSinceCompromise" 122 // 123 // Optional 124 ElapsedTimeSinceCompromise js.String 125 // CompromiseTypes is "CompromisedInfo.compromiseTypes" 126 // 127 // Optional 128 CompromiseTypes js.Array[CompromiseType] 129 // IsMuted is "CompromisedInfo.isMuted" 130 // 131 // Optional 132 // 133 // NOTE: FFI_USE_IsMuted MUST be set to true to make this field effective. 134 IsMuted bool 135 136 FFI_USE_CompromiseTime bool // for CompromiseTime. 137 FFI_USE_IsMuted bool // for IsMuted. 138 139 FFI_USE bool 140 } 141 142 // FromRef calls UpdateFrom and returns a CompromisedInfo with all fields set. 143 func (p CompromisedInfo) FromRef(ref js.Ref) CompromisedInfo { 144 p.UpdateFrom(ref) 145 return p 146 } 147 148 // New creates a new CompromisedInfo in the application heap. 149 func (p CompromisedInfo) New() js.Ref { 150 return bindings.CompromisedInfoJSLoad( 151 js.Pointer(&p), js.True, 0, 152 ) 153 } 154 155 // UpdateFrom copies value of all fields of the heap object to p. 156 func (p *CompromisedInfo) UpdateFrom(ref js.Ref) { 157 bindings.CompromisedInfoJSStore( 158 js.Pointer(p), ref, 159 ) 160 } 161 162 // Update writes all fields of the p to the heap object referenced by ref. 163 func (p *CompromisedInfo) Update(ref js.Ref) { 164 bindings.CompromisedInfoJSLoad( 165 js.Pointer(p), js.False, ref, 166 ) 167 } 168 169 // FreeMembers frees fields with heap reference, if recursive is true 170 // free all heap references reachable from p. 171 func (p *CompromisedInfo) FreeMembers(recursive bool) { 172 js.Free( 173 p.ElapsedTimeSinceCompromise.Ref(), 174 p.CompromiseTypes.Ref(), 175 ) 176 p.ElapsedTimeSinceCompromise = p.ElapsedTimeSinceCompromise.FromRef(js.Undefined) 177 p.CompromiseTypes = p.CompromiseTypes.FromRef(js.Undefined) 178 } 179 180 type DomainInfo struct { 181 // Name is "DomainInfo.name" 182 // 183 // Optional 184 Name js.String 185 // Url is "DomainInfo.url" 186 // 187 // Optional 188 Url js.String 189 // SignonRealm is "DomainInfo.signonRealm" 190 // 191 // Optional 192 SignonRealm js.String 193 194 FFI_USE bool 195 } 196 197 // FromRef calls UpdateFrom and returns a DomainInfo with all fields set. 198 func (p DomainInfo) FromRef(ref js.Ref) DomainInfo { 199 p.UpdateFrom(ref) 200 return p 201 } 202 203 // New creates a new DomainInfo in the application heap. 204 func (p DomainInfo) New() js.Ref { 205 return bindings.DomainInfoJSLoad( 206 js.Pointer(&p), js.True, 0, 207 ) 208 } 209 210 // UpdateFrom copies value of all fields of the heap object to p. 211 func (p *DomainInfo) UpdateFrom(ref js.Ref) { 212 bindings.DomainInfoJSStore( 213 js.Pointer(p), ref, 214 ) 215 } 216 217 // Update writes all fields of the p to the heap object referenced by ref. 218 func (p *DomainInfo) Update(ref js.Ref) { 219 bindings.DomainInfoJSLoad( 220 js.Pointer(p), js.False, ref, 221 ) 222 } 223 224 // FreeMembers frees fields with heap reference, if recursive is true 225 // free all heap references reachable from p. 226 func (p *DomainInfo) FreeMembers(recursive bool) { 227 js.Free( 228 p.Name.Ref(), 229 p.Url.Ref(), 230 p.SignonRealm.Ref(), 231 ) 232 p.Name = p.Name.FromRef(js.Undefined) 233 p.Url = p.Url.FromRef(js.Undefined) 234 p.SignonRealm = p.SignonRealm.FromRef(js.Undefined) 235 } 236 237 type PasswordStoreSet uint32 238 239 const ( 240 _ PasswordStoreSet = iota 241 242 PasswordStoreSet_DEVICE 243 PasswordStoreSet_ACCOUNT 244 PasswordStoreSet_DEVICE_AND_ACCOUNT 245 ) 246 247 func (PasswordStoreSet) FromRef(str js.Ref) PasswordStoreSet { 248 return PasswordStoreSet(bindings.ConstOfPasswordStoreSet(str)) 249 } 250 251 func (x PasswordStoreSet) String() (string, bool) { 252 switch x { 253 case PasswordStoreSet_DEVICE: 254 return "DEVICE", true 255 case PasswordStoreSet_ACCOUNT: 256 return "ACCOUNT", true 257 case PasswordStoreSet_DEVICE_AND_ACCOUNT: 258 return "DEVICE_AND_ACCOUNT", true 259 default: 260 return "", false 261 } 262 } 263 264 type PasswordUiEntry struct { 265 // AffiliatedDomains is "PasswordUiEntry.affiliatedDomains" 266 // 267 // Optional 268 AffiliatedDomains js.Array[DomainInfo] 269 // Username is "PasswordUiEntry.username" 270 // 271 // Optional 272 Username js.String 273 // DisplayName is "PasswordUiEntry.displayName" 274 // 275 // Optional 276 DisplayName js.String 277 // Password is "PasswordUiEntry.password" 278 // 279 // Optional 280 Password js.String 281 // FederationText is "PasswordUiEntry.federationText" 282 // 283 // Optional 284 FederationText js.String 285 // Id is "PasswordUiEntry.id" 286 // 287 // Optional 288 // 289 // NOTE: FFI_USE_Id MUST be set to true to make this field effective. 290 Id int32 291 // StoredIn is "PasswordUiEntry.storedIn" 292 // 293 // Optional 294 StoredIn PasswordStoreSet 295 // IsPasskey is "PasswordUiEntry.isPasskey" 296 // 297 // Optional 298 // 299 // NOTE: FFI_USE_IsPasskey MUST be set to true to make this field effective. 300 IsPasskey bool 301 // Note is "PasswordUiEntry.note" 302 // 303 // Optional 304 Note js.String 305 // ChangePasswordUrl is "PasswordUiEntry.changePasswordUrl" 306 // 307 // Optional 308 ChangePasswordUrl js.String 309 // CompromisedInfo is "PasswordUiEntry.compromisedInfo" 310 // 311 // Optional 312 // 313 // NOTE: CompromisedInfo.FFI_USE MUST be set to true to get CompromisedInfo used. 314 CompromisedInfo CompromisedInfo 315 316 FFI_USE_Id bool // for Id. 317 FFI_USE_IsPasskey bool // for IsPasskey. 318 319 FFI_USE bool 320 } 321 322 // FromRef calls UpdateFrom and returns a PasswordUiEntry with all fields set. 323 func (p PasswordUiEntry) FromRef(ref js.Ref) PasswordUiEntry { 324 p.UpdateFrom(ref) 325 return p 326 } 327 328 // New creates a new PasswordUiEntry in the application heap. 329 func (p PasswordUiEntry) New() js.Ref { 330 return bindings.PasswordUiEntryJSLoad( 331 js.Pointer(&p), js.True, 0, 332 ) 333 } 334 335 // UpdateFrom copies value of all fields of the heap object to p. 336 func (p *PasswordUiEntry) UpdateFrom(ref js.Ref) { 337 bindings.PasswordUiEntryJSStore( 338 js.Pointer(p), ref, 339 ) 340 } 341 342 // Update writes all fields of the p to the heap object referenced by ref. 343 func (p *PasswordUiEntry) Update(ref js.Ref) { 344 bindings.PasswordUiEntryJSLoad( 345 js.Pointer(p), js.False, ref, 346 ) 347 } 348 349 // FreeMembers frees fields with heap reference, if recursive is true 350 // free all heap references reachable from p. 351 func (p *PasswordUiEntry) FreeMembers(recursive bool) { 352 js.Free( 353 p.AffiliatedDomains.Ref(), 354 p.Username.Ref(), 355 p.DisplayName.Ref(), 356 p.Password.Ref(), 357 p.FederationText.Ref(), 358 p.Note.Ref(), 359 p.ChangePasswordUrl.Ref(), 360 ) 361 p.AffiliatedDomains = p.AffiliatedDomains.FromRef(js.Undefined) 362 p.Username = p.Username.FromRef(js.Undefined) 363 p.DisplayName = p.DisplayName.FromRef(js.Undefined) 364 p.Password = p.Password.FromRef(js.Undefined) 365 p.FederationText = p.FederationText.FromRef(js.Undefined) 366 p.Note = p.Note.FromRef(js.Undefined) 367 p.ChangePasswordUrl = p.ChangePasswordUrl.FromRef(js.Undefined) 368 if recursive { 369 p.CompromisedInfo.FreeMembers(true) 370 } 371 } 372 373 type CredentialGroup struct { 374 // Name is "CredentialGroup.name" 375 // 376 // Optional 377 Name js.String 378 // IconUrl is "CredentialGroup.iconUrl" 379 // 380 // Optional 381 IconUrl js.String 382 // Entries is "CredentialGroup.entries" 383 // 384 // Optional 385 Entries js.Array[PasswordUiEntry] 386 387 FFI_USE bool 388 } 389 390 // FromRef calls UpdateFrom and returns a CredentialGroup with all fields set. 391 func (p CredentialGroup) FromRef(ref js.Ref) CredentialGroup { 392 p.UpdateFrom(ref) 393 return p 394 } 395 396 // New creates a new CredentialGroup in the application heap. 397 func (p CredentialGroup) New() js.Ref { 398 return bindings.CredentialGroupJSLoad( 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 *CredentialGroup) UpdateFrom(ref js.Ref) { 405 bindings.CredentialGroupJSStore( 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 *CredentialGroup) Update(ref js.Ref) { 412 bindings.CredentialGroupJSLoad( 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 *CredentialGroup) FreeMembers(recursive bool) { 420 js.Free( 421 p.Name.Ref(), 422 p.IconUrl.Ref(), 423 p.Entries.Ref(), 424 ) 425 p.Name = p.Name.FromRef(js.Undefined) 426 p.IconUrl = p.IconUrl.FromRef(js.Undefined) 427 p.Entries = p.Entries.FromRef(js.Undefined) 428 } 429 430 type CredentialsGroupCallbackFunc func(this js.Ref, entries js.Array[CredentialGroup]) js.Ref 431 432 func (fn CredentialsGroupCallbackFunc) Register() js.Func[func(entries js.Array[CredentialGroup])] { 433 return js.RegisterCallback[func(entries js.Array[CredentialGroup])]( 434 fn, abi.FuncPCABIInternal(fn), 435 ) 436 } 437 438 func (fn CredentialsGroupCallbackFunc) DispatchCallback( 439 targetPC uintptr, ctx *js.CallbackContext, 440 ) { 441 args := ctx.Args() 442 if len(args) != 1+1 /* js this */ || 443 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 444 js.ThrowInvalidCallbackInvocation() 445 } 446 447 if ctx.Return(fn( 448 args[0], 449 450 js.Array[CredentialGroup]{}.FromRef(args[0+1]), 451 )) { 452 return 453 } 454 455 js.ThrowCallbackValueNotReturned() 456 } 457 458 type CredentialsGroupCallback[T any] struct { 459 Fn func(arg T, this js.Ref, entries js.Array[CredentialGroup]) js.Ref 460 Arg T 461 } 462 463 func (cb *CredentialsGroupCallback[T]) Register() js.Func[func(entries js.Array[CredentialGroup])] { 464 return js.RegisterCallback[func(entries js.Array[CredentialGroup])]( 465 cb, abi.FuncPCABIInternal(cb.Fn), 466 ) 467 } 468 469 func (cb *CredentialsGroupCallback[T]) DispatchCallback( 470 targetPC uintptr, ctx *js.CallbackContext, 471 ) { 472 args := ctx.Args() 473 if len(args) != 1+1 /* js this */ || 474 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 475 js.ThrowInvalidCallbackInvocation() 476 } 477 478 if ctx.Return(cb.Fn( 479 cb.Arg, 480 args[0], 481 482 js.Array[CredentialGroup]{}.FromRef(args[0+1]), 483 )) { 484 return 485 } 486 487 js.ThrowCallbackValueNotReturned() 488 } 489 490 type CredentialsWithReusedPasswordCallbackFunc func(this js.Ref, entries js.Array[PasswordUiEntryList]) js.Ref 491 492 func (fn CredentialsWithReusedPasswordCallbackFunc) Register() js.Func[func(entries js.Array[PasswordUiEntryList])] { 493 return js.RegisterCallback[func(entries js.Array[PasswordUiEntryList])]( 494 fn, abi.FuncPCABIInternal(fn), 495 ) 496 } 497 498 func (fn CredentialsWithReusedPasswordCallbackFunc) DispatchCallback( 499 targetPC uintptr, ctx *js.CallbackContext, 500 ) { 501 args := ctx.Args() 502 if len(args) != 1+1 /* js this */ || 503 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 504 js.ThrowInvalidCallbackInvocation() 505 } 506 507 if ctx.Return(fn( 508 args[0], 509 510 js.Array[PasswordUiEntryList]{}.FromRef(args[0+1]), 511 )) { 512 return 513 } 514 515 js.ThrowCallbackValueNotReturned() 516 } 517 518 type CredentialsWithReusedPasswordCallback[T any] struct { 519 Fn func(arg T, this js.Ref, entries js.Array[PasswordUiEntryList]) js.Ref 520 Arg T 521 } 522 523 func (cb *CredentialsWithReusedPasswordCallback[T]) Register() js.Func[func(entries js.Array[PasswordUiEntryList])] { 524 return js.RegisterCallback[func(entries js.Array[PasswordUiEntryList])]( 525 cb, abi.FuncPCABIInternal(cb.Fn), 526 ) 527 } 528 529 func (cb *CredentialsWithReusedPasswordCallback[T]) DispatchCallback( 530 targetPC uintptr, ctx *js.CallbackContext, 531 ) { 532 args := ctx.Args() 533 if len(args) != 1+1 /* js this */ || 534 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 535 js.ThrowInvalidCallbackInvocation() 536 } 537 538 if ctx.Return(cb.Fn( 539 cb.Arg, 540 args[0], 541 542 js.Array[PasswordUiEntryList]{}.FromRef(args[0+1]), 543 )) { 544 return 545 } 546 547 js.ThrowCallbackValueNotReturned() 548 } 549 550 type PasswordUiEntryList struct { 551 // Entries is "PasswordUiEntryList.entries" 552 // 553 // Optional 554 Entries js.Array[PasswordUiEntry] 555 556 FFI_USE bool 557 } 558 559 // FromRef calls UpdateFrom and returns a PasswordUiEntryList with all fields set. 560 func (p PasswordUiEntryList) FromRef(ref js.Ref) PasswordUiEntryList { 561 p.UpdateFrom(ref) 562 return p 563 } 564 565 // New creates a new PasswordUiEntryList in the application heap. 566 func (p PasswordUiEntryList) New() js.Ref { 567 return bindings.PasswordUiEntryListJSLoad( 568 js.Pointer(&p), js.True, 0, 569 ) 570 } 571 572 // UpdateFrom copies value of all fields of the heap object to p. 573 func (p *PasswordUiEntryList) UpdateFrom(ref js.Ref) { 574 bindings.PasswordUiEntryListJSStore( 575 js.Pointer(p), ref, 576 ) 577 } 578 579 // Update writes all fields of the p to the heap object referenced by ref. 580 func (p *PasswordUiEntryList) Update(ref js.Ref) { 581 bindings.PasswordUiEntryListJSLoad( 582 js.Pointer(p), js.False, ref, 583 ) 584 } 585 586 // FreeMembers frees fields with heap reference, if recursive is true 587 // free all heap references reachable from p. 588 func (p *PasswordUiEntryList) FreeMembers(recursive bool) { 589 js.Free( 590 p.Entries.Ref(), 591 ) 592 p.Entries = p.Entries.FromRef(js.Undefined) 593 } 594 595 type UrlCollection struct { 596 // SignonRealm is "UrlCollection.signonRealm" 597 // 598 // Optional 599 SignonRealm js.String 600 // Shown is "UrlCollection.shown" 601 // 602 // Optional 603 Shown js.String 604 // Link is "UrlCollection.link" 605 // 606 // Optional 607 Link js.String 608 609 FFI_USE bool 610 } 611 612 // FromRef calls UpdateFrom and returns a UrlCollection with all fields set. 613 func (p UrlCollection) FromRef(ref js.Ref) UrlCollection { 614 p.UpdateFrom(ref) 615 return p 616 } 617 618 // New creates a new UrlCollection in the application heap. 619 func (p UrlCollection) New() js.Ref { 620 return bindings.UrlCollectionJSLoad( 621 js.Pointer(&p), js.True, 0, 622 ) 623 } 624 625 // UpdateFrom copies value of all fields of the heap object to p. 626 func (p *UrlCollection) UpdateFrom(ref js.Ref) { 627 bindings.UrlCollectionJSStore( 628 js.Pointer(p), ref, 629 ) 630 } 631 632 // Update writes all fields of the p to the heap object referenced by ref. 633 func (p *UrlCollection) Update(ref js.Ref) { 634 bindings.UrlCollectionJSLoad( 635 js.Pointer(p), js.False, ref, 636 ) 637 } 638 639 // FreeMembers frees fields with heap reference, if recursive is true 640 // free all heap references reachable from p. 641 func (p *UrlCollection) FreeMembers(recursive bool) { 642 js.Free( 643 p.SignonRealm.Ref(), 644 p.Shown.Ref(), 645 p.Link.Ref(), 646 ) 647 p.SignonRealm = p.SignonRealm.FromRef(js.Undefined) 648 p.Shown = p.Shown.FromRef(js.Undefined) 649 p.Link = p.Link.FromRef(js.Undefined) 650 } 651 652 type ExceptionEntry struct { 653 // Urls is "ExceptionEntry.urls" 654 // 655 // Optional 656 // 657 // NOTE: Urls.FFI_USE MUST be set to true to get Urls used. 658 Urls UrlCollection 659 // Id is "ExceptionEntry.id" 660 // 661 // Optional 662 // 663 // NOTE: FFI_USE_Id MUST be set to true to make this field effective. 664 Id int32 665 666 FFI_USE_Id bool // for Id. 667 668 FFI_USE bool 669 } 670 671 // FromRef calls UpdateFrom and returns a ExceptionEntry with all fields set. 672 func (p ExceptionEntry) FromRef(ref js.Ref) ExceptionEntry { 673 p.UpdateFrom(ref) 674 return p 675 } 676 677 // New creates a new ExceptionEntry in the application heap. 678 func (p ExceptionEntry) New() js.Ref { 679 return bindings.ExceptionEntryJSLoad( 680 js.Pointer(&p), js.True, 0, 681 ) 682 } 683 684 // UpdateFrom copies value of all fields of the heap object to p. 685 func (p *ExceptionEntry) UpdateFrom(ref js.Ref) { 686 bindings.ExceptionEntryJSStore( 687 js.Pointer(p), ref, 688 ) 689 } 690 691 // Update writes all fields of the p to the heap object referenced by ref. 692 func (p *ExceptionEntry) Update(ref js.Ref) { 693 bindings.ExceptionEntryJSLoad( 694 js.Pointer(p), js.False, ref, 695 ) 696 } 697 698 // FreeMembers frees fields with heap reference, if recursive is true 699 // free all heap references reachable from p. 700 func (p *ExceptionEntry) FreeMembers(recursive bool) { 701 if recursive { 702 p.Urls.FreeMembers(true) 703 } 704 } 705 706 type ExceptionListCallbackFunc func(this js.Ref, exceptions js.Array[ExceptionEntry]) js.Ref 707 708 func (fn ExceptionListCallbackFunc) Register() js.Func[func(exceptions js.Array[ExceptionEntry])] { 709 return js.RegisterCallback[func(exceptions js.Array[ExceptionEntry])]( 710 fn, abi.FuncPCABIInternal(fn), 711 ) 712 } 713 714 func (fn ExceptionListCallbackFunc) DispatchCallback( 715 targetPC uintptr, ctx *js.CallbackContext, 716 ) { 717 args := ctx.Args() 718 if len(args) != 1+1 /* js this */ || 719 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 720 js.ThrowInvalidCallbackInvocation() 721 } 722 723 if ctx.Return(fn( 724 args[0], 725 726 js.Array[ExceptionEntry]{}.FromRef(args[0+1]), 727 )) { 728 return 729 } 730 731 js.ThrowCallbackValueNotReturned() 732 } 733 734 type ExceptionListCallback[T any] struct { 735 Fn func(arg T, this js.Ref, exceptions js.Array[ExceptionEntry]) js.Ref 736 Arg T 737 } 738 739 func (cb *ExceptionListCallback[T]) Register() js.Func[func(exceptions js.Array[ExceptionEntry])] { 740 return js.RegisterCallback[func(exceptions js.Array[ExceptionEntry])]( 741 cb, abi.FuncPCABIInternal(cb.Fn), 742 ) 743 } 744 745 func (cb *ExceptionListCallback[T]) DispatchCallback( 746 targetPC uintptr, ctx *js.CallbackContext, 747 ) { 748 args := ctx.Args() 749 if len(args) != 1+1 /* js this */ || 750 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 751 js.ThrowInvalidCallbackInvocation() 752 } 753 754 if ctx.Return(cb.Fn( 755 cb.Arg, 756 args[0], 757 758 js.Array[ExceptionEntry]{}.FromRef(args[0+1]), 759 )) { 760 return 761 } 762 763 js.ThrowCallbackValueNotReturned() 764 } 765 766 type ExportProgressStatus uint32 767 768 const ( 769 _ ExportProgressStatus = iota 770 771 ExportProgressStatus_NOT_STARTED 772 ExportProgressStatus_IN_PROGRESS 773 ExportProgressStatus_SUCCEEDED 774 ExportProgressStatus_FAILED_CANCELLED 775 ExportProgressStatus_FAILED_WRITE_FAILED 776 ) 777 778 func (ExportProgressStatus) FromRef(str js.Ref) ExportProgressStatus { 779 return ExportProgressStatus(bindings.ConstOfExportProgressStatus(str)) 780 } 781 782 func (x ExportProgressStatus) String() (string, bool) { 783 switch x { 784 case ExportProgressStatus_NOT_STARTED: 785 return "NOT_STARTED", true 786 case ExportProgressStatus_IN_PROGRESS: 787 return "IN_PROGRESS", true 788 case ExportProgressStatus_SUCCEEDED: 789 return "SUCCEEDED", true 790 case ExportProgressStatus_FAILED_CANCELLED: 791 return "FAILED_CANCELLED", true 792 case ExportProgressStatus_FAILED_WRITE_FAILED: 793 return "FAILED_WRITE_FAILED", true 794 default: 795 return "", false 796 } 797 } 798 799 type ExportProgressStatusCallbackFunc func(this js.Ref, status ExportProgressStatus) js.Ref 800 801 func (fn ExportProgressStatusCallbackFunc) Register() js.Func[func(status ExportProgressStatus)] { 802 return js.RegisterCallback[func(status ExportProgressStatus)]( 803 fn, abi.FuncPCABIInternal(fn), 804 ) 805 } 806 807 func (fn ExportProgressStatusCallbackFunc) DispatchCallback( 808 targetPC uintptr, ctx *js.CallbackContext, 809 ) { 810 args := ctx.Args() 811 if len(args) != 1+1 /* js this */ || 812 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 813 js.ThrowInvalidCallbackInvocation() 814 } 815 816 if ctx.Return(fn( 817 args[0], 818 819 ExportProgressStatus(0).FromRef(args[0+1]), 820 )) { 821 return 822 } 823 824 js.ThrowCallbackValueNotReturned() 825 } 826 827 type ExportProgressStatusCallback[T any] struct { 828 Fn func(arg T, this js.Ref, status ExportProgressStatus) js.Ref 829 Arg T 830 } 831 832 func (cb *ExportProgressStatusCallback[T]) Register() js.Func[func(status ExportProgressStatus)] { 833 return js.RegisterCallback[func(status ExportProgressStatus)]( 834 cb, abi.FuncPCABIInternal(cb.Fn), 835 ) 836 } 837 838 func (cb *ExportProgressStatusCallback[T]) DispatchCallback( 839 targetPC uintptr, ctx *js.CallbackContext, 840 ) { 841 args := ctx.Args() 842 if len(args) != 1+1 /* js this */ || 843 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 844 js.ThrowInvalidCallbackInvocation() 845 } 846 847 if ctx.Return(cb.Fn( 848 cb.Arg, 849 args[0], 850 851 ExportProgressStatus(0).FromRef(args[0+1]), 852 )) { 853 return 854 } 855 856 js.ThrowCallbackValueNotReturned() 857 } 858 859 type FamilyFetchStatus uint32 860 861 const ( 862 _ FamilyFetchStatus = iota 863 864 FamilyFetchStatus_UNKNOWN_ERROR 865 FamilyFetchStatus_NO_MEMBERS 866 FamilyFetchStatus_SUCCESS 867 ) 868 869 func (FamilyFetchStatus) FromRef(str js.Ref) FamilyFetchStatus { 870 return FamilyFetchStatus(bindings.ConstOfFamilyFetchStatus(str)) 871 } 872 873 func (x FamilyFetchStatus) String() (string, bool) { 874 switch x { 875 case FamilyFetchStatus_UNKNOWN_ERROR: 876 return "UNKNOWN_ERROR", true 877 case FamilyFetchStatus_NO_MEMBERS: 878 return "NO_MEMBERS", true 879 case FamilyFetchStatus_SUCCESS: 880 return "SUCCESS", true 881 default: 882 return "", false 883 } 884 } 885 886 type PublicKey struct { 887 // Value is "PublicKey.value" 888 // 889 // Optional 890 Value js.String 891 // Version is "PublicKey.version" 892 // 893 // Optional 894 // 895 // NOTE: FFI_USE_Version MUST be set to true to make this field effective. 896 Version int32 897 898 FFI_USE_Version bool // for Version. 899 900 FFI_USE bool 901 } 902 903 // FromRef calls UpdateFrom and returns a PublicKey with all fields set. 904 func (p PublicKey) FromRef(ref js.Ref) PublicKey { 905 p.UpdateFrom(ref) 906 return p 907 } 908 909 // New creates a new PublicKey in the application heap. 910 func (p PublicKey) New() js.Ref { 911 return bindings.PublicKeyJSLoad( 912 js.Pointer(&p), js.True, 0, 913 ) 914 } 915 916 // UpdateFrom copies value of all fields of the heap object to p. 917 func (p *PublicKey) UpdateFrom(ref js.Ref) { 918 bindings.PublicKeyJSStore( 919 js.Pointer(p), ref, 920 ) 921 } 922 923 // Update writes all fields of the p to the heap object referenced by ref. 924 func (p *PublicKey) Update(ref js.Ref) { 925 bindings.PublicKeyJSLoad( 926 js.Pointer(p), js.False, ref, 927 ) 928 } 929 930 // FreeMembers frees fields with heap reference, if recursive is true 931 // free all heap references reachable from p. 932 func (p *PublicKey) FreeMembers(recursive bool) { 933 js.Free( 934 p.Value.Ref(), 935 ) 936 p.Value = p.Value.FromRef(js.Undefined) 937 } 938 939 type RecipientInfo struct { 940 // UserId is "RecipientInfo.userId" 941 // 942 // Optional 943 UserId js.String 944 // Email is "RecipientInfo.email" 945 // 946 // Optional 947 Email js.String 948 // DisplayName is "RecipientInfo.displayName" 949 // 950 // Optional 951 DisplayName js.String 952 // ProfileImageUrl is "RecipientInfo.profileImageUrl" 953 // 954 // Optional 955 ProfileImageUrl js.String 956 // IsEligible is "RecipientInfo.isEligible" 957 // 958 // Optional 959 // 960 // NOTE: FFI_USE_IsEligible MUST be set to true to make this field effective. 961 IsEligible bool 962 // PublicKey is "RecipientInfo.publicKey" 963 // 964 // Optional 965 // 966 // NOTE: PublicKey.FFI_USE MUST be set to true to get PublicKey used. 967 PublicKey PublicKey 968 969 FFI_USE_IsEligible bool // for IsEligible. 970 971 FFI_USE bool 972 } 973 974 // FromRef calls UpdateFrom and returns a RecipientInfo with all fields set. 975 func (p RecipientInfo) FromRef(ref js.Ref) RecipientInfo { 976 p.UpdateFrom(ref) 977 return p 978 } 979 980 // New creates a new RecipientInfo in the application heap. 981 func (p RecipientInfo) New() js.Ref { 982 return bindings.RecipientInfoJSLoad( 983 js.Pointer(&p), js.True, 0, 984 ) 985 } 986 987 // UpdateFrom copies value of all fields of the heap object to p. 988 func (p *RecipientInfo) UpdateFrom(ref js.Ref) { 989 bindings.RecipientInfoJSStore( 990 js.Pointer(p), ref, 991 ) 992 } 993 994 // Update writes all fields of the p to the heap object referenced by ref. 995 func (p *RecipientInfo) Update(ref js.Ref) { 996 bindings.RecipientInfoJSLoad( 997 js.Pointer(p), js.False, ref, 998 ) 999 } 1000 1001 // FreeMembers frees fields with heap reference, if recursive is true 1002 // free all heap references reachable from p. 1003 func (p *RecipientInfo) FreeMembers(recursive bool) { 1004 js.Free( 1005 p.UserId.Ref(), 1006 p.Email.Ref(), 1007 p.DisplayName.Ref(), 1008 p.ProfileImageUrl.Ref(), 1009 ) 1010 p.UserId = p.UserId.FromRef(js.Undefined) 1011 p.Email = p.Email.FromRef(js.Undefined) 1012 p.DisplayName = p.DisplayName.FromRef(js.Undefined) 1013 p.ProfileImageUrl = p.ProfileImageUrl.FromRef(js.Undefined) 1014 if recursive { 1015 p.PublicKey.FreeMembers(true) 1016 } 1017 } 1018 1019 type FamilyFetchResults struct { 1020 // Status is "FamilyFetchResults.status" 1021 // 1022 // Optional 1023 Status FamilyFetchStatus 1024 // FamilyMembers is "FamilyFetchResults.familyMembers" 1025 // 1026 // Optional 1027 FamilyMembers js.Array[RecipientInfo] 1028 1029 FFI_USE bool 1030 } 1031 1032 // FromRef calls UpdateFrom and returns a FamilyFetchResults with all fields set. 1033 func (p FamilyFetchResults) FromRef(ref js.Ref) FamilyFetchResults { 1034 p.UpdateFrom(ref) 1035 return p 1036 } 1037 1038 // New creates a new FamilyFetchResults in the application heap. 1039 func (p FamilyFetchResults) New() js.Ref { 1040 return bindings.FamilyFetchResultsJSLoad( 1041 js.Pointer(&p), js.True, 0, 1042 ) 1043 } 1044 1045 // UpdateFrom copies value of all fields of the heap object to p. 1046 func (p *FamilyFetchResults) UpdateFrom(ref js.Ref) { 1047 bindings.FamilyFetchResultsJSStore( 1048 js.Pointer(p), ref, 1049 ) 1050 } 1051 1052 // Update writes all fields of the p to the heap object referenced by ref. 1053 func (p *FamilyFetchResults) Update(ref js.Ref) { 1054 bindings.FamilyFetchResultsJSLoad( 1055 js.Pointer(p), js.False, ref, 1056 ) 1057 } 1058 1059 // FreeMembers frees fields with heap reference, if recursive is true 1060 // free all heap references reachable from p. 1061 func (p *FamilyFetchResults) FreeMembers(recursive bool) { 1062 js.Free( 1063 p.FamilyMembers.Ref(), 1064 ) 1065 p.FamilyMembers = p.FamilyMembers.FromRef(js.Undefined) 1066 } 1067 1068 type FetchFamilyResultsCallbackFunc func(this js.Ref, results *FamilyFetchResults) js.Ref 1069 1070 func (fn FetchFamilyResultsCallbackFunc) Register() js.Func[func(results *FamilyFetchResults)] { 1071 return js.RegisterCallback[func(results *FamilyFetchResults)]( 1072 fn, abi.FuncPCABIInternal(fn), 1073 ) 1074 } 1075 1076 func (fn FetchFamilyResultsCallbackFunc) DispatchCallback( 1077 targetPC uintptr, ctx *js.CallbackContext, 1078 ) { 1079 args := ctx.Args() 1080 if len(args) != 1+1 /* js this */ || 1081 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1082 js.ThrowInvalidCallbackInvocation() 1083 } 1084 var arg0 FamilyFetchResults 1085 arg0.UpdateFrom(args[0+1]) 1086 defer arg0.FreeMembers(true) 1087 1088 if ctx.Return(fn( 1089 args[0], 1090 1091 mark.NoEscape(&arg0), 1092 )) { 1093 return 1094 } 1095 1096 js.ThrowCallbackValueNotReturned() 1097 } 1098 1099 type FetchFamilyResultsCallback[T any] struct { 1100 Fn func(arg T, this js.Ref, results *FamilyFetchResults) js.Ref 1101 Arg T 1102 } 1103 1104 func (cb *FetchFamilyResultsCallback[T]) Register() js.Func[func(results *FamilyFetchResults)] { 1105 return js.RegisterCallback[func(results *FamilyFetchResults)]( 1106 cb, abi.FuncPCABIInternal(cb.Fn), 1107 ) 1108 } 1109 1110 func (cb *FetchFamilyResultsCallback[T]) DispatchCallback( 1111 targetPC uintptr, ctx *js.CallbackContext, 1112 ) { 1113 args := ctx.Args() 1114 if len(args) != 1+1 /* js this */ || 1115 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1116 js.ThrowInvalidCallbackInvocation() 1117 } 1118 var arg0 FamilyFetchResults 1119 arg0.UpdateFrom(args[0+1]) 1120 defer arg0.FreeMembers(true) 1121 1122 if ctx.Return(cb.Fn( 1123 cb.Arg, 1124 args[0], 1125 1126 mark.NoEscape(&arg0), 1127 )) { 1128 return 1129 } 1130 1131 js.ThrowCallbackValueNotReturned() 1132 } 1133 1134 type GetUrlCollectionCallbackFunc func(this js.Ref, urlCollection *UrlCollection) js.Ref 1135 1136 func (fn GetUrlCollectionCallbackFunc) Register() js.Func[func(urlCollection *UrlCollection)] { 1137 return js.RegisterCallback[func(urlCollection *UrlCollection)]( 1138 fn, abi.FuncPCABIInternal(fn), 1139 ) 1140 } 1141 1142 func (fn GetUrlCollectionCallbackFunc) DispatchCallback( 1143 targetPC uintptr, ctx *js.CallbackContext, 1144 ) { 1145 args := ctx.Args() 1146 if len(args) != 1+1 /* js this */ || 1147 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1148 js.ThrowInvalidCallbackInvocation() 1149 } 1150 var arg0 UrlCollection 1151 arg0.UpdateFrom(args[0+1]) 1152 defer arg0.FreeMembers(true) 1153 1154 if ctx.Return(fn( 1155 args[0], 1156 1157 mark.NoEscape(&arg0), 1158 )) { 1159 return 1160 } 1161 1162 js.ThrowCallbackValueNotReturned() 1163 } 1164 1165 type GetUrlCollectionCallback[T any] struct { 1166 Fn func(arg T, this js.Ref, urlCollection *UrlCollection) js.Ref 1167 Arg T 1168 } 1169 1170 func (cb *GetUrlCollectionCallback[T]) Register() js.Func[func(urlCollection *UrlCollection)] { 1171 return js.RegisterCallback[func(urlCollection *UrlCollection)]( 1172 cb, abi.FuncPCABIInternal(cb.Fn), 1173 ) 1174 } 1175 1176 func (cb *GetUrlCollectionCallback[T]) DispatchCallback( 1177 targetPC uintptr, ctx *js.CallbackContext, 1178 ) { 1179 args := ctx.Args() 1180 if len(args) != 1+1 /* js this */ || 1181 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1182 js.ThrowInvalidCallbackInvocation() 1183 } 1184 var arg0 UrlCollection 1185 arg0.UpdateFrom(args[0+1]) 1186 defer arg0.FreeMembers(true) 1187 1188 if ctx.Return(cb.Fn( 1189 cb.Arg, 1190 args[0], 1191 1192 mark.NoEscape(&arg0), 1193 )) { 1194 return 1195 } 1196 1197 js.ThrowCallbackValueNotReturned() 1198 } 1199 1200 type ImportEntryStatus uint32 1201 1202 const ( 1203 _ ImportEntryStatus = iota 1204 1205 ImportEntryStatus_UNKNOWN_ERROR 1206 ImportEntryStatus_MISSING_PASSWORD 1207 ImportEntryStatus_MISSING_URL 1208 ImportEntryStatus_INVALID_URL 1209 ImportEntryStatus_NON_ASCII_URL 1210 ImportEntryStatus_LONG_URL 1211 ImportEntryStatus_LONG_PASSWORD 1212 ImportEntryStatus_LONG_USERNAME 1213 ImportEntryStatus_CONFLICT_PROFILE 1214 ImportEntryStatus_CONFLICT_ACCOUNT 1215 ImportEntryStatus_LONG_NOTE 1216 ImportEntryStatus_LONG_CONCATENATED_NOTE 1217 ImportEntryStatus_VALID 1218 ) 1219 1220 func (ImportEntryStatus) FromRef(str js.Ref) ImportEntryStatus { 1221 return ImportEntryStatus(bindings.ConstOfImportEntryStatus(str)) 1222 } 1223 1224 func (x ImportEntryStatus) String() (string, bool) { 1225 switch x { 1226 case ImportEntryStatus_UNKNOWN_ERROR: 1227 return "UNKNOWN_ERROR", true 1228 case ImportEntryStatus_MISSING_PASSWORD: 1229 return "MISSING_PASSWORD", true 1230 case ImportEntryStatus_MISSING_URL: 1231 return "MISSING_URL", true 1232 case ImportEntryStatus_INVALID_URL: 1233 return "INVALID_URL", true 1234 case ImportEntryStatus_NON_ASCII_URL: 1235 return "NON_ASCII_URL", true 1236 case ImportEntryStatus_LONG_URL: 1237 return "LONG_URL", true 1238 case ImportEntryStatus_LONG_PASSWORD: 1239 return "LONG_PASSWORD", true 1240 case ImportEntryStatus_LONG_USERNAME: 1241 return "LONG_USERNAME", true 1242 case ImportEntryStatus_CONFLICT_PROFILE: 1243 return "CONFLICT_PROFILE", true 1244 case ImportEntryStatus_CONFLICT_ACCOUNT: 1245 return "CONFLICT_ACCOUNT", true 1246 case ImportEntryStatus_LONG_NOTE: 1247 return "LONG_NOTE", true 1248 case ImportEntryStatus_LONG_CONCATENATED_NOTE: 1249 return "LONG_CONCATENATED_NOTE", true 1250 case ImportEntryStatus_VALID: 1251 return "VALID", true 1252 default: 1253 return "", false 1254 } 1255 } 1256 1257 type ImportEntry struct { 1258 // Status is "ImportEntry.status" 1259 // 1260 // Optional 1261 Status ImportEntryStatus 1262 // Url is "ImportEntry.url" 1263 // 1264 // Optional 1265 Url js.String 1266 // Username is "ImportEntry.username" 1267 // 1268 // Optional 1269 Username js.String 1270 // Password is "ImportEntry.password" 1271 // 1272 // Optional 1273 Password js.String 1274 // Id is "ImportEntry.id" 1275 // 1276 // Optional 1277 // 1278 // NOTE: FFI_USE_Id MUST be set to true to make this field effective. 1279 Id int32 1280 1281 FFI_USE_Id bool // for Id. 1282 1283 FFI_USE bool 1284 } 1285 1286 // FromRef calls UpdateFrom and returns a ImportEntry with all fields set. 1287 func (p ImportEntry) FromRef(ref js.Ref) ImportEntry { 1288 p.UpdateFrom(ref) 1289 return p 1290 } 1291 1292 // New creates a new ImportEntry in the application heap. 1293 func (p ImportEntry) New() js.Ref { 1294 return bindings.ImportEntryJSLoad( 1295 js.Pointer(&p), js.True, 0, 1296 ) 1297 } 1298 1299 // UpdateFrom copies value of all fields of the heap object to p. 1300 func (p *ImportEntry) UpdateFrom(ref js.Ref) { 1301 bindings.ImportEntryJSStore( 1302 js.Pointer(p), ref, 1303 ) 1304 } 1305 1306 // Update writes all fields of the p to the heap object referenced by ref. 1307 func (p *ImportEntry) Update(ref js.Ref) { 1308 bindings.ImportEntryJSLoad( 1309 js.Pointer(p), js.False, ref, 1310 ) 1311 } 1312 1313 // FreeMembers frees fields with heap reference, if recursive is true 1314 // free all heap references reachable from p. 1315 func (p *ImportEntry) FreeMembers(recursive bool) { 1316 js.Free( 1317 p.Url.Ref(), 1318 p.Username.Ref(), 1319 p.Password.Ref(), 1320 ) 1321 p.Url = p.Url.FromRef(js.Undefined) 1322 p.Username = p.Username.FromRef(js.Undefined) 1323 p.Password = p.Password.FromRef(js.Undefined) 1324 } 1325 1326 type ImportPasswordsCallbackFunc func(this js.Ref, results *ImportResults) js.Ref 1327 1328 func (fn ImportPasswordsCallbackFunc) Register() js.Func[func(results *ImportResults)] { 1329 return js.RegisterCallback[func(results *ImportResults)]( 1330 fn, abi.FuncPCABIInternal(fn), 1331 ) 1332 } 1333 1334 func (fn ImportPasswordsCallbackFunc) DispatchCallback( 1335 targetPC uintptr, ctx *js.CallbackContext, 1336 ) { 1337 args := ctx.Args() 1338 if len(args) != 1+1 /* js this */ || 1339 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1340 js.ThrowInvalidCallbackInvocation() 1341 } 1342 var arg0 ImportResults 1343 arg0.UpdateFrom(args[0+1]) 1344 defer arg0.FreeMembers(true) 1345 1346 if ctx.Return(fn( 1347 args[0], 1348 1349 mark.NoEscape(&arg0), 1350 )) { 1351 return 1352 } 1353 1354 js.ThrowCallbackValueNotReturned() 1355 } 1356 1357 type ImportPasswordsCallback[T any] struct { 1358 Fn func(arg T, this js.Ref, results *ImportResults) js.Ref 1359 Arg T 1360 } 1361 1362 func (cb *ImportPasswordsCallback[T]) Register() js.Func[func(results *ImportResults)] { 1363 return js.RegisterCallback[func(results *ImportResults)]( 1364 cb, abi.FuncPCABIInternal(cb.Fn), 1365 ) 1366 } 1367 1368 func (cb *ImportPasswordsCallback[T]) DispatchCallback( 1369 targetPC uintptr, ctx *js.CallbackContext, 1370 ) { 1371 args := ctx.Args() 1372 if len(args) != 1+1 /* js this */ || 1373 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1374 js.ThrowInvalidCallbackInvocation() 1375 } 1376 var arg0 ImportResults 1377 arg0.UpdateFrom(args[0+1]) 1378 defer arg0.FreeMembers(true) 1379 1380 if ctx.Return(cb.Fn( 1381 cb.Arg, 1382 args[0], 1383 1384 mark.NoEscape(&arg0), 1385 )) { 1386 return 1387 } 1388 1389 js.ThrowCallbackValueNotReturned() 1390 } 1391 1392 type ImportResultsStatus uint32 1393 1394 const ( 1395 _ ImportResultsStatus = iota 1396 1397 ImportResultsStatus_UNKNOWN_ERROR 1398 ImportResultsStatus_SUCCESS 1399 ImportResultsStatus_IO_ERROR 1400 ImportResultsStatus_BAD_FORMAT 1401 ImportResultsStatus_DISMISSED 1402 ImportResultsStatus_MAX_FILE_SIZE 1403 ImportResultsStatus_IMPORT_ALREADY_ACTIVE 1404 ImportResultsStatus_NUM_PASSWORDS_EXCEEDED 1405 ImportResultsStatus_CONFLICTS 1406 ) 1407 1408 func (ImportResultsStatus) FromRef(str js.Ref) ImportResultsStatus { 1409 return ImportResultsStatus(bindings.ConstOfImportResultsStatus(str)) 1410 } 1411 1412 func (x ImportResultsStatus) String() (string, bool) { 1413 switch x { 1414 case ImportResultsStatus_UNKNOWN_ERROR: 1415 return "UNKNOWN_ERROR", true 1416 case ImportResultsStatus_SUCCESS: 1417 return "SUCCESS", true 1418 case ImportResultsStatus_IO_ERROR: 1419 return "IO_ERROR", true 1420 case ImportResultsStatus_BAD_FORMAT: 1421 return "BAD_FORMAT", true 1422 case ImportResultsStatus_DISMISSED: 1423 return "DISMISSED", true 1424 case ImportResultsStatus_MAX_FILE_SIZE: 1425 return "MAX_FILE_SIZE", true 1426 case ImportResultsStatus_IMPORT_ALREADY_ACTIVE: 1427 return "IMPORT_ALREADY_ACTIVE", true 1428 case ImportResultsStatus_NUM_PASSWORDS_EXCEEDED: 1429 return "NUM_PASSWORDS_EXCEEDED", true 1430 case ImportResultsStatus_CONFLICTS: 1431 return "CONFLICTS", true 1432 default: 1433 return "", false 1434 } 1435 } 1436 1437 type ImportResults struct { 1438 // Status is "ImportResults.status" 1439 // 1440 // Optional 1441 Status ImportResultsStatus 1442 // NumberImported is "ImportResults.numberImported" 1443 // 1444 // Optional 1445 // 1446 // NOTE: FFI_USE_NumberImported MUST be set to true to make this field effective. 1447 NumberImported int32 1448 // DisplayedEntries is "ImportResults.displayedEntries" 1449 // 1450 // Optional 1451 DisplayedEntries js.Array[ImportEntry] 1452 // FileName is "ImportResults.fileName" 1453 // 1454 // Optional 1455 FileName js.String 1456 1457 FFI_USE_NumberImported bool // for NumberImported. 1458 1459 FFI_USE bool 1460 } 1461 1462 // FromRef calls UpdateFrom and returns a ImportResults with all fields set. 1463 func (p ImportResults) FromRef(ref js.Ref) ImportResults { 1464 p.UpdateFrom(ref) 1465 return p 1466 } 1467 1468 // New creates a new ImportResults in the application heap. 1469 func (p ImportResults) New() js.Ref { 1470 return bindings.ImportResultsJSLoad( 1471 js.Pointer(&p), js.True, 0, 1472 ) 1473 } 1474 1475 // UpdateFrom copies value of all fields of the heap object to p. 1476 func (p *ImportResults) UpdateFrom(ref js.Ref) { 1477 bindings.ImportResultsJSStore( 1478 js.Pointer(p), ref, 1479 ) 1480 } 1481 1482 // Update writes all fields of the p to the heap object referenced by ref. 1483 func (p *ImportResults) Update(ref js.Ref) { 1484 bindings.ImportResultsJSLoad( 1485 js.Pointer(p), js.False, ref, 1486 ) 1487 } 1488 1489 // FreeMembers frees fields with heap reference, if recursive is true 1490 // free all heap references reachable from p. 1491 func (p *ImportResults) FreeMembers(recursive bool) { 1492 js.Free( 1493 p.DisplayedEntries.Ref(), 1494 p.FileName.Ref(), 1495 ) 1496 p.DisplayedEntries = p.DisplayedEntries.FromRef(js.Undefined) 1497 p.FileName = p.FileName.FromRef(js.Undefined) 1498 } 1499 1500 type IsAccountStoreDefaultCallbackFunc func(this js.Ref, isDefault bool) js.Ref 1501 1502 func (fn IsAccountStoreDefaultCallbackFunc) Register() js.Func[func(isDefault bool)] { 1503 return js.RegisterCallback[func(isDefault bool)]( 1504 fn, abi.FuncPCABIInternal(fn), 1505 ) 1506 } 1507 1508 func (fn IsAccountStoreDefaultCallbackFunc) DispatchCallback( 1509 targetPC uintptr, ctx *js.CallbackContext, 1510 ) { 1511 args := ctx.Args() 1512 if len(args) != 1+1 /* js this */ || 1513 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1514 js.ThrowInvalidCallbackInvocation() 1515 } 1516 1517 if ctx.Return(fn( 1518 args[0], 1519 1520 args[0+1] == js.True, 1521 )) { 1522 return 1523 } 1524 1525 js.ThrowCallbackValueNotReturned() 1526 } 1527 1528 type IsAccountStoreDefaultCallback[T any] struct { 1529 Fn func(arg T, this js.Ref, isDefault bool) js.Ref 1530 Arg T 1531 } 1532 1533 func (cb *IsAccountStoreDefaultCallback[T]) Register() js.Func[func(isDefault bool)] { 1534 return js.RegisterCallback[func(isDefault bool)]( 1535 cb, abi.FuncPCABIInternal(cb.Fn), 1536 ) 1537 } 1538 1539 func (cb *IsAccountStoreDefaultCallback[T]) DispatchCallback( 1540 targetPC uintptr, ctx *js.CallbackContext, 1541 ) { 1542 args := ctx.Args() 1543 if len(args) != 1+1 /* js this */ || 1544 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1545 js.ThrowInvalidCallbackInvocation() 1546 } 1547 1548 if ctx.Return(cb.Fn( 1549 cb.Arg, 1550 args[0], 1551 1552 args[0+1] == js.True, 1553 )) { 1554 return 1555 } 1556 1557 js.ThrowCallbackValueNotReturned() 1558 } 1559 1560 type OptInCallbackFunc func(this js.Ref, optedIn bool) js.Ref 1561 1562 func (fn OptInCallbackFunc) Register() js.Func[func(optedIn bool)] { 1563 return js.RegisterCallback[func(optedIn bool)]( 1564 fn, abi.FuncPCABIInternal(fn), 1565 ) 1566 } 1567 1568 func (fn OptInCallbackFunc) DispatchCallback( 1569 targetPC uintptr, ctx *js.CallbackContext, 1570 ) { 1571 args := ctx.Args() 1572 if len(args) != 1+1 /* js this */ || 1573 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1574 js.ThrowInvalidCallbackInvocation() 1575 } 1576 1577 if ctx.Return(fn( 1578 args[0], 1579 1580 args[0+1] == js.True, 1581 )) { 1582 return 1583 } 1584 1585 js.ThrowCallbackValueNotReturned() 1586 } 1587 1588 type OptInCallback[T any] struct { 1589 Fn func(arg T, this js.Ref, optedIn bool) js.Ref 1590 Arg T 1591 } 1592 1593 func (cb *OptInCallback[T]) Register() js.Func[func(optedIn bool)] { 1594 return js.RegisterCallback[func(optedIn bool)]( 1595 cb, abi.FuncPCABIInternal(cb.Fn), 1596 ) 1597 } 1598 1599 func (cb *OptInCallback[T]) DispatchCallback( 1600 targetPC uintptr, ctx *js.CallbackContext, 1601 ) { 1602 args := ctx.Args() 1603 if len(args) != 1+1 /* js this */ || 1604 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1605 js.ThrowInvalidCallbackInvocation() 1606 } 1607 1608 if ctx.Return(cb.Fn( 1609 cb.Arg, 1610 args[0], 1611 1612 args[0+1] == js.True, 1613 )) { 1614 return 1615 } 1616 1617 js.ThrowCallbackValueNotReturned() 1618 } 1619 1620 type PasswordCheckState uint32 1621 1622 const ( 1623 _ PasswordCheckState = iota 1624 1625 PasswordCheckState_IDLE 1626 PasswordCheckState_RUNNING 1627 PasswordCheckState_CANCELED 1628 PasswordCheckState_OFFLINE 1629 PasswordCheckState_SIGNED_OUT 1630 PasswordCheckState_NO_PASSWORDS 1631 PasswordCheckState_QUOTA_LIMIT 1632 PasswordCheckState_OTHER_ERROR 1633 ) 1634 1635 func (PasswordCheckState) FromRef(str js.Ref) PasswordCheckState { 1636 return PasswordCheckState(bindings.ConstOfPasswordCheckState(str)) 1637 } 1638 1639 func (x PasswordCheckState) String() (string, bool) { 1640 switch x { 1641 case PasswordCheckState_IDLE: 1642 return "IDLE", true 1643 case PasswordCheckState_RUNNING: 1644 return "RUNNING", true 1645 case PasswordCheckState_CANCELED: 1646 return "CANCELED", true 1647 case PasswordCheckState_OFFLINE: 1648 return "OFFLINE", true 1649 case PasswordCheckState_SIGNED_OUT: 1650 return "SIGNED_OUT", true 1651 case PasswordCheckState_NO_PASSWORDS: 1652 return "NO_PASSWORDS", true 1653 case PasswordCheckState_QUOTA_LIMIT: 1654 return "QUOTA_LIMIT", true 1655 case PasswordCheckState_OTHER_ERROR: 1656 return "OTHER_ERROR", true 1657 default: 1658 return "", false 1659 } 1660 } 1661 1662 type PasswordCheckStatus struct { 1663 // State is "PasswordCheckStatus.state" 1664 // 1665 // Optional 1666 State PasswordCheckState 1667 // TotalNumberOfPasswords is "PasswordCheckStatus.totalNumberOfPasswords" 1668 // 1669 // Optional 1670 // 1671 // NOTE: FFI_USE_TotalNumberOfPasswords MUST be set to true to make this field effective. 1672 TotalNumberOfPasswords int32 1673 // AlreadyProcessed is "PasswordCheckStatus.alreadyProcessed" 1674 // 1675 // Optional 1676 // 1677 // NOTE: FFI_USE_AlreadyProcessed MUST be set to true to make this field effective. 1678 AlreadyProcessed int32 1679 // RemainingInQueue is "PasswordCheckStatus.remainingInQueue" 1680 // 1681 // Optional 1682 // 1683 // NOTE: FFI_USE_RemainingInQueue MUST be set to true to make this field effective. 1684 RemainingInQueue int32 1685 // ElapsedTimeSinceLastCheck is "PasswordCheckStatus.elapsedTimeSinceLastCheck" 1686 // 1687 // Optional 1688 ElapsedTimeSinceLastCheck js.String 1689 1690 FFI_USE_TotalNumberOfPasswords bool // for TotalNumberOfPasswords. 1691 FFI_USE_AlreadyProcessed bool // for AlreadyProcessed. 1692 FFI_USE_RemainingInQueue bool // for RemainingInQueue. 1693 1694 FFI_USE bool 1695 } 1696 1697 // FromRef calls UpdateFrom and returns a PasswordCheckStatus with all fields set. 1698 func (p PasswordCheckStatus) FromRef(ref js.Ref) PasswordCheckStatus { 1699 p.UpdateFrom(ref) 1700 return p 1701 } 1702 1703 // New creates a new PasswordCheckStatus in the application heap. 1704 func (p PasswordCheckStatus) New() js.Ref { 1705 return bindings.PasswordCheckStatusJSLoad( 1706 js.Pointer(&p), js.True, 0, 1707 ) 1708 } 1709 1710 // UpdateFrom copies value of all fields of the heap object to p. 1711 func (p *PasswordCheckStatus) UpdateFrom(ref js.Ref) { 1712 bindings.PasswordCheckStatusJSStore( 1713 js.Pointer(p), ref, 1714 ) 1715 } 1716 1717 // Update writes all fields of the p to the heap object referenced by ref. 1718 func (p *PasswordCheckStatus) Update(ref js.Ref) { 1719 bindings.PasswordCheckStatusJSLoad( 1720 js.Pointer(p), js.False, ref, 1721 ) 1722 } 1723 1724 // FreeMembers frees fields with heap reference, if recursive is true 1725 // free all heap references reachable from p. 1726 func (p *PasswordCheckStatus) FreeMembers(recursive bool) { 1727 js.Free( 1728 p.ElapsedTimeSinceLastCheck.Ref(), 1729 ) 1730 p.ElapsedTimeSinceLastCheck = p.ElapsedTimeSinceLastCheck.FromRef(js.Undefined) 1731 } 1732 1733 type PasswordCheckStatusCallbackFunc func(this js.Ref, status *PasswordCheckStatus) js.Ref 1734 1735 func (fn PasswordCheckStatusCallbackFunc) Register() js.Func[func(status *PasswordCheckStatus)] { 1736 return js.RegisterCallback[func(status *PasswordCheckStatus)]( 1737 fn, abi.FuncPCABIInternal(fn), 1738 ) 1739 } 1740 1741 func (fn PasswordCheckStatusCallbackFunc) DispatchCallback( 1742 targetPC uintptr, ctx *js.CallbackContext, 1743 ) { 1744 args := ctx.Args() 1745 if len(args) != 1+1 /* js this */ || 1746 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1747 js.ThrowInvalidCallbackInvocation() 1748 } 1749 var arg0 PasswordCheckStatus 1750 arg0.UpdateFrom(args[0+1]) 1751 defer arg0.FreeMembers(true) 1752 1753 if ctx.Return(fn( 1754 args[0], 1755 1756 mark.NoEscape(&arg0), 1757 )) { 1758 return 1759 } 1760 1761 js.ThrowCallbackValueNotReturned() 1762 } 1763 1764 type PasswordCheckStatusCallback[T any] struct { 1765 Fn func(arg T, this js.Ref, status *PasswordCheckStatus) js.Ref 1766 Arg T 1767 } 1768 1769 func (cb *PasswordCheckStatusCallback[T]) Register() js.Func[func(status *PasswordCheckStatus)] { 1770 return js.RegisterCallback[func(status *PasswordCheckStatus)]( 1771 cb, abi.FuncPCABIInternal(cb.Fn), 1772 ) 1773 } 1774 1775 func (cb *PasswordCheckStatusCallback[T]) DispatchCallback( 1776 targetPC uintptr, ctx *js.CallbackContext, 1777 ) { 1778 args := ctx.Args() 1779 if len(args) != 1+1 /* js this */ || 1780 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1781 js.ThrowInvalidCallbackInvocation() 1782 } 1783 var arg0 PasswordCheckStatus 1784 arg0.UpdateFrom(args[0+1]) 1785 defer arg0.FreeMembers(true) 1786 1787 if ctx.Return(cb.Fn( 1788 cb.Arg, 1789 args[0], 1790 1791 mark.NoEscape(&arg0), 1792 )) { 1793 return 1794 } 1795 1796 js.ThrowCallbackValueNotReturned() 1797 } 1798 1799 type PasswordExportProgress struct { 1800 // Status is "PasswordExportProgress.status" 1801 // 1802 // Optional 1803 Status ExportProgressStatus 1804 // FilePath is "PasswordExportProgress.filePath" 1805 // 1806 // Optional 1807 FilePath js.String 1808 // FolderName is "PasswordExportProgress.folderName" 1809 // 1810 // Optional 1811 FolderName js.String 1812 1813 FFI_USE bool 1814 } 1815 1816 // FromRef calls UpdateFrom and returns a PasswordExportProgress with all fields set. 1817 func (p PasswordExportProgress) FromRef(ref js.Ref) PasswordExportProgress { 1818 p.UpdateFrom(ref) 1819 return p 1820 } 1821 1822 // New creates a new PasswordExportProgress in the application heap. 1823 func (p PasswordExportProgress) New() js.Ref { 1824 return bindings.PasswordExportProgressJSLoad( 1825 js.Pointer(&p), js.True, 0, 1826 ) 1827 } 1828 1829 // UpdateFrom copies value of all fields of the heap object to p. 1830 func (p *PasswordExportProgress) UpdateFrom(ref js.Ref) { 1831 bindings.PasswordExportProgressJSStore( 1832 js.Pointer(p), ref, 1833 ) 1834 } 1835 1836 // Update writes all fields of the p to the heap object referenced by ref. 1837 func (p *PasswordExportProgress) Update(ref js.Ref) { 1838 bindings.PasswordExportProgressJSLoad( 1839 js.Pointer(p), js.False, ref, 1840 ) 1841 } 1842 1843 // FreeMembers frees fields with heap reference, if recursive is true 1844 // free all heap references reachable from p. 1845 func (p *PasswordExportProgress) FreeMembers(recursive bool) { 1846 js.Free( 1847 p.FilePath.Ref(), 1848 p.FolderName.Ref(), 1849 ) 1850 p.FilePath = p.FilePath.FromRef(js.Undefined) 1851 p.FolderName = p.FolderName.FromRef(js.Undefined) 1852 } 1853 1854 type PasswordListCallbackFunc func(this js.Ref, entries js.Array[PasswordUiEntry]) js.Ref 1855 1856 func (fn PasswordListCallbackFunc) Register() js.Func[func(entries js.Array[PasswordUiEntry])] { 1857 return js.RegisterCallback[func(entries js.Array[PasswordUiEntry])]( 1858 fn, abi.FuncPCABIInternal(fn), 1859 ) 1860 } 1861 1862 func (fn PasswordListCallbackFunc) DispatchCallback( 1863 targetPC uintptr, ctx *js.CallbackContext, 1864 ) { 1865 args := ctx.Args() 1866 if len(args) != 1+1 /* js this */ || 1867 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1868 js.ThrowInvalidCallbackInvocation() 1869 } 1870 1871 if ctx.Return(fn( 1872 args[0], 1873 1874 js.Array[PasswordUiEntry]{}.FromRef(args[0+1]), 1875 )) { 1876 return 1877 } 1878 1879 js.ThrowCallbackValueNotReturned() 1880 } 1881 1882 type PasswordListCallback[T any] struct { 1883 Fn func(arg T, this js.Ref, entries js.Array[PasswordUiEntry]) js.Ref 1884 Arg T 1885 } 1886 1887 func (cb *PasswordListCallback[T]) Register() js.Func[func(entries js.Array[PasswordUiEntry])] { 1888 return js.RegisterCallback[func(entries js.Array[PasswordUiEntry])]( 1889 cb, abi.FuncPCABIInternal(cb.Fn), 1890 ) 1891 } 1892 1893 func (cb *PasswordListCallback[T]) DispatchCallback( 1894 targetPC uintptr, ctx *js.CallbackContext, 1895 ) { 1896 args := ctx.Args() 1897 if len(args) != 1+1 /* js this */ || 1898 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1899 js.ThrowInvalidCallbackInvocation() 1900 } 1901 1902 if ctx.Return(cb.Fn( 1903 cb.Arg, 1904 args[0], 1905 1906 js.Array[PasswordUiEntry]{}.FromRef(args[0+1]), 1907 )) { 1908 return 1909 } 1910 1911 js.ThrowCallbackValueNotReturned() 1912 } 1913 1914 type PlaintextPasswordCallbackFunc func(this js.Ref, password js.String) js.Ref 1915 1916 func (fn PlaintextPasswordCallbackFunc) Register() js.Func[func(password js.String)] { 1917 return js.RegisterCallback[func(password js.String)]( 1918 fn, abi.FuncPCABIInternal(fn), 1919 ) 1920 } 1921 1922 func (fn PlaintextPasswordCallbackFunc) DispatchCallback( 1923 targetPC uintptr, ctx *js.CallbackContext, 1924 ) { 1925 args := ctx.Args() 1926 if len(args) != 1+1 /* js this */ || 1927 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1928 js.ThrowInvalidCallbackInvocation() 1929 } 1930 1931 if ctx.Return(fn( 1932 args[0], 1933 1934 js.String{}.FromRef(args[0+1]), 1935 )) { 1936 return 1937 } 1938 1939 js.ThrowCallbackValueNotReturned() 1940 } 1941 1942 type PlaintextPasswordCallback[T any] struct { 1943 Fn func(arg T, this js.Ref, password js.String) js.Ref 1944 Arg T 1945 } 1946 1947 func (cb *PlaintextPasswordCallback[T]) Register() js.Func[func(password js.String)] { 1948 return js.RegisterCallback[func(password js.String)]( 1949 cb, abi.FuncPCABIInternal(cb.Fn), 1950 ) 1951 } 1952 1953 func (cb *PlaintextPasswordCallback[T]) DispatchCallback( 1954 targetPC uintptr, ctx *js.CallbackContext, 1955 ) { 1956 args := ctx.Args() 1957 if len(args) != 1+1 /* js this */ || 1958 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1959 js.ThrowInvalidCallbackInvocation() 1960 } 1961 1962 if ctx.Return(cb.Fn( 1963 cb.Arg, 1964 args[0], 1965 1966 js.String{}.FromRef(args[0+1]), 1967 )) { 1968 return 1969 } 1970 1971 js.ThrowCallbackValueNotReturned() 1972 } 1973 1974 type PlaintextReason uint32 1975 1976 const ( 1977 _ PlaintextReason = iota 1978 1979 PlaintextReason_VIEW 1980 PlaintextReason_COPY 1981 PlaintextReason_EDIT 1982 ) 1983 1984 func (PlaintextReason) FromRef(str js.Ref) PlaintextReason { 1985 return PlaintextReason(bindings.ConstOfPlaintextReason(str)) 1986 } 1987 1988 func (x PlaintextReason) String() (string, bool) { 1989 switch x { 1990 case PlaintextReason_VIEW: 1991 return "VIEW", true 1992 case PlaintextReason_COPY: 1993 return "COPY", true 1994 case PlaintextReason_EDIT: 1995 return "EDIT", true 1996 default: 1997 return "", false 1998 } 1999 } 2000 2001 type VoidCallbackFunc func(this js.Ref) js.Ref 2002 2003 func (fn VoidCallbackFunc) Register() js.Func[func()] { 2004 return js.RegisterCallback[func()]( 2005 fn, abi.FuncPCABIInternal(fn), 2006 ) 2007 } 2008 2009 func (fn VoidCallbackFunc) DispatchCallback( 2010 targetPC uintptr, ctx *js.CallbackContext, 2011 ) { 2012 args := ctx.Args() 2013 if len(args) != 0+1 /* js this */ || 2014 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2015 js.ThrowInvalidCallbackInvocation() 2016 } 2017 2018 if ctx.Return(fn( 2019 args[0], 2020 )) { 2021 return 2022 } 2023 2024 js.ThrowCallbackValueNotReturned() 2025 } 2026 2027 type VoidCallback[T any] struct { 2028 Fn func(arg T, this js.Ref) js.Ref 2029 Arg T 2030 } 2031 2032 func (cb *VoidCallback[T]) Register() js.Func[func()] { 2033 return js.RegisterCallback[func()]( 2034 cb, abi.FuncPCABIInternal(cb.Fn), 2035 ) 2036 } 2037 2038 func (cb *VoidCallback[T]) DispatchCallback( 2039 targetPC uintptr, ctx *js.CallbackContext, 2040 ) { 2041 args := ctx.Args() 2042 if len(args) != 0+1 /* js this */ || 2043 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2044 js.ThrowInvalidCallbackInvocation() 2045 } 2046 2047 if ctx.Return(cb.Fn( 2048 cb.Arg, 2049 args[0], 2050 )) { 2051 return 2052 } 2053 2054 js.ThrowCallbackValueNotReturned() 2055 } 2056 2057 // HasFuncAddPassword returns true if the function "WEBEXT.passwordsPrivate.addPassword" exists. 2058 func HasFuncAddPassword() bool { 2059 return js.True == bindings.HasFuncAddPassword() 2060 } 2061 2062 // FuncAddPassword returns the function "WEBEXT.passwordsPrivate.addPassword". 2063 func FuncAddPassword() (fn js.Func[func(options AddPasswordOptions) js.Promise[js.Void]]) { 2064 bindings.FuncAddPassword( 2065 js.Pointer(&fn), 2066 ) 2067 return 2068 } 2069 2070 // AddPassword calls the function "WEBEXT.passwordsPrivate.addPassword" directly. 2071 func AddPassword(options AddPasswordOptions) (ret js.Promise[js.Void]) { 2072 bindings.CallAddPassword( 2073 js.Pointer(&ret), 2074 js.Pointer(&options), 2075 ) 2076 2077 return 2078 } 2079 2080 // TryAddPassword calls the function "WEBEXT.passwordsPrivate.addPassword" 2081 // in a try/catch block and returns (_, err, ok = false) when it went through 2082 // the catch clause. 2083 func TryAddPassword(options AddPasswordOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2084 ok = js.True == bindings.TryAddPassword( 2085 js.Pointer(&ret), js.Pointer(&exception), 2086 js.Pointer(&options), 2087 ) 2088 2089 return 2090 } 2091 2092 // HasFuncChangeCredential returns true if the function "WEBEXT.passwordsPrivate.changeCredential" exists. 2093 func HasFuncChangeCredential() bool { 2094 return js.True == bindings.HasFuncChangeCredential() 2095 } 2096 2097 // FuncChangeCredential returns the function "WEBEXT.passwordsPrivate.changeCredential". 2098 func FuncChangeCredential() (fn js.Func[func(credential PasswordUiEntry) js.Promise[js.Void]]) { 2099 bindings.FuncChangeCredential( 2100 js.Pointer(&fn), 2101 ) 2102 return 2103 } 2104 2105 // ChangeCredential calls the function "WEBEXT.passwordsPrivate.changeCredential" directly. 2106 func ChangeCredential(credential PasswordUiEntry) (ret js.Promise[js.Void]) { 2107 bindings.CallChangeCredential( 2108 js.Pointer(&ret), 2109 js.Pointer(&credential), 2110 ) 2111 2112 return 2113 } 2114 2115 // TryChangeCredential calls the function "WEBEXT.passwordsPrivate.changeCredential" 2116 // in a try/catch block and returns (_, err, ok = false) when it went through 2117 // the catch clause. 2118 func TryChangeCredential(credential PasswordUiEntry) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2119 ok = js.True == bindings.TryChangeCredential( 2120 js.Pointer(&ret), js.Pointer(&exception), 2121 js.Pointer(&credential), 2122 ) 2123 2124 return 2125 } 2126 2127 // HasFuncContinueImport returns true if the function "WEBEXT.passwordsPrivate.continueImport" exists. 2128 func HasFuncContinueImport() bool { 2129 return js.True == bindings.HasFuncContinueImport() 2130 } 2131 2132 // FuncContinueImport returns the function "WEBEXT.passwordsPrivate.continueImport". 2133 func FuncContinueImport() (fn js.Func[func(selectedIds js.Array[int32]) js.Promise[ImportResults]]) { 2134 bindings.FuncContinueImport( 2135 js.Pointer(&fn), 2136 ) 2137 return 2138 } 2139 2140 // ContinueImport calls the function "WEBEXT.passwordsPrivate.continueImport" directly. 2141 func ContinueImport(selectedIds js.Array[int32]) (ret js.Promise[ImportResults]) { 2142 bindings.CallContinueImport( 2143 js.Pointer(&ret), 2144 selectedIds.Ref(), 2145 ) 2146 2147 return 2148 } 2149 2150 // TryContinueImport calls the function "WEBEXT.passwordsPrivate.continueImport" 2151 // in a try/catch block and returns (_, err, ok = false) when it went through 2152 // the catch clause. 2153 func TryContinueImport(selectedIds js.Array[int32]) (ret js.Promise[ImportResults], exception js.Any, ok bool) { 2154 ok = js.True == bindings.TryContinueImport( 2155 js.Pointer(&ret), js.Pointer(&exception), 2156 selectedIds.Ref(), 2157 ) 2158 2159 return 2160 } 2161 2162 // HasFuncExportPasswords returns true if the function "WEBEXT.passwordsPrivate.exportPasswords" exists. 2163 func HasFuncExportPasswords() bool { 2164 return js.True == bindings.HasFuncExportPasswords() 2165 } 2166 2167 // FuncExportPasswords returns the function "WEBEXT.passwordsPrivate.exportPasswords". 2168 func FuncExportPasswords() (fn js.Func[func() js.Promise[js.Void]]) { 2169 bindings.FuncExportPasswords( 2170 js.Pointer(&fn), 2171 ) 2172 return 2173 } 2174 2175 // ExportPasswords calls the function "WEBEXT.passwordsPrivate.exportPasswords" directly. 2176 func ExportPasswords() (ret js.Promise[js.Void]) { 2177 bindings.CallExportPasswords( 2178 js.Pointer(&ret), 2179 ) 2180 2181 return 2182 } 2183 2184 // TryExportPasswords calls the function "WEBEXT.passwordsPrivate.exportPasswords" 2185 // in a try/catch block and returns (_, err, ok = false) when it went through 2186 // the catch clause. 2187 func TryExportPasswords() (ret js.Promise[js.Void], exception js.Any, ok bool) { 2188 ok = js.True == bindings.TryExportPasswords( 2189 js.Pointer(&ret), js.Pointer(&exception), 2190 ) 2191 2192 return 2193 } 2194 2195 // HasFuncExtendAuthValidity returns true if the function "WEBEXT.passwordsPrivate.extendAuthValidity" exists. 2196 func HasFuncExtendAuthValidity() bool { 2197 return js.True == bindings.HasFuncExtendAuthValidity() 2198 } 2199 2200 // FuncExtendAuthValidity returns the function "WEBEXT.passwordsPrivate.extendAuthValidity". 2201 func FuncExtendAuthValidity() (fn js.Func[func() js.Promise[js.Void]]) { 2202 bindings.FuncExtendAuthValidity( 2203 js.Pointer(&fn), 2204 ) 2205 return 2206 } 2207 2208 // ExtendAuthValidity calls the function "WEBEXT.passwordsPrivate.extendAuthValidity" directly. 2209 func ExtendAuthValidity() (ret js.Promise[js.Void]) { 2210 bindings.CallExtendAuthValidity( 2211 js.Pointer(&ret), 2212 ) 2213 2214 return 2215 } 2216 2217 // TryExtendAuthValidity calls the function "WEBEXT.passwordsPrivate.extendAuthValidity" 2218 // in a try/catch block and returns (_, err, ok = false) when it went through 2219 // the catch clause. 2220 func TryExtendAuthValidity() (ret js.Promise[js.Void], exception js.Any, ok bool) { 2221 ok = js.True == bindings.TryExtendAuthValidity( 2222 js.Pointer(&ret), js.Pointer(&exception), 2223 ) 2224 2225 return 2226 } 2227 2228 // HasFuncFetchFamilyMembers returns true if the function "WEBEXT.passwordsPrivate.fetchFamilyMembers" exists. 2229 func HasFuncFetchFamilyMembers() bool { 2230 return js.True == bindings.HasFuncFetchFamilyMembers() 2231 } 2232 2233 // FuncFetchFamilyMembers returns the function "WEBEXT.passwordsPrivate.fetchFamilyMembers". 2234 func FuncFetchFamilyMembers() (fn js.Func[func() js.Promise[FamilyFetchResults]]) { 2235 bindings.FuncFetchFamilyMembers( 2236 js.Pointer(&fn), 2237 ) 2238 return 2239 } 2240 2241 // FetchFamilyMembers calls the function "WEBEXT.passwordsPrivate.fetchFamilyMembers" directly. 2242 func FetchFamilyMembers() (ret js.Promise[FamilyFetchResults]) { 2243 bindings.CallFetchFamilyMembers( 2244 js.Pointer(&ret), 2245 ) 2246 2247 return 2248 } 2249 2250 // TryFetchFamilyMembers calls the function "WEBEXT.passwordsPrivate.fetchFamilyMembers" 2251 // in a try/catch block and returns (_, err, ok = false) when it went through 2252 // the catch clause. 2253 func TryFetchFamilyMembers() (ret js.Promise[FamilyFetchResults], exception js.Any, ok bool) { 2254 ok = js.True == bindings.TryFetchFamilyMembers( 2255 js.Pointer(&ret), js.Pointer(&exception), 2256 ) 2257 2258 return 2259 } 2260 2261 // HasFuncGetCredentialGroups returns true if the function "WEBEXT.passwordsPrivate.getCredentialGroups" exists. 2262 func HasFuncGetCredentialGroups() bool { 2263 return js.True == bindings.HasFuncGetCredentialGroups() 2264 } 2265 2266 // FuncGetCredentialGroups returns the function "WEBEXT.passwordsPrivate.getCredentialGroups". 2267 func FuncGetCredentialGroups() (fn js.Func[func() js.Promise[js.Array[CredentialGroup]]]) { 2268 bindings.FuncGetCredentialGroups( 2269 js.Pointer(&fn), 2270 ) 2271 return 2272 } 2273 2274 // GetCredentialGroups calls the function "WEBEXT.passwordsPrivate.getCredentialGroups" directly. 2275 func GetCredentialGroups() (ret js.Promise[js.Array[CredentialGroup]]) { 2276 bindings.CallGetCredentialGroups( 2277 js.Pointer(&ret), 2278 ) 2279 2280 return 2281 } 2282 2283 // TryGetCredentialGroups calls the function "WEBEXT.passwordsPrivate.getCredentialGroups" 2284 // in a try/catch block and returns (_, err, ok = false) when it went through 2285 // the catch clause. 2286 func TryGetCredentialGroups() (ret js.Promise[js.Array[CredentialGroup]], exception js.Any, ok bool) { 2287 ok = js.True == bindings.TryGetCredentialGroups( 2288 js.Pointer(&ret), js.Pointer(&exception), 2289 ) 2290 2291 return 2292 } 2293 2294 // HasFuncGetCredentialsWithReusedPassword returns true if the function "WEBEXT.passwordsPrivate.getCredentialsWithReusedPassword" exists. 2295 func HasFuncGetCredentialsWithReusedPassword() bool { 2296 return js.True == bindings.HasFuncGetCredentialsWithReusedPassword() 2297 } 2298 2299 // FuncGetCredentialsWithReusedPassword returns the function "WEBEXT.passwordsPrivate.getCredentialsWithReusedPassword". 2300 func FuncGetCredentialsWithReusedPassword() (fn js.Func[func() js.Promise[js.Array[PasswordUiEntryList]]]) { 2301 bindings.FuncGetCredentialsWithReusedPassword( 2302 js.Pointer(&fn), 2303 ) 2304 return 2305 } 2306 2307 // GetCredentialsWithReusedPassword calls the function "WEBEXT.passwordsPrivate.getCredentialsWithReusedPassword" directly. 2308 func GetCredentialsWithReusedPassword() (ret js.Promise[js.Array[PasswordUiEntryList]]) { 2309 bindings.CallGetCredentialsWithReusedPassword( 2310 js.Pointer(&ret), 2311 ) 2312 2313 return 2314 } 2315 2316 // TryGetCredentialsWithReusedPassword calls the function "WEBEXT.passwordsPrivate.getCredentialsWithReusedPassword" 2317 // in a try/catch block and returns (_, err, ok = false) when it went through 2318 // the catch clause. 2319 func TryGetCredentialsWithReusedPassword() (ret js.Promise[js.Array[PasswordUiEntryList]], exception js.Any, ok bool) { 2320 ok = js.True == bindings.TryGetCredentialsWithReusedPassword( 2321 js.Pointer(&ret), js.Pointer(&exception), 2322 ) 2323 2324 return 2325 } 2326 2327 // HasFuncGetInsecureCredentials returns true if the function "WEBEXT.passwordsPrivate.getInsecureCredentials" exists. 2328 func HasFuncGetInsecureCredentials() bool { 2329 return js.True == bindings.HasFuncGetInsecureCredentials() 2330 } 2331 2332 // FuncGetInsecureCredentials returns the function "WEBEXT.passwordsPrivate.getInsecureCredentials". 2333 func FuncGetInsecureCredentials() (fn js.Func[func() js.Promise[js.Array[PasswordUiEntry]]]) { 2334 bindings.FuncGetInsecureCredentials( 2335 js.Pointer(&fn), 2336 ) 2337 return 2338 } 2339 2340 // GetInsecureCredentials calls the function "WEBEXT.passwordsPrivate.getInsecureCredentials" directly. 2341 func GetInsecureCredentials() (ret js.Promise[js.Array[PasswordUiEntry]]) { 2342 bindings.CallGetInsecureCredentials( 2343 js.Pointer(&ret), 2344 ) 2345 2346 return 2347 } 2348 2349 // TryGetInsecureCredentials calls the function "WEBEXT.passwordsPrivate.getInsecureCredentials" 2350 // in a try/catch block and returns (_, err, ok = false) when it went through 2351 // the catch clause. 2352 func TryGetInsecureCredentials() (ret js.Promise[js.Array[PasswordUiEntry]], exception js.Any, ok bool) { 2353 ok = js.True == bindings.TryGetInsecureCredentials( 2354 js.Pointer(&ret), js.Pointer(&exception), 2355 ) 2356 2357 return 2358 } 2359 2360 // HasFuncGetPasswordCheckStatus returns true if the function "WEBEXT.passwordsPrivate.getPasswordCheckStatus" exists. 2361 func HasFuncGetPasswordCheckStatus() bool { 2362 return js.True == bindings.HasFuncGetPasswordCheckStatus() 2363 } 2364 2365 // FuncGetPasswordCheckStatus returns the function "WEBEXT.passwordsPrivate.getPasswordCheckStatus". 2366 func FuncGetPasswordCheckStatus() (fn js.Func[func() js.Promise[PasswordCheckStatus]]) { 2367 bindings.FuncGetPasswordCheckStatus( 2368 js.Pointer(&fn), 2369 ) 2370 return 2371 } 2372 2373 // GetPasswordCheckStatus calls the function "WEBEXT.passwordsPrivate.getPasswordCheckStatus" directly. 2374 func GetPasswordCheckStatus() (ret js.Promise[PasswordCheckStatus]) { 2375 bindings.CallGetPasswordCheckStatus( 2376 js.Pointer(&ret), 2377 ) 2378 2379 return 2380 } 2381 2382 // TryGetPasswordCheckStatus calls the function "WEBEXT.passwordsPrivate.getPasswordCheckStatus" 2383 // in a try/catch block and returns (_, err, ok = false) when it went through 2384 // the catch clause. 2385 func TryGetPasswordCheckStatus() (ret js.Promise[PasswordCheckStatus], exception js.Any, ok bool) { 2386 ok = js.True == bindings.TryGetPasswordCheckStatus( 2387 js.Pointer(&ret), js.Pointer(&exception), 2388 ) 2389 2390 return 2391 } 2392 2393 // HasFuncGetPasswordExceptionList returns true if the function "WEBEXT.passwordsPrivate.getPasswordExceptionList" exists. 2394 func HasFuncGetPasswordExceptionList() bool { 2395 return js.True == bindings.HasFuncGetPasswordExceptionList() 2396 } 2397 2398 // FuncGetPasswordExceptionList returns the function "WEBEXT.passwordsPrivate.getPasswordExceptionList". 2399 func FuncGetPasswordExceptionList() (fn js.Func[func() js.Promise[js.Array[ExceptionEntry]]]) { 2400 bindings.FuncGetPasswordExceptionList( 2401 js.Pointer(&fn), 2402 ) 2403 return 2404 } 2405 2406 // GetPasswordExceptionList calls the function "WEBEXT.passwordsPrivate.getPasswordExceptionList" directly. 2407 func GetPasswordExceptionList() (ret js.Promise[js.Array[ExceptionEntry]]) { 2408 bindings.CallGetPasswordExceptionList( 2409 js.Pointer(&ret), 2410 ) 2411 2412 return 2413 } 2414 2415 // TryGetPasswordExceptionList calls the function "WEBEXT.passwordsPrivate.getPasswordExceptionList" 2416 // in a try/catch block and returns (_, err, ok = false) when it went through 2417 // the catch clause. 2418 func TryGetPasswordExceptionList() (ret js.Promise[js.Array[ExceptionEntry]], exception js.Any, ok bool) { 2419 ok = js.True == bindings.TryGetPasswordExceptionList( 2420 js.Pointer(&ret), js.Pointer(&exception), 2421 ) 2422 2423 return 2424 } 2425 2426 // HasFuncGetSavedPasswordList returns true if the function "WEBEXT.passwordsPrivate.getSavedPasswordList" exists. 2427 func HasFuncGetSavedPasswordList() bool { 2428 return js.True == bindings.HasFuncGetSavedPasswordList() 2429 } 2430 2431 // FuncGetSavedPasswordList returns the function "WEBEXT.passwordsPrivate.getSavedPasswordList". 2432 func FuncGetSavedPasswordList() (fn js.Func[func() js.Promise[js.Array[PasswordUiEntry]]]) { 2433 bindings.FuncGetSavedPasswordList( 2434 js.Pointer(&fn), 2435 ) 2436 return 2437 } 2438 2439 // GetSavedPasswordList calls the function "WEBEXT.passwordsPrivate.getSavedPasswordList" directly. 2440 func GetSavedPasswordList() (ret js.Promise[js.Array[PasswordUiEntry]]) { 2441 bindings.CallGetSavedPasswordList( 2442 js.Pointer(&ret), 2443 ) 2444 2445 return 2446 } 2447 2448 // TryGetSavedPasswordList calls the function "WEBEXT.passwordsPrivate.getSavedPasswordList" 2449 // in a try/catch block and returns (_, err, ok = false) when it went through 2450 // the catch clause. 2451 func TryGetSavedPasswordList() (ret js.Promise[js.Array[PasswordUiEntry]], exception js.Any, ok bool) { 2452 ok = js.True == bindings.TryGetSavedPasswordList( 2453 js.Pointer(&ret), js.Pointer(&exception), 2454 ) 2455 2456 return 2457 } 2458 2459 // HasFuncGetUrlCollection returns true if the function "WEBEXT.passwordsPrivate.getUrlCollection" exists. 2460 func HasFuncGetUrlCollection() bool { 2461 return js.True == bindings.HasFuncGetUrlCollection() 2462 } 2463 2464 // FuncGetUrlCollection returns the function "WEBEXT.passwordsPrivate.getUrlCollection". 2465 func FuncGetUrlCollection() (fn js.Func[func(url js.String) js.Promise[UrlCollection]]) { 2466 bindings.FuncGetUrlCollection( 2467 js.Pointer(&fn), 2468 ) 2469 return 2470 } 2471 2472 // GetUrlCollection calls the function "WEBEXT.passwordsPrivate.getUrlCollection" directly. 2473 func GetUrlCollection(url js.String) (ret js.Promise[UrlCollection]) { 2474 bindings.CallGetUrlCollection( 2475 js.Pointer(&ret), 2476 url.Ref(), 2477 ) 2478 2479 return 2480 } 2481 2482 // TryGetUrlCollection calls the function "WEBEXT.passwordsPrivate.getUrlCollection" 2483 // in a try/catch block and returns (_, err, ok = false) when it went through 2484 // the catch clause. 2485 func TryGetUrlCollection(url js.String) (ret js.Promise[UrlCollection], exception js.Any, ok bool) { 2486 ok = js.True == bindings.TryGetUrlCollection( 2487 js.Pointer(&ret), js.Pointer(&exception), 2488 url.Ref(), 2489 ) 2490 2491 return 2492 } 2493 2494 // HasFuncImportPasswords returns true if the function "WEBEXT.passwordsPrivate.importPasswords" exists. 2495 func HasFuncImportPasswords() bool { 2496 return js.True == bindings.HasFuncImportPasswords() 2497 } 2498 2499 // FuncImportPasswords returns the function "WEBEXT.passwordsPrivate.importPasswords". 2500 func FuncImportPasswords() (fn js.Func[func(toStore PasswordStoreSet) js.Promise[ImportResults]]) { 2501 bindings.FuncImportPasswords( 2502 js.Pointer(&fn), 2503 ) 2504 return 2505 } 2506 2507 // ImportPasswords calls the function "WEBEXT.passwordsPrivate.importPasswords" directly. 2508 func ImportPasswords(toStore PasswordStoreSet) (ret js.Promise[ImportResults]) { 2509 bindings.CallImportPasswords( 2510 js.Pointer(&ret), 2511 uint32(toStore), 2512 ) 2513 2514 return 2515 } 2516 2517 // TryImportPasswords calls the function "WEBEXT.passwordsPrivate.importPasswords" 2518 // in a try/catch block and returns (_, err, ok = false) when it went through 2519 // the catch clause. 2520 func TryImportPasswords(toStore PasswordStoreSet) (ret js.Promise[ImportResults], exception js.Any, ok bool) { 2521 ok = js.True == bindings.TryImportPasswords( 2522 js.Pointer(&ret), js.Pointer(&exception), 2523 uint32(toStore), 2524 ) 2525 2526 return 2527 } 2528 2529 // HasFuncIsAccountStoreDefault returns true if the function "WEBEXT.passwordsPrivate.isAccountStoreDefault" exists. 2530 func HasFuncIsAccountStoreDefault() bool { 2531 return js.True == bindings.HasFuncIsAccountStoreDefault() 2532 } 2533 2534 // FuncIsAccountStoreDefault returns the function "WEBEXT.passwordsPrivate.isAccountStoreDefault". 2535 func FuncIsAccountStoreDefault() (fn js.Func[func() js.Promise[js.Boolean]]) { 2536 bindings.FuncIsAccountStoreDefault( 2537 js.Pointer(&fn), 2538 ) 2539 return 2540 } 2541 2542 // IsAccountStoreDefault calls the function "WEBEXT.passwordsPrivate.isAccountStoreDefault" directly. 2543 func IsAccountStoreDefault() (ret js.Promise[js.Boolean]) { 2544 bindings.CallIsAccountStoreDefault( 2545 js.Pointer(&ret), 2546 ) 2547 2548 return 2549 } 2550 2551 // TryIsAccountStoreDefault calls the function "WEBEXT.passwordsPrivate.isAccountStoreDefault" 2552 // in a try/catch block and returns (_, err, ok = false) when it went through 2553 // the catch clause. 2554 func TryIsAccountStoreDefault() (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 2555 ok = js.True == bindings.TryIsAccountStoreDefault( 2556 js.Pointer(&ret), js.Pointer(&exception), 2557 ) 2558 2559 return 2560 } 2561 2562 // HasFuncIsOptedInForAccountStorage returns true if the function "WEBEXT.passwordsPrivate.isOptedInForAccountStorage" exists. 2563 func HasFuncIsOptedInForAccountStorage() bool { 2564 return js.True == bindings.HasFuncIsOptedInForAccountStorage() 2565 } 2566 2567 // FuncIsOptedInForAccountStorage returns the function "WEBEXT.passwordsPrivate.isOptedInForAccountStorage". 2568 func FuncIsOptedInForAccountStorage() (fn js.Func[func() js.Promise[js.Boolean]]) { 2569 bindings.FuncIsOptedInForAccountStorage( 2570 js.Pointer(&fn), 2571 ) 2572 return 2573 } 2574 2575 // IsOptedInForAccountStorage calls the function "WEBEXT.passwordsPrivate.isOptedInForAccountStorage" directly. 2576 func IsOptedInForAccountStorage() (ret js.Promise[js.Boolean]) { 2577 bindings.CallIsOptedInForAccountStorage( 2578 js.Pointer(&ret), 2579 ) 2580 2581 return 2582 } 2583 2584 // TryIsOptedInForAccountStorage calls the function "WEBEXT.passwordsPrivate.isOptedInForAccountStorage" 2585 // in a try/catch block and returns (_, err, ok = false) when it went through 2586 // the catch clause. 2587 func TryIsOptedInForAccountStorage() (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 2588 ok = js.True == bindings.TryIsOptedInForAccountStorage( 2589 js.Pointer(&ret), js.Pointer(&exception), 2590 ) 2591 2592 return 2593 } 2594 2595 // HasFuncMovePasswordsToAccount returns true if the function "WEBEXT.passwordsPrivate.movePasswordsToAccount" exists. 2596 func HasFuncMovePasswordsToAccount() bool { 2597 return js.True == bindings.HasFuncMovePasswordsToAccount() 2598 } 2599 2600 // FuncMovePasswordsToAccount returns the function "WEBEXT.passwordsPrivate.movePasswordsToAccount". 2601 func FuncMovePasswordsToAccount() (fn js.Func[func(ids js.Array[int32])]) { 2602 bindings.FuncMovePasswordsToAccount( 2603 js.Pointer(&fn), 2604 ) 2605 return 2606 } 2607 2608 // MovePasswordsToAccount calls the function "WEBEXT.passwordsPrivate.movePasswordsToAccount" directly. 2609 func MovePasswordsToAccount(ids js.Array[int32]) (ret js.Void) { 2610 bindings.CallMovePasswordsToAccount( 2611 js.Pointer(&ret), 2612 ids.Ref(), 2613 ) 2614 2615 return 2616 } 2617 2618 // TryMovePasswordsToAccount calls the function "WEBEXT.passwordsPrivate.movePasswordsToAccount" 2619 // in a try/catch block and returns (_, err, ok = false) when it went through 2620 // the catch clause. 2621 func TryMovePasswordsToAccount(ids js.Array[int32]) (ret js.Void, exception js.Any, ok bool) { 2622 ok = js.True == bindings.TryMovePasswordsToAccount( 2623 js.Pointer(&ret), js.Pointer(&exception), 2624 ids.Ref(), 2625 ) 2626 2627 return 2628 } 2629 2630 // HasFuncMuteInsecureCredential returns true if the function "WEBEXT.passwordsPrivate.muteInsecureCredential" exists. 2631 func HasFuncMuteInsecureCredential() bool { 2632 return js.True == bindings.HasFuncMuteInsecureCredential() 2633 } 2634 2635 // FuncMuteInsecureCredential returns the function "WEBEXT.passwordsPrivate.muteInsecureCredential". 2636 func FuncMuteInsecureCredential() (fn js.Func[func(credential PasswordUiEntry) js.Promise[js.Void]]) { 2637 bindings.FuncMuteInsecureCredential( 2638 js.Pointer(&fn), 2639 ) 2640 return 2641 } 2642 2643 // MuteInsecureCredential calls the function "WEBEXT.passwordsPrivate.muteInsecureCredential" directly. 2644 func MuteInsecureCredential(credential PasswordUiEntry) (ret js.Promise[js.Void]) { 2645 bindings.CallMuteInsecureCredential( 2646 js.Pointer(&ret), 2647 js.Pointer(&credential), 2648 ) 2649 2650 return 2651 } 2652 2653 // TryMuteInsecureCredential calls the function "WEBEXT.passwordsPrivate.muteInsecureCredential" 2654 // in a try/catch block and returns (_, err, ok = false) when it went through 2655 // the catch clause. 2656 func TryMuteInsecureCredential(credential PasswordUiEntry) (ret js.Promise[js.Void], exception js.Any, ok bool) { 2657 ok = js.True == bindings.TryMuteInsecureCredential( 2658 js.Pointer(&ret), js.Pointer(&exception), 2659 js.Pointer(&credential), 2660 ) 2661 2662 return 2663 } 2664 2665 type OnAccountStorageOptInStateChangedEventCallbackFunc func(this js.Ref, optedIn bool) js.Ref 2666 2667 func (fn OnAccountStorageOptInStateChangedEventCallbackFunc) Register() js.Func[func(optedIn bool)] { 2668 return js.RegisterCallback[func(optedIn bool)]( 2669 fn, abi.FuncPCABIInternal(fn), 2670 ) 2671 } 2672 2673 func (fn OnAccountStorageOptInStateChangedEventCallbackFunc) DispatchCallback( 2674 targetPC uintptr, ctx *js.CallbackContext, 2675 ) { 2676 args := ctx.Args() 2677 if len(args) != 1+1 /* js this */ || 2678 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2679 js.ThrowInvalidCallbackInvocation() 2680 } 2681 2682 if ctx.Return(fn( 2683 args[0], 2684 2685 args[0+1] == js.True, 2686 )) { 2687 return 2688 } 2689 2690 js.ThrowCallbackValueNotReturned() 2691 } 2692 2693 type OnAccountStorageOptInStateChangedEventCallback[T any] struct { 2694 Fn func(arg T, this js.Ref, optedIn bool) js.Ref 2695 Arg T 2696 } 2697 2698 func (cb *OnAccountStorageOptInStateChangedEventCallback[T]) Register() js.Func[func(optedIn bool)] { 2699 return js.RegisterCallback[func(optedIn bool)]( 2700 cb, abi.FuncPCABIInternal(cb.Fn), 2701 ) 2702 } 2703 2704 func (cb *OnAccountStorageOptInStateChangedEventCallback[T]) DispatchCallback( 2705 targetPC uintptr, ctx *js.CallbackContext, 2706 ) { 2707 args := ctx.Args() 2708 if len(args) != 1+1 /* js this */ || 2709 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2710 js.ThrowInvalidCallbackInvocation() 2711 } 2712 2713 if ctx.Return(cb.Fn( 2714 cb.Arg, 2715 args[0], 2716 2717 args[0+1] == js.True, 2718 )) { 2719 return 2720 } 2721 2722 js.ThrowCallbackValueNotReturned() 2723 } 2724 2725 // HasFuncOnAccountStorageOptInStateChanged returns true if the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.addListener" exists. 2726 func HasFuncOnAccountStorageOptInStateChanged() bool { 2727 return js.True == bindings.HasFuncOnAccountStorageOptInStateChanged() 2728 } 2729 2730 // FuncOnAccountStorageOptInStateChanged returns the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.addListener". 2731 func FuncOnAccountStorageOptInStateChanged() (fn js.Func[func(callback js.Func[func(optedIn bool)])]) { 2732 bindings.FuncOnAccountStorageOptInStateChanged( 2733 js.Pointer(&fn), 2734 ) 2735 return 2736 } 2737 2738 // OnAccountStorageOptInStateChanged calls the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.addListener" directly. 2739 func OnAccountStorageOptInStateChanged(callback js.Func[func(optedIn bool)]) (ret js.Void) { 2740 bindings.CallOnAccountStorageOptInStateChanged( 2741 js.Pointer(&ret), 2742 callback.Ref(), 2743 ) 2744 2745 return 2746 } 2747 2748 // TryOnAccountStorageOptInStateChanged calls the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.addListener" 2749 // in a try/catch block and returns (_, err, ok = false) when it went through 2750 // the catch clause. 2751 func TryOnAccountStorageOptInStateChanged(callback js.Func[func(optedIn bool)]) (ret js.Void, exception js.Any, ok bool) { 2752 ok = js.True == bindings.TryOnAccountStorageOptInStateChanged( 2753 js.Pointer(&ret), js.Pointer(&exception), 2754 callback.Ref(), 2755 ) 2756 2757 return 2758 } 2759 2760 // HasFuncOffAccountStorageOptInStateChanged returns true if the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.removeListener" exists. 2761 func HasFuncOffAccountStorageOptInStateChanged() bool { 2762 return js.True == bindings.HasFuncOffAccountStorageOptInStateChanged() 2763 } 2764 2765 // FuncOffAccountStorageOptInStateChanged returns the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.removeListener". 2766 func FuncOffAccountStorageOptInStateChanged() (fn js.Func[func(callback js.Func[func(optedIn bool)])]) { 2767 bindings.FuncOffAccountStorageOptInStateChanged( 2768 js.Pointer(&fn), 2769 ) 2770 return 2771 } 2772 2773 // OffAccountStorageOptInStateChanged calls the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.removeListener" directly. 2774 func OffAccountStorageOptInStateChanged(callback js.Func[func(optedIn bool)]) (ret js.Void) { 2775 bindings.CallOffAccountStorageOptInStateChanged( 2776 js.Pointer(&ret), 2777 callback.Ref(), 2778 ) 2779 2780 return 2781 } 2782 2783 // TryOffAccountStorageOptInStateChanged calls the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.removeListener" 2784 // in a try/catch block and returns (_, err, ok = false) when it went through 2785 // the catch clause. 2786 func TryOffAccountStorageOptInStateChanged(callback js.Func[func(optedIn bool)]) (ret js.Void, exception js.Any, ok bool) { 2787 ok = js.True == bindings.TryOffAccountStorageOptInStateChanged( 2788 js.Pointer(&ret), js.Pointer(&exception), 2789 callback.Ref(), 2790 ) 2791 2792 return 2793 } 2794 2795 // HasFuncHasOnAccountStorageOptInStateChanged returns true if the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.hasListener" exists. 2796 func HasFuncHasOnAccountStorageOptInStateChanged() bool { 2797 return js.True == bindings.HasFuncHasOnAccountStorageOptInStateChanged() 2798 } 2799 2800 // FuncHasOnAccountStorageOptInStateChanged returns the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.hasListener". 2801 func FuncHasOnAccountStorageOptInStateChanged() (fn js.Func[func(callback js.Func[func(optedIn bool)]) bool]) { 2802 bindings.FuncHasOnAccountStorageOptInStateChanged( 2803 js.Pointer(&fn), 2804 ) 2805 return 2806 } 2807 2808 // HasOnAccountStorageOptInStateChanged calls the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.hasListener" directly. 2809 func HasOnAccountStorageOptInStateChanged(callback js.Func[func(optedIn bool)]) (ret bool) { 2810 bindings.CallHasOnAccountStorageOptInStateChanged( 2811 js.Pointer(&ret), 2812 callback.Ref(), 2813 ) 2814 2815 return 2816 } 2817 2818 // TryHasOnAccountStorageOptInStateChanged calls the function "WEBEXT.passwordsPrivate.onAccountStorageOptInStateChanged.hasListener" 2819 // in a try/catch block and returns (_, err, ok = false) when it went through 2820 // the catch clause. 2821 func TryHasOnAccountStorageOptInStateChanged(callback js.Func[func(optedIn bool)]) (ret bool, exception js.Any, ok bool) { 2822 ok = js.True == bindings.TryHasOnAccountStorageOptInStateChanged( 2823 js.Pointer(&ret), js.Pointer(&exception), 2824 callback.Ref(), 2825 ) 2826 2827 return 2828 } 2829 2830 type OnInsecureCredentialsChangedEventCallbackFunc func(this js.Ref, insecureCredentials js.Array[PasswordUiEntry]) js.Ref 2831 2832 func (fn OnInsecureCredentialsChangedEventCallbackFunc) Register() js.Func[func(insecureCredentials js.Array[PasswordUiEntry])] { 2833 return js.RegisterCallback[func(insecureCredentials js.Array[PasswordUiEntry])]( 2834 fn, abi.FuncPCABIInternal(fn), 2835 ) 2836 } 2837 2838 func (fn OnInsecureCredentialsChangedEventCallbackFunc) DispatchCallback( 2839 targetPC uintptr, ctx *js.CallbackContext, 2840 ) { 2841 args := ctx.Args() 2842 if len(args) != 1+1 /* js this */ || 2843 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2844 js.ThrowInvalidCallbackInvocation() 2845 } 2846 2847 if ctx.Return(fn( 2848 args[0], 2849 2850 js.Array[PasswordUiEntry]{}.FromRef(args[0+1]), 2851 )) { 2852 return 2853 } 2854 2855 js.ThrowCallbackValueNotReturned() 2856 } 2857 2858 type OnInsecureCredentialsChangedEventCallback[T any] struct { 2859 Fn func(arg T, this js.Ref, insecureCredentials js.Array[PasswordUiEntry]) js.Ref 2860 Arg T 2861 } 2862 2863 func (cb *OnInsecureCredentialsChangedEventCallback[T]) Register() js.Func[func(insecureCredentials js.Array[PasswordUiEntry])] { 2864 return js.RegisterCallback[func(insecureCredentials js.Array[PasswordUiEntry])]( 2865 cb, abi.FuncPCABIInternal(cb.Fn), 2866 ) 2867 } 2868 2869 func (cb *OnInsecureCredentialsChangedEventCallback[T]) DispatchCallback( 2870 targetPC uintptr, ctx *js.CallbackContext, 2871 ) { 2872 args := ctx.Args() 2873 if len(args) != 1+1 /* js this */ || 2874 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2875 js.ThrowInvalidCallbackInvocation() 2876 } 2877 2878 if ctx.Return(cb.Fn( 2879 cb.Arg, 2880 args[0], 2881 2882 js.Array[PasswordUiEntry]{}.FromRef(args[0+1]), 2883 )) { 2884 return 2885 } 2886 2887 js.ThrowCallbackValueNotReturned() 2888 } 2889 2890 // HasFuncOnInsecureCredentialsChanged returns true if the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.addListener" exists. 2891 func HasFuncOnInsecureCredentialsChanged() bool { 2892 return js.True == bindings.HasFuncOnInsecureCredentialsChanged() 2893 } 2894 2895 // FuncOnInsecureCredentialsChanged returns the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.addListener". 2896 func FuncOnInsecureCredentialsChanged() (fn js.Func[func(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])])]) { 2897 bindings.FuncOnInsecureCredentialsChanged( 2898 js.Pointer(&fn), 2899 ) 2900 return 2901 } 2902 2903 // OnInsecureCredentialsChanged calls the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.addListener" directly. 2904 func OnInsecureCredentialsChanged(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) (ret js.Void) { 2905 bindings.CallOnInsecureCredentialsChanged( 2906 js.Pointer(&ret), 2907 callback.Ref(), 2908 ) 2909 2910 return 2911 } 2912 2913 // TryOnInsecureCredentialsChanged calls the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.addListener" 2914 // in a try/catch block and returns (_, err, ok = false) when it went through 2915 // the catch clause. 2916 func TryOnInsecureCredentialsChanged(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) (ret js.Void, exception js.Any, ok bool) { 2917 ok = js.True == bindings.TryOnInsecureCredentialsChanged( 2918 js.Pointer(&ret), js.Pointer(&exception), 2919 callback.Ref(), 2920 ) 2921 2922 return 2923 } 2924 2925 // HasFuncOffInsecureCredentialsChanged returns true if the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.removeListener" exists. 2926 func HasFuncOffInsecureCredentialsChanged() bool { 2927 return js.True == bindings.HasFuncOffInsecureCredentialsChanged() 2928 } 2929 2930 // FuncOffInsecureCredentialsChanged returns the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.removeListener". 2931 func FuncOffInsecureCredentialsChanged() (fn js.Func[func(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])])]) { 2932 bindings.FuncOffInsecureCredentialsChanged( 2933 js.Pointer(&fn), 2934 ) 2935 return 2936 } 2937 2938 // OffInsecureCredentialsChanged calls the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.removeListener" directly. 2939 func OffInsecureCredentialsChanged(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) (ret js.Void) { 2940 bindings.CallOffInsecureCredentialsChanged( 2941 js.Pointer(&ret), 2942 callback.Ref(), 2943 ) 2944 2945 return 2946 } 2947 2948 // TryOffInsecureCredentialsChanged calls the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.removeListener" 2949 // in a try/catch block and returns (_, err, ok = false) when it went through 2950 // the catch clause. 2951 func TryOffInsecureCredentialsChanged(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) (ret js.Void, exception js.Any, ok bool) { 2952 ok = js.True == bindings.TryOffInsecureCredentialsChanged( 2953 js.Pointer(&ret), js.Pointer(&exception), 2954 callback.Ref(), 2955 ) 2956 2957 return 2958 } 2959 2960 // HasFuncHasOnInsecureCredentialsChanged returns true if the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.hasListener" exists. 2961 func HasFuncHasOnInsecureCredentialsChanged() bool { 2962 return js.True == bindings.HasFuncHasOnInsecureCredentialsChanged() 2963 } 2964 2965 // FuncHasOnInsecureCredentialsChanged returns the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.hasListener". 2966 func FuncHasOnInsecureCredentialsChanged() (fn js.Func[func(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) bool]) { 2967 bindings.FuncHasOnInsecureCredentialsChanged( 2968 js.Pointer(&fn), 2969 ) 2970 return 2971 } 2972 2973 // HasOnInsecureCredentialsChanged calls the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.hasListener" directly. 2974 func HasOnInsecureCredentialsChanged(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) (ret bool) { 2975 bindings.CallHasOnInsecureCredentialsChanged( 2976 js.Pointer(&ret), 2977 callback.Ref(), 2978 ) 2979 2980 return 2981 } 2982 2983 // TryHasOnInsecureCredentialsChanged calls the function "WEBEXT.passwordsPrivate.onInsecureCredentialsChanged.hasListener" 2984 // in a try/catch block and returns (_, err, ok = false) when it went through 2985 // the catch clause. 2986 func TryHasOnInsecureCredentialsChanged(callback js.Func[func(insecureCredentials js.Array[PasswordUiEntry])]) (ret bool, exception js.Any, ok bool) { 2987 ok = js.True == bindings.TryHasOnInsecureCredentialsChanged( 2988 js.Pointer(&ret), js.Pointer(&exception), 2989 callback.Ref(), 2990 ) 2991 2992 return 2993 } 2994 2995 type OnPasswordCheckStatusChangedEventCallbackFunc func(this js.Ref, status *PasswordCheckStatus) js.Ref 2996 2997 func (fn OnPasswordCheckStatusChangedEventCallbackFunc) Register() js.Func[func(status *PasswordCheckStatus)] { 2998 return js.RegisterCallback[func(status *PasswordCheckStatus)]( 2999 fn, abi.FuncPCABIInternal(fn), 3000 ) 3001 } 3002 3003 func (fn OnPasswordCheckStatusChangedEventCallbackFunc) DispatchCallback( 3004 targetPC uintptr, ctx *js.CallbackContext, 3005 ) { 3006 args := ctx.Args() 3007 if len(args) != 1+1 /* js this */ || 3008 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3009 js.ThrowInvalidCallbackInvocation() 3010 } 3011 var arg0 PasswordCheckStatus 3012 arg0.UpdateFrom(args[0+1]) 3013 defer arg0.FreeMembers(true) 3014 3015 if ctx.Return(fn( 3016 args[0], 3017 3018 mark.NoEscape(&arg0), 3019 )) { 3020 return 3021 } 3022 3023 js.ThrowCallbackValueNotReturned() 3024 } 3025 3026 type OnPasswordCheckStatusChangedEventCallback[T any] struct { 3027 Fn func(arg T, this js.Ref, status *PasswordCheckStatus) js.Ref 3028 Arg T 3029 } 3030 3031 func (cb *OnPasswordCheckStatusChangedEventCallback[T]) Register() js.Func[func(status *PasswordCheckStatus)] { 3032 return js.RegisterCallback[func(status *PasswordCheckStatus)]( 3033 cb, abi.FuncPCABIInternal(cb.Fn), 3034 ) 3035 } 3036 3037 func (cb *OnPasswordCheckStatusChangedEventCallback[T]) DispatchCallback( 3038 targetPC uintptr, ctx *js.CallbackContext, 3039 ) { 3040 args := ctx.Args() 3041 if len(args) != 1+1 /* js this */ || 3042 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3043 js.ThrowInvalidCallbackInvocation() 3044 } 3045 var arg0 PasswordCheckStatus 3046 arg0.UpdateFrom(args[0+1]) 3047 defer arg0.FreeMembers(true) 3048 3049 if ctx.Return(cb.Fn( 3050 cb.Arg, 3051 args[0], 3052 3053 mark.NoEscape(&arg0), 3054 )) { 3055 return 3056 } 3057 3058 js.ThrowCallbackValueNotReturned() 3059 } 3060 3061 // HasFuncOnPasswordCheckStatusChanged returns true if the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.addListener" exists. 3062 func HasFuncOnPasswordCheckStatusChanged() bool { 3063 return js.True == bindings.HasFuncOnPasswordCheckStatusChanged() 3064 } 3065 3066 // FuncOnPasswordCheckStatusChanged returns the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.addListener". 3067 func FuncOnPasswordCheckStatusChanged() (fn js.Func[func(callback js.Func[func(status *PasswordCheckStatus)])]) { 3068 bindings.FuncOnPasswordCheckStatusChanged( 3069 js.Pointer(&fn), 3070 ) 3071 return 3072 } 3073 3074 // OnPasswordCheckStatusChanged calls the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.addListener" directly. 3075 func OnPasswordCheckStatusChanged(callback js.Func[func(status *PasswordCheckStatus)]) (ret js.Void) { 3076 bindings.CallOnPasswordCheckStatusChanged( 3077 js.Pointer(&ret), 3078 callback.Ref(), 3079 ) 3080 3081 return 3082 } 3083 3084 // TryOnPasswordCheckStatusChanged calls the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.addListener" 3085 // in a try/catch block and returns (_, err, ok = false) when it went through 3086 // the catch clause. 3087 func TryOnPasswordCheckStatusChanged(callback js.Func[func(status *PasswordCheckStatus)]) (ret js.Void, exception js.Any, ok bool) { 3088 ok = js.True == bindings.TryOnPasswordCheckStatusChanged( 3089 js.Pointer(&ret), js.Pointer(&exception), 3090 callback.Ref(), 3091 ) 3092 3093 return 3094 } 3095 3096 // HasFuncOffPasswordCheckStatusChanged returns true if the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.removeListener" exists. 3097 func HasFuncOffPasswordCheckStatusChanged() bool { 3098 return js.True == bindings.HasFuncOffPasswordCheckStatusChanged() 3099 } 3100 3101 // FuncOffPasswordCheckStatusChanged returns the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.removeListener". 3102 func FuncOffPasswordCheckStatusChanged() (fn js.Func[func(callback js.Func[func(status *PasswordCheckStatus)])]) { 3103 bindings.FuncOffPasswordCheckStatusChanged( 3104 js.Pointer(&fn), 3105 ) 3106 return 3107 } 3108 3109 // OffPasswordCheckStatusChanged calls the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.removeListener" directly. 3110 func OffPasswordCheckStatusChanged(callback js.Func[func(status *PasswordCheckStatus)]) (ret js.Void) { 3111 bindings.CallOffPasswordCheckStatusChanged( 3112 js.Pointer(&ret), 3113 callback.Ref(), 3114 ) 3115 3116 return 3117 } 3118 3119 // TryOffPasswordCheckStatusChanged calls the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.removeListener" 3120 // in a try/catch block and returns (_, err, ok = false) when it went through 3121 // the catch clause. 3122 func TryOffPasswordCheckStatusChanged(callback js.Func[func(status *PasswordCheckStatus)]) (ret js.Void, exception js.Any, ok bool) { 3123 ok = js.True == bindings.TryOffPasswordCheckStatusChanged( 3124 js.Pointer(&ret), js.Pointer(&exception), 3125 callback.Ref(), 3126 ) 3127 3128 return 3129 } 3130 3131 // HasFuncHasOnPasswordCheckStatusChanged returns true if the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.hasListener" exists. 3132 func HasFuncHasOnPasswordCheckStatusChanged() bool { 3133 return js.True == bindings.HasFuncHasOnPasswordCheckStatusChanged() 3134 } 3135 3136 // FuncHasOnPasswordCheckStatusChanged returns the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.hasListener". 3137 func FuncHasOnPasswordCheckStatusChanged() (fn js.Func[func(callback js.Func[func(status *PasswordCheckStatus)]) bool]) { 3138 bindings.FuncHasOnPasswordCheckStatusChanged( 3139 js.Pointer(&fn), 3140 ) 3141 return 3142 } 3143 3144 // HasOnPasswordCheckStatusChanged calls the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.hasListener" directly. 3145 func HasOnPasswordCheckStatusChanged(callback js.Func[func(status *PasswordCheckStatus)]) (ret bool) { 3146 bindings.CallHasOnPasswordCheckStatusChanged( 3147 js.Pointer(&ret), 3148 callback.Ref(), 3149 ) 3150 3151 return 3152 } 3153 3154 // TryHasOnPasswordCheckStatusChanged calls the function "WEBEXT.passwordsPrivate.onPasswordCheckStatusChanged.hasListener" 3155 // in a try/catch block and returns (_, err, ok = false) when it went through 3156 // the catch clause. 3157 func TryHasOnPasswordCheckStatusChanged(callback js.Func[func(status *PasswordCheckStatus)]) (ret bool, exception js.Any, ok bool) { 3158 ok = js.True == bindings.TryHasOnPasswordCheckStatusChanged( 3159 js.Pointer(&ret), js.Pointer(&exception), 3160 callback.Ref(), 3161 ) 3162 3163 return 3164 } 3165 3166 type OnPasswordExceptionsListChangedEventCallbackFunc func(this js.Ref, exceptions js.Array[ExceptionEntry]) js.Ref 3167 3168 func (fn OnPasswordExceptionsListChangedEventCallbackFunc) Register() js.Func[func(exceptions js.Array[ExceptionEntry])] { 3169 return js.RegisterCallback[func(exceptions js.Array[ExceptionEntry])]( 3170 fn, abi.FuncPCABIInternal(fn), 3171 ) 3172 } 3173 3174 func (fn OnPasswordExceptionsListChangedEventCallbackFunc) DispatchCallback( 3175 targetPC uintptr, ctx *js.CallbackContext, 3176 ) { 3177 args := ctx.Args() 3178 if len(args) != 1+1 /* js this */ || 3179 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3180 js.ThrowInvalidCallbackInvocation() 3181 } 3182 3183 if ctx.Return(fn( 3184 args[0], 3185 3186 js.Array[ExceptionEntry]{}.FromRef(args[0+1]), 3187 )) { 3188 return 3189 } 3190 3191 js.ThrowCallbackValueNotReturned() 3192 } 3193 3194 type OnPasswordExceptionsListChangedEventCallback[T any] struct { 3195 Fn func(arg T, this js.Ref, exceptions js.Array[ExceptionEntry]) js.Ref 3196 Arg T 3197 } 3198 3199 func (cb *OnPasswordExceptionsListChangedEventCallback[T]) Register() js.Func[func(exceptions js.Array[ExceptionEntry])] { 3200 return js.RegisterCallback[func(exceptions js.Array[ExceptionEntry])]( 3201 cb, abi.FuncPCABIInternal(cb.Fn), 3202 ) 3203 } 3204 3205 func (cb *OnPasswordExceptionsListChangedEventCallback[T]) DispatchCallback( 3206 targetPC uintptr, ctx *js.CallbackContext, 3207 ) { 3208 args := ctx.Args() 3209 if len(args) != 1+1 /* js this */ || 3210 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3211 js.ThrowInvalidCallbackInvocation() 3212 } 3213 3214 if ctx.Return(cb.Fn( 3215 cb.Arg, 3216 args[0], 3217 3218 js.Array[ExceptionEntry]{}.FromRef(args[0+1]), 3219 )) { 3220 return 3221 } 3222 3223 js.ThrowCallbackValueNotReturned() 3224 } 3225 3226 // HasFuncOnPasswordExceptionsListChanged returns true if the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.addListener" exists. 3227 func HasFuncOnPasswordExceptionsListChanged() bool { 3228 return js.True == bindings.HasFuncOnPasswordExceptionsListChanged() 3229 } 3230 3231 // FuncOnPasswordExceptionsListChanged returns the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.addListener". 3232 func FuncOnPasswordExceptionsListChanged() (fn js.Func[func(callback js.Func[func(exceptions js.Array[ExceptionEntry])])]) { 3233 bindings.FuncOnPasswordExceptionsListChanged( 3234 js.Pointer(&fn), 3235 ) 3236 return 3237 } 3238 3239 // OnPasswordExceptionsListChanged calls the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.addListener" directly. 3240 func OnPasswordExceptionsListChanged(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) (ret js.Void) { 3241 bindings.CallOnPasswordExceptionsListChanged( 3242 js.Pointer(&ret), 3243 callback.Ref(), 3244 ) 3245 3246 return 3247 } 3248 3249 // TryOnPasswordExceptionsListChanged calls the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.addListener" 3250 // in a try/catch block and returns (_, err, ok = false) when it went through 3251 // the catch clause. 3252 func TryOnPasswordExceptionsListChanged(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) (ret js.Void, exception js.Any, ok bool) { 3253 ok = js.True == bindings.TryOnPasswordExceptionsListChanged( 3254 js.Pointer(&ret), js.Pointer(&exception), 3255 callback.Ref(), 3256 ) 3257 3258 return 3259 } 3260 3261 // HasFuncOffPasswordExceptionsListChanged returns true if the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.removeListener" exists. 3262 func HasFuncOffPasswordExceptionsListChanged() bool { 3263 return js.True == bindings.HasFuncOffPasswordExceptionsListChanged() 3264 } 3265 3266 // FuncOffPasswordExceptionsListChanged returns the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.removeListener". 3267 func FuncOffPasswordExceptionsListChanged() (fn js.Func[func(callback js.Func[func(exceptions js.Array[ExceptionEntry])])]) { 3268 bindings.FuncOffPasswordExceptionsListChanged( 3269 js.Pointer(&fn), 3270 ) 3271 return 3272 } 3273 3274 // OffPasswordExceptionsListChanged calls the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.removeListener" directly. 3275 func OffPasswordExceptionsListChanged(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) (ret js.Void) { 3276 bindings.CallOffPasswordExceptionsListChanged( 3277 js.Pointer(&ret), 3278 callback.Ref(), 3279 ) 3280 3281 return 3282 } 3283 3284 // TryOffPasswordExceptionsListChanged calls the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.removeListener" 3285 // in a try/catch block and returns (_, err, ok = false) when it went through 3286 // the catch clause. 3287 func TryOffPasswordExceptionsListChanged(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) (ret js.Void, exception js.Any, ok bool) { 3288 ok = js.True == bindings.TryOffPasswordExceptionsListChanged( 3289 js.Pointer(&ret), js.Pointer(&exception), 3290 callback.Ref(), 3291 ) 3292 3293 return 3294 } 3295 3296 // HasFuncHasOnPasswordExceptionsListChanged returns true if the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.hasListener" exists. 3297 func HasFuncHasOnPasswordExceptionsListChanged() bool { 3298 return js.True == bindings.HasFuncHasOnPasswordExceptionsListChanged() 3299 } 3300 3301 // FuncHasOnPasswordExceptionsListChanged returns the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.hasListener". 3302 func FuncHasOnPasswordExceptionsListChanged() (fn js.Func[func(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) bool]) { 3303 bindings.FuncHasOnPasswordExceptionsListChanged( 3304 js.Pointer(&fn), 3305 ) 3306 return 3307 } 3308 3309 // HasOnPasswordExceptionsListChanged calls the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.hasListener" directly. 3310 func HasOnPasswordExceptionsListChanged(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) (ret bool) { 3311 bindings.CallHasOnPasswordExceptionsListChanged( 3312 js.Pointer(&ret), 3313 callback.Ref(), 3314 ) 3315 3316 return 3317 } 3318 3319 // TryHasOnPasswordExceptionsListChanged calls the function "WEBEXT.passwordsPrivate.onPasswordExceptionsListChanged.hasListener" 3320 // in a try/catch block and returns (_, err, ok = false) when it went through 3321 // the catch clause. 3322 func TryHasOnPasswordExceptionsListChanged(callback js.Func[func(exceptions js.Array[ExceptionEntry])]) (ret bool, exception js.Any, ok bool) { 3323 ok = js.True == bindings.TryHasOnPasswordExceptionsListChanged( 3324 js.Pointer(&ret), js.Pointer(&exception), 3325 callback.Ref(), 3326 ) 3327 3328 return 3329 } 3330 3331 type OnPasswordManagerAuthTimeoutEventCallbackFunc func(this js.Ref) js.Ref 3332 3333 func (fn OnPasswordManagerAuthTimeoutEventCallbackFunc) Register() js.Func[func()] { 3334 return js.RegisterCallback[func()]( 3335 fn, abi.FuncPCABIInternal(fn), 3336 ) 3337 } 3338 3339 func (fn OnPasswordManagerAuthTimeoutEventCallbackFunc) DispatchCallback( 3340 targetPC uintptr, ctx *js.CallbackContext, 3341 ) { 3342 args := ctx.Args() 3343 if len(args) != 0+1 /* js this */ || 3344 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3345 js.ThrowInvalidCallbackInvocation() 3346 } 3347 3348 if ctx.Return(fn( 3349 args[0], 3350 )) { 3351 return 3352 } 3353 3354 js.ThrowCallbackValueNotReturned() 3355 } 3356 3357 type OnPasswordManagerAuthTimeoutEventCallback[T any] struct { 3358 Fn func(arg T, this js.Ref) js.Ref 3359 Arg T 3360 } 3361 3362 func (cb *OnPasswordManagerAuthTimeoutEventCallback[T]) Register() js.Func[func()] { 3363 return js.RegisterCallback[func()]( 3364 cb, abi.FuncPCABIInternal(cb.Fn), 3365 ) 3366 } 3367 3368 func (cb *OnPasswordManagerAuthTimeoutEventCallback[T]) DispatchCallback( 3369 targetPC uintptr, ctx *js.CallbackContext, 3370 ) { 3371 args := ctx.Args() 3372 if len(args) != 0+1 /* js this */ || 3373 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3374 js.ThrowInvalidCallbackInvocation() 3375 } 3376 3377 if ctx.Return(cb.Fn( 3378 cb.Arg, 3379 args[0], 3380 )) { 3381 return 3382 } 3383 3384 js.ThrowCallbackValueNotReturned() 3385 } 3386 3387 // HasFuncOnPasswordManagerAuthTimeout returns true if the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.addListener" exists. 3388 func HasFuncOnPasswordManagerAuthTimeout() bool { 3389 return js.True == bindings.HasFuncOnPasswordManagerAuthTimeout() 3390 } 3391 3392 // FuncOnPasswordManagerAuthTimeout returns the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.addListener". 3393 func FuncOnPasswordManagerAuthTimeout() (fn js.Func[func(callback js.Func[func()])]) { 3394 bindings.FuncOnPasswordManagerAuthTimeout( 3395 js.Pointer(&fn), 3396 ) 3397 return 3398 } 3399 3400 // OnPasswordManagerAuthTimeout calls the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.addListener" directly. 3401 func OnPasswordManagerAuthTimeout(callback js.Func[func()]) (ret js.Void) { 3402 bindings.CallOnPasswordManagerAuthTimeout( 3403 js.Pointer(&ret), 3404 callback.Ref(), 3405 ) 3406 3407 return 3408 } 3409 3410 // TryOnPasswordManagerAuthTimeout calls the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.addListener" 3411 // in a try/catch block and returns (_, err, ok = false) when it went through 3412 // the catch clause. 3413 func TryOnPasswordManagerAuthTimeout(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 3414 ok = js.True == bindings.TryOnPasswordManagerAuthTimeout( 3415 js.Pointer(&ret), js.Pointer(&exception), 3416 callback.Ref(), 3417 ) 3418 3419 return 3420 } 3421 3422 // HasFuncOffPasswordManagerAuthTimeout returns true if the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.removeListener" exists. 3423 func HasFuncOffPasswordManagerAuthTimeout() bool { 3424 return js.True == bindings.HasFuncOffPasswordManagerAuthTimeout() 3425 } 3426 3427 // FuncOffPasswordManagerAuthTimeout returns the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.removeListener". 3428 func FuncOffPasswordManagerAuthTimeout() (fn js.Func[func(callback js.Func[func()])]) { 3429 bindings.FuncOffPasswordManagerAuthTimeout( 3430 js.Pointer(&fn), 3431 ) 3432 return 3433 } 3434 3435 // OffPasswordManagerAuthTimeout calls the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.removeListener" directly. 3436 func OffPasswordManagerAuthTimeout(callback js.Func[func()]) (ret js.Void) { 3437 bindings.CallOffPasswordManagerAuthTimeout( 3438 js.Pointer(&ret), 3439 callback.Ref(), 3440 ) 3441 3442 return 3443 } 3444 3445 // TryOffPasswordManagerAuthTimeout calls the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.removeListener" 3446 // in a try/catch block and returns (_, err, ok = false) when it went through 3447 // the catch clause. 3448 func TryOffPasswordManagerAuthTimeout(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 3449 ok = js.True == bindings.TryOffPasswordManagerAuthTimeout( 3450 js.Pointer(&ret), js.Pointer(&exception), 3451 callback.Ref(), 3452 ) 3453 3454 return 3455 } 3456 3457 // HasFuncHasOnPasswordManagerAuthTimeout returns true if the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.hasListener" exists. 3458 func HasFuncHasOnPasswordManagerAuthTimeout() bool { 3459 return js.True == bindings.HasFuncHasOnPasswordManagerAuthTimeout() 3460 } 3461 3462 // FuncHasOnPasswordManagerAuthTimeout returns the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.hasListener". 3463 func FuncHasOnPasswordManagerAuthTimeout() (fn js.Func[func(callback js.Func[func()]) bool]) { 3464 bindings.FuncHasOnPasswordManagerAuthTimeout( 3465 js.Pointer(&fn), 3466 ) 3467 return 3468 } 3469 3470 // HasOnPasswordManagerAuthTimeout calls the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.hasListener" directly. 3471 func HasOnPasswordManagerAuthTimeout(callback js.Func[func()]) (ret bool) { 3472 bindings.CallHasOnPasswordManagerAuthTimeout( 3473 js.Pointer(&ret), 3474 callback.Ref(), 3475 ) 3476 3477 return 3478 } 3479 3480 // TryHasOnPasswordManagerAuthTimeout calls the function "WEBEXT.passwordsPrivate.onPasswordManagerAuthTimeout.hasListener" 3481 // in a try/catch block and returns (_, err, ok = false) when it went through 3482 // the catch clause. 3483 func TryHasOnPasswordManagerAuthTimeout(callback js.Func[func()]) (ret bool, exception js.Any, ok bool) { 3484 ok = js.True == bindings.TryHasOnPasswordManagerAuthTimeout( 3485 js.Pointer(&ret), js.Pointer(&exception), 3486 callback.Ref(), 3487 ) 3488 3489 return 3490 } 3491 3492 type OnPasswordsFileExportProgressEventCallbackFunc func(this js.Ref, status *PasswordExportProgress) js.Ref 3493 3494 func (fn OnPasswordsFileExportProgressEventCallbackFunc) Register() js.Func[func(status *PasswordExportProgress)] { 3495 return js.RegisterCallback[func(status *PasswordExportProgress)]( 3496 fn, abi.FuncPCABIInternal(fn), 3497 ) 3498 } 3499 3500 func (fn OnPasswordsFileExportProgressEventCallbackFunc) DispatchCallback( 3501 targetPC uintptr, ctx *js.CallbackContext, 3502 ) { 3503 args := ctx.Args() 3504 if len(args) != 1+1 /* js this */ || 3505 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3506 js.ThrowInvalidCallbackInvocation() 3507 } 3508 var arg0 PasswordExportProgress 3509 arg0.UpdateFrom(args[0+1]) 3510 defer arg0.FreeMembers(true) 3511 3512 if ctx.Return(fn( 3513 args[0], 3514 3515 mark.NoEscape(&arg0), 3516 )) { 3517 return 3518 } 3519 3520 js.ThrowCallbackValueNotReturned() 3521 } 3522 3523 type OnPasswordsFileExportProgressEventCallback[T any] struct { 3524 Fn func(arg T, this js.Ref, status *PasswordExportProgress) js.Ref 3525 Arg T 3526 } 3527 3528 func (cb *OnPasswordsFileExportProgressEventCallback[T]) Register() js.Func[func(status *PasswordExportProgress)] { 3529 return js.RegisterCallback[func(status *PasswordExportProgress)]( 3530 cb, abi.FuncPCABIInternal(cb.Fn), 3531 ) 3532 } 3533 3534 func (cb *OnPasswordsFileExportProgressEventCallback[T]) DispatchCallback( 3535 targetPC uintptr, ctx *js.CallbackContext, 3536 ) { 3537 args := ctx.Args() 3538 if len(args) != 1+1 /* js this */ || 3539 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3540 js.ThrowInvalidCallbackInvocation() 3541 } 3542 var arg0 PasswordExportProgress 3543 arg0.UpdateFrom(args[0+1]) 3544 defer arg0.FreeMembers(true) 3545 3546 if ctx.Return(cb.Fn( 3547 cb.Arg, 3548 args[0], 3549 3550 mark.NoEscape(&arg0), 3551 )) { 3552 return 3553 } 3554 3555 js.ThrowCallbackValueNotReturned() 3556 } 3557 3558 // HasFuncOnPasswordsFileExportProgress returns true if the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.addListener" exists. 3559 func HasFuncOnPasswordsFileExportProgress() bool { 3560 return js.True == bindings.HasFuncOnPasswordsFileExportProgress() 3561 } 3562 3563 // FuncOnPasswordsFileExportProgress returns the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.addListener". 3564 func FuncOnPasswordsFileExportProgress() (fn js.Func[func(callback js.Func[func(status *PasswordExportProgress)])]) { 3565 bindings.FuncOnPasswordsFileExportProgress( 3566 js.Pointer(&fn), 3567 ) 3568 return 3569 } 3570 3571 // OnPasswordsFileExportProgress calls the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.addListener" directly. 3572 func OnPasswordsFileExportProgress(callback js.Func[func(status *PasswordExportProgress)]) (ret js.Void) { 3573 bindings.CallOnPasswordsFileExportProgress( 3574 js.Pointer(&ret), 3575 callback.Ref(), 3576 ) 3577 3578 return 3579 } 3580 3581 // TryOnPasswordsFileExportProgress calls the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.addListener" 3582 // in a try/catch block and returns (_, err, ok = false) when it went through 3583 // the catch clause. 3584 func TryOnPasswordsFileExportProgress(callback js.Func[func(status *PasswordExportProgress)]) (ret js.Void, exception js.Any, ok bool) { 3585 ok = js.True == bindings.TryOnPasswordsFileExportProgress( 3586 js.Pointer(&ret), js.Pointer(&exception), 3587 callback.Ref(), 3588 ) 3589 3590 return 3591 } 3592 3593 // HasFuncOffPasswordsFileExportProgress returns true if the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.removeListener" exists. 3594 func HasFuncOffPasswordsFileExportProgress() bool { 3595 return js.True == bindings.HasFuncOffPasswordsFileExportProgress() 3596 } 3597 3598 // FuncOffPasswordsFileExportProgress returns the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.removeListener". 3599 func FuncOffPasswordsFileExportProgress() (fn js.Func[func(callback js.Func[func(status *PasswordExportProgress)])]) { 3600 bindings.FuncOffPasswordsFileExportProgress( 3601 js.Pointer(&fn), 3602 ) 3603 return 3604 } 3605 3606 // OffPasswordsFileExportProgress calls the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.removeListener" directly. 3607 func OffPasswordsFileExportProgress(callback js.Func[func(status *PasswordExportProgress)]) (ret js.Void) { 3608 bindings.CallOffPasswordsFileExportProgress( 3609 js.Pointer(&ret), 3610 callback.Ref(), 3611 ) 3612 3613 return 3614 } 3615 3616 // TryOffPasswordsFileExportProgress calls the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.removeListener" 3617 // in a try/catch block and returns (_, err, ok = false) when it went through 3618 // the catch clause. 3619 func TryOffPasswordsFileExportProgress(callback js.Func[func(status *PasswordExportProgress)]) (ret js.Void, exception js.Any, ok bool) { 3620 ok = js.True == bindings.TryOffPasswordsFileExportProgress( 3621 js.Pointer(&ret), js.Pointer(&exception), 3622 callback.Ref(), 3623 ) 3624 3625 return 3626 } 3627 3628 // HasFuncHasOnPasswordsFileExportProgress returns true if the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.hasListener" exists. 3629 func HasFuncHasOnPasswordsFileExportProgress() bool { 3630 return js.True == bindings.HasFuncHasOnPasswordsFileExportProgress() 3631 } 3632 3633 // FuncHasOnPasswordsFileExportProgress returns the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.hasListener". 3634 func FuncHasOnPasswordsFileExportProgress() (fn js.Func[func(callback js.Func[func(status *PasswordExportProgress)]) bool]) { 3635 bindings.FuncHasOnPasswordsFileExportProgress( 3636 js.Pointer(&fn), 3637 ) 3638 return 3639 } 3640 3641 // HasOnPasswordsFileExportProgress calls the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.hasListener" directly. 3642 func HasOnPasswordsFileExportProgress(callback js.Func[func(status *PasswordExportProgress)]) (ret bool) { 3643 bindings.CallHasOnPasswordsFileExportProgress( 3644 js.Pointer(&ret), 3645 callback.Ref(), 3646 ) 3647 3648 return 3649 } 3650 3651 // TryHasOnPasswordsFileExportProgress calls the function "WEBEXT.passwordsPrivate.onPasswordsFileExportProgress.hasListener" 3652 // in a try/catch block and returns (_, err, ok = false) when it went through 3653 // the catch clause. 3654 func TryHasOnPasswordsFileExportProgress(callback js.Func[func(status *PasswordExportProgress)]) (ret bool, exception js.Any, ok bool) { 3655 ok = js.True == bindings.TryHasOnPasswordsFileExportProgress( 3656 js.Pointer(&ret), js.Pointer(&exception), 3657 callback.Ref(), 3658 ) 3659 3660 return 3661 } 3662 3663 type OnSavedPasswordsListChangedEventCallbackFunc func(this js.Ref, entries js.Array[PasswordUiEntry]) js.Ref 3664 3665 func (fn OnSavedPasswordsListChangedEventCallbackFunc) Register() js.Func[func(entries js.Array[PasswordUiEntry])] { 3666 return js.RegisterCallback[func(entries js.Array[PasswordUiEntry])]( 3667 fn, abi.FuncPCABIInternal(fn), 3668 ) 3669 } 3670 3671 func (fn OnSavedPasswordsListChangedEventCallbackFunc) DispatchCallback( 3672 targetPC uintptr, ctx *js.CallbackContext, 3673 ) { 3674 args := ctx.Args() 3675 if len(args) != 1+1 /* js this */ || 3676 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3677 js.ThrowInvalidCallbackInvocation() 3678 } 3679 3680 if ctx.Return(fn( 3681 args[0], 3682 3683 js.Array[PasswordUiEntry]{}.FromRef(args[0+1]), 3684 )) { 3685 return 3686 } 3687 3688 js.ThrowCallbackValueNotReturned() 3689 } 3690 3691 type OnSavedPasswordsListChangedEventCallback[T any] struct { 3692 Fn func(arg T, this js.Ref, entries js.Array[PasswordUiEntry]) js.Ref 3693 Arg T 3694 } 3695 3696 func (cb *OnSavedPasswordsListChangedEventCallback[T]) Register() js.Func[func(entries js.Array[PasswordUiEntry])] { 3697 return js.RegisterCallback[func(entries js.Array[PasswordUiEntry])]( 3698 cb, abi.FuncPCABIInternal(cb.Fn), 3699 ) 3700 } 3701 3702 func (cb *OnSavedPasswordsListChangedEventCallback[T]) DispatchCallback( 3703 targetPC uintptr, ctx *js.CallbackContext, 3704 ) { 3705 args := ctx.Args() 3706 if len(args) != 1+1 /* js this */ || 3707 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3708 js.ThrowInvalidCallbackInvocation() 3709 } 3710 3711 if ctx.Return(cb.Fn( 3712 cb.Arg, 3713 args[0], 3714 3715 js.Array[PasswordUiEntry]{}.FromRef(args[0+1]), 3716 )) { 3717 return 3718 } 3719 3720 js.ThrowCallbackValueNotReturned() 3721 } 3722 3723 // HasFuncOnSavedPasswordsListChanged returns true if the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.addListener" exists. 3724 func HasFuncOnSavedPasswordsListChanged() bool { 3725 return js.True == bindings.HasFuncOnSavedPasswordsListChanged() 3726 } 3727 3728 // FuncOnSavedPasswordsListChanged returns the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.addListener". 3729 func FuncOnSavedPasswordsListChanged() (fn js.Func[func(callback js.Func[func(entries js.Array[PasswordUiEntry])])]) { 3730 bindings.FuncOnSavedPasswordsListChanged( 3731 js.Pointer(&fn), 3732 ) 3733 return 3734 } 3735 3736 // OnSavedPasswordsListChanged calls the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.addListener" directly. 3737 func OnSavedPasswordsListChanged(callback js.Func[func(entries js.Array[PasswordUiEntry])]) (ret js.Void) { 3738 bindings.CallOnSavedPasswordsListChanged( 3739 js.Pointer(&ret), 3740 callback.Ref(), 3741 ) 3742 3743 return 3744 } 3745 3746 // TryOnSavedPasswordsListChanged calls the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.addListener" 3747 // in a try/catch block and returns (_, err, ok = false) when it went through 3748 // the catch clause. 3749 func TryOnSavedPasswordsListChanged(callback js.Func[func(entries js.Array[PasswordUiEntry])]) (ret js.Void, exception js.Any, ok bool) { 3750 ok = js.True == bindings.TryOnSavedPasswordsListChanged( 3751 js.Pointer(&ret), js.Pointer(&exception), 3752 callback.Ref(), 3753 ) 3754 3755 return 3756 } 3757 3758 // HasFuncOffSavedPasswordsListChanged returns true if the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.removeListener" exists. 3759 func HasFuncOffSavedPasswordsListChanged() bool { 3760 return js.True == bindings.HasFuncOffSavedPasswordsListChanged() 3761 } 3762 3763 // FuncOffSavedPasswordsListChanged returns the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.removeListener". 3764 func FuncOffSavedPasswordsListChanged() (fn js.Func[func(callback js.Func[func(entries js.Array[PasswordUiEntry])])]) { 3765 bindings.FuncOffSavedPasswordsListChanged( 3766 js.Pointer(&fn), 3767 ) 3768 return 3769 } 3770 3771 // OffSavedPasswordsListChanged calls the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.removeListener" directly. 3772 func OffSavedPasswordsListChanged(callback js.Func[func(entries js.Array[PasswordUiEntry])]) (ret js.Void) { 3773 bindings.CallOffSavedPasswordsListChanged( 3774 js.Pointer(&ret), 3775 callback.Ref(), 3776 ) 3777 3778 return 3779 } 3780 3781 // TryOffSavedPasswordsListChanged calls the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.removeListener" 3782 // in a try/catch block and returns (_, err, ok = false) when it went through 3783 // the catch clause. 3784 func TryOffSavedPasswordsListChanged(callback js.Func[func(entries js.Array[PasswordUiEntry])]) (ret js.Void, exception js.Any, ok bool) { 3785 ok = js.True == bindings.TryOffSavedPasswordsListChanged( 3786 js.Pointer(&ret), js.Pointer(&exception), 3787 callback.Ref(), 3788 ) 3789 3790 return 3791 } 3792 3793 // HasFuncHasOnSavedPasswordsListChanged returns true if the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.hasListener" exists. 3794 func HasFuncHasOnSavedPasswordsListChanged() bool { 3795 return js.True == bindings.HasFuncHasOnSavedPasswordsListChanged() 3796 } 3797 3798 // FuncHasOnSavedPasswordsListChanged returns the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.hasListener". 3799 func FuncHasOnSavedPasswordsListChanged() (fn js.Func[func(callback js.Func[func(entries js.Array[PasswordUiEntry])]) bool]) { 3800 bindings.FuncHasOnSavedPasswordsListChanged( 3801 js.Pointer(&fn), 3802 ) 3803 return 3804 } 3805 3806 // HasOnSavedPasswordsListChanged calls the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.hasListener" directly. 3807 func HasOnSavedPasswordsListChanged(callback js.Func[func(entries js.Array[PasswordUiEntry])]) (ret bool) { 3808 bindings.CallHasOnSavedPasswordsListChanged( 3809 js.Pointer(&ret), 3810 callback.Ref(), 3811 ) 3812 3813 return 3814 } 3815 3816 // TryHasOnSavedPasswordsListChanged calls the function "WEBEXT.passwordsPrivate.onSavedPasswordsListChanged.hasListener" 3817 // in a try/catch block and returns (_, err, ok = false) when it went through 3818 // the catch clause. 3819 func TryHasOnSavedPasswordsListChanged(callback js.Func[func(entries js.Array[PasswordUiEntry])]) (ret bool, exception js.Any, ok bool) { 3820 ok = js.True == bindings.TryHasOnSavedPasswordsListChanged( 3821 js.Pointer(&ret), js.Pointer(&exception), 3822 callback.Ref(), 3823 ) 3824 3825 return 3826 } 3827 3828 // HasFuncOptInForAccountStorage returns true if the function "WEBEXT.passwordsPrivate.optInForAccountStorage" exists. 3829 func HasFuncOptInForAccountStorage() bool { 3830 return js.True == bindings.HasFuncOptInForAccountStorage() 3831 } 3832 3833 // FuncOptInForAccountStorage returns the function "WEBEXT.passwordsPrivate.optInForAccountStorage". 3834 func FuncOptInForAccountStorage() (fn js.Func[func(optIn bool)]) { 3835 bindings.FuncOptInForAccountStorage( 3836 js.Pointer(&fn), 3837 ) 3838 return 3839 } 3840 3841 // OptInForAccountStorage calls the function "WEBEXT.passwordsPrivate.optInForAccountStorage" directly. 3842 func OptInForAccountStorage(optIn bool) (ret js.Void) { 3843 bindings.CallOptInForAccountStorage( 3844 js.Pointer(&ret), 3845 js.Bool(bool(optIn)), 3846 ) 3847 3848 return 3849 } 3850 3851 // TryOptInForAccountStorage calls the function "WEBEXT.passwordsPrivate.optInForAccountStorage" 3852 // in a try/catch block and returns (_, err, ok = false) when it went through 3853 // the catch clause. 3854 func TryOptInForAccountStorage(optIn bool) (ret js.Void, exception js.Any, ok bool) { 3855 ok = js.True == bindings.TryOptInForAccountStorage( 3856 js.Pointer(&ret), js.Pointer(&exception), 3857 js.Bool(bool(optIn)), 3858 ) 3859 3860 return 3861 } 3862 3863 // HasFuncRecordPasswordsPageAccessInSettings returns true if the function "WEBEXT.passwordsPrivate.recordPasswordsPageAccessInSettings" exists. 3864 func HasFuncRecordPasswordsPageAccessInSettings() bool { 3865 return js.True == bindings.HasFuncRecordPasswordsPageAccessInSettings() 3866 } 3867 3868 // FuncRecordPasswordsPageAccessInSettings returns the function "WEBEXT.passwordsPrivate.recordPasswordsPageAccessInSettings". 3869 func FuncRecordPasswordsPageAccessInSettings() (fn js.Func[func()]) { 3870 bindings.FuncRecordPasswordsPageAccessInSettings( 3871 js.Pointer(&fn), 3872 ) 3873 return 3874 } 3875 3876 // RecordPasswordsPageAccessInSettings calls the function "WEBEXT.passwordsPrivate.recordPasswordsPageAccessInSettings" directly. 3877 func RecordPasswordsPageAccessInSettings() (ret js.Void) { 3878 bindings.CallRecordPasswordsPageAccessInSettings( 3879 js.Pointer(&ret), 3880 ) 3881 3882 return 3883 } 3884 3885 // TryRecordPasswordsPageAccessInSettings calls the function "WEBEXT.passwordsPrivate.recordPasswordsPageAccessInSettings" 3886 // in a try/catch block and returns (_, err, ok = false) when it went through 3887 // the catch clause. 3888 func TryRecordPasswordsPageAccessInSettings() (ret js.Void, exception js.Any, ok bool) { 3889 ok = js.True == bindings.TryRecordPasswordsPageAccessInSettings( 3890 js.Pointer(&ret), js.Pointer(&exception), 3891 ) 3892 3893 return 3894 } 3895 3896 // HasFuncRemoveCredential returns true if the function "WEBEXT.passwordsPrivate.removeCredential" exists. 3897 func HasFuncRemoveCredential() bool { 3898 return js.True == bindings.HasFuncRemoveCredential() 3899 } 3900 3901 // FuncRemoveCredential returns the function "WEBEXT.passwordsPrivate.removeCredential". 3902 func FuncRemoveCredential() (fn js.Func[func(id int32, fromStores PasswordStoreSet)]) { 3903 bindings.FuncRemoveCredential( 3904 js.Pointer(&fn), 3905 ) 3906 return 3907 } 3908 3909 // RemoveCredential calls the function "WEBEXT.passwordsPrivate.removeCredential" directly. 3910 func RemoveCredential(id int32, fromStores PasswordStoreSet) (ret js.Void) { 3911 bindings.CallRemoveCredential( 3912 js.Pointer(&ret), 3913 int32(id), 3914 uint32(fromStores), 3915 ) 3916 3917 return 3918 } 3919 3920 // TryRemoveCredential calls the function "WEBEXT.passwordsPrivate.removeCredential" 3921 // in a try/catch block and returns (_, err, ok = false) when it went through 3922 // the catch clause. 3923 func TryRemoveCredential(id int32, fromStores PasswordStoreSet) (ret js.Void, exception js.Any, ok bool) { 3924 ok = js.True == bindings.TryRemoveCredential( 3925 js.Pointer(&ret), js.Pointer(&exception), 3926 int32(id), 3927 uint32(fromStores), 3928 ) 3929 3930 return 3931 } 3932 3933 // HasFuncRemovePasswordException returns true if the function "WEBEXT.passwordsPrivate.removePasswordException" exists. 3934 func HasFuncRemovePasswordException() bool { 3935 return js.True == bindings.HasFuncRemovePasswordException() 3936 } 3937 3938 // FuncRemovePasswordException returns the function "WEBEXT.passwordsPrivate.removePasswordException". 3939 func FuncRemovePasswordException() (fn js.Func[func(id int32)]) { 3940 bindings.FuncRemovePasswordException( 3941 js.Pointer(&fn), 3942 ) 3943 return 3944 } 3945 3946 // RemovePasswordException calls the function "WEBEXT.passwordsPrivate.removePasswordException" directly. 3947 func RemovePasswordException(id int32) (ret js.Void) { 3948 bindings.CallRemovePasswordException( 3949 js.Pointer(&ret), 3950 int32(id), 3951 ) 3952 3953 return 3954 } 3955 3956 // TryRemovePasswordException calls the function "WEBEXT.passwordsPrivate.removePasswordException" 3957 // in a try/catch block and returns (_, err, ok = false) when it went through 3958 // the catch clause. 3959 func TryRemovePasswordException(id int32) (ret js.Void, exception js.Any, ok bool) { 3960 ok = js.True == bindings.TryRemovePasswordException( 3961 js.Pointer(&ret), js.Pointer(&exception), 3962 int32(id), 3963 ) 3964 3965 return 3966 } 3967 3968 // HasFuncRequestCredentialsDetails returns true if the function "WEBEXT.passwordsPrivate.requestCredentialsDetails" exists. 3969 func HasFuncRequestCredentialsDetails() bool { 3970 return js.True == bindings.HasFuncRequestCredentialsDetails() 3971 } 3972 3973 // FuncRequestCredentialsDetails returns the function "WEBEXT.passwordsPrivate.requestCredentialsDetails". 3974 func FuncRequestCredentialsDetails() (fn js.Func[func(ids js.Array[int32]) js.Promise[js.Array[PasswordUiEntry]]]) { 3975 bindings.FuncRequestCredentialsDetails( 3976 js.Pointer(&fn), 3977 ) 3978 return 3979 } 3980 3981 // RequestCredentialsDetails calls the function "WEBEXT.passwordsPrivate.requestCredentialsDetails" directly. 3982 func RequestCredentialsDetails(ids js.Array[int32]) (ret js.Promise[js.Array[PasswordUiEntry]]) { 3983 bindings.CallRequestCredentialsDetails( 3984 js.Pointer(&ret), 3985 ids.Ref(), 3986 ) 3987 3988 return 3989 } 3990 3991 // TryRequestCredentialsDetails calls the function "WEBEXT.passwordsPrivate.requestCredentialsDetails" 3992 // in a try/catch block and returns (_, err, ok = false) when it went through 3993 // the catch clause. 3994 func TryRequestCredentialsDetails(ids js.Array[int32]) (ret js.Promise[js.Array[PasswordUiEntry]], exception js.Any, ok bool) { 3995 ok = js.True == bindings.TryRequestCredentialsDetails( 3996 js.Pointer(&ret), js.Pointer(&exception), 3997 ids.Ref(), 3998 ) 3999 4000 return 4001 } 4002 4003 // HasFuncRequestExportProgressStatus returns true if the function "WEBEXT.passwordsPrivate.requestExportProgressStatus" exists. 4004 func HasFuncRequestExportProgressStatus() bool { 4005 return js.True == bindings.HasFuncRequestExportProgressStatus() 4006 } 4007 4008 // FuncRequestExportProgressStatus returns the function "WEBEXT.passwordsPrivate.requestExportProgressStatus". 4009 func FuncRequestExportProgressStatus() (fn js.Func[func() js.Promise[ExportProgressStatus]]) { 4010 bindings.FuncRequestExportProgressStatus( 4011 js.Pointer(&fn), 4012 ) 4013 return 4014 } 4015 4016 // RequestExportProgressStatus calls the function "WEBEXT.passwordsPrivate.requestExportProgressStatus" directly. 4017 func RequestExportProgressStatus() (ret js.Promise[ExportProgressStatus]) { 4018 bindings.CallRequestExportProgressStatus( 4019 js.Pointer(&ret), 4020 ) 4021 4022 return 4023 } 4024 4025 // TryRequestExportProgressStatus calls the function "WEBEXT.passwordsPrivate.requestExportProgressStatus" 4026 // in a try/catch block and returns (_, err, ok = false) when it went through 4027 // the catch clause. 4028 func TryRequestExportProgressStatus() (ret js.Promise[ExportProgressStatus], exception js.Any, ok bool) { 4029 ok = js.True == bindings.TryRequestExportProgressStatus( 4030 js.Pointer(&ret), js.Pointer(&exception), 4031 ) 4032 4033 return 4034 } 4035 4036 // HasFuncRequestPlaintextPassword returns true if the function "WEBEXT.passwordsPrivate.requestPlaintextPassword" exists. 4037 func HasFuncRequestPlaintextPassword() bool { 4038 return js.True == bindings.HasFuncRequestPlaintextPassword() 4039 } 4040 4041 // FuncRequestPlaintextPassword returns the function "WEBEXT.passwordsPrivate.requestPlaintextPassword". 4042 func FuncRequestPlaintextPassword() (fn js.Func[func(id int32, reason PlaintextReason) js.Promise[js.String]]) { 4043 bindings.FuncRequestPlaintextPassword( 4044 js.Pointer(&fn), 4045 ) 4046 return 4047 } 4048 4049 // RequestPlaintextPassword calls the function "WEBEXT.passwordsPrivate.requestPlaintextPassword" directly. 4050 func RequestPlaintextPassword(id int32, reason PlaintextReason) (ret js.Promise[js.String]) { 4051 bindings.CallRequestPlaintextPassword( 4052 js.Pointer(&ret), 4053 int32(id), 4054 uint32(reason), 4055 ) 4056 4057 return 4058 } 4059 4060 // TryRequestPlaintextPassword calls the function "WEBEXT.passwordsPrivate.requestPlaintextPassword" 4061 // in a try/catch block and returns (_, err, ok = false) when it went through 4062 // the catch clause. 4063 func TryRequestPlaintextPassword(id int32, reason PlaintextReason) (ret js.Promise[js.String], exception js.Any, ok bool) { 4064 ok = js.True == bindings.TryRequestPlaintextPassword( 4065 js.Pointer(&ret), js.Pointer(&exception), 4066 int32(id), 4067 uint32(reason), 4068 ) 4069 4070 return 4071 } 4072 4073 // HasFuncResetImporter returns true if the function "WEBEXT.passwordsPrivate.resetImporter" exists. 4074 func HasFuncResetImporter() bool { 4075 return js.True == bindings.HasFuncResetImporter() 4076 } 4077 4078 // FuncResetImporter returns the function "WEBEXT.passwordsPrivate.resetImporter". 4079 func FuncResetImporter() (fn js.Func[func(deleteFile bool) js.Promise[js.Void]]) { 4080 bindings.FuncResetImporter( 4081 js.Pointer(&fn), 4082 ) 4083 return 4084 } 4085 4086 // ResetImporter calls the function "WEBEXT.passwordsPrivate.resetImporter" directly. 4087 func ResetImporter(deleteFile bool) (ret js.Promise[js.Void]) { 4088 bindings.CallResetImporter( 4089 js.Pointer(&ret), 4090 js.Bool(bool(deleteFile)), 4091 ) 4092 4093 return 4094 } 4095 4096 // TryResetImporter calls the function "WEBEXT.passwordsPrivate.resetImporter" 4097 // in a try/catch block and returns (_, err, ok = false) when it went through 4098 // the catch clause. 4099 func TryResetImporter(deleteFile bool) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4100 ok = js.True == bindings.TryResetImporter( 4101 js.Pointer(&ret), js.Pointer(&exception), 4102 js.Bool(bool(deleteFile)), 4103 ) 4104 4105 return 4106 } 4107 4108 // HasFuncSharePassword returns true if the function "WEBEXT.passwordsPrivate.sharePassword" exists. 4109 func HasFuncSharePassword() bool { 4110 return js.True == bindings.HasFuncSharePassword() 4111 } 4112 4113 // FuncSharePassword returns the function "WEBEXT.passwordsPrivate.sharePassword". 4114 func FuncSharePassword() (fn js.Func[func(id int32, recipients js.Array[RecipientInfo]) js.Promise[js.Void]]) { 4115 bindings.FuncSharePassword( 4116 js.Pointer(&fn), 4117 ) 4118 return 4119 } 4120 4121 // SharePassword calls the function "WEBEXT.passwordsPrivate.sharePassword" directly. 4122 func SharePassword(id int32, recipients js.Array[RecipientInfo]) (ret js.Promise[js.Void]) { 4123 bindings.CallSharePassword( 4124 js.Pointer(&ret), 4125 int32(id), 4126 recipients.Ref(), 4127 ) 4128 4129 return 4130 } 4131 4132 // TrySharePassword calls the function "WEBEXT.passwordsPrivate.sharePassword" 4133 // in a try/catch block and returns (_, err, ok = false) when it went through 4134 // the catch clause. 4135 func TrySharePassword(id int32, recipients js.Array[RecipientInfo]) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4136 ok = js.True == bindings.TrySharePassword( 4137 js.Pointer(&ret), js.Pointer(&exception), 4138 int32(id), 4139 recipients.Ref(), 4140 ) 4141 4142 return 4143 } 4144 4145 // HasFuncShowAddShortcutDialog returns true if the function "WEBEXT.passwordsPrivate.showAddShortcutDialog" exists. 4146 func HasFuncShowAddShortcutDialog() bool { 4147 return js.True == bindings.HasFuncShowAddShortcutDialog() 4148 } 4149 4150 // FuncShowAddShortcutDialog returns the function "WEBEXT.passwordsPrivate.showAddShortcutDialog". 4151 func FuncShowAddShortcutDialog() (fn js.Func[func()]) { 4152 bindings.FuncShowAddShortcutDialog( 4153 js.Pointer(&fn), 4154 ) 4155 return 4156 } 4157 4158 // ShowAddShortcutDialog calls the function "WEBEXT.passwordsPrivate.showAddShortcutDialog" directly. 4159 func ShowAddShortcutDialog() (ret js.Void) { 4160 bindings.CallShowAddShortcutDialog( 4161 js.Pointer(&ret), 4162 ) 4163 4164 return 4165 } 4166 4167 // TryShowAddShortcutDialog calls the function "WEBEXT.passwordsPrivate.showAddShortcutDialog" 4168 // in a try/catch block and returns (_, err, ok = false) when it went through 4169 // the catch clause. 4170 func TryShowAddShortcutDialog() (ret js.Void, exception js.Any, ok bool) { 4171 ok = js.True == bindings.TryShowAddShortcutDialog( 4172 js.Pointer(&ret), js.Pointer(&exception), 4173 ) 4174 4175 return 4176 } 4177 4178 // HasFuncShowExportedFileInShell returns true if the function "WEBEXT.passwordsPrivate.showExportedFileInShell" exists. 4179 func HasFuncShowExportedFileInShell() bool { 4180 return js.True == bindings.HasFuncShowExportedFileInShell() 4181 } 4182 4183 // FuncShowExportedFileInShell returns the function "WEBEXT.passwordsPrivate.showExportedFileInShell". 4184 func FuncShowExportedFileInShell() (fn js.Func[func(file_path js.String)]) { 4185 bindings.FuncShowExportedFileInShell( 4186 js.Pointer(&fn), 4187 ) 4188 return 4189 } 4190 4191 // ShowExportedFileInShell calls the function "WEBEXT.passwordsPrivate.showExportedFileInShell" directly. 4192 func ShowExportedFileInShell(file_path js.String) (ret js.Void) { 4193 bindings.CallShowExportedFileInShell( 4194 js.Pointer(&ret), 4195 file_path.Ref(), 4196 ) 4197 4198 return 4199 } 4200 4201 // TryShowExportedFileInShell calls the function "WEBEXT.passwordsPrivate.showExportedFileInShell" 4202 // in a try/catch block and returns (_, err, ok = false) when it went through 4203 // the catch clause. 4204 func TryShowExportedFileInShell(file_path js.String) (ret js.Void, exception js.Any, ok bool) { 4205 ok = js.True == bindings.TryShowExportedFileInShell( 4206 js.Pointer(&ret), js.Pointer(&exception), 4207 file_path.Ref(), 4208 ) 4209 4210 return 4211 } 4212 4213 // HasFuncStartPasswordCheck returns true if the function "WEBEXT.passwordsPrivate.startPasswordCheck" exists. 4214 func HasFuncStartPasswordCheck() bool { 4215 return js.True == bindings.HasFuncStartPasswordCheck() 4216 } 4217 4218 // FuncStartPasswordCheck returns the function "WEBEXT.passwordsPrivate.startPasswordCheck". 4219 func FuncStartPasswordCheck() (fn js.Func[func() js.Promise[js.Void]]) { 4220 bindings.FuncStartPasswordCheck( 4221 js.Pointer(&fn), 4222 ) 4223 return 4224 } 4225 4226 // StartPasswordCheck calls the function "WEBEXT.passwordsPrivate.startPasswordCheck" directly. 4227 func StartPasswordCheck() (ret js.Promise[js.Void]) { 4228 bindings.CallStartPasswordCheck( 4229 js.Pointer(&ret), 4230 ) 4231 4232 return 4233 } 4234 4235 // TryStartPasswordCheck calls the function "WEBEXT.passwordsPrivate.startPasswordCheck" 4236 // in a try/catch block and returns (_, err, ok = false) when it went through 4237 // the catch clause. 4238 func TryStartPasswordCheck() (ret js.Promise[js.Void], exception js.Any, ok bool) { 4239 ok = js.True == bindings.TryStartPasswordCheck( 4240 js.Pointer(&ret), js.Pointer(&exception), 4241 ) 4242 4243 return 4244 } 4245 4246 // HasFuncSwitchBiometricAuthBeforeFillingState returns true if the function "WEBEXT.passwordsPrivate.switchBiometricAuthBeforeFillingState" exists. 4247 func HasFuncSwitchBiometricAuthBeforeFillingState() bool { 4248 return js.True == bindings.HasFuncSwitchBiometricAuthBeforeFillingState() 4249 } 4250 4251 // FuncSwitchBiometricAuthBeforeFillingState returns the function "WEBEXT.passwordsPrivate.switchBiometricAuthBeforeFillingState". 4252 func FuncSwitchBiometricAuthBeforeFillingState() (fn js.Func[func()]) { 4253 bindings.FuncSwitchBiometricAuthBeforeFillingState( 4254 js.Pointer(&fn), 4255 ) 4256 return 4257 } 4258 4259 // SwitchBiometricAuthBeforeFillingState calls the function "WEBEXT.passwordsPrivate.switchBiometricAuthBeforeFillingState" directly. 4260 func SwitchBiometricAuthBeforeFillingState() (ret js.Void) { 4261 bindings.CallSwitchBiometricAuthBeforeFillingState( 4262 js.Pointer(&ret), 4263 ) 4264 4265 return 4266 } 4267 4268 // TrySwitchBiometricAuthBeforeFillingState calls the function "WEBEXT.passwordsPrivate.switchBiometricAuthBeforeFillingState" 4269 // in a try/catch block and returns (_, err, ok = false) when it went through 4270 // the catch clause. 4271 func TrySwitchBiometricAuthBeforeFillingState() (ret js.Void, exception js.Any, ok bool) { 4272 ok = js.True == bindings.TrySwitchBiometricAuthBeforeFillingState( 4273 js.Pointer(&ret), js.Pointer(&exception), 4274 ) 4275 4276 return 4277 } 4278 4279 // HasFuncUndoRemoveSavedPasswordOrException returns true if the function "WEBEXT.passwordsPrivate.undoRemoveSavedPasswordOrException" exists. 4280 func HasFuncUndoRemoveSavedPasswordOrException() bool { 4281 return js.True == bindings.HasFuncUndoRemoveSavedPasswordOrException() 4282 } 4283 4284 // FuncUndoRemoveSavedPasswordOrException returns the function "WEBEXT.passwordsPrivate.undoRemoveSavedPasswordOrException". 4285 func FuncUndoRemoveSavedPasswordOrException() (fn js.Func[func()]) { 4286 bindings.FuncUndoRemoveSavedPasswordOrException( 4287 js.Pointer(&fn), 4288 ) 4289 return 4290 } 4291 4292 // UndoRemoveSavedPasswordOrException calls the function "WEBEXT.passwordsPrivate.undoRemoveSavedPasswordOrException" directly. 4293 func UndoRemoveSavedPasswordOrException() (ret js.Void) { 4294 bindings.CallUndoRemoveSavedPasswordOrException( 4295 js.Pointer(&ret), 4296 ) 4297 4298 return 4299 } 4300 4301 // TryUndoRemoveSavedPasswordOrException calls the function "WEBEXT.passwordsPrivate.undoRemoveSavedPasswordOrException" 4302 // in a try/catch block and returns (_, err, ok = false) when it went through 4303 // the catch clause. 4304 func TryUndoRemoveSavedPasswordOrException() (ret js.Void, exception js.Any, ok bool) { 4305 ok = js.True == bindings.TryUndoRemoveSavedPasswordOrException( 4306 js.Pointer(&ret), js.Pointer(&exception), 4307 ) 4308 4309 return 4310 } 4311 4312 // HasFuncUnmuteInsecureCredential returns true if the function "WEBEXT.passwordsPrivate.unmuteInsecureCredential" exists. 4313 func HasFuncUnmuteInsecureCredential() bool { 4314 return js.True == bindings.HasFuncUnmuteInsecureCredential() 4315 } 4316 4317 // FuncUnmuteInsecureCredential returns the function "WEBEXT.passwordsPrivate.unmuteInsecureCredential". 4318 func FuncUnmuteInsecureCredential() (fn js.Func[func(credential PasswordUiEntry) js.Promise[js.Void]]) { 4319 bindings.FuncUnmuteInsecureCredential( 4320 js.Pointer(&fn), 4321 ) 4322 return 4323 } 4324 4325 // UnmuteInsecureCredential calls the function "WEBEXT.passwordsPrivate.unmuteInsecureCredential" directly. 4326 func UnmuteInsecureCredential(credential PasswordUiEntry) (ret js.Promise[js.Void]) { 4327 bindings.CallUnmuteInsecureCredential( 4328 js.Pointer(&ret), 4329 js.Pointer(&credential), 4330 ) 4331 4332 return 4333 } 4334 4335 // TryUnmuteInsecureCredential calls the function "WEBEXT.passwordsPrivate.unmuteInsecureCredential" 4336 // in a try/catch block and returns (_, err, ok = false) when it went through 4337 // the catch clause. 4338 func TryUnmuteInsecureCredential(credential PasswordUiEntry) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4339 ok = js.True == bindings.TryUnmuteInsecureCredential( 4340 js.Pointer(&ret), js.Pointer(&exception), 4341 js.Pointer(&credential), 4342 ) 4343 4344 return 4345 }