github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/webauthenticationproxy/apis_js_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package webauthenticationproxy
     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/webauthenticationproxy/bindings"
    11  )
    12  
    13  type CreateRequest struct {
    14  	// RequestId is "CreateRequest.requestId"
    15  	//
    16  	// Optional
    17  	//
    18  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
    19  	RequestId int32
    20  	// RequestDetailsJson is "CreateRequest.requestDetailsJson"
    21  	//
    22  	// Optional
    23  	RequestDetailsJson js.String
    24  
    25  	FFI_USE_RequestId bool // for RequestId.
    26  
    27  	FFI_USE bool
    28  }
    29  
    30  // FromRef calls UpdateFrom and returns a CreateRequest with all fields set.
    31  func (p CreateRequest) FromRef(ref js.Ref) CreateRequest {
    32  	p.UpdateFrom(ref)
    33  	return p
    34  }
    35  
    36  // New creates a new CreateRequest in the application heap.
    37  func (p CreateRequest) New() js.Ref {
    38  	return bindings.CreateRequestJSLoad(
    39  		js.Pointer(&p), js.True, 0,
    40  	)
    41  }
    42  
    43  // UpdateFrom copies value of all fields of the heap object to p.
    44  func (p *CreateRequest) UpdateFrom(ref js.Ref) {
    45  	bindings.CreateRequestJSStore(
    46  		js.Pointer(p), ref,
    47  	)
    48  }
    49  
    50  // Update writes all fields of the p to the heap object referenced by ref.
    51  func (p *CreateRequest) Update(ref js.Ref) {
    52  	bindings.CreateRequestJSLoad(
    53  		js.Pointer(p), js.False, ref,
    54  	)
    55  }
    56  
    57  // FreeMembers frees fields with heap reference, if recursive is true
    58  // free all heap references reachable from p.
    59  func (p *CreateRequest) FreeMembers(recursive bool) {
    60  	js.Free(
    61  		p.RequestDetailsJson.Ref(),
    62  	)
    63  	p.RequestDetailsJson = p.RequestDetailsJson.FromRef(js.Undefined)
    64  }
    65  
    66  type DOMExceptionDetails struct {
    67  	// Name is "DOMExceptionDetails.name"
    68  	//
    69  	// Optional
    70  	Name js.String
    71  	// Message is "DOMExceptionDetails.message"
    72  	//
    73  	// Optional
    74  	Message js.String
    75  
    76  	FFI_USE bool
    77  }
    78  
    79  // FromRef calls UpdateFrom and returns a DOMExceptionDetails with all fields set.
    80  func (p DOMExceptionDetails) FromRef(ref js.Ref) DOMExceptionDetails {
    81  	p.UpdateFrom(ref)
    82  	return p
    83  }
    84  
    85  // New creates a new DOMExceptionDetails in the application heap.
    86  func (p DOMExceptionDetails) New() js.Ref {
    87  	return bindings.DOMExceptionDetailsJSLoad(
    88  		js.Pointer(&p), js.True, 0,
    89  	)
    90  }
    91  
    92  // UpdateFrom copies value of all fields of the heap object to p.
    93  func (p *DOMExceptionDetails) UpdateFrom(ref js.Ref) {
    94  	bindings.DOMExceptionDetailsJSStore(
    95  		js.Pointer(p), ref,
    96  	)
    97  }
    98  
    99  // Update writes all fields of the p to the heap object referenced by ref.
   100  func (p *DOMExceptionDetails) Update(ref js.Ref) {
   101  	bindings.DOMExceptionDetailsJSLoad(
   102  		js.Pointer(p), js.False, ref,
   103  	)
   104  }
   105  
   106  // FreeMembers frees fields with heap reference, if recursive is true
   107  // free all heap references reachable from p.
   108  func (p *DOMExceptionDetails) FreeMembers(recursive bool) {
   109  	js.Free(
   110  		p.Name.Ref(),
   111  		p.Message.Ref(),
   112  	)
   113  	p.Name = p.Name.FromRef(js.Undefined)
   114  	p.Message = p.Message.FromRef(js.Undefined)
   115  }
   116  
   117  type CreateResponseDetails struct {
   118  	// RequestId is "CreateResponseDetails.requestId"
   119  	//
   120  	// Optional
   121  	//
   122  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   123  	RequestId int32
   124  	// Error is "CreateResponseDetails.error"
   125  	//
   126  	// Optional
   127  	//
   128  	// NOTE: Error.FFI_USE MUST be set to true to get Error used.
   129  	Error DOMExceptionDetails
   130  	// ResponseJson is "CreateResponseDetails.responseJson"
   131  	//
   132  	// Optional
   133  	ResponseJson js.String
   134  
   135  	FFI_USE_RequestId bool // for RequestId.
   136  
   137  	FFI_USE bool
   138  }
   139  
   140  // FromRef calls UpdateFrom and returns a CreateResponseDetails with all fields set.
   141  func (p CreateResponseDetails) FromRef(ref js.Ref) CreateResponseDetails {
   142  	p.UpdateFrom(ref)
   143  	return p
   144  }
   145  
   146  // New creates a new CreateResponseDetails in the application heap.
   147  func (p CreateResponseDetails) New() js.Ref {
   148  	return bindings.CreateResponseDetailsJSLoad(
   149  		js.Pointer(&p), js.True, 0,
   150  	)
   151  }
   152  
   153  // UpdateFrom copies value of all fields of the heap object to p.
   154  func (p *CreateResponseDetails) UpdateFrom(ref js.Ref) {
   155  	bindings.CreateResponseDetailsJSStore(
   156  		js.Pointer(p), ref,
   157  	)
   158  }
   159  
   160  // Update writes all fields of the p to the heap object referenced by ref.
   161  func (p *CreateResponseDetails) Update(ref js.Ref) {
   162  	bindings.CreateResponseDetailsJSLoad(
   163  		js.Pointer(p), js.False, ref,
   164  	)
   165  }
   166  
   167  // FreeMembers frees fields with heap reference, if recursive is true
   168  // free all heap references reachable from p.
   169  func (p *CreateResponseDetails) FreeMembers(recursive bool) {
   170  	js.Free(
   171  		p.ResponseJson.Ref(),
   172  	)
   173  	p.ResponseJson = p.ResponseJson.FromRef(js.Undefined)
   174  	if recursive {
   175  		p.Error.FreeMembers(true)
   176  	}
   177  }
   178  
   179  type ErrorCallbackFunc func(this js.Ref, err js.String) js.Ref
   180  
   181  func (fn ErrorCallbackFunc) Register() js.Func[func(err js.String)] {
   182  	return js.RegisterCallback[func(err js.String)](
   183  		fn, abi.FuncPCABIInternal(fn),
   184  	)
   185  }
   186  
   187  func (fn ErrorCallbackFunc) DispatchCallback(
   188  	targetPC uintptr, ctx *js.CallbackContext,
   189  ) {
   190  	args := ctx.Args()
   191  	if len(args) != 1+1 /* js this */ ||
   192  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   193  		js.ThrowInvalidCallbackInvocation()
   194  	}
   195  
   196  	if ctx.Return(fn(
   197  		args[0],
   198  
   199  		js.String{}.FromRef(args[0+1]),
   200  	)) {
   201  		return
   202  	}
   203  
   204  	js.ThrowCallbackValueNotReturned()
   205  }
   206  
   207  type ErrorCallback[T any] struct {
   208  	Fn  func(arg T, this js.Ref, err js.String) js.Ref
   209  	Arg T
   210  }
   211  
   212  func (cb *ErrorCallback[T]) Register() js.Func[func(err js.String)] {
   213  	return js.RegisterCallback[func(err js.String)](
   214  		cb, abi.FuncPCABIInternal(cb.Fn),
   215  	)
   216  }
   217  
   218  func (cb *ErrorCallback[T]) DispatchCallback(
   219  	targetPC uintptr, ctx *js.CallbackContext,
   220  ) {
   221  	args := ctx.Args()
   222  	if len(args) != 1+1 /* js this */ ||
   223  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   224  		js.ThrowInvalidCallbackInvocation()
   225  	}
   226  
   227  	if ctx.Return(cb.Fn(
   228  		cb.Arg,
   229  		args[0],
   230  
   231  		js.String{}.FromRef(args[0+1]),
   232  	)) {
   233  		return
   234  	}
   235  
   236  	js.ThrowCallbackValueNotReturned()
   237  }
   238  
   239  type GetRequest struct {
   240  	// RequestId is "GetRequest.requestId"
   241  	//
   242  	// Optional
   243  	//
   244  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   245  	RequestId int32
   246  	// RequestDetailsJson is "GetRequest.requestDetailsJson"
   247  	//
   248  	// Optional
   249  	RequestDetailsJson js.String
   250  
   251  	FFI_USE_RequestId bool // for RequestId.
   252  
   253  	FFI_USE bool
   254  }
   255  
   256  // FromRef calls UpdateFrom and returns a GetRequest with all fields set.
   257  func (p GetRequest) FromRef(ref js.Ref) GetRequest {
   258  	p.UpdateFrom(ref)
   259  	return p
   260  }
   261  
   262  // New creates a new GetRequest in the application heap.
   263  func (p GetRequest) New() js.Ref {
   264  	return bindings.GetRequestJSLoad(
   265  		js.Pointer(&p), js.True, 0,
   266  	)
   267  }
   268  
   269  // UpdateFrom copies value of all fields of the heap object to p.
   270  func (p *GetRequest) UpdateFrom(ref js.Ref) {
   271  	bindings.GetRequestJSStore(
   272  		js.Pointer(p), ref,
   273  	)
   274  }
   275  
   276  // Update writes all fields of the p to the heap object referenced by ref.
   277  func (p *GetRequest) Update(ref js.Ref) {
   278  	bindings.GetRequestJSLoad(
   279  		js.Pointer(p), js.False, ref,
   280  	)
   281  }
   282  
   283  // FreeMembers frees fields with heap reference, if recursive is true
   284  // free all heap references reachable from p.
   285  func (p *GetRequest) FreeMembers(recursive bool) {
   286  	js.Free(
   287  		p.RequestDetailsJson.Ref(),
   288  	)
   289  	p.RequestDetailsJson = p.RequestDetailsJson.FromRef(js.Undefined)
   290  }
   291  
   292  type GetResponseDetails struct {
   293  	// RequestId is "GetResponseDetails.requestId"
   294  	//
   295  	// Optional
   296  	//
   297  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   298  	RequestId int32
   299  	// Error is "GetResponseDetails.error"
   300  	//
   301  	// Optional
   302  	//
   303  	// NOTE: Error.FFI_USE MUST be set to true to get Error used.
   304  	Error DOMExceptionDetails
   305  	// ResponseJson is "GetResponseDetails.responseJson"
   306  	//
   307  	// Optional
   308  	ResponseJson js.String
   309  
   310  	FFI_USE_RequestId bool // for RequestId.
   311  
   312  	FFI_USE bool
   313  }
   314  
   315  // FromRef calls UpdateFrom and returns a GetResponseDetails with all fields set.
   316  func (p GetResponseDetails) FromRef(ref js.Ref) GetResponseDetails {
   317  	p.UpdateFrom(ref)
   318  	return p
   319  }
   320  
   321  // New creates a new GetResponseDetails in the application heap.
   322  func (p GetResponseDetails) New() js.Ref {
   323  	return bindings.GetResponseDetailsJSLoad(
   324  		js.Pointer(&p), js.True, 0,
   325  	)
   326  }
   327  
   328  // UpdateFrom copies value of all fields of the heap object to p.
   329  func (p *GetResponseDetails) UpdateFrom(ref js.Ref) {
   330  	bindings.GetResponseDetailsJSStore(
   331  		js.Pointer(p), ref,
   332  	)
   333  }
   334  
   335  // Update writes all fields of the p to the heap object referenced by ref.
   336  func (p *GetResponseDetails) Update(ref js.Ref) {
   337  	bindings.GetResponseDetailsJSLoad(
   338  		js.Pointer(p), js.False, ref,
   339  	)
   340  }
   341  
   342  // FreeMembers frees fields with heap reference, if recursive is true
   343  // free all heap references reachable from p.
   344  func (p *GetResponseDetails) FreeMembers(recursive bool) {
   345  	js.Free(
   346  		p.ResponseJson.Ref(),
   347  	)
   348  	p.ResponseJson = p.ResponseJson.FromRef(js.Undefined)
   349  	if recursive {
   350  		p.Error.FreeMembers(true)
   351  	}
   352  }
   353  
   354  type IsUvpaaRequest struct {
   355  	// RequestId is "IsUvpaaRequest.requestId"
   356  	//
   357  	// Optional
   358  	//
   359  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   360  	RequestId int32
   361  
   362  	FFI_USE_RequestId bool // for RequestId.
   363  
   364  	FFI_USE bool
   365  }
   366  
   367  // FromRef calls UpdateFrom and returns a IsUvpaaRequest with all fields set.
   368  func (p IsUvpaaRequest) FromRef(ref js.Ref) IsUvpaaRequest {
   369  	p.UpdateFrom(ref)
   370  	return p
   371  }
   372  
   373  // New creates a new IsUvpaaRequest in the application heap.
   374  func (p IsUvpaaRequest) New() js.Ref {
   375  	return bindings.IsUvpaaRequestJSLoad(
   376  		js.Pointer(&p), js.True, 0,
   377  	)
   378  }
   379  
   380  // UpdateFrom copies value of all fields of the heap object to p.
   381  func (p *IsUvpaaRequest) UpdateFrom(ref js.Ref) {
   382  	bindings.IsUvpaaRequestJSStore(
   383  		js.Pointer(p), ref,
   384  	)
   385  }
   386  
   387  // Update writes all fields of the p to the heap object referenced by ref.
   388  func (p *IsUvpaaRequest) Update(ref js.Ref) {
   389  	bindings.IsUvpaaRequestJSLoad(
   390  		js.Pointer(p), js.False, ref,
   391  	)
   392  }
   393  
   394  // FreeMembers frees fields with heap reference, if recursive is true
   395  // free all heap references reachable from p.
   396  func (p *IsUvpaaRequest) FreeMembers(recursive bool) {
   397  }
   398  
   399  type IsUvpaaResponseDetails struct {
   400  	// RequestId is "IsUvpaaResponseDetails.requestId"
   401  	//
   402  	// Optional
   403  	//
   404  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   405  	RequestId int32
   406  	// IsUvpaa is "IsUvpaaResponseDetails.isUvpaa"
   407  	//
   408  	// Optional
   409  	//
   410  	// NOTE: FFI_USE_IsUvpaa MUST be set to true to make this field effective.
   411  	IsUvpaa bool
   412  
   413  	FFI_USE_RequestId bool // for RequestId.
   414  	FFI_USE_IsUvpaa   bool // for IsUvpaa.
   415  
   416  	FFI_USE bool
   417  }
   418  
   419  // FromRef calls UpdateFrom and returns a IsUvpaaResponseDetails with all fields set.
   420  func (p IsUvpaaResponseDetails) FromRef(ref js.Ref) IsUvpaaResponseDetails {
   421  	p.UpdateFrom(ref)
   422  	return p
   423  }
   424  
   425  // New creates a new IsUvpaaResponseDetails in the application heap.
   426  func (p IsUvpaaResponseDetails) New() js.Ref {
   427  	return bindings.IsUvpaaResponseDetailsJSLoad(
   428  		js.Pointer(&p), js.True, 0,
   429  	)
   430  }
   431  
   432  // UpdateFrom copies value of all fields of the heap object to p.
   433  func (p *IsUvpaaResponseDetails) UpdateFrom(ref js.Ref) {
   434  	bindings.IsUvpaaResponseDetailsJSStore(
   435  		js.Pointer(p), ref,
   436  	)
   437  }
   438  
   439  // Update writes all fields of the p to the heap object referenced by ref.
   440  func (p *IsUvpaaResponseDetails) Update(ref js.Ref) {
   441  	bindings.IsUvpaaResponseDetailsJSLoad(
   442  		js.Pointer(p), js.False, ref,
   443  	)
   444  }
   445  
   446  // FreeMembers frees fields with heap reference, if recursive is true
   447  // free all heap references reachable from p.
   448  func (p *IsUvpaaResponseDetails) FreeMembers(recursive bool) {
   449  }
   450  
   451  type VoidCallbackFunc func(this js.Ref) js.Ref
   452  
   453  func (fn VoidCallbackFunc) Register() js.Func[func()] {
   454  	return js.RegisterCallback[func()](
   455  		fn, abi.FuncPCABIInternal(fn),
   456  	)
   457  }
   458  
   459  func (fn VoidCallbackFunc) DispatchCallback(
   460  	targetPC uintptr, ctx *js.CallbackContext,
   461  ) {
   462  	args := ctx.Args()
   463  	if len(args) != 0+1 /* js this */ ||
   464  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   465  		js.ThrowInvalidCallbackInvocation()
   466  	}
   467  
   468  	if ctx.Return(fn(
   469  		args[0],
   470  	)) {
   471  		return
   472  	}
   473  
   474  	js.ThrowCallbackValueNotReturned()
   475  }
   476  
   477  type VoidCallback[T any] struct {
   478  	Fn  func(arg T, this js.Ref) js.Ref
   479  	Arg T
   480  }
   481  
   482  func (cb *VoidCallback[T]) Register() js.Func[func()] {
   483  	return js.RegisterCallback[func()](
   484  		cb, abi.FuncPCABIInternal(cb.Fn),
   485  	)
   486  }
   487  
   488  func (cb *VoidCallback[T]) DispatchCallback(
   489  	targetPC uintptr, ctx *js.CallbackContext,
   490  ) {
   491  	args := ctx.Args()
   492  	if len(args) != 0+1 /* js this */ ||
   493  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   494  		js.ThrowInvalidCallbackInvocation()
   495  	}
   496  
   497  	if ctx.Return(cb.Fn(
   498  		cb.Arg,
   499  		args[0],
   500  	)) {
   501  		return
   502  	}
   503  
   504  	js.ThrowCallbackValueNotReturned()
   505  }
   506  
   507  // HasFuncAttach returns true if the function "WEBEXT.webAuthenticationProxy.attach" exists.
   508  func HasFuncAttach() bool {
   509  	return js.True == bindings.HasFuncAttach()
   510  }
   511  
   512  // FuncAttach returns the function "WEBEXT.webAuthenticationProxy.attach".
   513  func FuncAttach() (fn js.Func[func() js.Promise[js.String]]) {
   514  	bindings.FuncAttach(
   515  		js.Pointer(&fn),
   516  	)
   517  	return
   518  }
   519  
   520  // Attach calls the function "WEBEXT.webAuthenticationProxy.attach" directly.
   521  func Attach() (ret js.Promise[js.String]) {
   522  	bindings.CallAttach(
   523  		js.Pointer(&ret),
   524  	)
   525  
   526  	return
   527  }
   528  
   529  // TryAttach calls the function "WEBEXT.webAuthenticationProxy.attach"
   530  // in a try/catch block and returns (_, err, ok = false) when it went through
   531  // the catch clause.
   532  func TryAttach() (ret js.Promise[js.String], exception js.Any, ok bool) {
   533  	ok = js.True == bindings.TryAttach(
   534  		js.Pointer(&ret), js.Pointer(&exception),
   535  	)
   536  
   537  	return
   538  }
   539  
   540  // HasFuncCompleteCreateRequest returns true if the function "WEBEXT.webAuthenticationProxy.completeCreateRequest" exists.
   541  func HasFuncCompleteCreateRequest() bool {
   542  	return js.True == bindings.HasFuncCompleteCreateRequest()
   543  }
   544  
   545  // FuncCompleteCreateRequest returns the function "WEBEXT.webAuthenticationProxy.completeCreateRequest".
   546  func FuncCompleteCreateRequest() (fn js.Func[func(details CreateResponseDetails) js.Promise[js.Void]]) {
   547  	bindings.FuncCompleteCreateRequest(
   548  		js.Pointer(&fn),
   549  	)
   550  	return
   551  }
   552  
   553  // CompleteCreateRequest calls the function "WEBEXT.webAuthenticationProxy.completeCreateRequest" directly.
   554  func CompleteCreateRequest(details CreateResponseDetails) (ret js.Promise[js.Void]) {
   555  	bindings.CallCompleteCreateRequest(
   556  		js.Pointer(&ret),
   557  		js.Pointer(&details),
   558  	)
   559  
   560  	return
   561  }
   562  
   563  // TryCompleteCreateRequest calls the function "WEBEXT.webAuthenticationProxy.completeCreateRequest"
   564  // in a try/catch block and returns (_, err, ok = false) when it went through
   565  // the catch clause.
   566  func TryCompleteCreateRequest(details CreateResponseDetails) (ret js.Promise[js.Void], exception js.Any, ok bool) {
   567  	ok = js.True == bindings.TryCompleteCreateRequest(
   568  		js.Pointer(&ret), js.Pointer(&exception),
   569  		js.Pointer(&details),
   570  	)
   571  
   572  	return
   573  }
   574  
   575  // HasFuncCompleteGetRequest returns true if the function "WEBEXT.webAuthenticationProxy.completeGetRequest" exists.
   576  func HasFuncCompleteGetRequest() bool {
   577  	return js.True == bindings.HasFuncCompleteGetRequest()
   578  }
   579  
   580  // FuncCompleteGetRequest returns the function "WEBEXT.webAuthenticationProxy.completeGetRequest".
   581  func FuncCompleteGetRequest() (fn js.Func[func(details GetResponseDetails) js.Promise[js.Void]]) {
   582  	bindings.FuncCompleteGetRequest(
   583  		js.Pointer(&fn),
   584  	)
   585  	return
   586  }
   587  
   588  // CompleteGetRequest calls the function "WEBEXT.webAuthenticationProxy.completeGetRequest" directly.
   589  func CompleteGetRequest(details GetResponseDetails) (ret js.Promise[js.Void]) {
   590  	bindings.CallCompleteGetRequest(
   591  		js.Pointer(&ret),
   592  		js.Pointer(&details),
   593  	)
   594  
   595  	return
   596  }
   597  
   598  // TryCompleteGetRequest calls the function "WEBEXT.webAuthenticationProxy.completeGetRequest"
   599  // in a try/catch block and returns (_, err, ok = false) when it went through
   600  // the catch clause.
   601  func TryCompleteGetRequest(details GetResponseDetails) (ret js.Promise[js.Void], exception js.Any, ok bool) {
   602  	ok = js.True == bindings.TryCompleteGetRequest(
   603  		js.Pointer(&ret), js.Pointer(&exception),
   604  		js.Pointer(&details),
   605  	)
   606  
   607  	return
   608  }
   609  
   610  // HasFuncCompleteIsUvpaaRequest returns true if the function "WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest" exists.
   611  func HasFuncCompleteIsUvpaaRequest() bool {
   612  	return js.True == bindings.HasFuncCompleteIsUvpaaRequest()
   613  }
   614  
   615  // FuncCompleteIsUvpaaRequest returns the function "WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest".
   616  func FuncCompleteIsUvpaaRequest() (fn js.Func[func(details IsUvpaaResponseDetails) js.Promise[js.Void]]) {
   617  	bindings.FuncCompleteIsUvpaaRequest(
   618  		js.Pointer(&fn),
   619  	)
   620  	return
   621  }
   622  
   623  // CompleteIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest" directly.
   624  func CompleteIsUvpaaRequest(details IsUvpaaResponseDetails) (ret js.Promise[js.Void]) {
   625  	bindings.CallCompleteIsUvpaaRequest(
   626  		js.Pointer(&ret),
   627  		js.Pointer(&details),
   628  	)
   629  
   630  	return
   631  }
   632  
   633  // TryCompleteIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest"
   634  // in a try/catch block and returns (_, err, ok = false) when it went through
   635  // the catch clause.
   636  func TryCompleteIsUvpaaRequest(details IsUvpaaResponseDetails) (ret js.Promise[js.Void], exception js.Any, ok bool) {
   637  	ok = js.True == bindings.TryCompleteIsUvpaaRequest(
   638  		js.Pointer(&ret), js.Pointer(&exception),
   639  		js.Pointer(&details),
   640  	)
   641  
   642  	return
   643  }
   644  
   645  // HasFuncDetach returns true if the function "WEBEXT.webAuthenticationProxy.detach" exists.
   646  func HasFuncDetach() bool {
   647  	return js.True == bindings.HasFuncDetach()
   648  }
   649  
   650  // FuncDetach returns the function "WEBEXT.webAuthenticationProxy.detach".
   651  func FuncDetach() (fn js.Func[func() js.Promise[js.String]]) {
   652  	bindings.FuncDetach(
   653  		js.Pointer(&fn),
   654  	)
   655  	return
   656  }
   657  
   658  // Detach calls the function "WEBEXT.webAuthenticationProxy.detach" directly.
   659  func Detach() (ret js.Promise[js.String]) {
   660  	bindings.CallDetach(
   661  		js.Pointer(&ret),
   662  	)
   663  
   664  	return
   665  }
   666  
   667  // TryDetach calls the function "WEBEXT.webAuthenticationProxy.detach"
   668  // in a try/catch block and returns (_, err, ok = false) when it went through
   669  // the catch clause.
   670  func TryDetach() (ret js.Promise[js.String], exception js.Any, ok bool) {
   671  	ok = js.True == bindings.TryDetach(
   672  		js.Pointer(&ret), js.Pointer(&exception),
   673  	)
   674  
   675  	return
   676  }
   677  
   678  type OnCreateRequestEventCallbackFunc func(this js.Ref, requestInfo *CreateRequest) js.Ref
   679  
   680  func (fn OnCreateRequestEventCallbackFunc) Register() js.Func[func(requestInfo *CreateRequest)] {
   681  	return js.RegisterCallback[func(requestInfo *CreateRequest)](
   682  		fn, abi.FuncPCABIInternal(fn),
   683  	)
   684  }
   685  
   686  func (fn OnCreateRequestEventCallbackFunc) DispatchCallback(
   687  	targetPC uintptr, ctx *js.CallbackContext,
   688  ) {
   689  	args := ctx.Args()
   690  	if len(args) != 1+1 /* js this */ ||
   691  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   692  		js.ThrowInvalidCallbackInvocation()
   693  	}
   694  	var arg0 CreateRequest
   695  	arg0.UpdateFrom(args[0+1])
   696  	defer arg0.FreeMembers(true)
   697  
   698  	if ctx.Return(fn(
   699  		args[0],
   700  
   701  		mark.NoEscape(&arg0),
   702  	)) {
   703  		return
   704  	}
   705  
   706  	js.ThrowCallbackValueNotReturned()
   707  }
   708  
   709  type OnCreateRequestEventCallback[T any] struct {
   710  	Fn  func(arg T, this js.Ref, requestInfo *CreateRequest) js.Ref
   711  	Arg T
   712  }
   713  
   714  func (cb *OnCreateRequestEventCallback[T]) Register() js.Func[func(requestInfo *CreateRequest)] {
   715  	return js.RegisterCallback[func(requestInfo *CreateRequest)](
   716  		cb, abi.FuncPCABIInternal(cb.Fn),
   717  	)
   718  }
   719  
   720  func (cb *OnCreateRequestEventCallback[T]) DispatchCallback(
   721  	targetPC uintptr, ctx *js.CallbackContext,
   722  ) {
   723  	args := ctx.Args()
   724  	if len(args) != 1+1 /* js this */ ||
   725  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   726  		js.ThrowInvalidCallbackInvocation()
   727  	}
   728  	var arg0 CreateRequest
   729  	arg0.UpdateFrom(args[0+1])
   730  	defer arg0.FreeMembers(true)
   731  
   732  	if ctx.Return(cb.Fn(
   733  		cb.Arg,
   734  		args[0],
   735  
   736  		mark.NoEscape(&arg0),
   737  	)) {
   738  		return
   739  	}
   740  
   741  	js.ThrowCallbackValueNotReturned()
   742  }
   743  
   744  // HasFuncOnCreateRequest returns true if the function "WEBEXT.webAuthenticationProxy.onCreateRequest.addListener" exists.
   745  func HasFuncOnCreateRequest() bool {
   746  	return js.True == bindings.HasFuncOnCreateRequest()
   747  }
   748  
   749  // FuncOnCreateRequest returns the function "WEBEXT.webAuthenticationProxy.onCreateRequest.addListener".
   750  func FuncOnCreateRequest() (fn js.Func[func(callback js.Func[func(requestInfo *CreateRequest)])]) {
   751  	bindings.FuncOnCreateRequest(
   752  		js.Pointer(&fn),
   753  	)
   754  	return
   755  }
   756  
   757  // OnCreateRequest calls the function "WEBEXT.webAuthenticationProxy.onCreateRequest.addListener" directly.
   758  func OnCreateRequest(callback js.Func[func(requestInfo *CreateRequest)]) (ret js.Void) {
   759  	bindings.CallOnCreateRequest(
   760  		js.Pointer(&ret),
   761  		callback.Ref(),
   762  	)
   763  
   764  	return
   765  }
   766  
   767  // TryOnCreateRequest calls the function "WEBEXT.webAuthenticationProxy.onCreateRequest.addListener"
   768  // in a try/catch block and returns (_, err, ok = false) when it went through
   769  // the catch clause.
   770  func TryOnCreateRequest(callback js.Func[func(requestInfo *CreateRequest)]) (ret js.Void, exception js.Any, ok bool) {
   771  	ok = js.True == bindings.TryOnCreateRequest(
   772  		js.Pointer(&ret), js.Pointer(&exception),
   773  		callback.Ref(),
   774  	)
   775  
   776  	return
   777  }
   778  
   779  // HasFuncOffCreateRequest returns true if the function "WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener" exists.
   780  func HasFuncOffCreateRequest() bool {
   781  	return js.True == bindings.HasFuncOffCreateRequest()
   782  }
   783  
   784  // FuncOffCreateRequest returns the function "WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener".
   785  func FuncOffCreateRequest() (fn js.Func[func(callback js.Func[func(requestInfo *CreateRequest)])]) {
   786  	bindings.FuncOffCreateRequest(
   787  		js.Pointer(&fn),
   788  	)
   789  	return
   790  }
   791  
   792  // OffCreateRequest calls the function "WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener" directly.
   793  func OffCreateRequest(callback js.Func[func(requestInfo *CreateRequest)]) (ret js.Void) {
   794  	bindings.CallOffCreateRequest(
   795  		js.Pointer(&ret),
   796  		callback.Ref(),
   797  	)
   798  
   799  	return
   800  }
   801  
   802  // TryOffCreateRequest calls the function "WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener"
   803  // in a try/catch block and returns (_, err, ok = false) when it went through
   804  // the catch clause.
   805  func TryOffCreateRequest(callback js.Func[func(requestInfo *CreateRequest)]) (ret js.Void, exception js.Any, ok bool) {
   806  	ok = js.True == bindings.TryOffCreateRequest(
   807  		js.Pointer(&ret), js.Pointer(&exception),
   808  		callback.Ref(),
   809  	)
   810  
   811  	return
   812  }
   813  
   814  // HasFuncHasOnCreateRequest returns true if the function "WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener" exists.
   815  func HasFuncHasOnCreateRequest() bool {
   816  	return js.True == bindings.HasFuncHasOnCreateRequest()
   817  }
   818  
   819  // FuncHasOnCreateRequest returns the function "WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener".
   820  func FuncHasOnCreateRequest() (fn js.Func[func(callback js.Func[func(requestInfo *CreateRequest)]) bool]) {
   821  	bindings.FuncHasOnCreateRequest(
   822  		js.Pointer(&fn),
   823  	)
   824  	return
   825  }
   826  
   827  // HasOnCreateRequest calls the function "WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener" directly.
   828  func HasOnCreateRequest(callback js.Func[func(requestInfo *CreateRequest)]) (ret bool) {
   829  	bindings.CallHasOnCreateRequest(
   830  		js.Pointer(&ret),
   831  		callback.Ref(),
   832  	)
   833  
   834  	return
   835  }
   836  
   837  // TryHasOnCreateRequest calls the function "WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener"
   838  // in a try/catch block and returns (_, err, ok = false) when it went through
   839  // the catch clause.
   840  func TryHasOnCreateRequest(callback js.Func[func(requestInfo *CreateRequest)]) (ret bool, exception js.Any, ok bool) {
   841  	ok = js.True == bindings.TryHasOnCreateRequest(
   842  		js.Pointer(&ret), js.Pointer(&exception),
   843  		callback.Ref(),
   844  	)
   845  
   846  	return
   847  }
   848  
   849  type OnGetRequestEventCallbackFunc func(this js.Ref, requestInfo *GetRequest) js.Ref
   850  
   851  func (fn OnGetRequestEventCallbackFunc) Register() js.Func[func(requestInfo *GetRequest)] {
   852  	return js.RegisterCallback[func(requestInfo *GetRequest)](
   853  		fn, abi.FuncPCABIInternal(fn),
   854  	)
   855  }
   856  
   857  func (fn OnGetRequestEventCallbackFunc) DispatchCallback(
   858  	targetPC uintptr, ctx *js.CallbackContext,
   859  ) {
   860  	args := ctx.Args()
   861  	if len(args) != 1+1 /* js this */ ||
   862  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   863  		js.ThrowInvalidCallbackInvocation()
   864  	}
   865  	var arg0 GetRequest
   866  	arg0.UpdateFrom(args[0+1])
   867  	defer arg0.FreeMembers(true)
   868  
   869  	if ctx.Return(fn(
   870  		args[0],
   871  
   872  		mark.NoEscape(&arg0),
   873  	)) {
   874  		return
   875  	}
   876  
   877  	js.ThrowCallbackValueNotReturned()
   878  }
   879  
   880  type OnGetRequestEventCallback[T any] struct {
   881  	Fn  func(arg T, this js.Ref, requestInfo *GetRequest) js.Ref
   882  	Arg T
   883  }
   884  
   885  func (cb *OnGetRequestEventCallback[T]) Register() js.Func[func(requestInfo *GetRequest)] {
   886  	return js.RegisterCallback[func(requestInfo *GetRequest)](
   887  		cb, abi.FuncPCABIInternal(cb.Fn),
   888  	)
   889  }
   890  
   891  func (cb *OnGetRequestEventCallback[T]) DispatchCallback(
   892  	targetPC uintptr, ctx *js.CallbackContext,
   893  ) {
   894  	args := ctx.Args()
   895  	if len(args) != 1+1 /* js this */ ||
   896  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   897  		js.ThrowInvalidCallbackInvocation()
   898  	}
   899  	var arg0 GetRequest
   900  	arg0.UpdateFrom(args[0+1])
   901  	defer arg0.FreeMembers(true)
   902  
   903  	if ctx.Return(cb.Fn(
   904  		cb.Arg,
   905  		args[0],
   906  
   907  		mark.NoEscape(&arg0),
   908  	)) {
   909  		return
   910  	}
   911  
   912  	js.ThrowCallbackValueNotReturned()
   913  }
   914  
   915  // HasFuncOnGetRequest returns true if the function "WEBEXT.webAuthenticationProxy.onGetRequest.addListener" exists.
   916  func HasFuncOnGetRequest() bool {
   917  	return js.True == bindings.HasFuncOnGetRequest()
   918  }
   919  
   920  // FuncOnGetRequest returns the function "WEBEXT.webAuthenticationProxy.onGetRequest.addListener".
   921  func FuncOnGetRequest() (fn js.Func[func(callback js.Func[func(requestInfo *GetRequest)])]) {
   922  	bindings.FuncOnGetRequest(
   923  		js.Pointer(&fn),
   924  	)
   925  	return
   926  }
   927  
   928  // OnGetRequest calls the function "WEBEXT.webAuthenticationProxy.onGetRequest.addListener" directly.
   929  func OnGetRequest(callback js.Func[func(requestInfo *GetRequest)]) (ret js.Void) {
   930  	bindings.CallOnGetRequest(
   931  		js.Pointer(&ret),
   932  		callback.Ref(),
   933  	)
   934  
   935  	return
   936  }
   937  
   938  // TryOnGetRequest calls the function "WEBEXT.webAuthenticationProxy.onGetRequest.addListener"
   939  // in a try/catch block and returns (_, err, ok = false) when it went through
   940  // the catch clause.
   941  func TryOnGetRequest(callback js.Func[func(requestInfo *GetRequest)]) (ret js.Void, exception js.Any, ok bool) {
   942  	ok = js.True == bindings.TryOnGetRequest(
   943  		js.Pointer(&ret), js.Pointer(&exception),
   944  		callback.Ref(),
   945  	)
   946  
   947  	return
   948  }
   949  
   950  // HasFuncOffGetRequest returns true if the function "WEBEXT.webAuthenticationProxy.onGetRequest.removeListener" exists.
   951  func HasFuncOffGetRequest() bool {
   952  	return js.True == bindings.HasFuncOffGetRequest()
   953  }
   954  
   955  // FuncOffGetRequest returns the function "WEBEXT.webAuthenticationProxy.onGetRequest.removeListener".
   956  func FuncOffGetRequest() (fn js.Func[func(callback js.Func[func(requestInfo *GetRequest)])]) {
   957  	bindings.FuncOffGetRequest(
   958  		js.Pointer(&fn),
   959  	)
   960  	return
   961  }
   962  
   963  // OffGetRequest calls the function "WEBEXT.webAuthenticationProxy.onGetRequest.removeListener" directly.
   964  func OffGetRequest(callback js.Func[func(requestInfo *GetRequest)]) (ret js.Void) {
   965  	bindings.CallOffGetRequest(
   966  		js.Pointer(&ret),
   967  		callback.Ref(),
   968  	)
   969  
   970  	return
   971  }
   972  
   973  // TryOffGetRequest calls the function "WEBEXT.webAuthenticationProxy.onGetRequest.removeListener"
   974  // in a try/catch block and returns (_, err, ok = false) when it went through
   975  // the catch clause.
   976  func TryOffGetRequest(callback js.Func[func(requestInfo *GetRequest)]) (ret js.Void, exception js.Any, ok bool) {
   977  	ok = js.True == bindings.TryOffGetRequest(
   978  		js.Pointer(&ret), js.Pointer(&exception),
   979  		callback.Ref(),
   980  	)
   981  
   982  	return
   983  }
   984  
   985  // HasFuncHasOnGetRequest returns true if the function "WEBEXT.webAuthenticationProxy.onGetRequest.hasListener" exists.
   986  func HasFuncHasOnGetRequest() bool {
   987  	return js.True == bindings.HasFuncHasOnGetRequest()
   988  }
   989  
   990  // FuncHasOnGetRequest returns the function "WEBEXT.webAuthenticationProxy.onGetRequest.hasListener".
   991  func FuncHasOnGetRequest() (fn js.Func[func(callback js.Func[func(requestInfo *GetRequest)]) bool]) {
   992  	bindings.FuncHasOnGetRequest(
   993  		js.Pointer(&fn),
   994  	)
   995  	return
   996  }
   997  
   998  // HasOnGetRequest calls the function "WEBEXT.webAuthenticationProxy.onGetRequest.hasListener" directly.
   999  func HasOnGetRequest(callback js.Func[func(requestInfo *GetRequest)]) (ret bool) {
  1000  	bindings.CallHasOnGetRequest(
  1001  		js.Pointer(&ret),
  1002  		callback.Ref(),
  1003  	)
  1004  
  1005  	return
  1006  }
  1007  
  1008  // TryHasOnGetRequest calls the function "WEBEXT.webAuthenticationProxy.onGetRequest.hasListener"
  1009  // in a try/catch block and returns (_, err, ok = false) when it went through
  1010  // the catch clause.
  1011  func TryHasOnGetRequest(callback js.Func[func(requestInfo *GetRequest)]) (ret bool, exception js.Any, ok bool) {
  1012  	ok = js.True == bindings.TryHasOnGetRequest(
  1013  		js.Pointer(&ret), js.Pointer(&exception),
  1014  		callback.Ref(),
  1015  	)
  1016  
  1017  	return
  1018  }
  1019  
  1020  type OnIsUvpaaRequestEventCallbackFunc func(this js.Ref, requestInfo *IsUvpaaRequest) js.Ref
  1021  
  1022  func (fn OnIsUvpaaRequestEventCallbackFunc) Register() js.Func[func(requestInfo *IsUvpaaRequest)] {
  1023  	return js.RegisterCallback[func(requestInfo *IsUvpaaRequest)](
  1024  		fn, abi.FuncPCABIInternal(fn),
  1025  	)
  1026  }
  1027  
  1028  func (fn OnIsUvpaaRequestEventCallbackFunc) DispatchCallback(
  1029  	targetPC uintptr, ctx *js.CallbackContext,
  1030  ) {
  1031  	args := ctx.Args()
  1032  	if len(args) != 1+1 /* js this */ ||
  1033  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1034  		js.ThrowInvalidCallbackInvocation()
  1035  	}
  1036  	var arg0 IsUvpaaRequest
  1037  	arg0.UpdateFrom(args[0+1])
  1038  	defer arg0.FreeMembers(true)
  1039  
  1040  	if ctx.Return(fn(
  1041  		args[0],
  1042  
  1043  		mark.NoEscape(&arg0),
  1044  	)) {
  1045  		return
  1046  	}
  1047  
  1048  	js.ThrowCallbackValueNotReturned()
  1049  }
  1050  
  1051  type OnIsUvpaaRequestEventCallback[T any] struct {
  1052  	Fn  func(arg T, this js.Ref, requestInfo *IsUvpaaRequest) js.Ref
  1053  	Arg T
  1054  }
  1055  
  1056  func (cb *OnIsUvpaaRequestEventCallback[T]) Register() js.Func[func(requestInfo *IsUvpaaRequest)] {
  1057  	return js.RegisterCallback[func(requestInfo *IsUvpaaRequest)](
  1058  		cb, abi.FuncPCABIInternal(cb.Fn),
  1059  	)
  1060  }
  1061  
  1062  func (cb *OnIsUvpaaRequestEventCallback[T]) DispatchCallback(
  1063  	targetPC uintptr, ctx *js.CallbackContext,
  1064  ) {
  1065  	args := ctx.Args()
  1066  	if len(args) != 1+1 /* js this */ ||
  1067  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1068  		js.ThrowInvalidCallbackInvocation()
  1069  	}
  1070  	var arg0 IsUvpaaRequest
  1071  	arg0.UpdateFrom(args[0+1])
  1072  	defer arg0.FreeMembers(true)
  1073  
  1074  	if ctx.Return(cb.Fn(
  1075  		cb.Arg,
  1076  		args[0],
  1077  
  1078  		mark.NoEscape(&arg0),
  1079  	)) {
  1080  		return
  1081  	}
  1082  
  1083  	js.ThrowCallbackValueNotReturned()
  1084  }
  1085  
  1086  // HasFuncOnIsUvpaaRequest returns true if the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener" exists.
  1087  func HasFuncOnIsUvpaaRequest() bool {
  1088  	return js.True == bindings.HasFuncOnIsUvpaaRequest()
  1089  }
  1090  
  1091  // FuncOnIsUvpaaRequest returns the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener".
  1092  func FuncOnIsUvpaaRequest() (fn js.Func[func(callback js.Func[func(requestInfo *IsUvpaaRequest)])]) {
  1093  	bindings.FuncOnIsUvpaaRequest(
  1094  		js.Pointer(&fn),
  1095  	)
  1096  	return
  1097  }
  1098  
  1099  // OnIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener" directly.
  1100  func OnIsUvpaaRequest(callback js.Func[func(requestInfo *IsUvpaaRequest)]) (ret js.Void) {
  1101  	bindings.CallOnIsUvpaaRequest(
  1102  		js.Pointer(&ret),
  1103  		callback.Ref(),
  1104  	)
  1105  
  1106  	return
  1107  }
  1108  
  1109  // TryOnIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener"
  1110  // in a try/catch block and returns (_, err, ok = false) when it went through
  1111  // the catch clause.
  1112  func TryOnIsUvpaaRequest(callback js.Func[func(requestInfo *IsUvpaaRequest)]) (ret js.Void, exception js.Any, ok bool) {
  1113  	ok = js.True == bindings.TryOnIsUvpaaRequest(
  1114  		js.Pointer(&ret), js.Pointer(&exception),
  1115  		callback.Ref(),
  1116  	)
  1117  
  1118  	return
  1119  }
  1120  
  1121  // HasFuncOffIsUvpaaRequest returns true if the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener" exists.
  1122  func HasFuncOffIsUvpaaRequest() bool {
  1123  	return js.True == bindings.HasFuncOffIsUvpaaRequest()
  1124  }
  1125  
  1126  // FuncOffIsUvpaaRequest returns the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener".
  1127  func FuncOffIsUvpaaRequest() (fn js.Func[func(callback js.Func[func(requestInfo *IsUvpaaRequest)])]) {
  1128  	bindings.FuncOffIsUvpaaRequest(
  1129  		js.Pointer(&fn),
  1130  	)
  1131  	return
  1132  }
  1133  
  1134  // OffIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener" directly.
  1135  func OffIsUvpaaRequest(callback js.Func[func(requestInfo *IsUvpaaRequest)]) (ret js.Void) {
  1136  	bindings.CallOffIsUvpaaRequest(
  1137  		js.Pointer(&ret),
  1138  		callback.Ref(),
  1139  	)
  1140  
  1141  	return
  1142  }
  1143  
  1144  // TryOffIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener"
  1145  // in a try/catch block and returns (_, err, ok = false) when it went through
  1146  // the catch clause.
  1147  func TryOffIsUvpaaRequest(callback js.Func[func(requestInfo *IsUvpaaRequest)]) (ret js.Void, exception js.Any, ok bool) {
  1148  	ok = js.True == bindings.TryOffIsUvpaaRequest(
  1149  		js.Pointer(&ret), js.Pointer(&exception),
  1150  		callback.Ref(),
  1151  	)
  1152  
  1153  	return
  1154  }
  1155  
  1156  // HasFuncHasOnIsUvpaaRequest returns true if the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener" exists.
  1157  func HasFuncHasOnIsUvpaaRequest() bool {
  1158  	return js.True == bindings.HasFuncHasOnIsUvpaaRequest()
  1159  }
  1160  
  1161  // FuncHasOnIsUvpaaRequest returns the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener".
  1162  func FuncHasOnIsUvpaaRequest() (fn js.Func[func(callback js.Func[func(requestInfo *IsUvpaaRequest)]) bool]) {
  1163  	bindings.FuncHasOnIsUvpaaRequest(
  1164  		js.Pointer(&fn),
  1165  	)
  1166  	return
  1167  }
  1168  
  1169  // HasOnIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener" directly.
  1170  func HasOnIsUvpaaRequest(callback js.Func[func(requestInfo *IsUvpaaRequest)]) (ret bool) {
  1171  	bindings.CallHasOnIsUvpaaRequest(
  1172  		js.Pointer(&ret),
  1173  		callback.Ref(),
  1174  	)
  1175  
  1176  	return
  1177  }
  1178  
  1179  // TryHasOnIsUvpaaRequest calls the function "WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener"
  1180  // in a try/catch block and returns (_, err, ok = false) when it went through
  1181  // the catch clause.
  1182  func TryHasOnIsUvpaaRequest(callback js.Func[func(requestInfo *IsUvpaaRequest)]) (ret bool, exception js.Any, ok bool) {
  1183  	ok = js.True == bindings.TryHasOnIsUvpaaRequest(
  1184  		js.Pointer(&ret), js.Pointer(&exception),
  1185  		callback.Ref(),
  1186  	)
  1187  
  1188  	return
  1189  }
  1190  
  1191  type OnRemoteSessionStateChangeEventCallbackFunc func(this js.Ref) js.Ref
  1192  
  1193  func (fn OnRemoteSessionStateChangeEventCallbackFunc) Register() js.Func[func()] {
  1194  	return js.RegisterCallback[func()](
  1195  		fn, abi.FuncPCABIInternal(fn),
  1196  	)
  1197  }
  1198  
  1199  func (fn OnRemoteSessionStateChangeEventCallbackFunc) DispatchCallback(
  1200  	targetPC uintptr, ctx *js.CallbackContext,
  1201  ) {
  1202  	args := ctx.Args()
  1203  	if len(args) != 0+1 /* js this */ ||
  1204  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1205  		js.ThrowInvalidCallbackInvocation()
  1206  	}
  1207  
  1208  	if ctx.Return(fn(
  1209  		args[0],
  1210  	)) {
  1211  		return
  1212  	}
  1213  
  1214  	js.ThrowCallbackValueNotReturned()
  1215  }
  1216  
  1217  type OnRemoteSessionStateChangeEventCallback[T any] struct {
  1218  	Fn  func(arg T, this js.Ref) js.Ref
  1219  	Arg T
  1220  }
  1221  
  1222  func (cb *OnRemoteSessionStateChangeEventCallback[T]) Register() js.Func[func()] {
  1223  	return js.RegisterCallback[func()](
  1224  		cb, abi.FuncPCABIInternal(cb.Fn),
  1225  	)
  1226  }
  1227  
  1228  func (cb *OnRemoteSessionStateChangeEventCallback[T]) DispatchCallback(
  1229  	targetPC uintptr, ctx *js.CallbackContext,
  1230  ) {
  1231  	args := ctx.Args()
  1232  	if len(args) != 0+1 /* js this */ ||
  1233  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1234  		js.ThrowInvalidCallbackInvocation()
  1235  	}
  1236  
  1237  	if ctx.Return(cb.Fn(
  1238  		cb.Arg,
  1239  		args[0],
  1240  	)) {
  1241  		return
  1242  	}
  1243  
  1244  	js.ThrowCallbackValueNotReturned()
  1245  }
  1246  
  1247  // HasFuncOnRemoteSessionStateChange returns true if the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener" exists.
  1248  func HasFuncOnRemoteSessionStateChange() bool {
  1249  	return js.True == bindings.HasFuncOnRemoteSessionStateChange()
  1250  }
  1251  
  1252  // FuncOnRemoteSessionStateChange returns the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener".
  1253  func FuncOnRemoteSessionStateChange() (fn js.Func[func(callback js.Func[func()])]) {
  1254  	bindings.FuncOnRemoteSessionStateChange(
  1255  		js.Pointer(&fn),
  1256  	)
  1257  	return
  1258  }
  1259  
  1260  // OnRemoteSessionStateChange calls the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener" directly.
  1261  func OnRemoteSessionStateChange(callback js.Func[func()]) (ret js.Void) {
  1262  	bindings.CallOnRemoteSessionStateChange(
  1263  		js.Pointer(&ret),
  1264  		callback.Ref(),
  1265  	)
  1266  
  1267  	return
  1268  }
  1269  
  1270  // TryOnRemoteSessionStateChange calls the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener"
  1271  // in a try/catch block and returns (_, err, ok = false) when it went through
  1272  // the catch clause.
  1273  func TryOnRemoteSessionStateChange(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
  1274  	ok = js.True == bindings.TryOnRemoteSessionStateChange(
  1275  		js.Pointer(&ret), js.Pointer(&exception),
  1276  		callback.Ref(),
  1277  	)
  1278  
  1279  	return
  1280  }
  1281  
  1282  // HasFuncOffRemoteSessionStateChange returns true if the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener" exists.
  1283  func HasFuncOffRemoteSessionStateChange() bool {
  1284  	return js.True == bindings.HasFuncOffRemoteSessionStateChange()
  1285  }
  1286  
  1287  // FuncOffRemoteSessionStateChange returns the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener".
  1288  func FuncOffRemoteSessionStateChange() (fn js.Func[func(callback js.Func[func()])]) {
  1289  	bindings.FuncOffRemoteSessionStateChange(
  1290  		js.Pointer(&fn),
  1291  	)
  1292  	return
  1293  }
  1294  
  1295  // OffRemoteSessionStateChange calls the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener" directly.
  1296  func OffRemoteSessionStateChange(callback js.Func[func()]) (ret js.Void) {
  1297  	bindings.CallOffRemoteSessionStateChange(
  1298  		js.Pointer(&ret),
  1299  		callback.Ref(),
  1300  	)
  1301  
  1302  	return
  1303  }
  1304  
  1305  // TryOffRemoteSessionStateChange calls the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener"
  1306  // in a try/catch block and returns (_, err, ok = false) when it went through
  1307  // the catch clause.
  1308  func TryOffRemoteSessionStateChange(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
  1309  	ok = js.True == bindings.TryOffRemoteSessionStateChange(
  1310  		js.Pointer(&ret), js.Pointer(&exception),
  1311  		callback.Ref(),
  1312  	)
  1313  
  1314  	return
  1315  }
  1316  
  1317  // HasFuncHasOnRemoteSessionStateChange returns true if the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener" exists.
  1318  func HasFuncHasOnRemoteSessionStateChange() bool {
  1319  	return js.True == bindings.HasFuncHasOnRemoteSessionStateChange()
  1320  }
  1321  
  1322  // FuncHasOnRemoteSessionStateChange returns the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener".
  1323  func FuncHasOnRemoteSessionStateChange() (fn js.Func[func(callback js.Func[func()]) bool]) {
  1324  	bindings.FuncHasOnRemoteSessionStateChange(
  1325  		js.Pointer(&fn),
  1326  	)
  1327  	return
  1328  }
  1329  
  1330  // HasOnRemoteSessionStateChange calls the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener" directly.
  1331  func HasOnRemoteSessionStateChange(callback js.Func[func()]) (ret bool) {
  1332  	bindings.CallHasOnRemoteSessionStateChange(
  1333  		js.Pointer(&ret),
  1334  		callback.Ref(),
  1335  	)
  1336  
  1337  	return
  1338  }
  1339  
  1340  // TryHasOnRemoteSessionStateChange calls the function "WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener"
  1341  // in a try/catch block and returns (_, err, ok = false) when it went through
  1342  // the catch clause.
  1343  func TryHasOnRemoteSessionStateChange(callback js.Func[func()]) (ret bool, exception js.Any, ok bool) {
  1344  	ok = js.True == bindings.TryHasOnRemoteSessionStateChange(
  1345  		js.Pointer(&ret), js.Pointer(&exception),
  1346  		callback.Ref(),
  1347  	)
  1348  
  1349  	return
  1350  }
  1351  
  1352  type OnRequestCanceledEventCallbackFunc func(this js.Ref, requestId int32) js.Ref
  1353  
  1354  func (fn OnRequestCanceledEventCallbackFunc) Register() js.Func[func(requestId int32)] {
  1355  	return js.RegisterCallback[func(requestId int32)](
  1356  		fn, abi.FuncPCABIInternal(fn),
  1357  	)
  1358  }
  1359  
  1360  func (fn OnRequestCanceledEventCallbackFunc) DispatchCallback(
  1361  	targetPC uintptr, ctx *js.CallbackContext,
  1362  ) {
  1363  	args := ctx.Args()
  1364  	if len(args) != 1+1 /* js this */ ||
  1365  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1366  		js.ThrowInvalidCallbackInvocation()
  1367  	}
  1368  
  1369  	if ctx.Return(fn(
  1370  		args[0],
  1371  
  1372  		js.Number[int32]{}.FromRef(args[0+1]).Get(),
  1373  	)) {
  1374  		return
  1375  	}
  1376  
  1377  	js.ThrowCallbackValueNotReturned()
  1378  }
  1379  
  1380  type OnRequestCanceledEventCallback[T any] struct {
  1381  	Fn  func(arg T, this js.Ref, requestId int32) js.Ref
  1382  	Arg T
  1383  }
  1384  
  1385  func (cb *OnRequestCanceledEventCallback[T]) Register() js.Func[func(requestId int32)] {
  1386  	return js.RegisterCallback[func(requestId int32)](
  1387  		cb, abi.FuncPCABIInternal(cb.Fn),
  1388  	)
  1389  }
  1390  
  1391  func (cb *OnRequestCanceledEventCallback[T]) DispatchCallback(
  1392  	targetPC uintptr, ctx *js.CallbackContext,
  1393  ) {
  1394  	args := ctx.Args()
  1395  	if len(args) != 1+1 /* js this */ ||
  1396  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1397  		js.ThrowInvalidCallbackInvocation()
  1398  	}
  1399  
  1400  	if ctx.Return(cb.Fn(
  1401  		cb.Arg,
  1402  		args[0],
  1403  
  1404  		js.Number[int32]{}.FromRef(args[0+1]).Get(),
  1405  	)) {
  1406  		return
  1407  	}
  1408  
  1409  	js.ThrowCallbackValueNotReturned()
  1410  }
  1411  
  1412  // HasFuncOnRequestCanceled returns true if the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener" exists.
  1413  func HasFuncOnRequestCanceled() bool {
  1414  	return js.True == bindings.HasFuncOnRequestCanceled()
  1415  }
  1416  
  1417  // FuncOnRequestCanceled returns the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener".
  1418  func FuncOnRequestCanceled() (fn js.Func[func(callback js.Func[func(requestId int32)])]) {
  1419  	bindings.FuncOnRequestCanceled(
  1420  		js.Pointer(&fn),
  1421  	)
  1422  	return
  1423  }
  1424  
  1425  // OnRequestCanceled calls the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener" directly.
  1426  func OnRequestCanceled(callback js.Func[func(requestId int32)]) (ret js.Void) {
  1427  	bindings.CallOnRequestCanceled(
  1428  		js.Pointer(&ret),
  1429  		callback.Ref(),
  1430  	)
  1431  
  1432  	return
  1433  }
  1434  
  1435  // TryOnRequestCanceled calls the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener"
  1436  // in a try/catch block and returns (_, err, ok = false) when it went through
  1437  // the catch clause.
  1438  func TryOnRequestCanceled(callback js.Func[func(requestId int32)]) (ret js.Void, exception js.Any, ok bool) {
  1439  	ok = js.True == bindings.TryOnRequestCanceled(
  1440  		js.Pointer(&ret), js.Pointer(&exception),
  1441  		callback.Ref(),
  1442  	)
  1443  
  1444  	return
  1445  }
  1446  
  1447  // HasFuncOffRequestCanceled returns true if the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener" exists.
  1448  func HasFuncOffRequestCanceled() bool {
  1449  	return js.True == bindings.HasFuncOffRequestCanceled()
  1450  }
  1451  
  1452  // FuncOffRequestCanceled returns the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener".
  1453  func FuncOffRequestCanceled() (fn js.Func[func(callback js.Func[func(requestId int32)])]) {
  1454  	bindings.FuncOffRequestCanceled(
  1455  		js.Pointer(&fn),
  1456  	)
  1457  	return
  1458  }
  1459  
  1460  // OffRequestCanceled calls the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener" directly.
  1461  func OffRequestCanceled(callback js.Func[func(requestId int32)]) (ret js.Void) {
  1462  	bindings.CallOffRequestCanceled(
  1463  		js.Pointer(&ret),
  1464  		callback.Ref(),
  1465  	)
  1466  
  1467  	return
  1468  }
  1469  
  1470  // TryOffRequestCanceled calls the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener"
  1471  // in a try/catch block and returns (_, err, ok = false) when it went through
  1472  // the catch clause.
  1473  func TryOffRequestCanceled(callback js.Func[func(requestId int32)]) (ret js.Void, exception js.Any, ok bool) {
  1474  	ok = js.True == bindings.TryOffRequestCanceled(
  1475  		js.Pointer(&ret), js.Pointer(&exception),
  1476  		callback.Ref(),
  1477  	)
  1478  
  1479  	return
  1480  }
  1481  
  1482  // HasFuncHasOnRequestCanceled returns true if the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener" exists.
  1483  func HasFuncHasOnRequestCanceled() bool {
  1484  	return js.True == bindings.HasFuncHasOnRequestCanceled()
  1485  }
  1486  
  1487  // FuncHasOnRequestCanceled returns the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener".
  1488  func FuncHasOnRequestCanceled() (fn js.Func[func(callback js.Func[func(requestId int32)]) bool]) {
  1489  	bindings.FuncHasOnRequestCanceled(
  1490  		js.Pointer(&fn),
  1491  	)
  1492  	return
  1493  }
  1494  
  1495  // HasOnRequestCanceled calls the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener" directly.
  1496  func HasOnRequestCanceled(callback js.Func[func(requestId int32)]) (ret bool) {
  1497  	bindings.CallHasOnRequestCanceled(
  1498  		js.Pointer(&ret),
  1499  		callback.Ref(),
  1500  	)
  1501  
  1502  	return
  1503  }
  1504  
  1505  // TryHasOnRequestCanceled calls the function "WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener"
  1506  // in a try/catch block and returns (_, err, ok = false) when it went through
  1507  // the catch clause.
  1508  func TryHasOnRequestCanceled(callback js.Func[func(requestId int32)]) (ret bool, exception js.Any, ok bool) {
  1509  	ok = js.True == bindings.TryHasOnRequestCanceled(
  1510  		js.Pointer(&ret), js.Pointer(&exception),
  1511  		callback.Ref(),
  1512  	)
  1513  
  1514  	return
  1515  }