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

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package filesystemprovider
     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/filesystemprovider/bindings"
    11  )
    12  
    13  type AbortRequestedOptions struct {
    14  	// FileSystemId is "AbortRequestedOptions.fileSystemId"
    15  	//
    16  	// Optional
    17  	FileSystemId js.String
    18  	// RequestId is "AbortRequestedOptions.requestId"
    19  	//
    20  	// Optional
    21  	//
    22  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
    23  	RequestId int32
    24  	// OperationRequestId is "AbortRequestedOptions.operationRequestId"
    25  	//
    26  	// Optional
    27  	//
    28  	// NOTE: FFI_USE_OperationRequestId MUST be set to true to make this field effective.
    29  	OperationRequestId int32
    30  
    31  	FFI_USE_RequestId          bool // for RequestId.
    32  	FFI_USE_OperationRequestId bool // for OperationRequestId.
    33  
    34  	FFI_USE bool
    35  }
    36  
    37  // FromRef calls UpdateFrom and returns a AbortRequestedOptions with all fields set.
    38  func (p AbortRequestedOptions) FromRef(ref js.Ref) AbortRequestedOptions {
    39  	p.UpdateFrom(ref)
    40  	return p
    41  }
    42  
    43  // New creates a new AbortRequestedOptions in the application heap.
    44  func (p AbortRequestedOptions) New() js.Ref {
    45  	return bindings.AbortRequestedOptionsJSLoad(
    46  		js.Pointer(&p), js.True, 0,
    47  	)
    48  }
    49  
    50  // UpdateFrom copies value of all fields of the heap object to p.
    51  func (p *AbortRequestedOptions) UpdateFrom(ref js.Ref) {
    52  	bindings.AbortRequestedOptionsJSStore(
    53  		js.Pointer(p), ref,
    54  	)
    55  }
    56  
    57  // Update writes all fields of the p to the heap object referenced by ref.
    58  func (p *AbortRequestedOptions) Update(ref js.Ref) {
    59  	bindings.AbortRequestedOptionsJSLoad(
    60  		js.Pointer(p), js.False, ref,
    61  	)
    62  }
    63  
    64  // FreeMembers frees fields with heap reference, if recursive is true
    65  // free all heap references reachable from p.
    66  func (p *AbortRequestedOptions) FreeMembers(recursive bool) {
    67  	js.Free(
    68  		p.FileSystemId.Ref(),
    69  	)
    70  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
    71  }
    72  
    73  type Action struct {
    74  	// Id is "Action.id"
    75  	//
    76  	// Optional
    77  	Id js.String
    78  	// Title is "Action.title"
    79  	//
    80  	// Optional
    81  	Title js.String
    82  
    83  	FFI_USE bool
    84  }
    85  
    86  // FromRef calls UpdateFrom and returns a Action with all fields set.
    87  func (p Action) FromRef(ref js.Ref) Action {
    88  	p.UpdateFrom(ref)
    89  	return p
    90  }
    91  
    92  // New creates a new Action in the application heap.
    93  func (p Action) New() js.Ref {
    94  	return bindings.ActionJSLoad(
    95  		js.Pointer(&p), js.True, 0,
    96  	)
    97  }
    98  
    99  // UpdateFrom copies value of all fields of the heap object to p.
   100  func (p *Action) UpdateFrom(ref js.Ref) {
   101  	bindings.ActionJSStore(
   102  		js.Pointer(p), ref,
   103  	)
   104  }
   105  
   106  // Update writes all fields of the p to the heap object referenced by ref.
   107  func (p *Action) Update(ref js.Ref) {
   108  	bindings.ActionJSLoad(
   109  		js.Pointer(p), js.False, ref,
   110  	)
   111  }
   112  
   113  // FreeMembers frees fields with heap reference, if recursive is true
   114  // free all heap references reachable from p.
   115  func (p *Action) FreeMembers(recursive bool) {
   116  	js.Free(
   117  		p.Id.Ref(),
   118  		p.Title.Ref(),
   119  	)
   120  	p.Id = p.Id.FromRef(js.Undefined)
   121  	p.Title = p.Title.FromRef(js.Undefined)
   122  }
   123  
   124  type ActionsCallbackFunc func(this js.Ref, actions js.Array[Action]) js.Ref
   125  
   126  func (fn ActionsCallbackFunc) Register() js.Func[func(actions js.Array[Action])] {
   127  	return js.RegisterCallback[func(actions js.Array[Action])](
   128  		fn, abi.FuncPCABIInternal(fn),
   129  	)
   130  }
   131  
   132  func (fn ActionsCallbackFunc) DispatchCallback(
   133  	targetPC uintptr, ctx *js.CallbackContext,
   134  ) {
   135  	args := ctx.Args()
   136  	if len(args) != 1+1 /* js this */ ||
   137  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   138  		js.ThrowInvalidCallbackInvocation()
   139  	}
   140  
   141  	if ctx.Return(fn(
   142  		args[0],
   143  
   144  		js.Array[Action]{}.FromRef(args[0+1]),
   145  	)) {
   146  		return
   147  	}
   148  
   149  	js.ThrowCallbackValueNotReturned()
   150  }
   151  
   152  type ActionsCallback[T any] struct {
   153  	Fn  func(arg T, this js.Ref, actions js.Array[Action]) js.Ref
   154  	Arg T
   155  }
   156  
   157  func (cb *ActionsCallback[T]) Register() js.Func[func(actions js.Array[Action])] {
   158  	return js.RegisterCallback[func(actions js.Array[Action])](
   159  		cb, abi.FuncPCABIInternal(cb.Fn),
   160  	)
   161  }
   162  
   163  func (cb *ActionsCallback[T]) DispatchCallback(
   164  	targetPC uintptr, ctx *js.CallbackContext,
   165  ) {
   166  	args := ctx.Args()
   167  	if len(args) != 1+1 /* js this */ ||
   168  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   169  		js.ThrowInvalidCallbackInvocation()
   170  	}
   171  
   172  	if ctx.Return(cb.Fn(
   173  		cb.Arg,
   174  		args[0],
   175  
   176  		js.Array[Action]{}.FromRef(args[0+1]),
   177  	)) {
   178  		return
   179  	}
   180  
   181  	js.ThrowCallbackValueNotReturned()
   182  }
   183  
   184  type AddWatcherRequestedOptions struct {
   185  	// FileSystemId is "AddWatcherRequestedOptions.fileSystemId"
   186  	//
   187  	// Optional
   188  	FileSystemId js.String
   189  	// RequestId is "AddWatcherRequestedOptions.requestId"
   190  	//
   191  	// Optional
   192  	//
   193  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   194  	RequestId int32
   195  	// EntryPath is "AddWatcherRequestedOptions.entryPath"
   196  	//
   197  	// Optional
   198  	EntryPath js.String
   199  	// Recursive is "AddWatcherRequestedOptions.recursive"
   200  	//
   201  	// Optional
   202  	//
   203  	// NOTE: FFI_USE_Recursive MUST be set to true to make this field effective.
   204  	Recursive bool
   205  
   206  	FFI_USE_RequestId bool // for RequestId.
   207  	FFI_USE_Recursive bool // for Recursive.
   208  
   209  	FFI_USE bool
   210  }
   211  
   212  // FromRef calls UpdateFrom and returns a AddWatcherRequestedOptions with all fields set.
   213  func (p AddWatcherRequestedOptions) FromRef(ref js.Ref) AddWatcherRequestedOptions {
   214  	p.UpdateFrom(ref)
   215  	return p
   216  }
   217  
   218  // New creates a new AddWatcherRequestedOptions in the application heap.
   219  func (p AddWatcherRequestedOptions) New() js.Ref {
   220  	return bindings.AddWatcherRequestedOptionsJSLoad(
   221  		js.Pointer(&p), js.True, 0,
   222  	)
   223  }
   224  
   225  // UpdateFrom copies value of all fields of the heap object to p.
   226  func (p *AddWatcherRequestedOptions) UpdateFrom(ref js.Ref) {
   227  	bindings.AddWatcherRequestedOptionsJSStore(
   228  		js.Pointer(p), ref,
   229  	)
   230  }
   231  
   232  // Update writes all fields of the p to the heap object referenced by ref.
   233  func (p *AddWatcherRequestedOptions) Update(ref js.Ref) {
   234  	bindings.AddWatcherRequestedOptionsJSLoad(
   235  		js.Pointer(p), js.False, ref,
   236  	)
   237  }
   238  
   239  // FreeMembers frees fields with heap reference, if recursive is true
   240  // free all heap references reachable from p.
   241  func (p *AddWatcherRequestedOptions) FreeMembers(recursive bool) {
   242  	js.Free(
   243  		p.FileSystemId.Ref(),
   244  		p.EntryPath.Ref(),
   245  	)
   246  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   247  	p.EntryPath = p.EntryPath.FromRef(js.Undefined)
   248  }
   249  
   250  type ChangeType uint32
   251  
   252  const (
   253  	_ ChangeType = iota
   254  
   255  	ChangeType_CHANGED
   256  	ChangeType_DELETED
   257  )
   258  
   259  func (ChangeType) FromRef(str js.Ref) ChangeType {
   260  	return ChangeType(bindings.ConstOfChangeType(str))
   261  }
   262  
   263  func (x ChangeType) String() (string, bool) {
   264  	switch x {
   265  	case ChangeType_CHANGED:
   266  		return "CHANGED", true
   267  	case ChangeType_DELETED:
   268  		return "DELETED", true
   269  	default:
   270  		return "", false
   271  	}
   272  }
   273  
   274  type Change struct {
   275  	// EntryPath is "Change.entryPath"
   276  	//
   277  	// Optional
   278  	EntryPath js.String
   279  	// ChangeType is "Change.changeType"
   280  	//
   281  	// Optional
   282  	ChangeType ChangeType
   283  
   284  	FFI_USE bool
   285  }
   286  
   287  // FromRef calls UpdateFrom and returns a Change with all fields set.
   288  func (p Change) FromRef(ref js.Ref) Change {
   289  	p.UpdateFrom(ref)
   290  	return p
   291  }
   292  
   293  // New creates a new Change in the application heap.
   294  func (p Change) New() js.Ref {
   295  	return bindings.ChangeJSLoad(
   296  		js.Pointer(&p), js.True, 0,
   297  	)
   298  }
   299  
   300  // UpdateFrom copies value of all fields of the heap object to p.
   301  func (p *Change) UpdateFrom(ref js.Ref) {
   302  	bindings.ChangeJSStore(
   303  		js.Pointer(p), ref,
   304  	)
   305  }
   306  
   307  // Update writes all fields of the p to the heap object referenced by ref.
   308  func (p *Change) Update(ref js.Ref) {
   309  	bindings.ChangeJSLoad(
   310  		js.Pointer(p), js.False, ref,
   311  	)
   312  }
   313  
   314  // FreeMembers frees fields with heap reference, if recursive is true
   315  // free all heap references reachable from p.
   316  func (p *Change) FreeMembers(recursive bool) {
   317  	js.Free(
   318  		p.EntryPath.Ref(),
   319  	)
   320  	p.EntryPath = p.EntryPath.FromRef(js.Undefined)
   321  }
   322  
   323  type CloseFileRequestedOptions struct {
   324  	// FileSystemId is "CloseFileRequestedOptions.fileSystemId"
   325  	//
   326  	// Optional
   327  	FileSystemId js.String
   328  	// RequestId is "CloseFileRequestedOptions.requestId"
   329  	//
   330  	// Optional
   331  	//
   332  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   333  	RequestId int32
   334  	// OpenRequestId is "CloseFileRequestedOptions.openRequestId"
   335  	//
   336  	// Optional
   337  	//
   338  	// NOTE: FFI_USE_OpenRequestId MUST be set to true to make this field effective.
   339  	OpenRequestId int32
   340  
   341  	FFI_USE_RequestId     bool // for RequestId.
   342  	FFI_USE_OpenRequestId bool // for OpenRequestId.
   343  
   344  	FFI_USE bool
   345  }
   346  
   347  // FromRef calls UpdateFrom and returns a CloseFileRequestedOptions with all fields set.
   348  func (p CloseFileRequestedOptions) FromRef(ref js.Ref) CloseFileRequestedOptions {
   349  	p.UpdateFrom(ref)
   350  	return p
   351  }
   352  
   353  // New creates a new CloseFileRequestedOptions in the application heap.
   354  func (p CloseFileRequestedOptions) New() js.Ref {
   355  	return bindings.CloseFileRequestedOptionsJSLoad(
   356  		js.Pointer(&p), js.True, 0,
   357  	)
   358  }
   359  
   360  // UpdateFrom copies value of all fields of the heap object to p.
   361  func (p *CloseFileRequestedOptions) UpdateFrom(ref js.Ref) {
   362  	bindings.CloseFileRequestedOptionsJSStore(
   363  		js.Pointer(p), ref,
   364  	)
   365  }
   366  
   367  // Update writes all fields of the p to the heap object referenced by ref.
   368  func (p *CloseFileRequestedOptions) Update(ref js.Ref) {
   369  	bindings.CloseFileRequestedOptionsJSLoad(
   370  		js.Pointer(p), js.False, ref,
   371  	)
   372  }
   373  
   374  // FreeMembers frees fields with heap reference, if recursive is true
   375  // free all heap references reachable from p.
   376  func (p *CloseFileRequestedOptions) FreeMembers(recursive bool) {
   377  	js.Free(
   378  		p.FileSystemId.Ref(),
   379  	)
   380  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   381  }
   382  
   383  type CloudIdentifier struct {
   384  	// ProviderName is "CloudIdentifier.providerName"
   385  	//
   386  	// Optional
   387  	ProviderName js.String
   388  	// Id is "CloudIdentifier.id"
   389  	//
   390  	// Optional
   391  	Id js.String
   392  
   393  	FFI_USE bool
   394  }
   395  
   396  // FromRef calls UpdateFrom and returns a CloudIdentifier with all fields set.
   397  func (p CloudIdentifier) FromRef(ref js.Ref) CloudIdentifier {
   398  	p.UpdateFrom(ref)
   399  	return p
   400  }
   401  
   402  // New creates a new CloudIdentifier in the application heap.
   403  func (p CloudIdentifier) New() js.Ref {
   404  	return bindings.CloudIdentifierJSLoad(
   405  		js.Pointer(&p), js.True, 0,
   406  	)
   407  }
   408  
   409  // UpdateFrom copies value of all fields of the heap object to p.
   410  func (p *CloudIdentifier) UpdateFrom(ref js.Ref) {
   411  	bindings.CloudIdentifierJSStore(
   412  		js.Pointer(p), ref,
   413  	)
   414  }
   415  
   416  // Update writes all fields of the p to the heap object referenced by ref.
   417  func (p *CloudIdentifier) Update(ref js.Ref) {
   418  	bindings.CloudIdentifierJSLoad(
   419  		js.Pointer(p), js.False, ref,
   420  	)
   421  }
   422  
   423  // FreeMembers frees fields with heap reference, if recursive is true
   424  // free all heap references reachable from p.
   425  func (p *CloudIdentifier) FreeMembers(recursive bool) {
   426  	js.Free(
   427  		p.ProviderName.Ref(),
   428  		p.Id.Ref(),
   429  	)
   430  	p.ProviderName = p.ProviderName.FromRef(js.Undefined)
   431  	p.Id = p.Id.FromRef(js.Undefined)
   432  }
   433  
   434  type CommonActionId uint32
   435  
   436  const (
   437  	_ CommonActionId = iota
   438  
   439  	CommonActionId_SAVE_FOR_OFFLINE
   440  	CommonActionId_OFFLINE_NOT_NECESSARY
   441  	CommonActionId_SHARE
   442  )
   443  
   444  func (CommonActionId) FromRef(str js.Ref) CommonActionId {
   445  	return CommonActionId(bindings.ConstOfCommonActionId(str))
   446  }
   447  
   448  func (x CommonActionId) String() (string, bool) {
   449  	switch x {
   450  	case CommonActionId_SAVE_FOR_OFFLINE:
   451  		return "SAVE_FOR_OFFLINE", true
   452  	case CommonActionId_OFFLINE_NOT_NECESSARY:
   453  		return "OFFLINE_NOT_NECESSARY", true
   454  	case CommonActionId_SHARE:
   455  		return "SHARE", true
   456  	default:
   457  		return "", false
   458  	}
   459  }
   460  
   461  type ConfigureRequestedOptions struct {
   462  	// FileSystemId is "ConfigureRequestedOptions.fileSystemId"
   463  	//
   464  	// Optional
   465  	FileSystemId js.String
   466  	// RequestId is "ConfigureRequestedOptions.requestId"
   467  	//
   468  	// Optional
   469  	//
   470  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   471  	RequestId int32
   472  
   473  	FFI_USE_RequestId bool // for RequestId.
   474  
   475  	FFI_USE bool
   476  }
   477  
   478  // FromRef calls UpdateFrom and returns a ConfigureRequestedOptions with all fields set.
   479  func (p ConfigureRequestedOptions) FromRef(ref js.Ref) ConfigureRequestedOptions {
   480  	p.UpdateFrom(ref)
   481  	return p
   482  }
   483  
   484  // New creates a new ConfigureRequestedOptions in the application heap.
   485  func (p ConfigureRequestedOptions) New() js.Ref {
   486  	return bindings.ConfigureRequestedOptionsJSLoad(
   487  		js.Pointer(&p), js.True, 0,
   488  	)
   489  }
   490  
   491  // UpdateFrom copies value of all fields of the heap object to p.
   492  func (p *ConfigureRequestedOptions) UpdateFrom(ref js.Ref) {
   493  	bindings.ConfigureRequestedOptionsJSStore(
   494  		js.Pointer(p), ref,
   495  	)
   496  }
   497  
   498  // Update writes all fields of the p to the heap object referenced by ref.
   499  func (p *ConfigureRequestedOptions) Update(ref js.Ref) {
   500  	bindings.ConfigureRequestedOptionsJSLoad(
   501  		js.Pointer(p), js.False, ref,
   502  	)
   503  }
   504  
   505  // FreeMembers frees fields with heap reference, if recursive is true
   506  // free all heap references reachable from p.
   507  func (p *ConfigureRequestedOptions) FreeMembers(recursive bool) {
   508  	js.Free(
   509  		p.FileSystemId.Ref(),
   510  	)
   511  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   512  }
   513  
   514  type CopyEntryRequestedOptions struct {
   515  	// FileSystemId is "CopyEntryRequestedOptions.fileSystemId"
   516  	//
   517  	// Optional
   518  	FileSystemId js.String
   519  	// RequestId is "CopyEntryRequestedOptions.requestId"
   520  	//
   521  	// Optional
   522  	//
   523  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   524  	RequestId int32
   525  	// SourcePath is "CopyEntryRequestedOptions.sourcePath"
   526  	//
   527  	// Optional
   528  	SourcePath js.String
   529  	// TargetPath is "CopyEntryRequestedOptions.targetPath"
   530  	//
   531  	// Optional
   532  	TargetPath js.String
   533  
   534  	FFI_USE_RequestId bool // for RequestId.
   535  
   536  	FFI_USE bool
   537  }
   538  
   539  // FromRef calls UpdateFrom and returns a CopyEntryRequestedOptions with all fields set.
   540  func (p CopyEntryRequestedOptions) FromRef(ref js.Ref) CopyEntryRequestedOptions {
   541  	p.UpdateFrom(ref)
   542  	return p
   543  }
   544  
   545  // New creates a new CopyEntryRequestedOptions in the application heap.
   546  func (p CopyEntryRequestedOptions) New() js.Ref {
   547  	return bindings.CopyEntryRequestedOptionsJSLoad(
   548  		js.Pointer(&p), js.True, 0,
   549  	)
   550  }
   551  
   552  // UpdateFrom copies value of all fields of the heap object to p.
   553  func (p *CopyEntryRequestedOptions) UpdateFrom(ref js.Ref) {
   554  	bindings.CopyEntryRequestedOptionsJSStore(
   555  		js.Pointer(p), ref,
   556  	)
   557  }
   558  
   559  // Update writes all fields of the p to the heap object referenced by ref.
   560  func (p *CopyEntryRequestedOptions) Update(ref js.Ref) {
   561  	bindings.CopyEntryRequestedOptionsJSLoad(
   562  		js.Pointer(p), js.False, ref,
   563  	)
   564  }
   565  
   566  // FreeMembers frees fields with heap reference, if recursive is true
   567  // free all heap references reachable from p.
   568  func (p *CopyEntryRequestedOptions) FreeMembers(recursive bool) {
   569  	js.Free(
   570  		p.FileSystemId.Ref(),
   571  		p.SourcePath.Ref(),
   572  		p.TargetPath.Ref(),
   573  	)
   574  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   575  	p.SourcePath = p.SourcePath.FromRef(js.Undefined)
   576  	p.TargetPath = p.TargetPath.FromRef(js.Undefined)
   577  }
   578  
   579  type CreateDirectoryRequestedOptions struct {
   580  	// FileSystemId is "CreateDirectoryRequestedOptions.fileSystemId"
   581  	//
   582  	// Optional
   583  	FileSystemId js.String
   584  	// RequestId is "CreateDirectoryRequestedOptions.requestId"
   585  	//
   586  	// Optional
   587  	//
   588  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   589  	RequestId int32
   590  	// DirectoryPath is "CreateDirectoryRequestedOptions.directoryPath"
   591  	//
   592  	// Optional
   593  	DirectoryPath js.String
   594  	// Recursive is "CreateDirectoryRequestedOptions.recursive"
   595  	//
   596  	// Optional
   597  	//
   598  	// NOTE: FFI_USE_Recursive MUST be set to true to make this field effective.
   599  	Recursive bool
   600  
   601  	FFI_USE_RequestId bool // for RequestId.
   602  	FFI_USE_Recursive bool // for Recursive.
   603  
   604  	FFI_USE bool
   605  }
   606  
   607  // FromRef calls UpdateFrom and returns a CreateDirectoryRequestedOptions with all fields set.
   608  func (p CreateDirectoryRequestedOptions) FromRef(ref js.Ref) CreateDirectoryRequestedOptions {
   609  	p.UpdateFrom(ref)
   610  	return p
   611  }
   612  
   613  // New creates a new CreateDirectoryRequestedOptions in the application heap.
   614  func (p CreateDirectoryRequestedOptions) New() js.Ref {
   615  	return bindings.CreateDirectoryRequestedOptionsJSLoad(
   616  		js.Pointer(&p), js.True, 0,
   617  	)
   618  }
   619  
   620  // UpdateFrom copies value of all fields of the heap object to p.
   621  func (p *CreateDirectoryRequestedOptions) UpdateFrom(ref js.Ref) {
   622  	bindings.CreateDirectoryRequestedOptionsJSStore(
   623  		js.Pointer(p), ref,
   624  	)
   625  }
   626  
   627  // Update writes all fields of the p to the heap object referenced by ref.
   628  func (p *CreateDirectoryRequestedOptions) Update(ref js.Ref) {
   629  	bindings.CreateDirectoryRequestedOptionsJSLoad(
   630  		js.Pointer(p), js.False, ref,
   631  	)
   632  }
   633  
   634  // FreeMembers frees fields with heap reference, if recursive is true
   635  // free all heap references reachable from p.
   636  func (p *CreateDirectoryRequestedOptions) FreeMembers(recursive bool) {
   637  	js.Free(
   638  		p.FileSystemId.Ref(),
   639  		p.DirectoryPath.Ref(),
   640  	)
   641  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   642  	p.DirectoryPath = p.DirectoryPath.FromRef(js.Undefined)
   643  }
   644  
   645  type CreateFileRequestedOptions struct {
   646  	// FileSystemId is "CreateFileRequestedOptions.fileSystemId"
   647  	//
   648  	// Optional
   649  	FileSystemId js.String
   650  	// RequestId is "CreateFileRequestedOptions.requestId"
   651  	//
   652  	// Optional
   653  	//
   654  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   655  	RequestId int32
   656  	// FilePath is "CreateFileRequestedOptions.filePath"
   657  	//
   658  	// Optional
   659  	FilePath js.String
   660  
   661  	FFI_USE_RequestId bool // for RequestId.
   662  
   663  	FFI_USE bool
   664  }
   665  
   666  // FromRef calls UpdateFrom and returns a CreateFileRequestedOptions with all fields set.
   667  func (p CreateFileRequestedOptions) FromRef(ref js.Ref) CreateFileRequestedOptions {
   668  	p.UpdateFrom(ref)
   669  	return p
   670  }
   671  
   672  // New creates a new CreateFileRequestedOptions in the application heap.
   673  func (p CreateFileRequestedOptions) New() js.Ref {
   674  	return bindings.CreateFileRequestedOptionsJSLoad(
   675  		js.Pointer(&p), js.True, 0,
   676  	)
   677  }
   678  
   679  // UpdateFrom copies value of all fields of the heap object to p.
   680  func (p *CreateFileRequestedOptions) UpdateFrom(ref js.Ref) {
   681  	bindings.CreateFileRequestedOptionsJSStore(
   682  		js.Pointer(p), ref,
   683  	)
   684  }
   685  
   686  // Update writes all fields of the p to the heap object referenced by ref.
   687  func (p *CreateFileRequestedOptions) Update(ref js.Ref) {
   688  	bindings.CreateFileRequestedOptionsJSLoad(
   689  		js.Pointer(p), js.False, ref,
   690  	)
   691  }
   692  
   693  // FreeMembers frees fields with heap reference, if recursive is true
   694  // free all heap references reachable from p.
   695  func (p *CreateFileRequestedOptions) FreeMembers(recursive bool) {
   696  	js.Free(
   697  		p.FileSystemId.Ref(),
   698  		p.FilePath.Ref(),
   699  	)
   700  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   701  	p.FilePath = p.FilePath.FromRef(js.Undefined)
   702  }
   703  
   704  type DeleteEntryRequestedOptions struct {
   705  	// FileSystemId is "DeleteEntryRequestedOptions.fileSystemId"
   706  	//
   707  	// Optional
   708  	FileSystemId js.String
   709  	// RequestId is "DeleteEntryRequestedOptions.requestId"
   710  	//
   711  	// Optional
   712  	//
   713  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   714  	RequestId int32
   715  	// EntryPath is "DeleteEntryRequestedOptions.entryPath"
   716  	//
   717  	// Optional
   718  	EntryPath js.String
   719  	// Recursive is "DeleteEntryRequestedOptions.recursive"
   720  	//
   721  	// Optional
   722  	//
   723  	// NOTE: FFI_USE_Recursive MUST be set to true to make this field effective.
   724  	Recursive bool
   725  
   726  	FFI_USE_RequestId bool // for RequestId.
   727  	FFI_USE_Recursive bool // for Recursive.
   728  
   729  	FFI_USE bool
   730  }
   731  
   732  // FromRef calls UpdateFrom and returns a DeleteEntryRequestedOptions with all fields set.
   733  func (p DeleteEntryRequestedOptions) FromRef(ref js.Ref) DeleteEntryRequestedOptions {
   734  	p.UpdateFrom(ref)
   735  	return p
   736  }
   737  
   738  // New creates a new DeleteEntryRequestedOptions in the application heap.
   739  func (p DeleteEntryRequestedOptions) New() js.Ref {
   740  	return bindings.DeleteEntryRequestedOptionsJSLoad(
   741  		js.Pointer(&p), js.True, 0,
   742  	)
   743  }
   744  
   745  // UpdateFrom copies value of all fields of the heap object to p.
   746  func (p *DeleteEntryRequestedOptions) UpdateFrom(ref js.Ref) {
   747  	bindings.DeleteEntryRequestedOptionsJSStore(
   748  		js.Pointer(p), ref,
   749  	)
   750  }
   751  
   752  // Update writes all fields of the p to the heap object referenced by ref.
   753  func (p *DeleteEntryRequestedOptions) Update(ref js.Ref) {
   754  	bindings.DeleteEntryRequestedOptionsJSLoad(
   755  		js.Pointer(p), js.False, ref,
   756  	)
   757  }
   758  
   759  // FreeMembers frees fields with heap reference, if recursive is true
   760  // free all heap references reachable from p.
   761  func (p *DeleteEntryRequestedOptions) FreeMembers(recursive bool) {
   762  	js.Free(
   763  		p.FileSystemId.Ref(),
   764  		p.EntryPath.Ref(),
   765  	)
   766  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   767  	p.EntryPath = p.EntryPath.FromRef(js.Undefined)
   768  }
   769  
   770  type EntriesCallbackFunc func(this js.Ref, entries js.Array[EntryMetadata], hasMore bool) js.Ref
   771  
   772  func (fn EntriesCallbackFunc) Register() js.Func[func(entries js.Array[EntryMetadata], hasMore bool)] {
   773  	return js.RegisterCallback[func(entries js.Array[EntryMetadata], hasMore bool)](
   774  		fn, abi.FuncPCABIInternal(fn),
   775  	)
   776  }
   777  
   778  func (fn EntriesCallbackFunc) DispatchCallback(
   779  	targetPC uintptr, ctx *js.CallbackContext,
   780  ) {
   781  	args := ctx.Args()
   782  	if len(args) != 2+1 /* js this */ ||
   783  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   784  		js.ThrowInvalidCallbackInvocation()
   785  	}
   786  
   787  	if ctx.Return(fn(
   788  		args[0],
   789  
   790  		js.Array[EntryMetadata]{}.FromRef(args[0+1]),
   791  		args[1+1] == js.True,
   792  	)) {
   793  		return
   794  	}
   795  
   796  	js.ThrowCallbackValueNotReturned()
   797  }
   798  
   799  type EntriesCallback[T any] struct {
   800  	Fn  func(arg T, this js.Ref, entries js.Array[EntryMetadata], hasMore bool) js.Ref
   801  	Arg T
   802  }
   803  
   804  func (cb *EntriesCallback[T]) Register() js.Func[func(entries js.Array[EntryMetadata], hasMore bool)] {
   805  	return js.RegisterCallback[func(entries js.Array[EntryMetadata], hasMore bool)](
   806  		cb, abi.FuncPCABIInternal(cb.Fn),
   807  	)
   808  }
   809  
   810  func (cb *EntriesCallback[T]) DispatchCallback(
   811  	targetPC uintptr, ctx *js.CallbackContext,
   812  ) {
   813  	args := ctx.Args()
   814  	if len(args) != 2+1 /* js this */ ||
   815  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   816  		js.ThrowInvalidCallbackInvocation()
   817  	}
   818  
   819  	if ctx.Return(cb.Fn(
   820  		cb.Arg,
   821  		args[0],
   822  
   823  		js.Array[EntryMetadata]{}.FromRef(args[0+1]),
   824  		args[1+1] == js.True,
   825  	)) {
   826  		return
   827  	}
   828  
   829  	js.ThrowCallbackValueNotReturned()
   830  }
   831  
   832  type EntryMetadata struct {
   833  	// IsDirectory is "EntryMetadata.isDirectory"
   834  	//
   835  	// Optional
   836  	//
   837  	// NOTE: FFI_USE_IsDirectory MUST be set to true to make this field effective.
   838  	IsDirectory bool
   839  	// Name is "EntryMetadata.name"
   840  	//
   841  	// Optional
   842  	Name js.String
   843  	// Size is "EntryMetadata.size"
   844  	//
   845  	// Optional
   846  	//
   847  	// NOTE: FFI_USE_Size MUST be set to true to make this field effective.
   848  	Size float64
   849  	// ModificationTime is "EntryMetadata.modificationTime"
   850  	//
   851  	// Optional
   852  	ModificationTime js.Object
   853  	// MimeType is "EntryMetadata.mimeType"
   854  	//
   855  	// Optional
   856  	MimeType js.String
   857  	// Thumbnail is "EntryMetadata.thumbnail"
   858  	//
   859  	// Optional
   860  	Thumbnail js.String
   861  	// CloudIdentifier is "EntryMetadata.cloudIdentifier"
   862  	//
   863  	// Optional
   864  	//
   865  	// NOTE: CloudIdentifier.FFI_USE MUST be set to true to get CloudIdentifier used.
   866  	CloudIdentifier CloudIdentifier
   867  
   868  	FFI_USE_IsDirectory bool // for IsDirectory.
   869  	FFI_USE_Size        bool // for Size.
   870  
   871  	FFI_USE bool
   872  }
   873  
   874  // FromRef calls UpdateFrom and returns a EntryMetadata with all fields set.
   875  func (p EntryMetadata) FromRef(ref js.Ref) EntryMetadata {
   876  	p.UpdateFrom(ref)
   877  	return p
   878  }
   879  
   880  // New creates a new EntryMetadata in the application heap.
   881  func (p EntryMetadata) New() js.Ref {
   882  	return bindings.EntryMetadataJSLoad(
   883  		js.Pointer(&p), js.True, 0,
   884  	)
   885  }
   886  
   887  // UpdateFrom copies value of all fields of the heap object to p.
   888  func (p *EntryMetadata) UpdateFrom(ref js.Ref) {
   889  	bindings.EntryMetadataJSStore(
   890  		js.Pointer(p), ref,
   891  	)
   892  }
   893  
   894  // Update writes all fields of the p to the heap object referenced by ref.
   895  func (p *EntryMetadata) Update(ref js.Ref) {
   896  	bindings.EntryMetadataJSLoad(
   897  		js.Pointer(p), js.False, ref,
   898  	)
   899  }
   900  
   901  // FreeMembers frees fields with heap reference, if recursive is true
   902  // free all heap references reachable from p.
   903  func (p *EntryMetadata) FreeMembers(recursive bool) {
   904  	js.Free(
   905  		p.Name.Ref(),
   906  		p.ModificationTime.Ref(),
   907  		p.MimeType.Ref(),
   908  		p.Thumbnail.Ref(),
   909  	)
   910  	p.Name = p.Name.FromRef(js.Undefined)
   911  	p.ModificationTime = p.ModificationTime.FromRef(js.Undefined)
   912  	p.MimeType = p.MimeType.FromRef(js.Undefined)
   913  	p.Thumbnail = p.Thumbnail.FromRef(js.Undefined)
   914  	if recursive {
   915  		p.CloudIdentifier.FreeMembers(true)
   916  	}
   917  }
   918  
   919  type ExecuteActionRequestedOptions struct {
   920  	// FileSystemId is "ExecuteActionRequestedOptions.fileSystemId"
   921  	//
   922  	// Optional
   923  	FileSystemId js.String
   924  	// RequestId is "ExecuteActionRequestedOptions.requestId"
   925  	//
   926  	// Optional
   927  	//
   928  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
   929  	RequestId int32
   930  	// EntryPaths is "ExecuteActionRequestedOptions.entryPaths"
   931  	//
   932  	// Optional
   933  	EntryPaths js.Array[js.String]
   934  	// ActionId is "ExecuteActionRequestedOptions.actionId"
   935  	//
   936  	// Optional
   937  	ActionId js.String
   938  
   939  	FFI_USE_RequestId bool // for RequestId.
   940  
   941  	FFI_USE bool
   942  }
   943  
   944  // FromRef calls UpdateFrom and returns a ExecuteActionRequestedOptions with all fields set.
   945  func (p ExecuteActionRequestedOptions) FromRef(ref js.Ref) ExecuteActionRequestedOptions {
   946  	p.UpdateFrom(ref)
   947  	return p
   948  }
   949  
   950  // New creates a new ExecuteActionRequestedOptions in the application heap.
   951  func (p ExecuteActionRequestedOptions) New() js.Ref {
   952  	return bindings.ExecuteActionRequestedOptionsJSLoad(
   953  		js.Pointer(&p), js.True, 0,
   954  	)
   955  }
   956  
   957  // UpdateFrom copies value of all fields of the heap object to p.
   958  func (p *ExecuteActionRequestedOptions) UpdateFrom(ref js.Ref) {
   959  	bindings.ExecuteActionRequestedOptionsJSStore(
   960  		js.Pointer(p), ref,
   961  	)
   962  }
   963  
   964  // Update writes all fields of the p to the heap object referenced by ref.
   965  func (p *ExecuteActionRequestedOptions) Update(ref js.Ref) {
   966  	bindings.ExecuteActionRequestedOptionsJSLoad(
   967  		js.Pointer(p), js.False, ref,
   968  	)
   969  }
   970  
   971  // FreeMembers frees fields with heap reference, if recursive is true
   972  // free all heap references reachable from p.
   973  func (p *ExecuteActionRequestedOptions) FreeMembers(recursive bool) {
   974  	js.Free(
   975  		p.FileSystemId.Ref(),
   976  		p.EntryPaths.Ref(),
   977  		p.ActionId.Ref(),
   978  	)
   979  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
   980  	p.EntryPaths = p.EntryPaths.FromRef(js.Undefined)
   981  	p.ActionId = p.ActionId.FromRef(js.Undefined)
   982  }
   983  
   984  type FileDataCallbackFunc func(this js.Ref, data js.ArrayBuffer, hasMore bool) js.Ref
   985  
   986  func (fn FileDataCallbackFunc) Register() js.Func[func(data js.ArrayBuffer, hasMore bool)] {
   987  	return js.RegisterCallback[func(data js.ArrayBuffer, hasMore bool)](
   988  		fn, abi.FuncPCABIInternal(fn),
   989  	)
   990  }
   991  
   992  func (fn FileDataCallbackFunc) DispatchCallback(
   993  	targetPC uintptr, ctx *js.CallbackContext,
   994  ) {
   995  	args := ctx.Args()
   996  	if len(args) != 2+1 /* js this */ ||
   997  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   998  		js.ThrowInvalidCallbackInvocation()
   999  	}
  1000  
  1001  	if ctx.Return(fn(
  1002  		args[0],
  1003  
  1004  		js.ArrayBuffer{}.FromRef(args[0+1]),
  1005  		args[1+1] == js.True,
  1006  	)) {
  1007  		return
  1008  	}
  1009  
  1010  	js.ThrowCallbackValueNotReturned()
  1011  }
  1012  
  1013  type FileDataCallback[T any] struct {
  1014  	Fn  func(arg T, this js.Ref, data js.ArrayBuffer, hasMore bool) js.Ref
  1015  	Arg T
  1016  }
  1017  
  1018  func (cb *FileDataCallback[T]) Register() js.Func[func(data js.ArrayBuffer, hasMore bool)] {
  1019  	return js.RegisterCallback[func(data js.ArrayBuffer, hasMore bool)](
  1020  		cb, abi.FuncPCABIInternal(cb.Fn),
  1021  	)
  1022  }
  1023  
  1024  func (cb *FileDataCallback[T]) DispatchCallback(
  1025  	targetPC uintptr, ctx *js.CallbackContext,
  1026  ) {
  1027  	args := ctx.Args()
  1028  	if len(args) != 2+1 /* js this */ ||
  1029  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1030  		js.ThrowInvalidCallbackInvocation()
  1031  	}
  1032  
  1033  	if ctx.Return(cb.Fn(
  1034  		cb.Arg,
  1035  		args[0],
  1036  
  1037  		js.ArrayBuffer{}.FromRef(args[0+1]),
  1038  		args[1+1] == js.True,
  1039  	)) {
  1040  		return
  1041  	}
  1042  
  1043  	js.ThrowCallbackValueNotReturned()
  1044  }
  1045  
  1046  type OpenFileMode uint32
  1047  
  1048  const (
  1049  	_ OpenFileMode = iota
  1050  
  1051  	OpenFileMode_READ
  1052  	OpenFileMode_WRITE
  1053  )
  1054  
  1055  func (OpenFileMode) FromRef(str js.Ref) OpenFileMode {
  1056  	return OpenFileMode(bindings.ConstOfOpenFileMode(str))
  1057  }
  1058  
  1059  func (x OpenFileMode) String() (string, bool) {
  1060  	switch x {
  1061  	case OpenFileMode_READ:
  1062  		return "READ", true
  1063  	case OpenFileMode_WRITE:
  1064  		return "WRITE", true
  1065  	default:
  1066  		return "", false
  1067  	}
  1068  }
  1069  
  1070  type OpenedFile struct {
  1071  	// OpenRequestId is "OpenedFile.openRequestId"
  1072  	//
  1073  	// Optional
  1074  	//
  1075  	// NOTE: FFI_USE_OpenRequestId MUST be set to true to make this field effective.
  1076  	OpenRequestId int32
  1077  	// FilePath is "OpenedFile.filePath"
  1078  	//
  1079  	// Optional
  1080  	FilePath js.String
  1081  	// Mode is "OpenedFile.mode"
  1082  	//
  1083  	// Optional
  1084  	Mode OpenFileMode
  1085  
  1086  	FFI_USE_OpenRequestId bool // for OpenRequestId.
  1087  
  1088  	FFI_USE bool
  1089  }
  1090  
  1091  // FromRef calls UpdateFrom and returns a OpenedFile with all fields set.
  1092  func (p OpenedFile) FromRef(ref js.Ref) OpenedFile {
  1093  	p.UpdateFrom(ref)
  1094  	return p
  1095  }
  1096  
  1097  // New creates a new OpenedFile in the application heap.
  1098  func (p OpenedFile) New() js.Ref {
  1099  	return bindings.OpenedFileJSLoad(
  1100  		js.Pointer(&p), js.True, 0,
  1101  	)
  1102  }
  1103  
  1104  // UpdateFrom copies value of all fields of the heap object to p.
  1105  func (p *OpenedFile) UpdateFrom(ref js.Ref) {
  1106  	bindings.OpenedFileJSStore(
  1107  		js.Pointer(p), ref,
  1108  	)
  1109  }
  1110  
  1111  // Update writes all fields of the p to the heap object referenced by ref.
  1112  func (p *OpenedFile) Update(ref js.Ref) {
  1113  	bindings.OpenedFileJSLoad(
  1114  		js.Pointer(p), js.False, ref,
  1115  	)
  1116  }
  1117  
  1118  // FreeMembers frees fields with heap reference, if recursive is true
  1119  // free all heap references reachable from p.
  1120  func (p *OpenedFile) FreeMembers(recursive bool) {
  1121  	js.Free(
  1122  		p.FilePath.Ref(),
  1123  	)
  1124  	p.FilePath = p.FilePath.FromRef(js.Undefined)
  1125  }
  1126  
  1127  type Watcher struct {
  1128  	// EntryPath is "Watcher.entryPath"
  1129  	//
  1130  	// Optional
  1131  	EntryPath js.String
  1132  	// Recursive is "Watcher.recursive"
  1133  	//
  1134  	// Optional
  1135  	//
  1136  	// NOTE: FFI_USE_Recursive MUST be set to true to make this field effective.
  1137  	Recursive bool
  1138  	// LastTag is "Watcher.lastTag"
  1139  	//
  1140  	// Optional
  1141  	LastTag js.String
  1142  
  1143  	FFI_USE_Recursive bool // for Recursive.
  1144  
  1145  	FFI_USE bool
  1146  }
  1147  
  1148  // FromRef calls UpdateFrom and returns a Watcher with all fields set.
  1149  func (p Watcher) FromRef(ref js.Ref) Watcher {
  1150  	p.UpdateFrom(ref)
  1151  	return p
  1152  }
  1153  
  1154  // New creates a new Watcher in the application heap.
  1155  func (p Watcher) New() js.Ref {
  1156  	return bindings.WatcherJSLoad(
  1157  		js.Pointer(&p), js.True, 0,
  1158  	)
  1159  }
  1160  
  1161  // UpdateFrom copies value of all fields of the heap object to p.
  1162  func (p *Watcher) UpdateFrom(ref js.Ref) {
  1163  	bindings.WatcherJSStore(
  1164  		js.Pointer(p), ref,
  1165  	)
  1166  }
  1167  
  1168  // Update writes all fields of the p to the heap object referenced by ref.
  1169  func (p *Watcher) Update(ref js.Ref) {
  1170  	bindings.WatcherJSLoad(
  1171  		js.Pointer(p), js.False, ref,
  1172  	)
  1173  }
  1174  
  1175  // FreeMembers frees fields with heap reference, if recursive is true
  1176  // free all heap references reachable from p.
  1177  func (p *Watcher) FreeMembers(recursive bool) {
  1178  	js.Free(
  1179  		p.EntryPath.Ref(),
  1180  		p.LastTag.Ref(),
  1181  	)
  1182  	p.EntryPath = p.EntryPath.FromRef(js.Undefined)
  1183  	p.LastTag = p.LastTag.FromRef(js.Undefined)
  1184  }
  1185  
  1186  type FileSystemInfo struct {
  1187  	// FileSystemId is "FileSystemInfo.fileSystemId"
  1188  	//
  1189  	// Optional
  1190  	FileSystemId js.String
  1191  	// DisplayName is "FileSystemInfo.displayName"
  1192  	//
  1193  	// Optional
  1194  	DisplayName js.String
  1195  	// Writable is "FileSystemInfo.writable"
  1196  	//
  1197  	// Optional
  1198  	//
  1199  	// NOTE: FFI_USE_Writable MUST be set to true to make this field effective.
  1200  	Writable bool
  1201  	// OpenedFilesLimit is "FileSystemInfo.openedFilesLimit"
  1202  	//
  1203  	// Optional
  1204  	//
  1205  	// NOTE: FFI_USE_OpenedFilesLimit MUST be set to true to make this field effective.
  1206  	OpenedFilesLimit int32
  1207  	// OpenedFiles is "FileSystemInfo.openedFiles"
  1208  	//
  1209  	// Optional
  1210  	OpenedFiles js.Array[OpenedFile]
  1211  	// SupportsNotifyTag is "FileSystemInfo.supportsNotifyTag"
  1212  	//
  1213  	// Optional
  1214  	//
  1215  	// NOTE: FFI_USE_SupportsNotifyTag MUST be set to true to make this field effective.
  1216  	SupportsNotifyTag bool
  1217  	// Watchers is "FileSystemInfo.watchers"
  1218  	//
  1219  	// Optional
  1220  	Watchers js.Array[Watcher]
  1221  
  1222  	FFI_USE_Writable          bool // for Writable.
  1223  	FFI_USE_OpenedFilesLimit  bool // for OpenedFilesLimit.
  1224  	FFI_USE_SupportsNotifyTag bool // for SupportsNotifyTag.
  1225  
  1226  	FFI_USE bool
  1227  }
  1228  
  1229  // FromRef calls UpdateFrom and returns a FileSystemInfo with all fields set.
  1230  func (p FileSystemInfo) FromRef(ref js.Ref) FileSystemInfo {
  1231  	p.UpdateFrom(ref)
  1232  	return p
  1233  }
  1234  
  1235  // New creates a new FileSystemInfo in the application heap.
  1236  func (p FileSystemInfo) New() js.Ref {
  1237  	return bindings.FileSystemInfoJSLoad(
  1238  		js.Pointer(&p), js.True, 0,
  1239  	)
  1240  }
  1241  
  1242  // UpdateFrom copies value of all fields of the heap object to p.
  1243  func (p *FileSystemInfo) UpdateFrom(ref js.Ref) {
  1244  	bindings.FileSystemInfoJSStore(
  1245  		js.Pointer(p), ref,
  1246  	)
  1247  }
  1248  
  1249  // Update writes all fields of the p to the heap object referenced by ref.
  1250  func (p *FileSystemInfo) Update(ref js.Ref) {
  1251  	bindings.FileSystemInfoJSLoad(
  1252  		js.Pointer(p), js.False, ref,
  1253  	)
  1254  }
  1255  
  1256  // FreeMembers frees fields with heap reference, if recursive is true
  1257  // free all heap references reachable from p.
  1258  func (p *FileSystemInfo) FreeMembers(recursive bool) {
  1259  	js.Free(
  1260  		p.FileSystemId.Ref(),
  1261  		p.DisplayName.Ref(),
  1262  		p.OpenedFiles.Ref(),
  1263  		p.Watchers.Ref(),
  1264  	)
  1265  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1266  	p.DisplayName = p.DisplayName.FromRef(js.Undefined)
  1267  	p.OpenedFiles = p.OpenedFiles.FromRef(js.Undefined)
  1268  	p.Watchers = p.Watchers.FromRef(js.Undefined)
  1269  }
  1270  
  1271  type GetActionsRequestedOptions struct {
  1272  	// FileSystemId is "GetActionsRequestedOptions.fileSystemId"
  1273  	//
  1274  	// Optional
  1275  	FileSystemId js.String
  1276  	// RequestId is "GetActionsRequestedOptions.requestId"
  1277  	//
  1278  	// Optional
  1279  	//
  1280  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  1281  	RequestId int32
  1282  	// EntryPaths is "GetActionsRequestedOptions.entryPaths"
  1283  	//
  1284  	// Optional
  1285  	EntryPaths js.Array[js.String]
  1286  
  1287  	FFI_USE_RequestId bool // for RequestId.
  1288  
  1289  	FFI_USE bool
  1290  }
  1291  
  1292  // FromRef calls UpdateFrom and returns a GetActionsRequestedOptions with all fields set.
  1293  func (p GetActionsRequestedOptions) FromRef(ref js.Ref) GetActionsRequestedOptions {
  1294  	p.UpdateFrom(ref)
  1295  	return p
  1296  }
  1297  
  1298  // New creates a new GetActionsRequestedOptions in the application heap.
  1299  func (p GetActionsRequestedOptions) New() js.Ref {
  1300  	return bindings.GetActionsRequestedOptionsJSLoad(
  1301  		js.Pointer(&p), js.True, 0,
  1302  	)
  1303  }
  1304  
  1305  // UpdateFrom copies value of all fields of the heap object to p.
  1306  func (p *GetActionsRequestedOptions) UpdateFrom(ref js.Ref) {
  1307  	bindings.GetActionsRequestedOptionsJSStore(
  1308  		js.Pointer(p), ref,
  1309  	)
  1310  }
  1311  
  1312  // Update writes all fields of the p to the heap object referenced by ref.
  1313  func (p *GetActionsRequestedOptions) Update(ref js.Ref) {
  1314  	bindings.GetActionsRequestedOptionsJSLoad(
  1315  		js.Pointer(p), js.False, ref,
  1316  	)
  1317  }
  1318  
  1319  // FreeMembers frees fields with heap reference, if recursive is true
  1320  // free all heap references reachable from p.
  1321  func (p *GetActionsRequestedOptions) FreeMembers(recursive bool) {
  1322  	js.Free(
  1323  		p.FileSystemId.Ref(),
  1324  		p.EntryPaths.Ref(),
  1325  	)
  1326  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1327  	p.EntryPaths = p.EntryPaths.FromRef(js.Undefined)
  1328  }
  1329  
  1330  type GetAllCallbackFunc func(this js.Ref, fileSystems js.Array[FileSystemInfo]) js.Ref
  1331  
  1332  func (fn GetAllCallbackFunc) Register() js.Func[func(fileSystems js.Array[FileSystemInfo])] {
  1333  	return js.RegisterCallback[func(fileSystems js.Array[FileSystemInfo])](
  1334  		fn, abi.FuncPCABIInternal(fn),
  1335  	)
  1336  }
  1337  
  1338  func (fn GetAllCallbackFunc) DispatchCallback(
  1339  	targetPC uintptr, ctx *js.CallbackContext,
  1340  ) {
  1341  	args := ctx.Args()
  1342  	if len(args) != 1+1 /* js this */ ||
  1343  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1344  		js.ThrowInvalidCallbackInvocation()
  1345  	}
  1346  
  1347  	if ctx.Return(fn(
  1348  		args[0],
  1349  
  1350  		js.Array[FileSystemInfo]{}.FromRef(args[0+1]),
  1351  	)) {
  1352  		return
  1353  	}
  1354  
  1355  	js.ThrowCallbackValueNotReturned()
  1356  }
  1357  
  1358  type GetAllCallback[T any] struct {
  1359  	Fn  func(arg T, this js.Ref, fileSystems js.Array[FileSystemInfo]) js.Ref
  1360  	Arg T
  1361  }
  1362  
  1363  func (cb *GetAllCallback[T]) Register() js.Func[func(fileSystems js.Array[FileSystemInfo])] {
  1364  	return js.RegisterCallback[func(fileSystems js.Array[FileSystemInfo])](
  1365  		cb, abi.FuncPCABIInternal(cb.Fn),
  1366  	)
  1367  }
  1368  
  1369  func (cb *GetAllCallback[T]) DispatchCallback(
  1370  	targetPC uintptr, ctx *js.CallbackContext,
  1371  ) {
  1372  	args := ctx.Args()
  1373  	if len(args) != 1+1 /* js this */ ||
  1374  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1375  		js.ThrowInvalidCallbackInvocation()
  1376  	}
  1377  
  1378  	if ctx.Return(cb.Fn(
  1379  		cb.Arg,
  1380  		args[0],
  1381  
  1382  		js.Array[FileSystemInfo]{}.FromRef(args[0+1]),
  1383  	)) {
  1384  		return
  1385  	}
  1386  
  1387  	js.ThrowCallbackValueNotReturned()
  1388  }
  1389  
  1390  type GetCallbackFunc func(this js.Ref, fileSystem *FileSystemInfo) js.Ref
  1391  
  1392  func (fn GetCallbackFunc) Register() js.Func[func(fileSystem *FileSystemInfo)] {
  1393  	return js.RegisterCallback[func(fileSystem *FileSystemInfo)](
  1394  		fn, abi.FuncPCABIInternal(fn),
  1395  	)
  1396  }
  1397  
  1398  func (fn GetCallbackFunc) DispatchCallback(
  1399  	targetPC uintptr, ctx *js.CallbackContext,
  1400  ) {
  1401  	args := ctx.Args()
  1402  	if len(args) != 1+1 /* js this */ ||
  1403  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1404  		js.ThrowInvalidCallbackInvocation()
  1405  	}
  1406  	var arg0 FileSystemInfo
  1407  	arg0.UpdateFrom(args[0+1])
  1408  	defer arg0.FreeMembers(true)
  1409  
  1410  	if ctx.Return(fn(
  1411  		args[0],
  1412  
  1413  		mark.NoEscape(&arg0),
  1414  	)) {
  1415  		return
  1416  	}
  1417  
  1418  	js.ThrowCallbackValueNotReturned()
  1419  }
  1420  
  1421  type GetCallback[T any] struct {
  1422  	Fn  func(arg T, this js.Ref, fileSystem *FileSystemInfo) js.Ref
  1423  	Arg T
  1424  }
  1425  
  1426  func (cb *GetCallback[T]) Register() js.Func[func(fileSystem *FileSystemInfo)] {
  1427  	return js.RegisterCallback[func(fileSystem *FileSystemInfo)](
  1428  		cb, abi.FuncPCABIInternal(cb.Fn),
  1429  	)
  1430  }
  1431  
  1432  func (cb *GetCallback[T]) DispatchCallback(
  1433  	targetPC uintptr, ctx *js.CallbackContext,
  1434  ) {
  1435  	args := ctx.Args()
  1436  	if len(args) != 1+1 /* js this */ ||
  1437  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1438  		js.ThrowInvalidCallbackInvocation()
  1439  	}
  1440  	var arg0 FileSystemInfo
  1441  	arg0.UpdateFrom(args[0+1])
  1442  	defer arg0.FreeMembers(true)
  1443  
  1444  	if ctx.Return(cb.Fn(
  1445  		cb.Arg,
  1446  		args[0],
  1447  
  1448  		mark.NoEscape(&arg0),
  1449  	)) {
  1450  		return
  1451  	}
  1452  
  1453  	js.ThrowCallbackValueNotReturned()
  1454  }
  1455  
  1456  type GetMetadataRequestedOptions struct {
  1457  	// FileSystemId is "GetMetadataRequestedOptions.fileSystemId"
  1458  	//
  1459  	// Optional
  1460  	FileSystemId js.String
  1461  	// RequestId is "GetMetadataRequestedOptions.requestId"
  1462  	//
  1463  	// Optional
  1464  	//
  1465  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  1466  	RequestId int32
  1467  	// EntryPath is "GetMetadataRequestedOptions.entryPath"
  1468  	//
  1469  	// Optional
  1470  	EntryPath js.String
  1471  	// IsDirectory is "GetMetadataRequestedOptions.isDirectory"
  1472  	//
  1473  	// Optional
  1474  	//
  1475  	// NOTE: FFI_USE_IsDirectory MUST be set to true to make this field effective.
  1476  	IsDirectory bool
  1477  	// Name is "GetMetadataRequestedOptions.name"
  1478  	//
  1479  	// Optional
  1480  	//
  1481  	// NOTE: FFI_USE_Name MUST be set to true to make this field effective.
  1482  	Name bool
  1483  	// Size is "GetMetadataRequestedOptions.size"
  1484  	//
  1485  	// Optional
  1486  	//
  1487  	// NOTE: FFI_USE_Size MUST be set to true to make this field effective.
  1488  	Size bool
  1489  	// ModificationTime is "GetMetadataRequestedOptions.modificationTime"
  1490  	//
  1491  	// Optional
  1492  	//
  1493  	// NOTE: FFI_USE_ModificationTime MUST be set to true to make this field effective.
  1494  	ModificationTime bool
  1495  	// MimeType is "GetMetadataRequestedOptions.mimeType"
  1496  	//
  1497  	// Optional
  1498  	//
  1499  	// NOTE: FFI_USE_MimeType MUST be set to true to make this field effective.
  1500  	MimeType bool
  1501  	// Thumbnail is "GetMetadataRequestedOptions.thumbnail"
  1502  	//
  1503  	// Optional
  1504  	//
  1505  	// NOTE: FFI_USE_Thumbnail MUST be set to true to make this field effective.
  1506  	Thumbnail bool
  1507  	// CloudIdentifier is "GetMetadataRequestedOptions.cloudIdentifier"
  1508  	//
  1509  	// Optional
  1510  	//
  1511  	// NOTE: FFI_USE_CloudIdentifier MUST be set to true to make this field effective.
  1512  	CloudIdentifier bool
  1513  
  1514  	FFI_USE_RequestId        bool // for RequestId.
  1515  	FFI_USE_IsDirectory      bool // for IsDirectory.
  1516  	FFI_USE_Name             bool // for Name.
  1517  	FFI_USE_Size             bool // for Size.
  1518  	FFI_USE_ModificationTime bool // for ModificationTime.
  1519  	FFI_USE_MimeType         bool // for MimeType.
  1520  	FFI_USE_Thumbnail        bool // for Thumbnail.
  1521  	FFI_USE_CloudIdentifier  bool // for CloudIdentifier.
  1522  
  1523  	FFI_USE bool
  1524  }
  1525  
  1526  // FromRef calls UpdateFrom and returns a GetMetadataRequestedOptions with all fields set.
  1527  func (p GetMetadataRequestedOptions) FromRef(ref js.Ref) GetMetadataRequestedOptions {
  1528  	p.UpdateFrom(ref)
  1529  	return p
  1530  }
  1531  
  1532  // New creates a new GetMetadataRequestedOptions in the application heap.
  1533  func (p GetMetadataRequestedOptions) New() js.Ref {
  1534  	return bindings.GetMetadataRequestedOptionsJSLoad(
  1535  		js.Pointer(&p), js.True, 0,
  1536  	)
  1537  }
  1538  
  1539  // UpdateFrom copies value of all fields of the heap object to p.
  1540  func (p *GetMetadataRequestedOptions) UpdateFrom(ref js.Ref) {
  1541  	bindings.GetMetadataRequestedOptionsJSStore(
  1542  		js.Pointer(p), ref,
  1543  	)
  1544  }
  1545  
  1546  // Update writes all fields of the p to the heap object referenced by ref.
  1547  func (p *GetMetadataRequestedOptions) Update(ref js.Ref) {
  1548  	bindings.GetMetadataRequestedOptionsJSLoad(
  1549  		js.Pointer(p), js.False, ref,
  1550  	)
  1551  }
  1552  
  1553  // FreeMembers frees fields with heap reference, if recursive is true
  1554  // free all heap references reachable from p.
  1555  func (p *GetMetadataRequestedOptions) FreeMembers(recursive bool) {
  1556  	js.Free(
  1557  		p.FileSystemId.Ref(),
  1558  		p.EntryPath.Ref(),
  1559  	)
  1560  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1561  	p.EntryPath = p.EntryPath.FromRef(js.Undefined)
  1562  }
  1563  
  1564  type MetadataCallbackFunc func(this js.Ref, metadata *EntryMetadata) js.Ref
  1565  
  1566  func (fn MetadataCallbackFunc) Register() js.Func[func(metadata *EntryMetadata)] {
  1567  	return js.RegisterCallback[func(metadata *EntryMetadata)](
  1568  		fn, abi.FuncPCABIInternal(fn),
  1569  	)
  1570  }
  1571  
  1572  func (fn MetadataCallbackFunc) DispatchCallback(
  1573  	targetPC uintptr, ctx *js.CallbackContext,
  1574  ) {
  1575  	args := ctx.Args()
  1576  	if len(args) != 1+1 /* js this */ ||
  1577  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1578  		js.ThrowInvalidCallbackInvocation()
  1579  	}
  1580  	var arg0 EntryMetadata
  1581  	arg0.UpdateFrom(args[0+1])
  1582  	defer arg0.FreeMembers(true)
  1583  
  1584  	if ctx.Return(fn(
  1585  		args[0],
  1586  
  1587  		mark.NoEscape(&arg0),
  1588  	)) {
  1589  		return
  1590  	}
  1591  
  1592  	js.ThrowCallbackValueNotReturned()
  1593  }
  1594  
  1595  type MetadataCallback[T any] struct {
  1596  	Fn  func(arg T, this js.Ref, metadata *EntryMetadata) js.Ref
  1597  	Arg T
  1598  }
  1599  
  1600  func (cb *MetadataCallback[T]) Register() js.Func[func(metadata *EntryMetadata)] {
  1601  	return js.RegisterCallback[func(metadata *EntryMetadata)](
  1602  		cb, abi.FuncPCABIInternal(cb.Fn),
  1603  	)
  1604  }
  1605  
  1606  func (cb *MetadataCallback[T]) DispatchCallback(
  1607  	targetPC uintptr, ctx *js.CallbackContext,
  1608  ) {
  1609  	args := ctx.Args()
  1610  	if len(args) != 1+1 /* js this */ ||
  1611  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1612  		js.ThrowInvalidCallbackInvocation()
  1613  	}
  1614  	var arg0 EntryMetadata
  1615  	arg0.UpdateFrom(args[0+1])
  1616  	defer arg0.FreeMembers(true)
  1617  
  1618  	if ctx.Return(cb.Fn(
  1619  		cb.Arg,
  1620  		args[0],
  1621  
  1622  		mark.NoEscape(&arg0),
  1623  	)) {
  1624  		return
  1625  	}
  1626  
  1627  	js.ThrowCallbackValueNotReturned()
  1628  }
  1629  
  1630  type MountOptions struct {
  1631  	// FileSystemId is "MountOptions.fileSystemId"
  1632  	//
  1633  	// Optional
  1634  	FileSystemId js.String
  1635  	// DisplayName is "MountOptions.displayName"
  1636  	//
  1637  	// Optional
  1638  	DisplayName js.String
  1639  	// Writable is "MountOptions.writable"
  1640  	//
  1641  	// Optional
  1642  	//
  1643  	// NOTE: FFI_USE_Writable MUST be set to true to make this field effective.
  1644  	Writable bool
  1645  	// OpenedFilesLimit is "MountOptions.openedFilesLimit"
  1646  	//
  1647  	// Optional
  1648  	//
  1649  	// NOTE: FFI_USE_OpenedFilesLimit MUST be set to true to make this field effective.
  1650  	OpenedFilesLimit int32
  1651  	// SupportsNotifyTag is "MountOptions.supportsNotifyTag"
  1652  	//
  1653  	// Optional
  1654  	//
  1655  	// NOTE: FFI_USE_SupportsNotifyTag MUST be set to true to make this field effective.
  1656  	SupportsNotifyTag bool
  1657  	// Persistent is "MountOptions.persistent"
  1658  	//
  1659  	// Optional
  1660  	//
  1661  	// NOTE: FFI_USE_Persistent MUST be set to true to make this field effective.
  1662  	Persistent bool
  1663  
  1664  	FFI_USE_Writable          bool // for Writable.
  1665  	FFI_USE_OpenedFilesLimit  bool // for OpenedFilesLimit.
  1666  	FFI_USE_SupportsNotifyTag bool // for SupportsNotifyTag.
  1667  	FFI_USE_Persistent        bool // for Persistent.
  1668  
  1669  	FFI_USE bool
  1670  }
  1671  
  1672  // FromRef calls UpdateFrom and returns a MountOptions with all fields set.
  1673  func (p MountOptions) FromRef(ref js.Ref) MountOptions {
  1674  	p.UpdateFrom(ref)
  1675  	return p
  1676  }
  1677  
  1678  // New creates a new MountOptions in the application heap.
  1679  func (p MountOptions) New() js.Ref {
  1680  	return bindings.MountOptionsJSLoad(
  1681  		js.Pointer(&p), js.True, 0,
  1682  	)
  1683  }
  1684  
  1685  // UpdateFrom copies value of all fields of the heap object to p.
  1686  func (p *MountOptions) UpdateFrom(ref js.Ref) {
  1687  	bindings.MountOptionsJSStore(
  1688  		js.Pointer(p), ref,
  1689  	)
  1690  }
  1691  
  1692  // Update writes all fields of the p to the heap object referenced by ref.
  1693  func (p *MountOptions) Update(ref js.Ref) {
  1694  	bindings.MountOptionsJSLoad(
  1695  		js.Pointer(p), js.False, ref,
  1696  	)
  1697  }
  1698  
  1699  // FreeMembers frees fields with heap reference, if recursive is true
  1700  // free all heap references reachable from p.
  1701  func (p *MountOptions) FreeMembers(recursive bool) {
  1702  	js.Free(
  1703  		p.FileSystemId.Ref(),
  1704  		p.DisplayName.Ref(),
  1705  	)
  1706  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1707  	p.DisplayName = p.DisplayName.FromRef(js.Undefined)
  1708  }
  1709  
  1710  type MoveEntryRequestedOptions struct {
  1711  	// FileSystemId is "MoveEntryRequestedOptions.fileSystemId"
  1712  	//
  1713  	// Optional
  1714  	FileSystemId js.String
  1715  	// RequestId is "MoveEntryRequestedOptions.requestId"
  1716  	//
  1717  	// Optional
  1718  	//
  1719  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  1720  	RequestId int32
  1721  	// SourcePath is "MoveEntryRequestedOptions.sourcePath"
  1722  	//
  1723  	// Optional
  1724  	SourcePath js.String
  1725  	// TargetPath is "MoveEntryRequestedOptions.targetPath"
  1726  	//
  1727  	// Optional
  1728  	TargetPath js.String
  1729  
  1730  	FFI_USE_RequestId bool // for RequestId.
  1731  
  1732  	FFI_USE bool
  1733  }
  1734  
  1735  // FromRef calls UpdateFrom and returns a MoveEntryRequestedOptions with all fields set.
  1736  func (p MoveEntryRequestedOptions) FromRef(ref js.Ref) MoveEntryRequestedOptions {
  1737  	p.UpdateFrom(ref)
  1738  	return p
  1739  }
  1740  
  1741  // New creates a new MoveEntryRequestedOptions in the application heap.
  1742  func (p MoveEntryRequestedOptions) New() js.Ref {
  1743  	return bindings.MoveEntryRequestedOptionsJSLoad(
  1744  		js.Pointer(&p), js.True, 0,
  1745  	)
  1746  }
  1747  
  1748  // UpdateFrom copies value of all fields of the heap object to p.
  1749  func (p *MoveEntryRequestedOptions) UpdateFrom(ref js.Ref) {
  1750  	bindings.MoveEntryRequestedOptionsJSStore(
  1751  		js.Pointer(p), ref,
  1752  	)
  1753  }
  1754  
  1755  // Update writes all fields of the p to the heap object referenced by ref.
  1756  func (p *MoveEntryRequestedOptions) Update(ref js.Ref) {
  1757  	bindings.MoveEntryRequestedOptionsJSLoad(
  1758  		js.Pointer(p), js.False, ref,
  1759  	)
  1760  }
  1761  
  1762  // FreeMembers frees fields with heap reference, if recursive is true
  1763  // free all heap references reachable from p.
  1764  func (p *MoveEntryRequestedOptions) FreeMembers(recursive bool) {
  1765  	js.Free(
  1766  		p.FileSystemId.Ref(),
  1767  		p.SourcePath.Ref(),
  1768  		p.TargetPath.Ref(),
  1769  	)
  1770  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1771  	p.SourcePath = p.SourcePath.FromRef(js.Undefined)
  1772  	p.TargetPath = p.TargetPath.FromRef(js.Undefined)
  1773  }
  1774  
  1775  type NotifyOptions struct {
  1776  	// FileSystemId is "NotifyOptions.fileSystemId"
  1777  	//
  1778  	// Optional
  1779  	FileSystemId js.String
  1780  	// ObservedPath is "NotifyOptions.observedPath"
  1781  	//
  1782  	// Optional
  1783  	ObservedPath js.String
  1784  	// Recursive is "NotifyOptions.recursive"
  1785  	//
  1786  	// Optional
  1787  	//
  1788  	// NOTE: FFI_USE_Recursive MUST be set to true to make this field effective.
  1789  	Recursive bool
  1790  	// ChangeType is "NotifyOptions.changeType"
  1791  	//
  1792  	// Optional
  1793  	ChangeType ChangeType
  1794  	// Changes is "NotifyOptions.changes"
  1795  	//
  1796  	// Optional
  1797  	Changes js.Array[Change]
  1798  	// Tag is "NotifyOptions.tag"
  1799  	//
  1800  	// Optional
  1801  	Tag js.String
  1802  
  1803  	FFI_USE_Recursive bool // for Recursive.
  1804  
  1805  	FFI_USE bool
  1806  }
  1807  
  1808  // FromRef calls UpdateFrom and returns a NotifyOptions with all fields set.
  1809  func (p NotifyOptions) FromRef(ref js.Ref) NotifyOptions {
  1810  	p.UpdateFrom(ref)
  1811  	return p
  1812  }
  1813  
  1814  // New creates a new NotifyOptions in the application heap.
  1815  func (p NotifyOptions) New() js.Ref {
  1816  	return bindings.NotifyOptionsJSLoad(
  1817  		js.Pointer(&p), js.True, 0,
  1818  	)
  1819  }
  1820  
  1821  // UpdateFrom copies value of all fields of the heap object to p.
  1822  func (p *NotifyOptions) UpdateFrom(ref js.Ref) {
  1823  	bindings.NotifyOptionsJSStore(
  1824  		js.Pointer(p), ref,
  1825  	)
  1826  }
  1827  
  1828  // Update writes all fields of the p to the heap object referenced by ref.
  1829  func (p *NotifyOptions) Update(ref js.Ref) {
  1830  	bindings.NotifyOptionsJSLoad(
  1831  		js.Pointer(p), js.False, ref,
  1832  	)
  1833  }
  1834  
  1835  // FreeMembers frees fields with heap reference, if recursive is true
  1836  // free all heap references reachable from p.
  1837  func (p *NotifyOptions) FreeMembers(recursive bool) {
  1838  	js.Free(
  1839  		p.FileSystemId.Ref(),
  1840  		p.ObservedPath.Ref(),
  1841  		p.Changes.Ref(),
  1842  		p.Tag.Ref(),
  1843  	)
  1844  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1845  	p.ObservedPath = p.ObservedPath.FromRef(js.Undefined)
  1846  	p.Changes = p.Changes.FromRef(js.Undefined)
  1847  	p.Tag = p.Tag.FromRef(js.Undefined)
  1848  }
  1849  
  1850  type OpenFileRequestedOptions struct {
  1851  	// FileSystemId is "OpenFileRequestedOptions.fileSystemId"
  1852  	//
  1853  	// Optional
  1854  	FileSystemId js.String
  1855  	// RequestId is "OpenFileRequestedOptions.requestId"
  1856  	//
  1857  	// Optional
  1858  	//
  1859  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  1860  	RequestId int32
  1861  	// FilePath is "OpenFileRequestedOptions.filePath"
  1862  	//
  1863  	// Optional
  1864  	FilePath js.String
  1865  	// Mode is "OpenFileRequestedOptions.mode"
  1866  	//
  1867  	// Optional
  1868  	Mode OpenFileMode
  1869  
  1870  	FFI_USE_RequestId bool // for RequestId.
  1871  
  1872  	FFI_USE bool
  1873  }
  1874  
  1875  // FromRef calls UpdateFrom and returns a OpenFileRequestedOptions with all fields set.
  1876  func (p OpenFileRequestedOptions) FromRef(ref js.Ref) OpenFileRequestedOptions {
  1877  	p.UpdateFrom(ref)
  1878  	return p
  1879  }
  1880  
  1881  // New creates a new OpenFileRequestedOptions in the application heap.
  1882  func (p OpenFileRequestedOptions) New() js.Ref {
  1883  	return bindings.OpenFileRequestedOptionsJSLoad(
  1884  		js.Pointer(&p), js.True, 0,
  1885  	)
  1886  }
  1887  
  1888  // UpdateFrom copies value of all fields of the heap object to p.
  1889  func (p *OpenFileRequestedOptions) UpdateFrom(ref js.Ref) {
  1890  	bindings.OpenFileRequestedOptionsJSStore(
  1891  		js.Pointer(p), ref,
  1892  	)
  1893  }
  1894  
  1895  // Update writes all fields of the p to the heap object referenced by ref.
  1896  func (p *OpenFileRequestedOptions) Update(ref js.Ref) {
  1897  	bindings.OpenFileRequestedOptionsJSLoad(
  1898  		js.Pointer(p), js.False, ref,
  1899  	)
  1900  }
  1901  
  1902  // FreeMembers frees fields with heap reference, if recursive is true
  1903  // free all heap references reachable from p.
  1904  func (p *OpenFileRequestedOptions) FreeMembers(recursive bool) {
  1905  	js.Free(
  1906  		p.FileSystemId.Ref(),
  1907  		p.FilePath.Ref(),
  1908  	)
  1909  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  1910  	p.FilePath = p.FilePath.FromRef(js.Undefined)
  1911  }
  1912  
  1913  type ProviderError uint32
  1914  
  1915  const (
  1916  	_ ProviderError = iota
  1917  
  1918  	ProviderError_OK
  1919  	ProviderError_FAILED
  1920  	ProviderError_IN_USE
  1921  	ProviderError_EXISTS
  1922  	ProviderError_NOT_FOUND
  1923  	ProviderError_ACCESS_DENIED
  1924  	ProviderError_TOO_MANY_OPENED
  1925  	ProviderError_NO_MEMORY
  1926  	ProviderError_NO_SPACE
  1927  	ProviderError_NOT_A_DIRECTORY
  1928  	ProviderError_INVALID_OPERATION
  1929  	ProviderError_SECURITY
  1930  	ProviderError_ABORT
  1931  	ProviderError_NOT_A_FILE
  1932  	ProviderError_NOT_EMPTY
  1933  	ProviderError_INVALID_URL
  1934  	ProviderError_IO
  1935  )
  1936  
  1937  func (ProviderError) FromRef(str js.Ref) ProviderError {
  1938  	return ProviderError(bindings.ConstOfProviderError(str))
  1939  }
  1940  
  1941  func (x ProviderError) String() (string, bool) {
  1942  	switch x {
  1943  	case ProviderError_OK:
  1944  		return "OK", true
  1945  	case ProviderError_FAILED:
  1946  		return "FAILED", true
  1947  	case ProviderError_IN_USE:
  1948  		return "IN_USE", true
  1949  	case ProviderError_EXISTS:
  1950  		return "EXISTS", true
  1951  	case ProviderError_NOT_FOUND:
  1952  		return "NOT_FOUND", true
  1953  	case ProviderError_ACCESS_DENIED:
  1954  		return "ACCESS_DENIED", true
  1955  	case ProviderError_TOO_MANY_OPENED:
  1956  		return "TOO_MANY_OPENED", true
  1957  	case ProviderError_NO_MEMORY:
  1958  		return "NO_MEMORY", true
  1959  	case ProviderError_NO_SPACE:
  1960  		return "NO_SPACE", true
  1961  	case ProviderError_NOT_A_DIRECTORY:
  1962  		return "NOT_A_DIRECTORY", true
  1963  	case ProviderError_INVALID_OPERATION:
  1964  		return "INVALID_OPERATION", true
  1965  	case ProviderError_SECURITY:
  1966  		return "SECURITY", true
  1967  	case ProviderError_ABORT:
  1968  		return "ABORT", true
  1969  	case ProviderError_NOT_A_FILE:
  1970  		return "NOT_A_FILE", true
  1971  	case ProviderError_NOT_EMPTY:
  1972  		return "NOT_EMPTY", true
  1973  	case ProviderError_INVALID_URL:
  1974  		return "INVALID_URL", true
  1975  	case ProviderError_IO:
  1976  		return "IO", true
  1977  	default:
  1978  		return "", false
  1979  	}
  1980  }
  1981  
  1982  type ProviderErrorCallbackFunc func(this js.Ref, err ProviderError) js.Ref
  1983  
  1984  func (fn ProviderErrorCallbackFunc) Register() js.Func[func(err ProviderError)] {
  1985  	return js.RegisterCallback[func(err ProviderError)](
  1986  		fn, abi.FuncPCABIInternal(fn),
  1987  	)
  1988  }
  1989  
  1990  func (fn ProviderErrorCallbackFunc) DispatchCallback(
  1991  	targetPC uintptr, ctx *js.CallbackContext,
  1992  ) {
  1993  	args := ctx.Args()
  1994  	if len(args) != 1+1 /* js this */ ||
  1995  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1996  		js.ThrowInvalidCallbackInvocation()
  1997  	}
  1998  
  1999  	if ctx.Return(fn(
  2000  		args[0],
  2001  
  2002  		ProviderError(0).FromRef(args[0+1]),
  2003  	)) {
  2004  		return
  2005  	}
  2006  
  2007  	js.ThrowCallbackValueNotReturned()
  2008  }
  2009  
  2010  type ProviderErrorCallback[T any] struct {
  2011  	Fn  func(arg T, this js.Ref, err ProviderError) js.Ref
  2012  	Arg T
  2013  }
  2014  
  2015  func (cb *ProviderErrorCallback[T]) Register() js.Func[func(err ProviderError)] {
  2016  	return js.RegisterCallback[func(err ProviderError)](
  2017  		cb, abi.FuncPCABIInternal(cb.Fn),
  2018  	)
  2019  }
  2020  
  2021  func (cb *ProviderErrorCallback[T]) DispatchCallback(
  2022  	targetPC uintptr, ctx *js.CallbackContext,
  2023  ) {
  2024  	args := ctx.Args()
  2025  	if len(args) != 1+1 /* js this */ ||
  2026  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2027  		js.ThrowInvalidCallbackInvocation()
  2028  	}
  2029  
  2030  	if ctx.Return(cb.Fn(
  2031  		cb.Arg,
  2032  		args[0],
  2033  
  2034  		ProviderError(0).FromRef(args[0+1]),
  2035  	)) {
  2036  		return
  2037  	}
  2038  
  2039  	js.ThrowCallbackValueNotReturned()
  2040  }
  2041  
  2042  type ProviderSuccessCallbackFunc func(this js.Ref) js.Ref
  2043  
  2044  func (fn ProviderSuccessCallbackFunc) Register() js.Func[func()] {
  2045  	return js.RegisterCallback[func()](
  2046  		fn, abi.FuncPCABIInternal(fn),
  2047  	)
  2048  }
  2049  
  2050  func (fn ProviderSuccessCallbackFunc) DispatchCallback(
  2051  	targetPC uintptr, ctx *js.CallbackContext,
  2052  ) {
  2053  	args := ctx.Args()
  2054  	if len(args) != 0+1 /* js this */ ||
  2055  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  2056  		js.ThrowInvalidCallbackInvocation()
  2057  	}
  2058  
  2059  	if ctx.Return(fn(
  2060  		args[0],
  2061  	)) {
  2062  		return
  2063  	}
  2064  
  2065  	js.ThrowCallbackValueNotReturned()
  2066  }
  2067  
  2068  type ProviderSuccessCallback[T any] struct {
  2069  	Fn  func(arg T, this js.Ref) js.Ref
  2070  	Arg T
  2071  }
  2072  
  2073  func (cb *ProviderSuccessCallback[T]) Register() js.Func[func()] {
  2074  	return js.RegisterCallback[func()](
  2075  		cb, abi.FuncPCABIInternal(cb.Fn),
  2076  	)
  2077  }
  2078  
  2079  func (cb *ProviderSuccessCallback[T]) DispatchCallback(
  2080  	targetPC uintptr, ctx *js.CallbackContext,
  2081  ) {
  2082  	args := ctx.Args()
  2083  	if len(args) != 0+1 /* js this */ ||
  2084  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2085  		js.ThrowInvalidCallbackInvocation()
  2086  	}
  2087  
  2088  	if ctx.Return(cb.Fn(
  2089  		cb.Arg,
  2090  		args[0],
  2091  	)) {
  2092  		return
  2093  	}
  2094  
  2095  	js.ThrowCallbackValueNotReturned()
  2096  }
  2097  
  2098  type ReadDirectoryRequestedOptions struct {
  2099  	// FileSystemId is "ReadDirectoryRequestedOptions.fileSystemId"
  2100  	//
  2101  	// Optional
  2102  	FileSystemId js.String
  2103  	// RequestId is "ReadDirectoryRequestedOptions.requestId"
  2104  	//
  2105  	// Optional
  2106  	//
  2107  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  2108  	RequestId int32
  2109  	// DirectoryPath is "ReadDirectoryRequestedOptions.directoryPath"
  2110  	//
  2111  	// Optional
  2112  	DirectoryPath js.String
  2113  	// IsDirectory is "ReadDirectoryRequestedOptions.isDirectory"
  2114  	//
  2115  	// Optional
  2116  	//
  2117  	// NOTE: FFI_USE_IsDirectory MUST be set to true to make this field effective.
  2118  	IsDirectory bool
  2119  	// Name is "ReadDirectoryRequestedOptions.name"
  2120  	//
  2121  	// Optional
  2122  	//
  2123  	// NOTE: FFI_USE_Name MUST be set to true to make this field effective.
  2124  	Name bool
  2125  	// Size is "ReadDirectoryRequestedOptions.size"
  2126  	//
  2127  	// Optional
  2128  	//
  2129  	// NOTE: FFI_USE_Size MUST be set to true to make this field effective.
  2130  	Size bool
  2131  	// ModificationTime is "ReadDirectoryRequestedOptions.modificationTime"
  2132  	//
  2133  	// Optional
  2134  	//
  2135  	// NOTE: FFI_USE_ModificationTime MUST be set to true to make this field effective.
  2136  	ModificationTime bool
  2137  	// MimeType is "ReadDirectoryRequestedOptions.mimeType"
  2138  	//
  2139  	// Optional
  2140  	//
  2141  	// NOTE: FFI_USE_MimeType MUST be set to true to make this field effective.
  2142  	MimeType bool
  2143  	// Thumbnail is "ReadDirectoryRequestedOptions.thumbnail"
  2144  	//
  2145  	// Optional
  2146  	//
  2147  	// NOTE: FFI_USE_Thumbnail MUST be set to true to make this field effective.
  2148  	Thumbnail bool
  2149  
  2150  	FFI_USE_RequestId        bool // for RequestId.
  2151  	FFI_USE_IsDirectory      bool // for IsDirectory.
  2152  	FFI_USE_Name             bool // for Name.
  2153  	FFI_USE_Size             bool // for Size.
  2154  	FFI_USE_ModificationTime bool // for ModificationTime.
  2155  	FFI_USE_MimeType         bool // for MimeType.
  2156  	FFI_USE_Thumbnail        bool // for Thumbnail.
  2157  
  2158  	FFI_USE bool
  2159  }
  2160  
  2161  // FromRef calls UpdateFrom and returns a ReadDirectoryRequestedOptions with all fields set.
  2162  func (p ReadDirectoryRequestedOptions) FromRef(ref js.Ref) ReadDirectoryRequestedOptions {
  2163  	p.UpdateFrom(ref)
  2164  	return p
  2165  }
  2166  
  2167  // New creates a new ReadDirectoryRequestedOptions in the application heap.
  2168  func (p ReadDirectoryRequestedOptions) New() js.Ref {
  2169  	return bindings.ReadDirectoryRequestedOptionsJSLoad(
  2170  		js.Pointer(&p), js.True, 0,
  2171  	)
  2172  }
  2173  
  2174  // UpdateFrom copies value of all fields of the heap object to p.
  2175  func (p *ReadDirectoryRequestedOptions) UpdateFrom(ref js.Ref) {
  2176  	bindings.ReadDirectoryRequestedOptionsJSStore(
  2177  		js.Pointer(p), ref,
  2178  	)
  2179  }
  2180  
  2181  // Update writes all fields of the p to the heap object referenced by ref.
  2182  func (p *ReadDirectoryRequestedOptions) Update(ref js.Ref) {
  2183  	bindings.ReadDirectoryRequestedOptionsJSLoad(
  2184  		js.Pointer(p), js.False, ref,
  2185  	)
  2186  }
  2187  
  2188  // FreeMembers frees fields with heap reference, if recursive is true
  2189  // free all heap references reachable from p.
  2190  func (p *ReadDirectoryRequestedOptions) FreeMembers(recursive bool) {
  2191  	js.Free(
  2192  		p.FileSystemId.Ref(),
  2193  		p.DirectoryPath.Ref(),
  2194  	)
  2195  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2196  	p.DirectoryPath = p.DirectoryPath.FromRef(js.Undefined)
  2197  }
  2198  
  2199  type ReadFileRequestedOptions struct {
  2200  	// FileSystemId is "ReadFileRequestedOptions.fileSystemId"
  2201  	//
  2202  	// Optional
  2203  	FileSystemId js.String
  2204  	// RequestId is "ReadFileRequestedOptions.requestId"
  2205  	//
  2206  	// Optional
  2207  	//
  2208  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  2209  	RequestId int32
  2210  	// OpenRequestId is "ReadFileRequestedOptions.openRequestId"
  2211  	//
  2212  	// Optional
  2213  	//
  2214  	// NOTE: FFI_USE_OpenRequestId MUST be set to true to make this field effective.
  2215  	OpenRequestId int32
  2216  	// Offset is "ReadFileRequestedOptions.offset"
  2217  	//
  2218  	// Optional
  2219  	//
  2220  	// NOTE: FFI_USE_Offset MUST be set to true to make this field effective.
  2221  	Offset float64
  2222  	// Length is "ReadFileRequestedOptions.length"
  2223  	//
  2224  	// Optional
  2225  	//
  2226  	// NOTE: FFI_USE_Length MUST be set to true to make this field effective.
  2227  	Length float64
  2228  
  2229  	FFI_USE_RequestId     bool // for RequestId.
  2230  	FFI_USE_OpenRequestId bool // for OpenRequestId.
  2231  	FFI_USE_Offset        bool // for Offset.
  2232  	FFI_USE_Length        bool // for Length.
  2233  
  2234  	FFI_USE bool
  2235  }
  2236  
  2237  // FromRef calls UpdateFrom and returns a ReadFileRequestedOptions with all fields set.
  2238  func (p ReadFileRequestedOptions) FromRef(ref js.Ref) ReadFileRequestedOptions {
  2239  	p.UpdateFrom(ref)
  2240  	return p
  2241  }
  2242  
  2243  // New creates a new ReadFileRequestedOptions in the application heap.
  2244  func (p ReadFileRequestedOptions) New() js.Ref {
  2245  	return bindings.ReadFileRequestedOptionsJSLoad(
  2246  		js.Pointer(&p), js.True, 0,
  2247  	)
  2248  }
  2249  
  2250  // UpdateFrom copies value of all fields of the heap object to p.
  2251  func (p *ReadFileRequestedOptions) UpdateFrom(ref js.Ref) {
  2252  	bindings.ReadFileRequestedOptionsJSStore(
  2253  		js.Pointer(p), ref,
  2254  	)
  2255  }
  2256  
  2257  // Update writes all fields of the p to the heap object referenced by ref.
  2258  func (p *ReadFileRequestedOptions) Update(ref js.Ref) {
  2259  	bindings.ReadFileRequestedOptionsJSLoad(
  2260  		js.Pointer(p), js.False, ref,
  2261  	)
  2262  }
  2263  
  2264  // FreeMembers frees fields with heap reference, if recursive is true
  2265  // free all heap references reachable from p.
  2266  func (p *ReadFileRequestedOptions) FreeMembers(recursive bool) {
  2267  	js.Free(
  2268  		p.FileSystemId.Ref(),
  2269  	)
  2270  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2271  }
  2272  
  2273  type RemoveWatcherRequestedOptions struct {
  2274  	// FileSystemId is "RemoveWatcherRequestedOptions.fileSystemId"
  2275  	//
  2276  	// Optional
  2277  	FileSystemId js.String
  2278  	// RequestId is "RemoveWatcherRequestedOptions.requestId"
  2279  	//
  2280  	// Optional
  2281  	//
  2282  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  2283  	RequestId int32
  2284  	// EntryPath is "RemoveWatcherRequestedOptions.entryPath"
  2285  	//
  2286  	// Optional
  2287  	EntryPath js.String
  2288  	// Recursive is "RemoveWatcherRequestedOptions.recursive"
  2289  	//
  2290  	// Optional
  2291  	//
  2292  	// NOTE: FFI_USE_Recursive MUST be set to true to make this field effective.
  2293  	Recursive bool
  2294  
  2295  	FFI_USE_RequestId bool // for RequestId.
  2296  	FFI_USE_Recursive bool // for Recursive.
  2297  
  2298  	FFI_USE bool
  2299  }
  2300  
  2301  // FromRef calls UpdateFrom and returns a RemoveWatcherRequestedOptions with all fields set.
  2302  func (p RemoveWatcherRequestedOptions) FromRef(ref js.Ref) RemoveWatcherRequestedOptions {
  2303  	p.UpdateFrom(ref)
  2304  	return p
  2305  }
  2306  
  2307  // New creates a new RemoveWatcherRequestedOptions in the application heap.
  2308  func (p RemoveWatcherRequestedOptions) New() js.Ref {
  2309  	return bindings.RemoveWatcherRequestedOptionsJSLoad(
  2310  		js.Pointer(&p), js.True, 0,
  2311  	)
  2312  }
  2313  
  2314  // UpdateFrom copies value of all fields of the heap object to p.
  2315  func (p *RemoveWatcherRequestedOptions) UpdateFrom(ref js.Ref) {
  2316  	bindings.RemoveWatcherRequestedOptionsJSStore(
  2317  		js.Pointer(p), ref,
  2318  	)
  2319  }
  2320  
  2321  // Update writes all fields of the p to the heap object referenced by ref.
  2322  func (p *RemoveWatcherRequestedOptions) Update(ref js.Ref) {
  2323  	bindings.RemoveWatcherRequestedOptionsJSLoad(
  2324  		js.Pointer(p), js.False, ref,
  2325  	)
  2326  }
  2327  
  2328  // FreeMembers frees fields with heap reference, if recursive is true
  2329  // free all heap references reachable from p.
  2330  func (p *RemoveWatcherRequestedOptions) FreeMembers(recursive bool) {
  2331  	js.Free(
  2332  		p.FileSystemId.Ref(),
  2333  		p.EntryPath.Ref(),
  2334  	)
  2335  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2336  	p.EntryPath = p.EntryPath.FromRef(js.Undefined)
  2337  }
  2338  
  2339  type ResultCallbackFunc func(this js.Ref) js.Ref
  2340  
  2341  func (fn ResultCallbackFunc) Register() js.Func[func()] {
  2342  	return js.RegisterCallback[func()](
  2343  		fn, abi.FuncPCABIInternal(fn),
  2344  	)
  2345  }
  2346  
  2347  func (fn ResultCallbackFunc) DispatchCallback(
  2348  	targetPC uintptr, ctx *js.CallbackContext,
  2349  ) {
  2350  	args := ctx.Args()
  2351  	if len(args) != 0+1 /* js this */ ||
  2352  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  2353  		js.ThrowInvalidCallbackInvocation()
  2354  	}
  2355  
  2356  	if ctx.Return(fn(
  2357  		args[0],
  2358  	)) {
  2359  		return
  2360  	}
  2361  
  2362  	js.ThrowCallbackValueNotReturned()
  2363  }
  2364  
  2365  type ResultCallback[T any] struct {
  2366  	Fn  func(arg T, this js.Ref) js.Ref
  2367  	Arg T
  2368  }
  2369  
  2370  func (cb *ResultCallback[T]) Register() js.Func[func()] {
  2371  	return js.RegisterCallback[func()](
  2372  		cb, abi.FuncPCABIInternal(cb.Fn),
  2373  	)
  2374  }
  2375  
  2376  func (cb *ResultCallback[T]) DispatchCallback(
  2377  	targetPC uintptr, ctx *js.CallbackContext,
  2378  ) {
  2379  	args := ctx.Args()
  2380  	if len(args) != 0+1 /* js this */ ||
  2381  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2382  		js.ThrowInvalidCallbackInvocation()
  2383  	}
  2384  
  2385  	if ctx.Return(cb.Fn(
  2386  		cb.Arg,
  2387  		args[0],
  2388  	)) {
  2389  		return
  2390  	}
  2391  
  2392  	js.ThrowCallbackValueNotReturned()
  2393  }
  2394  
  2395  type TruncateRequestedOptions struct {
  2396  	// FileSystemId is "TruncateRequestedOptions.fileSystemId"
  2397  	//
  2398  	// Optional
  2399  	FileSystemId js.String
  2400  	// RequestId is "TruncateRequestedOptions.requestId"
  2401  	//
  2402  	// Optional
  2403  	//
  2404  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  2405  	RequestId int32
  2406  	// FilePath is "TruncateRequestedOptions.filePath"
  2407  	//
  2408  	// Optional
  2409  	FilePath js.String
  2410  	// Length is "TruncateRequestedOptions.length"
  2411  	//
  2412  	// Optional
  2413  	//
  2414  	// NOTE: FFI_USE_Length MUST be set to true to make this field effective.
  2415  	Length float64
  2416  
  2417  	FFI_USE_RequestId bool // for RequestId.
  2418  	FFI_USE_Length    bool // for Length.
  2419  
  2420  	FFI_USE bool
  2421  }
  2422  
  2423  // FromRef calls UpdateFrom and returns a TruncateRequestedOptions with all fields set.
  2424  func (p TruncateRequestedOptions) FromRef(ref js.Ref) TruncateRequestedOptions {
  2425  	p.UpdateFrom(ref)
  2426  	return p
  2427  }
  2428  
  2429  // New creates a new TruncateRequestedOptions in the application heap.
  2430  func (p TruncateRequestedOptions) New() js.Ref {
  2431  	return bindings.TruncateRequestedOptionsJSLoad(
  2432  		js.Pointer(&p), js.True, 0,
  2433  	)
  2434  }
  2435  
  2436  // UpdateFrom copies value of all fields of the heap object to p.
  2437  func (p *TruncateRequestedOptions) UpdateFrom(ref js.Ref) {
  2438  	bindings.TruncateRequestedOptionsJSStore(
  2439  		js.Pointer(p), ref,
  2440  	)
  2441  }
  2442  
  2443  // Update writes all fields of the p to the heap object referenced by ref.
  2444  func (p *TruncateRequestedOptions) Update(ref js.Ref) {
  2445  	bindings.TruncateRequestedOptionsJSLoad(
  2446  		js.Pointer(p), js.False, ref,
  2447  	)
  2448  }
  2449  
  2450  // FreeMembers frees fields with heap reference, if recursive is true
  2451  // free all heap references reachable from p.
  2452  func (p *TruncateRequestedOptions) FreeMembers(recursive bool) {
  2453  	js.Free(
  2454  		p.FileSystemId.Ref(),
  2455  		p.FilePath.Ref(),
  2456  	)
  2457  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2458  	p.FilePath = p.FilePath.FromRef(js.Undefined)
  2459  }
  2460  
  2461  type UnmountOptions struct {
  2462  	// FileSystemId is "UnmountOptions.fileSystemId"
  2463  	//
  2464  	// Optional
  2465  	FileSystemId js.String
  2466  
  2467  	FFI_USE bool
  2468  }
  2469  
  2470  // FromRef calls UpdateFrom and returns a UnmountOptions with all fields set.
  2471  func (p UnmountOptions) FromRef(ref js.Ref) UnmountOptions {
  2472  	p.UpdateFrom(ref)
  2473  	return p
  2474  }
  2475  
  2476  // New creates a new UnmountOptions in the application heap.
  2477  func (p UnmountOptions) New() js.Ref {
  2478  	return bindings.UnmountOptionsJSLoad(
  2479  		js.Pointer(&p), js.True, 0,
  2480  	)
  2481  }
  2482  
  2483  // UpdateFrom copies value of all fields of the heap object to p.
  2484  func (p *UnmountOptions) UpdateFrom(ref js.Ref) {
  2485  	bindings.UnmountOptionsJSStore(
  2486  		js.Pointer(p), ref,
  2487  	)
  2488  }
  2489  
  2490  // Update writes all fields of the p to the heap object referenced by ref.
  2491  func (p *UnmountOptions) Update(ref js.Ref) {
  2492  	bindings.UnmountOptionsJSLoad(
  2493  		js.Pointer(p), js.False, ref,
  2494  	)
  2495  }
  2496  
  2497  // FreeMembers frees fields with heap reference, if recursive is true
  2498  // free all heap references reachable from p.
  2499  func (p *UnmountOptions) FreeMembers(recursive bool) {
  2500  	js.Free(
  2501  		p.FileSystemId.Ref(),
  2502  	)
  2503  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2504  }
  2505  
  2506  type UnmountRequestedOptions struct {
  2507  	// FileSystemId is "UnmountRequestedOptions.fileSystemId"
  2508  	//
  2509  	// Optional
  2510  	FileSystemId js.String
  2511  	// RequestId is "UnmountRequestedOptions.requestId"
  2512  	//
  2513  	// Optional
  2514  	//
  2515  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  2516  	RequestId int32
  2517  
  2518  	FFI_USE_RequestId bool // for RequestId.
  2519  
  2520  	FFI_USE bool
  2521  }
  2522  
  2523  // FromRef calls UpdateFrom and returns a UnmountRequestedOptions with all fields set.
  2524  func (p UnmountRequestedOptions) FromRef(ref js.Ref) UnmountRequestedOptions {
  2525  	p.UpdateFrom(ref)
  2526  	return p
  2527  }
  2528  
  2529  // New creates a new UnmountRequestedOptions in the application heap.
  2530  func (p UnmountRequestedOptions) New() js.Ref {
  2531  	return bindings.UnmountRequestedOptionsJSLoad(
  2532  		js.Pointer(&p), js.True, 0,
  2533  	)
  2534  }
  2535  
  2536  // UpdateFrom copies value of all fields of the heap object to p.
  2537  func (p *UnmountRequestedOptions) UpdateFrom(ref js.Ref) {
  2538  	bindings.UnmountRequestedOptionsJSStore(
  2539  		js.Pointer(p), ref,
  2540  	)
  2541  }
  2542  
  2543  // Update writes all fields of the p to the heap object referenced by ref.
  2544  func (p *UnmountRequestedOptions) Update(ref js.Ref) {
  2545  	bindings.UnmountRequestedOptionsJSLoad(
  2546  		js.Pointer(p), js.False, ref,
  2547  	)
  2548  }
  2549  
  2550  // FreeMembers frees fields with heap reference, if recursive is true
  2551  // free all heap references reachable from p.
  2552  func (p *UnmountRequestedOptions) FreeMembers(recursive bool) {
  2553  	js.Free(
  2554  		p.FileSystemId.Ref(),
  2555  	)
  2556  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2557  }
  2558  
  2559  type WriteFileRequestedOptions struct {
  2560  	// FileSystemId is "WriteFileRequestedOptions.fileSystemId"
  2561  	//
  2562  	// Optional
  2563  	FileSystemId js.String
  2564  	// RequestId is "WriteFileRequestedOptions.requestId"
  2565  	//
  2566  	// Optional
  2567  	//
  2568  	// NOTE: FFI_USE_RequestId MUST be set to true to make this field effective.
  2569  	RequestId int32
  2570  	// OpenRequestId is "WriteFileRequestedOptions.openRequestId"
  2571  	//
  2572  	// Optional
  2573  	//
  2574  	// NOTE: FFI_USE_OpenRequestId MUST be set to true to make this field effective.
  2575  	OpenRequestId int32
  2576  	// Offset is "WriteFileRequestedOptions.offset"
  2577  	//
  2578  	// Optional
  2579  	//
  2580  	// NOTE: FFI_USE_Offset MUST be set to true to make this field effective.
  2581  	Offset float64
  2582  	// Data is "WriteFileRequestedOptions.data"
  2583  	//
  2584  	// Optional
  2585  	Data js.ArrayBuffer
  2586  
  2587  	FFI_USE_RequestId     bool // for RequestId.
  2588  	FFI_USE_OpenRequestId bool // for OpenRequestId.
  2589  	FFI_USE_Offset        bool // for Offset.
  2590  
  2591  	FFI_USE bool
  2592  }
  2593  
  2594  // FromRef calls UpdateFrom and returns a WriteFileRequestedOptions with all fields set.
  2595  func (p WriteFileRequestedOptions) FromRef(ref js.Ref) WriteFileRequestedOptions {
  2596  	p.UpdateFrom(ref)
  2597  	return p
  2598  }
  2599  
  2600  // New creates a new WriteFileRequestedOptions in the application heap.
  2601  func (p WriteFileRequestedOptions) New() js.Ref {
  2602  	return bindings.WriteFileRequestedOptionsJSLoad(
  2603  		js.Pointer(&p), js.True, 0,
  2604  	)
  2605  }
  2606  
  2607  // UpdateFrom copies value of all fields of the heap object to p.
  2608  func (p *WriteFileRequestedOptions) UpdateFrom(ref js.Ref) {
  2609  	bindings.WriteFileRequestedOptionsJSStore(
  2610  		js.Pointer(p), ref,
  2611  	)
  2612  }
  2613  
  2614  // Update writes all fields of the p to the heap object referenced by ref.
  2615  func (p *WriteFileRequestedOptions) Update(ref js.Ref) {
  2616  	bindings.WriteFileRequestedOptionsJSLoad(
  2617  		js.Pointer(p), js.False, ref,
  2618  	)
  2619  }
  2620  
  2621  // FreeMembers frees fields with heap reference, if recursive is true
  2622  // free all heap references reachable from p.
  2623  func (p *WriteFileRequestedOptions) FreeMembers(recursive bool) {
  2624  	js.Free(
  2625  		p.FileSystemId.Ref(),
  2626  		p.Data.Ref(),
  2627  	)
  2628  	p.FileSystemId = p.FileSystemId.FromRef(js.Undefined)
  2629  	p.Data = p.Data.FromRef(js.Undefined)
  2630  }
  2631  
  2632  // HasFuncGet returns true if the function "WEBEXT.fileSystemProvider.get" exists.
  2633  func HasFuncGet() bool {
  2634  	return js.True == bindings.HasFuncGet()
  2635  }
  2636  
  2637  // FuncGet returns the function "WEBEXT.fileSystemProvider.get".
  2638  func FuncGet() (fn js.Func[func(fileSystemId js.String) js.Promise[FileSystemInfo]]) {
  2639  	bindings.FuncGet(
  2640  		js.Pointer(&fn),
  2641  	)
  2642  	return
  2643  }
  2644  
  2645  // Get calls the function "WEBEXT.fileSystemProvider.get" directly.
  2646  func Get(fileSystemId js.String) (ret js.Promise[FileSystemInfo]) {
  2647  	bindings.CallGet(
  2648  		js.Pointer(&ret),
  2649  		fileSystemId.Ref(),
  2650  	)
  2651  
  2652  	return
  2653  }
  2654  
  2655  // TryGet calls the function "WEBEXT.fileSystemProvider.get"
  2656  // in a try/catch block and returns (_, err, ok = false) when it went through
  2657  // the catch clause.
  2658  func TryGet(fileSystemId js.String) (ret js.Promise[FileSystemInfo], exception js.Any, ok bool) {
  2659  	ok = js.True == bindings.TryGet(
  2660  		js.Pointer(&ret), js.Pointer(&exception),
  2661  		fileSystemId.Ref(),
  2662  	)
  2663  
  2664  	return
  2665  }
  2666  
  2667  // HasFuncGetAll returns true if the function "WEBEXT.fileSystemProvider.getAll" exists.
  2668  func HasFuncGetAll() bool {
  2669  	return js.True == bindings.HasFuncGetAll()
  2670  }
  2671  
  2672  // FuncGetAll returns the function "WEBEXT.fileSystemProvider.getAll".
  2673  func FuncGetAll() (fn js.Func[func() js.Promise[js.Array[FileSystemInfo]]]) {
  2674  	bindings.FuncGetAll(
  2675  		js.Pointer(&fn),
  2676  	)
  2677  	return
  2678  }
  2679  
  2680  // GetAll calls the function "WEBEXT.fileSystemProvider.getAll" directly.
  2681  func GetAll() (ret js.Promise[js.Array[FileSystemInfo]]) {
  2682  	bindings.CallGetAll(
  2683  		js.Pointer(&ret),
  2684  	)
  2685  
  2686  	return
  2687  }
  2688  
  2689  // TryGetAll calls the function "WEBEXT.fileSystemProvider.getAll"
  2690  // in a try/catch block and returns (_, err, ok = false) when it went through
  2691  // the catch clause.
  2692  func TryGetAll() (ret js.Promise[js.Array[FileSystemInfo]], exception js.Any, ok bool) {
  2693  	ok = js.True == bindings.TryGetAll(
  2694  		js.Pointer(&ret), js.Pointer(&exception),
  2695  	)
  2696  
  2697  	return
  2698  }
  2699  
  2700  // HasFuncMount returns true if the function "WEBEXT.fileSystemProvider.mount" exists.
  2701  func HasFuncMount() bool {
  2702  	return js.True == bindings.HasFuncMount()
  2703  }
  2704  
  2705  // FuncMount returns the function "WEBEXT.fileSystemProvider.mount".
  2706  func FuncMount() (fn js.Func[func(options MountOptions) js.Promise[js.Void]]) {
  2707  	bindings.FuncMount(
  2708  		js.Pointer(&fn),
  2709  	)
  2710  	return
  2711  }
  2712  
  2713  // Mount calls the function "WEBEXT.fileSystemProvider.mount" directly.
  2714  func Mount(options MountOptions) (ret js.Promise[js.Void]) {
  2715  	bindings.CallMount(
  2716  		js.Pointer(&ret),
  2717  		js.Pointer(&options),
  2718  	)
  2719  
  2720  	return
  2721  }
  2722  
  2723  // TryMount calls the function "WEBEXT.fileSystemProvider.mount"
  2724  // in a try/catch block and returns (_, err, ok = false) when it went through
  2725  // the catch clause.
  2726  func TryMount(options MountOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  2727  	ok = js.True == bindings.TryMount(
  2728  		js.Pointer(&ret), js.Pointer(&exception),
  2729  		js.Pointer(&options),
  2730  	)
  2731  
  2732  	return
  2733  }
  2734  
  2735  // HasFuncNotify returns true if the function "WEBEXT.fileSystemProvider.notify" exists.
  2736  func HasFuncNotify() bool {
  2737  	return js.True == bindings.HasFuncNotify()
  2738  }
  2739  
  2740  // FuncNotify returns the function "WEBEXT.fileSystemProvider.notify".
  2741  func FuncNotify() (fn js.Func[func(options NotifyOptions) js.Promise[js.Void]]) {
  2742  	bindings.FuncNotify(
  2743  		js.Pointer(&fn),
  2744  	)
  2745  	return
  2746  }
  2747  
  2748  // Notify calls the function "WEBEXT.fileSystemProvider.notify" directly.
  2749  func Notify(options NotifyOptions) (ret js.Promise[js.Void]) {
  2750  	bindings.CallNotify(
  2751  		js.Pointer(&ret),
  2752  		js.Pointer(&options),
  2753  	)
  2754  
  2755  	return
  2756  }
  2757  
  2758  // TryNotify calls the function "WEBEXT.fileSystemProvider.notify"
  2759  // in a try/catch block and returns (_, err, ok = false) when it went through
  2760  // the catch clause.
  2761  func TryNotify(options NotifyOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  2762  	ok = js.True == bindings.TryNotify(
  2763  		js.Pointer(&ret), js.Pointer(&exception),
  2764  		js.Pointer(&options),
  2765  	)
  2766  
  2767  	return
  2768  }
  2769  
  2770  type OnAbortRequestedEventCallbackFunc func(this js.Ref, options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  2771  
  2772  func (fn OnAbortRequestedEventCallbackFunc) Register() js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  2773  	return js.RegisterCallback[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  2774  		fn, abi.FuncPCABIInternal(fn),
  2775  	)
  2776  }
  2777  
  2778  func (fn OnAbortRequestedEventCallbackFunc) DispatchCallback(
  2779  	targetPC uintptr, ctx *js.CallbackContext,
  2780  ) {
  2781  	args := ctx.Args()
  2782  	if len(args) != 3+1 /* js this */ ||
  2783  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  2784  		js.ThrowInvalidCallbackInvocation()
  2785  	}
  2786  	var arg0 AbortRequestedOptions
  2787  	arg0.UpdateFrom(args[0+1])
  2788  	defer arg0.FreeMembers(true)
  2789  
  2790  	if ctx.Return(fn(
  2791  		args[0],
  2792  
  2793  		mark.NoEscape(&arg0),
  2794  		js.Func[func()]{}.FromRef(args[1+1]),
  2795  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  2796  	)) {
  2797  		return
  2798  	}
  2799  
  2800  	js.ThrowCallbackValueNotReturned()
  2801  }
  2802  
  2803  type OnAbortRequestedEventCallback[T any] struct {
  2804  	Fn  func(arg T, this js.Ref, options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  2805  	Arg T
  2806  }
  2807  
  2808  func (cb *OnAbortRequestedEventCallback[T]) Register() js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  2809  	return js.RegisterCallback[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  2810  		cb, abi.FuncPCABIInternal(cb.Fn),
  2811  	)
  2812  }
  2813  
  2814  func (cb *OnAbortRequestedEventCallback[T]) DispatchCallback(
  2815  	targetPC uintptr, ctx *js.CallbackContext,
  2816  ) {
  2817  	args := ctx.Args()
  2818  	if len(args) != 3+1 /* js this */ ||
  2819  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2820  		js.ThrowInvalidCallbackInvocation()
  2821  	}
  2822  	var arg0 AbortRequestedOptions
  2823  	arg0.UpdateFrom(args[0+1])
  2824  	defer arg0.FreeMembers(true)
  2825  
  2826  	if ctx.Return(cb.Fn(
  2827  		cb.Arg,
  2828  		args[0],
  2829  
  2830  		mark.NoEscape(&arg0),
  2831  		js.Func[func()]{}.FromRef(args[1+1]),
  2832  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  2833  	)) {
  2834  		return
  2835  	}
  2836  
  2837  	js.ThrowCallbackValueNotReturned()
  2838  }
  2839  
  2840  // HasFuncOnAbortRequested returns true if the function "WEBEXT.fileSystemProvider.onAbortRequested.addListener" exists.
  2841  func HasFuncOnAbortRequested() bool {
  2842  	return js.True == bindings.HasFuncOnAbortRequested()
  2843  }
  2844  
  2845  // FuncOnAbortRequested returns the function "WEBEXT.fileSystemProvider.onAbortRequested.addListener".
  2846  func FuncOnAbortRequested() (fn js.Func[func(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  2847  	bindings.FuncOnAbortRequested(
  2848  		js.Pointer(&fn),
  2849  	)
  2850  	return
  2851  }
  2852  
  2853  // OnAbortRequested calls the function "WEBEXT.fileSystemProvider.onAbortRequested.addListener" directly.
  2854  func OnAbortRequested(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  2855  	bindings.CallOnAbortRequested(
  2856  		js.Pointer(&ret),
  2857  		callback.Ref(),
  2858  	)
  2859  
  2860  	return
  2861  }
  2862  
  2863  // TryOnAbortRequested calls the function "WEBEXT.fileSystemProvider.onAbortRequested.addListener"
  2864  // in a try/catch block and returns (_, err, ok = false) when it went through
  2865  // the catch clause.
  2866  func TryOnAbortRequested(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  2867  	ok = js.True == bindings.TryOnAbortRequested(
  2868  		js.Pointer(&ret), js.Pointer(&exception),
  2869  		callback.Ref(),
  2870  	)
  2871  
  2872  	return
  2873  }
  2874  
  2875  // HasFuncOffAbortRequested returns true if the function "WEBEXT.fileSystemProvider.onAbortRequested.removeListener" exists.
  2876  func HasFuncOffAbortRequested() bool {
  2877  	return js.True == bindings.HasFuncOffAbortRequested()
  2878  }
  2879  
  2880  // FuncOffAbortRequested returns the function "WEBEXT.fileSystemProvider.onAbortRequested.removeListener".
  2881  func FuncOffAbortRequested() (fn js.Func[func(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  2882  	bindings.FuncOffAbortRequested(
  2883  		js.Pointer(&fn),
  2884  	)
  2885  	return
  2886  }
  2887  
  2888  // OffAbortRequested calls the function "WEBEXT.fileSystemProvider.onAbortRequested.removeListener" directly.
  2889  func OffAbortRequested(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  2890  	bindings.CallOffAbortRequested(
  2891  		js.Pointer(&ret),
  2892  		callback.Ref(),
  2893  	)
  2894  
  2895  	return
  2896  }
  2897  
  2898  // TryOffAbortRequested calls the function "WEBEXT.fileSystemProvider.onAbortRequested.removeListener"
  2899  // in a try/catch block and returns (_, err, ok = false) when it went through
  2900  // the catch clause.
  2901  func TryOffAbortRequested(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  2902  	ok = js.True == bindings.TryOffAbortRequested(
  2903  		js.Pointer(&ret), js.Pointer(&exception),
  2904  		callback.Ref(),
  2905  	)
  2906  
  2907  	return
  2908  }
  2909  
  2910  // HasFuncHasOnAbortRequested returns true if the function "WEBEXT.fileSystemProvider.onAbortRequested.hasListener" exists.
  2911  func HasFuncHasOnAbortRequested() bool {
  2912  	return js.True == bindings.HasFuncHasOnAbortRequested()
  2913  }
  2914  
  2915  // FuncHasOnAbortRequested returns the function "WEBEXT.fileSystemProvider.onAbortRequested.hasListener".
  2916  func FuncHasOnAbortRequested() (fn js.Func[func(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  2917  	bindings.FuncHasOnAbortRequested(
  2918  		js.Pointer(&fn),
  2919  	)
  2920  	return
  2921  }
  2922  
  2923  // HasOnAbortRequested calls the function "WEBEXT.fileSystemProvider.onAbortRequested.hasListener" directly.
  2924  func HasOnAbortRequested(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  2925  	bindings.CallHasOnAbortRequested(
  2926  		js.Pointer(&ret),
  2927  		callback.Ref(),
  2928  	)
  2929  
  2930  	return
  2931  }
  2932  
  2933  // TryHasOnAbortRequested calls the function "WEBEXT.fileSystemProvider.onAbortRequested.hasListener"
  2934  // in a try/catch block and returns (_, err, ok = false) when it went through
  2935  // the catch clause.
  2936  func TryHasOnAbortRequested(callback js.Func[func(options *AbortRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  2937  	ok = js.True == bindings.TryHasOnAbortRequested(
  2938  		js.Pointer(&ret), js.Pointer(&exception),
  2939  		callback.Ref(),
  2940  	)
  2941  
  2942  	return
  2943  }
  2944  
  2945  type OnAddWatcherRequestedEventCallbackFunc func(this js.Ref, options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  2946  
  2947  func (fn OnAddWatcherRequestedEventCallbackFunc) Register() js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  2948  	return js.RegisterCallback[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  2949  		fn, abi.FuncPCABIInternal(fn),
  2950  	)
  2951  }
  2952  
  2953  func (fn OnAddWatcherRequestedEventCallbackFunc) DispatchCallback(
  2954  	targetPC uintptr, ctx *js.CallbackContext,
  2955  ) {
  2956  	args := ctx.Args()
  2957  	if len(args) != 3+1 /* js this */ ||
  2958  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  2959  		js.ThrowInvalidCallbackInvocation()
  2960  	}
  2961  	var arg0 AddWatcherRequestedOptions
  2962  	arg0.UpdateFrom(args[0+1])
  2963  	defer arg0.FreeMembers(true)
  2964  
  2965  	if ctx.Return(fn(
  2966  		args[0],
  2967  
  2968  		mark.NoEscape(&arg0),
  2969  		js.Func[func()]{}.FromRef(args[1+1]),
  2970  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  2971  	)) {
  2972  		return
  2973  	}
  2974  
  2975  	js.ThrowCallbackValueNotReturned()
  2976  }
  2977  
  2978  type OnAddWatcherRequestedEventCallback[T any] struct {
  2979  	Fn  func(arg T, this js.Ref, options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  2980  	Arg T
  2981  }
  2982  
  2983  func (cb *OnAddWatcherRequestedEventCallback[T]) Register() js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  2984  	return js.RegisterCallback[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  2985  		cb, abi.FuncPCABIInternal(cb.Fn),
  2986  	)
  2987  }
  2988  
  2989  func (cb *OnAddWatcherRequestedEventCallback[T]) DispatchCallback(
  2990  	targetPC uintptr, ctx *js.CallbackContext,
  2991  ) {
  2992  	args := ctx.Args()
  2993  	if len(args) != 3+1 /* js this */ ||
  2994  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2995  		js.ThrowInvalidCallbackInvocation()
  2996  	}
  2997  	var arg0 AddWatcherRequestedOptions
  2998  	arg0.UpdateFrom(args[0+1])
  2999  	defer arg0.FreeMembers(true)
  3000  
  3001  	if ctx.Return(cb.Fn(
  3002  		cb.Arg,
  3003  		args[0],
  3004  
  3005  		mark.NoEscape(&arg0),
  3006  		js.Func[func()]{}.FromRef(args[1+1]),
  3007  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3008  	)) {
  3009  		return
  3010  	}
  3011  
  3012  	js.ThrowCallbackValueNotReturned()
  3013  }
  3014  
  3015  // HasFuncOnAddWatcherRequested returns true if the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.addListener" exists.
  3016  func HasFuncOnAddWatcherRequested() bool {
  3017  	return js.True == bindings.HasFuncOnAddWatcherRequested()
  3018  }
  3019  
  3020  // FuncOnAddWatcherRequested returns the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.addListener".
  3021  func FuncOnAddWatcherRequested() (fn js.Func[func(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3022  	bindings.FuncOnAddWatcherRequested(
  3023  		js.Pointer(&fn),
  3024  	)
  3025  	return
  3026  }
  3027  
  3028  // OnAddWatcherRequested calls the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.addListener" directly.
  3029  func OnAddWatcherRequested(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3030  	bindings.CallOnAddWatcherRequested(
  3031  		js.Pointer(&ret),
  3032  		callback.Ref(),
  3033  	)
  3034  
  3035  	return
  3036  }
  3037  
  3038  // TryOnAddWatcherRequested calls the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.addListener"
  3039  // in a try/catch block and returns (_, err, ok = false) when it went through
  3040  // the catch clause.
  3041  func TryOnAddWatcherRequested(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3042  	ok = js.True == bindings.TryOnAddWatcherRequested(
  3043  		js.Pointer(&ret), js.Pointer(&exception),
  3044  		callback.Ref(),
  3045  	)
  3046  
  3047  	return
  3048  }
  3049  
  3050  // HasFuncOffAddWatcherRequested returns true if the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.removeListener" exists.
  3051  func HasFuncOffAddWatcherRequested() bool {
  3052  	return js.True == bindings.HasFuncOffAddWatcherRequested()
  3053  }
  3054  
  3055  // FuncOffAddWatcherRequested returns the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.removeListener".
  3056  func FuncOffAddWatcherRequested() (fn js.Func[func(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3057  	bindings.FuncOffAddWatcherRequested(
  3058  		js.Pointer(&fn),
  3059  	)
  3060  	return
  3061  }
  3062  
  3063  // OffAddWatcherRequested calls the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.removeListener" directly.
  3064  func OffAddWatcherRequested(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3065  	bindings.CallOffAddWatcherRequested(
  3066  		js.Pointer(&ret),
  3067  		callback.Ref(),
  3068  	)
  3069  
  3070  	return
  3071  }
  3072  
  3073  // TryOffAddWatcherRequested calls the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.removeListener"
  3074  // in a try/catch block and returns (_, err, ok = false) when it went through
  3075  // the catch clause.
  3076  func TryOffAddWatcherRequested(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3077  	ok = js.True == bindings.TryOffAddWatcherRequested(
  3078  		js.Pointer(&ret), js.Pointer(&exception),
  3079  		callback.Ref(),
  3080  	)
  3081  
  3082  	return
  3083  }
  3084  
  3085  // HasFuncHasOnAddWatcherRequested returns true if the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.hasListener" exists.
  3086  func HasFuncHasOnAddWatcherRequested() bool {
  3087  	return js.True == bindings.HasFuncHasOnAddWatcherRequested()
  3088  }
  3089  
  3090  // FuncHasOnAddWatcherRequested returns the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.hasListener".
  3091  func FuncHasOnAddWatcherRequested() (fn js.Func[func(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  3092  	bindings.FuncHasOnAddWatcherRequested(
  3093  		js.Pointer(&fn),
  3094  	)
  3095  	return
  3096  }
  3097  
  3098  // HasOnAddWatcherRequested calls the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.hasListener" directly.
  3099  func HasOnAddWatcherRequested(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  3100  	bindings.CallHasOnAddWatcherRequested(
  3101  		js.Pointer(&ret),
  3102  		callback.Ref(),
  3103  	)
  3104  
  3105  	return
  3106  }
  3107  
  3108  // TryHasOnAddWatcherRequested calls the function "WEBEXT.fileSystemProvider.onAddWatcherRequested.hasListener"
  3109  // in a try/catch block and returns (_, err, ok = false) when it went through
  3110  // the catch clause.
  3111  func TryHasOnAddWatcherRequested(callback js.Func[func(options *AddWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  3112  	ok = js.True == bindings.TryHasOnAddWatcherRequested(
  3113  		js.Pointer(&ret), js.Pointer(&exception),
  3114  		callback.Ref(),
  3115  	)
  3116  
  3117  	return
  3118  }
  3119  
  3120  type OnCloseFileRequestedEventCallbackFunc func(this js.Ref, options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3121  
  3122  func (fn OnCloseFileRequestedEventCallbackFunc) Register() js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3123  	return js.RegisterCallback[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3124  		fn, abi.FuncPCABIInternal(fn),
  3125  	)
  3126  }
  3127  
  3128  func (fn OnCloseFileRequestedEventCallbackFunc) DispatchCallback(
  3129  	targetPC uintptr, ctx *js.CallbackContext,
  3130  ) {
  3131  	args := ctx.Args()
  3132  	if len(args) != 3+1 /* js this */ ||
  3133  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3134  		js.ThrowInvalidCallbackInvocation()
  3135  	}
  3136  	var arg0 CloseFileRequestedOptions
  3137  	arg0.UpdateFrom(args[0+1])
  3138  	defer arg0.FreeMembers(true)
  3139  
  3140  	if ctx.Return(fn(
  3141  		args[0],
  3142  
  3143  		mark.NoEscape(&arg0),
  3144  		js.Func[func()]{}.FromRef(args[1+1]),
  3145  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3146  	)) {
  3147  		return
  3148  	}
  3149  
  3150  	js.ThrowCallbackValueNotReturned()
  3151  }
  3152  
  3153  type OnCloseFileRequestedEventCallback[T any] struct {
  3154  	Fn  func(arg T, this js.Ref, options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3155  	Arg T
  3156  }
  3157  
  3158  func (cb *OnCloseFileRequestedEventCallback[T]) Register() js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3159  	return js.RegisterCallback[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3160  		cb, abi.FuncPCABIInternal(cb.Fn),
  3161  	)
  3162  }
  3163  
  3164  func (cb *OnCloseFileRequestedEventCallback[T]) DispatchCallback(
  3165  	targetPC uintptr, ctx *js.CallbackContext,
  3166  ) {
  3167  	args := ctx.Args()
  3168  	if len(args) != 3+1 /* js this */ ||
  3169  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3170  		js.ThrowInvalidCallbackInvocation()
  3171  	}
  3172  	var arg0 CloseFileRequestedOptions
  3173  	arg0.UpdateFrom(args[0+1])
  3174  	defer arg0.FreeMembers(true)
  3175  
  3176  	if ctx.Return(cb.Fn(
  3177  		cb.Arg,
  3178  		args[0],
  3179  
  3180  		mark.NoEscape(&arg0),
  3181  		js.Func[func()]{}.FromRef(args[1+1]),
  3182  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3183  	)) {
  3184  		return
  3185  	}
  3186  
  3187  	js.ThrowCallbackValueNotReturned()
  3188  }
  3189  
  3190  // HasFuncOnCloseFileRequested returns true if the function "WEBEXT.fileSystemProvider.onCloseFileRequested.addListener" exists.
  3191  func HasFuncOnCloseFileRequested() bool {
  3192  	return js.True == bindings.HasFuncOnCloseFileRequested()
  3193  }
  3194  
  3195  // FuncOnCloseFileRequested returns the function "WEBEXT.fileSystemProvider.onCloseFileRequested.addListener".
  3196  func FuncOnCloseFileRequested() (fn js.Func[func(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3197  	bindings.FuncOnCloseFileRequested(
  3198  		js.Pointer(&fn),
  3199  	)
  3200  	return
  3201  }
  3202  
  3203  // OnCloseFileRequested calls the function "WEBEXT.fileSystemProvider.onCloseFileRequested.addListener" directly.
  3204  func OnCloseFileRequested(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3205  	bindings.CallOnCloseFileRequested(
  3206  		js.Pointer(&ret),
  3207  		callback.Ref(),
  3208  	)
  3209  
  3210  	return
  3211  }
  3212  
  3213  // TryOnCloseFileRequested calls the function "WEBEXT.fileSystemProvider.onCloseFileRequested.addListener"
  3214  // in a try/catch block and returns (_, err, ok = false) when it went through
  3215  // the catch clause.
  3216  func TryOnCloseFileRequested(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3217  	ok = js.True == bindings.TryOnCloseFileRequested(
  3218  		js.Pointer(&ret), js.Pointer(&exception),
  3219  		callback.Ref(),
  3220  	)
  3221  
  3222  	return
  3223  }
  3224  
  3225  // HasFuncOffCloseFileRequested returns true if the function "WEBEXT.fileSystemProvider.onCloseFileRequested.removeListener" exists.
  3226  func HasFuncOffCloseFileRequested() bool {
  3227  	return js.True == bindings.HasFuncOffCloseFileRequested()
  3228  }
  3229  
  3230  // FuncOffCloseFileRequested returns the function "WEBEXT.fileSystemProvider.onCloseFileRequested.removeListener".
  3231  func FuncOffCloseFileRequested() (fn js.Func[func(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3232  	bindings.FuncOffCloseFileRequested(
  3233  		js.Pointer(&fn),
  3234  	)
  3235  	return
  3236  }
  3237  
  3238  // OffCloseFileRequested calls the function "WEBEXT.fileSystemProvider.onCloseFileRequested.removeListener" directly.
  3239  func OffCloseFileRequested(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3240  	bindings.CallOffCloseFileRequested(
  3241  		js.Pointer(&ret),
  3242  		callback.Ref(),
  3243  	)
  3244  
  3245  	return
  3246  }
  3247  
  3248  // TryOffCloseFileRequested calls the function "WEBEXT.fileSystemProvider.onCloseFileRequested.removeListener"
  3249  // in a try/catch block and returns (_, err, ok = false) when it went through
  3250  // the catch clause.
  3251  func TryOffCloseFileRequested(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3252  	ok = js.True == bindings.TryOffCloseFileRequested(
  3253  		js.Pointer(&ret), js.Pointer(&exception),
  3254  		callback.Ref(),
  3255  	)
  3256  
  3257  	return
  3258  }
  3259  
  3260  // HasFuncHasOnCloseFileRequested returns true if the function "WEBEXT.fileSystemProvider.onCloseFileRequested.hasListener" exists.
  3261  func HasFuncHasOnCloseFileRequested() bool {
  3262  	return js.True == bindings.HasFuncHasOnCloseFileRequested()
  3263  }
  3264  
  3265  // FuncHasOnCloseFileRequested returns the function "WEBEXT.fileSystemProvider.onCloseFileRequested.hasListener".
  3266  func FuncHasOnCloseFileRequested() (fn js.Func[func(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  3267  	bindings.FuncHasOnCloseFileRequested(
  3268  		js.Pointer(&fn),
  3269  	)
  3270  	return
  3271  }
  3272  
  3273  // HasOnCloseFileRequested calls the function "WEBEXT.fileSystemProvider.onCloseFileRequested.hasListener" directly.
  3274  func HasOnCloseFileRequested(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  3275  	bindings.CallHasOnCloseFileRequested(
  3276  		js.Pointer(&ret),
  3277  		callback.Ref(),
  3278  	)
  3279  
  3280  	return
  3281  }
  3282  
  3283  // TryHasOnCloseFileRequested calls the function "WEBEXT.fileSystemProvider.onCloseFileRequested.hasListener"
  3284  // in a try/catch block and returns (_, err, ok = false) when it went through
  3285  // the catch clause.
  3286  func TryHasOnCloseFileRequested(callback js.Func[func(options *CloseFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  3287  	ok = js.True == bindings.TryHasOnCloseFileRequested(
  3288  		js.Pointer(&ret), js.Pointer(&exception),
  3289  		callback.Ref(),
  3290  	)
  3291  
  3292  	return
  3293  }
  3294  
  3295  type OnConfigureRequestedEventCallbackFunc func(this js.Ref, options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3296  
  3297  func (fn OnConfigureRequestedEventCallbackFunc) Register() js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3298  	return js.RegisterCallback[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3299  		fn, abi.FuncPCABIInternal(fn),
  3300  	)
  3301  }
  3302  
  3303  func (fn OnConfigureRequestedEventCallbackFunc) DispatchCallback(
  3304  	targetPC uintptr, ctx *js.CallbackContext,
  3305  ) {
  3306  	args := ctx.Args()
  3307  	if len(args) != 3+1 /* js this */ ||
  3308  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3309  		js.ThrowInvalidCallbackInvocation()
  3310  	}
  3311  	var arg0 ConfigureRequestedOptions
  3312  	arg0.UpdateFrom(args[0+1])
  3313  	defer arg0.FreeMembers(true)
  3314  
  3315  	if ctx.Return(fn(
  3316  		args[0],
  3317  
  3318  		mark.NoEscape(&arg0),
  3319  		js.Func[func()]{}.FromRef(args[1+1]),
  3320  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3321  	)) {
  3322  		return
  3323  	}
  3324  
  3325  	js.ThrowCallbackValueNotReturned()
  3326  }
  3327  
  3328  type OnConfigureRequestedEventCallback[T any] struct {
  3329  	Fn  func(arg T, this js.Ref, options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3330  	Arg T
  3331  }
  3332  
  3333  func (cb *OnConfigureRequestedEventCallback[T]) Register() js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3334  	return js.RegisterCallback[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3335  		cb, abi.FuncPCABIInternal(cb.Fn),
  3336  	)
  3337  }
  3338  
  3339  func (cb *OnConfigureRequestedEventCallback[T]) DispatchCallback(
  3340  	targetPC uintptr, ctx *js.CallbackContext,
  3341  ) {
  3342  	args := ctx.Args()
  3343  	if len(args) != 3+1 /* js this */ ||
  3344  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3345  		js.ThrowInvalidCallbackInvocation()
  3346  	}
  3347  	var arg0 ConfigureRequestedOptions
  3348  	arg0.UpdateFrom(args[0+1])
  3349  	defer arg0.FreeMembers(true)
  3350  
  3351  	if ctx.Return(cb.Fn(
  3352  		cb.Arg,
  3353  		args[0],
  3354  
  3355  		mark.NoEscape(&arg0),
  3356  		js.Func[func()]{}.FromRef(args[1+1]),
  3357  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3358  	)) {
  3359  		return
  3360  	}
  3361  
  3362  	js.ThrowCallbackValueNotReturned()
  3363  }
  3364  
  3365  // HasFuncOnConfigureRequested returns true if the function "WEBEXT.fileSystemProvider.onConfigureRequested.addListener" exists.
  3366  func HasFuncOnConfigureRequested() bool {
  3367  	return js.True == bindings.HasFuncOnConfigureRequested()
  3368  }
  3369  
  3370  // FuncOnConfigureRequested returns the function "WEBEXT.fileSystemProvider.onConfigureRequested.addListener".
  3371  func FuncOnConfigureRequested() (fn js.Func[func(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3372  	bindings.FuncOnConfigureRequested(
  3373  		js.Pointer(&fn),
  3374  	)
  3375  	return
  3376  }
  3377  
  3378  // OnConfigureRequested calls the function "WEBEXT.fileSystemProvider.onConfigureRequested.addListener" directly.
  3379  func OnConfigureRequested(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3380  	bindings.CallOnConfigureRequested(
  3381  		js.Pointer(&ret),
  3382  		callback.Ref(),
  3383  	)
  3384  
  3385  	return
  3386  }
  3387  
  3388  // TryOnConfigureRequested calls the function "WEBEXT.fileSystemProvider.onConfigureRequested.addListener"
  3389  // in a try/catch block and returns (_, err, ok = false) when it went through
  3390  // the catch clause.
  3391  func TryOnConfigureRequested(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3392  	ok = js.True == bindings.TryOnConfigureRequested(
  3393  		js.Pointer(&ret), js.Pointer(&exception),
  3394  		callback.Ref(),
  3395  	)
  3396  
  3397  	return
  3398  }
  3399  
  3400  // HasFuncOffConfigureRequested returns true if the function "WEBEXT.fileSystemProvider.onConfigureRequested.removeListener" exists.
  3401  func HasFuncOffConfigureRequested() bool {
  3402  	return js.True == bindings.HasFuncOffConfigureRequested()
  3403  }
  3404  
  3405  // FuncOffConfigureRequested returns the function "WEBEXT.fileSystemProvider.onConfigureRequested.removeListener".
  3406  func FuncOffConfigureRequested() (fn js.Func[func(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3407  	bindings.FuncOffConfigureRequested(
  3408  		js.Pointer(&fn),
  3409  	)
  3410  	return
  3411  }
  3412  
  3413  // OffConfigureRequested calls the function "WEBEXT.fileSystemProvider.onConfigureRequested.removeListener" directly.
  3414  func OffConfigureRequested(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3415  	bindings.CallOffConfigureRequested(
  3416  		js.Pointer(&ret),
  3417  		callback.Ref(),
  3418  	)
  3419  
  3420  	return
  3421  }
  3422  
  3423  // TryOffConfigureRequested calls the function "WEBEXT.fileSystemProvider.onConfigureRequested.removeListener"
  3424  // in a try/catch block and returns (_, err, ok = false) when it went through
  3425  // the catch clause.
  3426  func TryOffConfigureRequested(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3427  	ok = js.True == bindings.TryOffConfigureRequested(
  3428  		js.Pointer(&ret), js.Pointer(&exception),
  3429  		callback.Ref(),
  3430  	)
  3431  
  3432  	return
  3433  }
  3434  
  3435  // HasFuncHasOnConfigureRequested returns true if the function "WEBEXT.fileSystemProvider.onConfigureRequested.hasListener" exists.
  3436  func HasFuncHasOnConfigureRequested() bool {
  3437  	return js.True == bindings.HasFuncHasOnConfigureRequested()
  3438  }
  3439  
  3440  // FuncHasOnConfigureRequested returns the function "WEBEXT.fileSystemProvider.onConfigureRequested.hasListener".
  3441  func FuncHasOnConfigureRequested() (fn js.Func[func(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  3442  	bindings.FuncHasOnConfigureRequested(
  3443  		js.Pointer(&fn),
  3444  	)
  3445  	return
  3446  }
  3447  
  3448  // HasOnConfigureRequested calls the function "WEBEXT.fileSystemProvider.onConfigureRequested.hasListener" directly.
  3449  func HasOnConfigureRequested(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  3450  	bindings.CallHasOnConfigureRequested(
  3451  		js.Pointer(&ret),
  3452  		callback.Ref(),
  3453  	)
  3454  
  3455  	return
  3456  }
  3457  
  3458  // TryHasOnConfigureRequested calls the function "WEBEXT.fileSystemProvider.onConfigureRequested.hasListener"
  3459  // in a try/catch block and returns (_, err, ok = false) when it went through
  3460  // the catch clause.
  3461  func TryHasOnConfigureRequested(callback js.Func[func(options *ConfigureRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  3462  	ok = js.True == bindings.TryHasOnConfigureRequested(
  3463  		js.Pointer(&ret), js.Pointer(&exception),
  3464  		callback.Ref(),
  3465  	)
  3466  
  3467  	return
  3468  }
  3469  
  3470  type OnCopyEntryRequestedEventCallbackFunc func(this js.Ref, options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3471  
  3472  func (fn OnCopyEntryRequestedEventCallbackFunc) Register() js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3473  	return js.RegisterCallback[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3474  		fn, abi.FuncPCABIInternal(fn),
  3475  	)
  3476  }
  3477  
  3478  func (fn OnCopyEntryRequestedEventCallbackFunc) DispatchCallback(
  3479  	targetPC uintptr, ctx *js.CallbackContext,
  3480  ) {
  3481  	args := ctx.Args()
  3482  	if len(args) != 3+1 /* js this */ ||
  3483  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3484  		js.ThrowInvalidCallbackInvocation()
  3485  	}
  3486  	var arg0 CopyEntryRequestedOptions
  3487  	arg0.UpdateFrom(args[0+1])
  3488  	defer arg0.FreeMembers(true)
  3489  
  3490  	if ctx.Return(fn(
  3491  		args[0],
  3492  
  3493  		mark.NoEscape(&arg0),
  3494  		js.Func[func()]{}.FromRef(args[1+1]),
  3495  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3496  	)) {
  3497  		return
  3498  	}
  3499  
  3500  	js.ThrowCallbackValueNotReturned()
  3501  }
  3502  
  3503  type OnCopyEntryRequestedEventCallback[T any] struct {
  3504  	Fn  func(arg T, this js.Ref, options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3505  	Arg T
  3506  }
  3507  
  3508  func (cb *OnCopyEntryRequestedEventCallback[T]) Register() js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3509  	return js.RegisterCallback[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3510  		cb, abi.FuncPCABIInternal(cb.Fn),
  3511  	)
  3512  }
  3513  
  3514  func (cb *OnCopyEntryRequestedEventCallback[T]) DispatchCallback(
  3515  	targetPC uintptr, ctx *js.CallbackContext,
  3516  ) {
  3517  	args := ctx.Args()
  3518  	if len(args) != 3+1 /* js this */ ||
  3519  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3520  		js.ThrowInvalidCallbackInvocation()
  3521  	}
  3522  	var arg0 CopyEntryRequestedOptions
  3523  	arg0.UpdateFrom(args[0+1])
  3524  	defer arg0.FreeMembers(true)
  3525  
  3526  	if ctx.Return(cb.Fn(
  3527  		cb.Arg,
  3528  		args[0],
  3529  
  3530  		mark.NoEscape(&arg0),
  3531  		js.Func[func()]{}.FromRef(args[1+1]),
  3532  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3533  	)) {
  3534  		return
  3535  	}
  3536  
  3537  	js.ThrowCallbackValueNotReturned()
  3538  }
  3539  
  3540  // HasFuncOnCopyEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.addListener" exists.
  3541  func HasFuncOnCopyEntryRequested() bool {
  3542  	return js.True == bindings.HasFuncOnCopyEntryRequested()
  3543  }
  3544  
  3545  // FuncOnCopyEntryRequested returns the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.addListener".
  3546  func FuncOnCopyEntryRequested() (fn js.Func[func(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3547  	bindings.FuncOnCopyEntryRequested(
  3548  		js.Pointer(&fn),
  3549  	)
  3550  	return
  3551  }
  3552  
  3553  // OnCopyEntryRequested calls the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.addListener" directly.
  3554  func OnCopyEntryRequested(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3555  	bindings.CallOnCopyEntryRequested(
  3556  		js.Pointer(&ret),
  3557  		callback.Ref(),
  3558  	)
  3559  
  3560  	return
  3561  }
  3562  
  3563  // TryOnCopyEntryRequested calls the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.addListener"
  3564  // in a try/catch block and returns (_, err, ok = false) when it went through
  3565  // the catch clause.
  3566  func TryOnCopyEntryRequested(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3567  	ok = js.True == bindings.TryOnCopyEntryRequested(
  3568  		js.Pointer(&ret), js.Pointer(&exception),
  3569  		callback.Ref(),
  3570  	)
  3571  
  3572  	return
  3573  }
  3574  
  3575  // HasFuncOffCopyEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.removeListener" exists.
  3576  func HasFuncOffCopyEntryRequested() bool {
  3577  	return js.True == bindings.HasFuncOffCopyEntryRequested()
  3578  }
  3579  
  3580  // FuncOffCopyEntryRequested returns the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.removeListener".
  3581  func FuncOffCopyEntryRequested() (fn js.Func[func(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3582  	bindings.FuncOffCopyEntryRequested(
  3583  		js.Pointer(&fn),
  3584  	)
  3585  	return
  3586  }
  3587  
  3588  // OffCopyEntryRequested calls the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.removeListener" directly.
  3589  func OffCopyEntryRequested(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3590  	bindings.CallOffCopyEntryRequested(
  3591  		js.Pointer(&ret),
  3592  		callback.Ref(),
  3593  	)
  3594  
  3595  	return
  3596  }
  3597  
  3598  // TryOffCopyEntryRequested calls the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.removeListener"
  3599  // in a try/catch block and returns (_, err, ok = false) when it went through
  3600  // the catch clause.
  3601  func TryOffCopyEntryRequested(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3602  	ok = js.True == bindings.TryOffCopyEntryRequested(
  3603  		js.Pointer(&ret), js.Pointer(&exception),
  3604  		callback.Ref(),
  3605  	)
  3606  
  3607  	return
  3608  }
  3609  
  3610  // HasFuncHasOnCopyEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.hasListener" exists.
  3611  func HasFuncHasOnCopyEntryRequested() bool {
  3612  	return js.True == bindings.HasFuncHasOnCopyEntryRequested()
  3613  }
  3614  
  3615  // FuncHasOnCopyEntryRequested returns the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.hasListener".
  3616  func FuncHasOnCopyEntryRequested() (fn js.Func[func(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  3617  	bindings.FuncHasOnCopyEntryRequested(
  3618  		js.Pointer(&fn),
  3619  	)
  3620  	return
  3621  }
  3622  
  3623  // HasOnCopyEntryRequested calls the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.hasListener" directly.
  3624  func HasOnCopyEntryRequested(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  3625  	bindings.CallHasOnCopyEntryRequested(
  3626  		js.Pointer(&ret),
  3627  		callback.Ref(),
  3628  	)
  3629  
  3630  	return
  3631  }
  3632  
  3633  // TryHasOnCopyEntryRequested calls the function "WEBEXT.fileSystemProvider.onCopyEntryRequested.hasListener"
  3634  // in a try/catch block and returns (_, err, ok = false) when it went through
  3635  // the catch clause.
  3636  func TryHasOnCopyEntryRequested(callback js.Func[func(options *CopyEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  3637  	ok = js.True == bindings.TryHasOnCopyEntryRequested(
  3638  		js.Pointer(&ret), js.Pointer(&exception),
  3639  		callback.Ref(),
  3640  	)
  3641  
  3642  	return
  3643  }
  3644  
  3645  type OnCreateDirectoryRequestedEventCallbackFunc func(this js.Ref, options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3646  
  3647  func (fn OnCreateDirectoryRequestedEventCallbackFunc) Register() js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3648  	return js.RegisterCallback[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3649  		fn, abi.FuncPCABIInternal(fn),
  3650  	)
  3651  }
  3652  
  3653  func (fn OnCreateDirectoryRequestedEventCallbackFunc) DispatchCallback(
  3654  	targetPC uintptr, ctx *js.CallbackContext,
  3655  ) {
  3656  	args := ctx.Args()
  3657  	if len(args) != 3+1 /* js this */ ||
  3658  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3659  		js.ThrowInvalidCallbackInvocation()
  3660  	}
  3661  	var arg0 CreateDirectoryRequestedOptions
  3662  	arg0.UpdateFrom(args[0+1])
  3663  	defer arg0.FreeMembers(true)
  3664  
  3665  	if ctx.Return(fn(
  3666  		args[0],
  3667  
  3668  		mark.NoEscape(&arg0),
  3669  		js.Func[func()]{}.FromRef(args[1+1]),
  3670  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3671  	)) {
  3672  		return
  3673  	}
  3674  
  3675  	js.ThrowCallbackValueNotReturned()
  3676  }
  3677  
  3678  type OnCreateDirectoryRequestedEventCallback[T any] struct {
  3679  	Fn  func(arg T, this js.Ref, options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3680  	Arg T
  3681  }
  3682  
  3683  func (cb *OnCreateDirectoryRequestedEventCallback[T]) Register() js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3684  	return js.RegisterCallback[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3685  		cb, abi.FuncPCABIInternal(cb.Fn),
  3686  	)
  3687  }
  3688  
  3689  func (cb *OnCreateDirectoryRequestedEventCallback[T]) DispatchCallback(
  3690  	targetPC uintptr, ctx *js.CallbackContext,
  3691  ) {
  3692  	args := ctx.Args()
  3693  	if len(args) != 3+1 /* js this */ ||
  3694  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3695  		js.ThrowInvalidCallbackInvocation()
  3696  	}
  3697  	var arg0 CreateDirectoryRequestedOptions
  3698  	arg0.UpdateFrom(args[0+1])
  3699  	defer arg0.FreeMembers(true)
  3700  
  3701  	if ctx.Return(cb.Fn(
  3702  		cb.Arg,
  3703  		args[0],
  3704  
  3705  		mark.NoEscape(&arg0),
  3706  		js.Func[func()]{}.FromRef(args[1+1]),
  3707  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3708  	)) {
  3709  		return
  3710  	}
  3711  
  3712  	js.ThrowCallbackValueNotReturned()
  3713  }
  3714  
  3715  // HasFuncOnCreateDirectoryRequested returns true if the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.addListener" exists.
  3716  func HasFuncOnCreateDirectoryRequested() bool {
  3717  	return js.True == bindings.HasFuncOnCreateDirectoryRequested()
  3718  }
  3719  
  3720  // FuncOnCreateDirectoryRequested returns the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.addListener".
  3721  func FuncOnCreateDirectoryRequested() (fn js.Func[func(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3722  	bindings.FuncOnCreateDirectoryRequested(
  3723  		js.Pointer(&fn),
  3724  	)
  3725  	return
  3726  }
  3727  
  3728  // OnCreateDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.addListener" directly.
  3729  func OnCreateDirectoryRequested(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3730  	bindings.CallOnCreateDirectoryRequested(
  3731  		js.Pointer(&ret),
  3732  		callback.Ref(),
  3733  	)
  3734  
  3735  	return
  3736  }
  3737  
  3738  // TryOnCreateDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.addListener"
  3739  // in a try/catch block and returns (_, err, ok = false) when it went through
  3740  // the catch clause.
  3741  func TryOnCreateDirectoryRequested(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3742  	ok = js.True == bindings.TryOnCreateDirectoryRequested(
  3743  		js.Pointer(&ret), js.Pointer(&exception),
  3744  		callback.Ref(),
  3745  	)
  3746  
  3747  	return
  3748  }
  3749  
  3750  // HasFuncOffCreateDirectoryRequested returns true if the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.removeListener" exists.
  3751  func HasFuncOffCreateDirectoryRequested() bool {
  3752  	return js.True == bindings.HasFuncOffCreateDirectoryRequested()
  3753  }
  3754  
  3755  // FuncOffCreateDirectoryRequested returns the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.removeListener".
  3756  func FuncOffCreateDirectoryRequested() (fn js.Func[func(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3757  	bindings.FuncOffCreateDirectoryRequested(
  3758  		js.Pointer(&fn),
  3759  	)
  3760  	return
  3761  }
  3762  
  3763  // OffCreateDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.removeListener" directly.
  3764  func OffCreateDirectoryRequested(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3765  	bindings.CallOffCreateDirectoryRequested(
  3766  		js.Pointer(&ret),
  3767  		callback.Ref(),
  3768  	)
  3769  
  3770  	return
  3771  }
  3772  
  3773  // TryOffCreateDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.removeListener"
  3774  // in a try/catch block and returns (_, err, ok = false) when it went through
  3775  // the catch clause.
  3776  func TryOffCreateDirectoryRequested(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3777  	ok = js.True == bindings.TryOffCreateDirectoryRequested(
  3778  		js.Pointer(&ret), js.Pointer(&exception),
  3779  		callback.Ref(),
  3780  	)
  3781  
  3782  	return
  3783  }
  3784  
  3785  // HasFuncHasOnCreateDirectoryRequested returns true if the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.hasListener" exists.
  3786  func HasFuncHasOnCreateDirectoryRequested() bool {
  3787  	return js.True == bindings.HasFuncHasOnCreateDirectoryRequested()
  3788  }
  3789  
  3790  // FuncHasOnCreateDirectoryRequested returns the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.hasListener".
  3791  func FuncHasOnCreateDirectoryRequested() (fn js.Func[func(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  3792  	bindings.FuncHasOnCreateDirectoryRequested(
  3793  		js.Pointer(&fn),
  3794  	)
  3795  	return
  3796  }
  3797  
  3798  // HasOnCreateDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.hasListener" directly.
  3799  func HasOnCreateDirectoryRequested(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  3800  	bindings.CallHasOnCreateDirectoryRequested(
  3801  		js.Pointer(&ret),
  3802  		callback.Ref(),
  3803  	)
  3804  
  3805  	return
  3806  }
  3807  
  3808  // TryHasOnCreateDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onCreateDirectoryRequested.hasListener"
  3809  // in a try/catch block and returns (_, err, ok = false) when it went through
  3810  // the catch clause.
  3811  func TryHasOnCreateDirectoryRequested(callback js.Func[func(options *CreateDirectoryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  3812  	ok = js.True == bindings.TryHasOnCreateDirectoryRequested(
  3813  		js.Pointer(&ret), js.Pointer(&exception),
  3814  		callback.Ref(),
  3815  	)
  3816  
  3817  	return
  3818  }
  3819  
  3820  type OnCreateFileRequestedEventCallbackFunc func(this js.Ref, options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3821  
  3822  func (fn OnCreateFileRequestedEventCallbackFunc) Register() js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3823  	return js.RegisterCallback[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3824  		fn, abi.FuncPCABIInternal(fn),
  3825  	)
  3826  }
  3827  
  3828  func (fn OnCreateFileRequestedEventCallbackFunc) DispatchCallback(
  3829  	targetPC uintptr, ctx *js.CallbackContext,
  3830  ) {
  3831  	args := ctx.Args()
  3832  	if len(args) != 3+1 /* js this */ ||
  3833  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3834  		js.ThrowInvalidCallbackInvocation()
  3835  	}
  3836  	var arg0 CreateFileRequestedOptions
  3837  	arg0.UpdateFrom(args[0+1])
  3838  	defer arg0.FreeMembers(true)
  3839  
  3840  	if ctx.Return(fn(
  3841  		args[0],
  3842  
  3843  		mark.NoEscape(&arg0),
  3844  		js.Func[func()]{}.FromRef(args[1+1]),
  3845  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3846  	)) {
  3847  		return
  3848  	}
  3849  
  3850  	js.ThrowCallbackValueNotReturned()
  3851  }
  3852  
  3853  type OnCreateFileRequestedEventCallback[T any] struct {
  3854  	Fn  func(arg T, this js.Ref, options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3855  	Arg T
  3856  }
  3857  
  3858  func (cb *OnCreateFileRequestedEventCallback[T]) Register() js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3859  	return js.RegisterCallback[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3860  		cb, abi.FuncPCABIInternal(cb.Fn),
  3861  	)
  3862  }
  3863  
  3864  func (cb *OnCreateFileRequestedEventCallback[T]) DispatchCallback(
  3865  	targetPC uintptr, ctx *js.CallbackContext,
  3866  ) {
  3867  	args := ctx.Args()
  3868  	if len(args) != 3+1 /* js this */ ||
  3869  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3870  		js.ThrowInvalidCallbackInvocation()
  3871  	}
  3872  	var arg0 CreateFileRequestedOptions
  3873  	arg0.UpdateFrom(args[0+1])
  3874  	defer arg0.FreeMembers(true)
  3875  
  3876  	if ctx.Return(cb.Fn(
  3877  		cb.Arg,
  3878  		args[0],
  3879  
  3880  		mark.NoEscape(&arg0),
  3881  		js.Func[func()]{}.FromRef(args[1+1]),
  3882  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  3883  	)) {
  3884  		return
  3885  	}
  3886  
  3887  	js.ThrowCallbackValueNotReturned()
  3888  }
  3889  
  3890  // HasFuncOnCreateFileRequested returns true if the function "WEBEXT.fileSystemProvider.onCreateFileRequested.addListener" exists.
  3891  func HasFuncOnCreateFileRequested() bool {
  3892  	return js.True == bindings.HasFuncOnCreateFileRequested()
  3893  }
  3894  
  3895  // FuncOnCreateFileRequested returns the function "WEBEXT.fileSystemProvider.onCreateFileRequested.addListener".
  3896  func FuncOnCreateFileRequested() (fn js.Func[func(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3897  	bindings.FuncOnCreateFileRequested(
  3898  		js.Pointer(&fn),
  3899  	)
  3900  	return
  3901  }
  3902  
  3903  // OnCreateFileRequested calls the function "WEBEXT.fileSystemProvider.onCreateFileRequested.addListener" directly.
  3904  func OnCreateFileRequested(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3905  	bindings.CallOnCreateFileRequested(
  3906  		js.Pointer(&ret),
  3907  		callback.Ref(),
  3908  	)
  3909  
  3910  	return
  3911  }
  3912  
  3913  // TryOnCreateFileRequested calls the function "WEBEXT.fileSystemProvider.onCreateFileRequested.addListener"
  3914  // in a try/catch block and returns (_, err, ok = false) when it went through
  3915  // the catch clause.
  3916  func TryOnCreateFileRequested(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3917  	ok = js.True == bindings.TryOnCreateFileRequested(
  3918  		js.Pointer(&ret), js.Pointer(&exception),
  3919  		callback.Ref(),
  3920  	)
  3921  
  3922  	return
  3923  }
  3924  
  3925  // HasFuncOffCreateFileRequested returns true if the function "WEBEXT.fileSystemProvider.onCreateFileRequested.removeListener" exists.
  3926  func HasFuncOffCreateFileRequested() bool {
  3927  	return js.True == bindings.HasFuncOffCreateFileRequested()
  3928  }
  3929  
  3930  // FuncOffCreateFileRequested returns the function "WEBEXT.fileSystemProvider.onCreateFileRequested.removeListener".
  3931  func FuncOffCreateFileRequested() (fn js.Func[func(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  3932  	bindings.FuncOffCreateFileRequested(
  3933  		js.Pointer(&fn),
  3934  	)
  3935  	return
  3936  }
  3937  
  3938  // OffCreateFileRequested calls the function "WEBEXT.fileSystemProvider.onCreateFileRequested.removeListener" directly.
  3939  func OffCreateFileRequested(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  3940  	bindings.CallOffCreateFileRequested(
  3941  		js.Pointer(&ret),
  3942  		callback.Ref(),
  3943  	)
  3944  
  3945  	return
  3946  }
  3947  
  3948  // TryOffCreateFileRequested calls the function "WEBEXT.fileSystemProvider.onCreateFileRequested.removeListener"
  3949  // in a try/catch block and returns (_, err, ok = false) when it went through
  3950  // the catch clause.
  3951  func TryOffCreateFileRequested(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  3952  	ok = js.True == bindings.TryOffCreateFileRequested(
  3953  		js.Pointer(&ret), js.Pointer(&exception),
  3954  		callback.Ref(),
  3955  	)
  3956  
  3957  	return
  3958  }
  3959  
  3960  // HasFuncHasOnCreateFileRequested returns true if the function "WEBEXT.fileSystemProvider.onCreateFileRequested.hasListener" exists.
  3961  func HasFuncHasOnCreateFileRequested() bool {
  3962  	return js.True == bindings.HasFuncHasOnCreateFileRequested()
  3963  }
  3964  
  3965  // FuncHasOnCreateFileRequested returns the function "WEBEXT.fileSystemProvider.onCreateFileRequested.hasListener".
  3966  func FuncHasOnCreateFileRequested() (fn js.Func[func(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  3967  	bindings.FuncHasOnCreateFileRequested(
  3968  		js.Pointer(&fn),
  3969  	)
  3970  	return
  3971  }
  3972  
  3973  // HasOnCreateFileRequested calls the function "WEBEXT.fileSystemProvider.onCreateFileRequested.hasListener" directly.
  3974  func HasOnCreateFileRequested(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  3975  	bindings.CallHasOnCreateFileRequested(
  3976  		js.Pointer(&ret),
  3977  		callback.Ref(),
  3978  	)
  3979  
  3980  	return
  3981  }
  3982  
  3983  // TryHasOnCreateFileRequested calls the function "WEBEXT.fileSystemProvider.onCreateFileRequested.hasListener"
  3984  // in a try/catch block and returns (_, err, ok = false) when it went through
  3985  // the catch clause.
  3986  func TryHasOnCreateFileRequested(callback js.Func[func(options *CreateFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  3987  	ok = js.True == bindings.TryHasOnCreateFileRequested(
  3988  		js.Pointer(&ret), js.Pointer(&exception),
  3989  		callback.Ref(),
  3990  	)
  3991  
  3992  	return
  3993  }
  3994  
  3995  type OnDeleteEntryRequestedEventCallbackFunc func(this js.Ref, options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  3996  
  3997  func (fn OnDeleteEntryRequestedEventCallbackFunc) Register() js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  3998  	return js.RegisterCallback[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  3999  		fn, abi.FuncPCABIInternal(fn),
  4000  	)
  4001  }
  4002  
  4003  func (fn OnDeleteEntryRequestedEventCallbackFunc) DispatchCallback(
  4004  	targetPC uintptr, ctx *js.CallbackContext,
  4005  ) {
  4006  	args := ctx.Args()
  4007  	if len(args) != 3+1 /* js this */ ||
  4008  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  4009  		js.ThrowInvalidCallbackInvocation()
  4010  	}
  4011  	var arg0 DeleteEntryRequestedOptions
  4012  	arg0.UpdateFrom(args[0+1])
  4013  	defer arg0.FreeMembers(true)
  4014  
  4015  	if ctx.Return(fn(
  4016  		args[0],
  4017  
  4018  		mark.NoEscape(&arg0),
  4019  		js.Func[func()]{}.FromRef(args[1+1]),
  4020  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4021  	)) {
  4022  		return
  4023  	}
  4024  
  4025  	js.ThrowCallbackValueNotReturned()
  4026  }
  4027  
  4028  type OnDeleteEntryRequestedEventCallback[T any] struct {
  4029  	Fn  func(arg T, this js.Ref, options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4030  	Arg T
  4031  }
  4032  
  4033  func (cb *OnDeleteEntryRequestedEventCallback[T]) Register() js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4034  	return js.RegisterCallback[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4035  		cb, abi.FuncPCABIInternal(cb.Fn),
  4036  	)
  4037  }
  4038  
  4039  func (cb *OnDeleteEntryRequestedEventCallback[T]) DispatchCallback(
  4040  	targetPC uintptr, ctx *js.CallbackContext,
  4041  ) {
  4042  	args := ctx.Args()
  4043  	if len(args) != 3+1 /* js this */ ||
  4044  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  4045  		js.ThrowInvalidCallbackInvocation()
  4046  	}
  4047  	var arg0 DeleteEntryRequestedOptions
  4048  	arg0.UpdateFrom(args[0+1])
  4049  	defer arg0.FreeMembers(true)
  4050  
  4051  	if ctx.Return(cb.Fn(
  4052  		cb.Arg,
  4053  		args[0],
  4054  
  4055  		mark.NoEscape(&arg0),
  4056  		js.Func[func()]{}.FromRef(args[1+1]),
  4057  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4058  	)) {
  4059  		return
  4060  	}
  4061  
  4062  	js.ThrowCallbackValueNotReturned()
  4063  }
  4064  
  4065  // HasFuncOnDeleteEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.addListener" exists.
  4066  func HasFuncOnDeleteEntryRequested() bool {
  4067  	return js.True == bindings.HasFuncOnDeleteEntryRequested()
  4068  }
  4069  
  4070  // FuncOnDeleteEntryRequested returns the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.addListener".
  4071  func FuncOnDeleteEntryRequested() (fn js.Func[func(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4072  	bindings.FuncOnDeleteEntryRequested(
  4073  		js.Pointer(&fn),
  4074  	)
  4075  	return
  4076  }
  4077  
  4078  // OnDeleteEntryRequested calls the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.addListener" directly.
  4079  func OnDeleteEntryRequested(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4080  	bindings.CallOnDeleteEntryRequested(
  4081  		js.Pointer(&ret),
  4082  		callback.Ref(),
  4083  	)
  4084  
  4085  	return
  4086  }
  4087  
  4088  // TryOnDeleteEntryRequested calls the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.addListener"
  4089  // in a try/catch block and returns (_, err, ok = false) when it went through
  4090  // the catch clause.
  4091  func TryOnDeleteEntryRequested(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4092  	ok = js.True == bindings.TryOnDeleteEntryRequested(
  4093  		js.Pointer(&ret), js.Pointer(&exception),
  4094  		callback.Ref(),
  4095  	)
  4096  
  4097  	return
  4098  }
  4099  
  4100  // HasFuncOffDeleteEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.removeListener" exists.
  4101  func HasFuncOffDeleteEntryRequested() bool {
  4102  	return js.True == bindings.HasFuncOffDeleteEntryRequested()
  4103  }
  4104  
  4105  // FuncOffDeleteEntryRequested returns the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.removeListener".
  4106  func FuncOffDeleteEntryRequested() (fn js.Func[func(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4107  	bindings.FuncOffDeleteEntryRequested(
  4108  		js.Pointer(&fn),
  4109  	)
  4110  	return
  4111  }
  4112  
  4113  // OffDeleteEntryRequested calls the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.removeListener" directly.
  4114  func OffDeleteEntryRequested(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4115  	bindings.CallOffDeleteEntryRequested(
  4116  		js.Pointer(&ret),
  4117  		callback.Ref(),
  4118  	)
  4119  
  4120  	return
  4121  }
  4122  
  4123  // TryOffDeleteEntryRequested calls the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.removeListener"
  4124  // in a try/catch block and returns (_, err, ok = false) when it went through
  4125  // the catch clause.
  4126  func TryOffDeleteEntryRequested(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4127  	ok = js.True == bindings.TryOffDeleteEntryRequested(
  4128  		js.Pointer(&ret), js.Pointer(&exception),
  4129  		callback.Ref(),
  4130  	)
  4131  
  4132  	return
  4133  }
  4134  
  4135  // HasFuncHasOnDeleteEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.hasListener" exists.
  4136  func HasFuncHasOnDeleteEntryRequested() bool {
  4137  	return js.True == bindings.HasFuncHasOnDeleteEntryRequested()
  4138  }
  4139  
  4140  // FuncHasOnDeleteEntryRequested returns the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.hasListener".
  4141  func FuncHasOnDeleteEntryRequested() (fn js.Func[func(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  4142  	bindings.FuncHasOnDeleteEntryRequested(
  4143  		js.Pointer(&fn),
  4144  	)
  4145  	return
  4146  }
  4147  
  4148  // HasOnDeleteEntryRequested calls the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.hasListener" directly.
  4149  func HasOnDeleteEntryRequested(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  4150  	bindings.CallHasOnDeleteEntryRequested(
  4151  		js.Pointer(&ret),
  4152  		callback.Ref(),
  4153  	)
  4154  
  4155  	return
  4156  }
  4157  
  4158  // TryHasOnDeleteEntryRequested calls the function "WEBEXT.fileSystemProvider.onDeleteEntryRequested.hasListener"
  4159  // in a try/catch block and returns (_, err, ok = false) when it went through
  4160  // the catch clause.
  4161  func TryHasOnDeleteEntryRequested(callback js.Func[func(options *DeleteEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  4162  	ok = js.True == bindings.TryHasOnDeleteEntryRequested(
  4163  		js.Pointer(&ret), js.Pointer(&exception),
  4164  		callback.Ref(),
  4165  	)
  4166  
  4167  	return
  4168  }
  4169  
  4170  type OnExecuteActionRequestedEventCallbackFunc func(this js.Ref, options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4171  
  4172  func (fn OnExecuteActionRequestedEventCallbackFunc) Register() js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4173  	return js.RegisterCallback[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4174  		fn, abi.FuncPCABIInternal(fn),
  4175  	)
  4176  }
  4177  
  4178  func (fn OnExecuteActionRequestedEventCallbackFunc) DispatchCallback(
  4179  	targetPC uintptr, ctx *js.CallbackContext,
  4180  ) {
  4181  	args := ctx.Args()
  4182  	if len(args) != 3+1 /* js this */ ||
  4183  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  4184  		js.ThrowInvalidCallbackInvocation()
  4185  	}
  4186  	var arg0 ExecuteActionRequestedOptions
  4187  	arg0.UpdateFrom(args[0+1])
  4188  	defer arg0.FreeMembers(true)
  4189  
  4190  	if ctx.Return(fn(
  4191  		args[0],
  4192  
  4193  		mark.NoEscape(&arg0),
  4194  		js.Func[func()]{}.FromRef(args[1+1]),
  4195  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4196  	)) {
  4197  		return
  4198  	}
  4199  
  4200  	js.ThrowCallbackValueNotReturned()
  4201  }
  4202  
  4203  type OnExecuteActionRequestedEventCallback[T any] struct {
  4204  	Fn  func(arg T, this js.Ref, options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4205  	Arg T
  4206  }
  4207  
  4208  func (cb *OnExecuteActionRequestedEventCallback[T]) Register() js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4209  	return js.RegisterCallback[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4210  		cb, abi.FuncPCABIInternal(cb.Fn),
  4211  	)
  4212  }
  4213  
  4214  func (cb *OnExecuteActionRequestedEventCallback[T]) DispatchCallback(
  4215  	targetPC uintptr, ctx *js.CallbackContext,
  4216  ) {
  4217  	args := ctx.Args()
  4218  	if len(args) != 3+1 /* js this */ ||
  4219  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  4220  		js.ThrowInvalidCallbackInvocation()
  4221  	}
  4222  	var arg0 ExecuteActionRequestedOptions
  4223  	arg0.UpdateFrom(args[0+1])
  4224  	defer arg0.FreeMembers(true)
  4225  
  4226  	if ctx.Return(cb.Fn(
  4227  		cb.Arg,
  4228  		args[0],
  4229  
  4230  		mark.NoEscape(&arg0),
  4231  		js.Func[func()]{}.FromRef(args[1+1]),
  4232  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4233  	)) {
  4234  		return
  4235  	}
  4236  
  4237  	js.ThrowCallbackValueNotReturned()
  4238  }
  4239  
  4240  // HasFuncOnExecuteActionRequested returns true if the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.addListener" exists.
  4241  func HasFuncOnExecuteActionRequested() bool {
  4242  	return js.True == bindings.HasFuncOnExecuteActionRequested()
  4243  }
  4244  
  4245  // FuncOnExecuteActionRequested returns the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.addListener".
  4246  func FuncOnExecuteActionRequested() (fn js.Func[func(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4247  	bindings.FuncOnExecuteActionRequested(
  4248  		js.Pointer(&fn),
  4249  	)
  4250  	return
  4251  }
  4252  
  4253  // OnExecuteActionRequested calls the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.addListener" directly.
  4254  func OnExecuteActionRequested(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4255  	bindings.CallOnExecuteActionRequested(
  4256  		js.Pointer(&ret),
  4257  		callback.Ref(),
  4258  	)
  4259  
  4260  	return
  4261  }
  4262  
  4263  // TryOnExecuteActionRequested calls the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.addListener"
  4264  // in a try/catch block and returns (_, err, ok = false) when it went through
  4265  // the catch clause.
  4266  func TryOnExecuteActionRequested(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4267  	ok = js.True == bindings.TryOnExecuteActionRequested(
  4268  		js.Pointer(&ret), js.Pointer(&exception),
  4269  		callback.Ref(),
  4270  	)
  4271  
  4272  	return
  4273  }
  4274  
  4275  // HasFuncOffExecuteActionRequested returns true if the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.removeListener" exists.
  4276  func HasFuncOffExecuteActionRequested() bool {
  4277  	return js.True == bindings.HasFuncOffExecuteActionRequested()
  4278  }
  4279  
  4280  // FuncOffExecuteActionRequested returns the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.removeListener".
  4281  func FuncOffExecuteActionRequested() (fn js.Func[func(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4282  	bindings.FuncOffExecuteActionRequested(
  4283  		js.Pointer(&fn),
  4284  	)
  4285  	return
  4286  }
  4287  
  4288  // OffExecuteActionRequested calls the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.removeListener" directly.
  4289  func OffExecuteActionRequested(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4290  	bindings.CallOffExecuteActionRequested(
  4291  		js.Pointer(&ret),
  4292  		callback.Ref(),
  4293  	)
  4294  
  4295  	return
  4296  }
  4297  
  4298  // TryOffExecuteActionRequested calls the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.removeListener"
  4299  // in a try/catch block and returns (_, err, ok = false) when it went through
  4300  // the catch clause.
  4301  func TryOffExecuteActionRequested(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4302  	ok = js.True == bindings.TryOffExecuteActionRequested(
  4303  		js.Pointer(&ret), js.Pointer(&exception),
  4304  		callback.Ref(),
  4305  	)
  4306  
  4307  	return
  4308  }
  4309  
  4310  // HasFuncHasOnExecuteActionRequested returns true if the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.hasListener" exists.
  4311  func HasFuncHasOnExecuteActionRequested() bool {
  4312  	return js.True == bindings.HasFuncHasOnExecuteActionRequested()
  4313  }
  4314  
  4315  // FuncHasOnExecuteActionRequested returns the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.hasListener".
  4316  func FuncHasOnExecuteActionRequested() (fn js.Func[func(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  4317  	bindings.FuncHasOnExecuteActionRequested(
  4318  		js.Pointer(&fn),
  4319  	)
  4320  	return
  4321  }
  4322  
  4323  // HasOnExecuteActionRequested calls the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.hasListener" directly.
  4324  func HasOnExecuteActionRequested(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  4325  	bindings.CallHasOnExecuteActionRequested(
  4326  		js.Pointer(&ret),
  4327  		callback.Ref(),
  4328  	)
  4329  
  4330  	return
  4331  }
  4332  
  4333  // TryHasOnExecuteActionRequested calls the function "WEBEXT.fileSystemProvider.onExecuteActionRequested.hasListener"
  4334  // in a try/catch block and returns (_, err, ok = false) when it went through
  4335  // the catch clause.
  4336  func TryHasOnExecuteActionRequested(callback js.Func[func(options *ExecuteActionRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  4337  	ok = js.True == bindings.TryHasOnExecuteActionRequested(
  4338  		js.Pointer(&ret), js.Pointer(&exception),
  4339  		callback.Ref(),
  4340  	)
  4341  
  4342  	return
  4343  }
  4344  
  4345  type OnGetActionsRequestedEventCallbackFunc func(this js.Ref, options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4346  
  4347  func (fn OnGetActionsRequestedEventCallbackFunc) Register() js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])] {
  4348  	return js.RegisterCallback[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])](
  4349  		fn, abi.FuncPCABIInternal(fn),
  4350  	)
  4351  }
  4352  
  4353  func (fn OnGetActionsRequestedEventCallbackFunc) DispatchCallback(
  4354  	targetPC uintptr, ctx *js.CallbackContext,
  4355  ) {
  4356  	args := ctx.Args()
  4357  	if len(args) != 3+1 /* js this */ ||
  4358  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  4359  		js.ThrowInvalidCallbackInvocation()
  4360  	}
  4361  	var arg0 GetActionsRequestedOptions
  4362  	arg0.UpdateFrom(args[0+1])
  4363  	defer arg0.FreeMembers(true)
  4364  
  4365  	if ctx.Return(fn(
  4366  		args[0],
  4367  
  4368  		mark.NoEscape(&arg0),
  4369  		js.Func[func(actions js.Array[Action])]{}.FromRef(args[1+1]),
  4370  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4371  	)) {
  4372  		return
  4373  	}
  4374  
  4375  	js.ThrowCallbackValueNotReturned()
  4376  }
  4377  
  4378  type OnGetActionsRequestedEventCallback[T any] struct {
  4379  	Fn  func(arg T, this js.Ref, options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4380  	Arg T
  4381  }
  4382  
  4383  func (cb *OnGetActionsRequestedEventCallback[T]) Register() js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])] {
  4384  	return js.RegisterCallback[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])](
  4385  		cb, abi.FuncPCABIInternal(cb.Fn),
  4386  	)
  4387  }
  4388  
  4389  func (cb *OnGetActionsRequestedEventCallback[T]) DispatchCallback(
  4390  	targetPC uintptr, ctx *js.CallbackContext,
  4391  ) {
  4392  	args := ctx.Args()
  4393  	if len(args) != 3+1 /* js this */ ||
  4394  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  4395  		js.ThrowInvalidCallbackInvocation()
  4396  	}
  4397  	var arg0 GetActionsRequestedOptions
  4398  	arg0.UpdateFrom(args[0+1])
  4399  	defer arg0.FreeMembers(true)
  4400  
  4401  	if ctx.Return(cb.Fn(
  4402  		cb.Arg,
  4403  		args[0],
  4404  
  4405  		mark.NoEscape(&arg0),
  4406  		js.Func[func(actions js.Array[Action])]{}.FromRef(args[1+1]),
  4407  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4408  	)) {
  4409  		return
  4410  	}
  4411  
  4412  	js.ThrowCallbackValueNotReturned()
  4413  }
  4414  
  4415  // HasFuncOnGetActionsRequested returns true if the function "WEBEXT.fileSystemProvider.onGetActionsRequested.addListener" exists.
  4416  func HasFuncOnGetActionsRequested() bool {
  4417  	return js.True == bindings.HasFuncOnGetActionsRequested()
  4418  }
  4419  
  4420  // FuncOnGetActionsRequested returns the function "WEBEXT.fileSystemProvider.onGetActionsRequested.addListener".
  4421  func FuncOnGetActionsRequested() (fn js.Func[func(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])])]) {
  4422  	bindings.FuncOnGetActionsRequested(
  4423  		js.Pointer(&fn),
  4424  	)
  4425  	return
  4426  }
  4427  
  4428  // OnGetActionsRequested calls the function "WEBEXT.fileSystemProvider.onGetActionsRequested.addListener" directly.
  4429  func OnGetActionsRequested(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4430  	bindings.CallOnGetActionsRequested(
  4431  		js.Pointer(&ret),
  4432  		callback.Ref(),
  4433  	)
  4434  
  4435  	return
  4436  }
  4437  
  4438  // TryOnGetActionsRequested calls the function "WEBEXT.fileSystemProvider.onGetActionsRequested.addListener"
  4439  // in a try/catch block and returns (_, err, ok = false) when it went through
  4440  // the catch clause.
  4441  func TryOnGetActionsRequested(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4442  	ok = js.True == bindings.TryOnGetActionsRequested(
  4443  		js.Pointer(&ret), js.Pointer(&exception),
  4444  		callback.Ref(),
  4445  	)
  4446  
  4447  	return
  4448  }
  4449  
  4450  // HasFuncOffGetActionsRequested returns true if the function "WEBEXT.fileSystemProvider.onGetActionsRequested.removeListener" exists.
  4451  func HasFuncOffGetActionsRequested() bool {
  4452  	return js.True == bindings.HasFuncOffGetActionsRequested()
  4453  }
  4454  
  4455  // FuncOffGetActionsRequested returns the function "WEBEXT.fileSystemProvider.onGetActionsRequested.removeListener".
  4456  func FuncOffGetActionsRequested() (fn js.Func[func(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])])]) {
  4457  	bindings.FuncOffGetActionsRequested(
  4458  		js.Pointer(&fn),
  4459  	)
  4460  	return
  4461  }
  4462  
  4463  // OffGetActionsRequested calls the function "WEBEXT.fileSystemProvider.onGetActionsRequested.removeListener" directly.
  4464  func OffGetActionsRequested(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4465  	bindings.CallOffGetActionsRequested(
  4466  		js.Pointer(&ret),
  4467  		callback.Ref(),
  4468  	)
  4469  
  4470  	return
  4471  }
  4472  
  4473  // TryOffGetActionsRequested calls the function "WEBEXT.fileSystemProvider.onGetActionsRequested.removeListener"
  4474  // in a try/catch block and returns (_, err, ok = false) when it went through
  4475  // the catch clause.
  4476  func TryOffGetActionsRequested(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4477  	ok = js.True == bindings.TryOffGetActionsRequested(
  4478  		js.Pointer(&ret), js.Pointer(&exception),
  4479  		callback.Ref(),
  4480  	)
  4481  
  4482  	return
  4483  }
  4484  
  4485  // HasFuncHasOnGetActionsRequested returns true if the function "WEBEXT.fileSystemProvider.onGetActionsRequested.hasListener" exists.
  4486  func HasFuncHasOnGetActionsRequested() bool {
  4487  	return js.True == bindings.HasFuncHasOnGetActionsRequested()
  4488  }
  4489  
  4490  // FuncHasOnGetActionsRequested returns the function "WEBEXT.fileSystemProvider.onGetActionsRequested.hasListener".
  4491  func FuncHasOnGetActionsRequested() (fn js.Func[func(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  4492  	bindings.FuncHasOnGetActionsRequested(
  4493  		js.Pointer(&fn),
  4494  	)
  4495  	return
  4496  }
  4497  
  4498  // HasOnGetActionsRequested calls the function "WEBEXT.fileSystemProvider.onGetActionsRequested.hasListener" directly.
  4499  func HasOnGetActionsRequested(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  4500  	bindings.CallHasOnGetActionsRequested(
  4501  		js.Pointer(&ret),
  4502  		callback.Ref(),
  4503  	)
  4504  
  4505  	return
  4506  }
  4507  
  4508  // TryHasOnGetActionsRequested calls the function "WEBEXT.fileSystemProvider.onGetActionsRequested.hasListener"
  4509  // in a try/catch block and returns (_, err, ok = false) when it went through
  4510  // the catch clause.
  4511  func TryHasOnGetActionsRequested(callback js.Func[func(options *GetActionsRequestedOptions, successCallback js.Func[func(actions js.Array[Action])], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  4512  	ok = js.True == bindings.TryHasOnGetActionsRequested(
  4513  		js.Pointer(&ret), js.Pointer(&exception),
  4514  		callback.Ref(),
  4515  	)
  4516  
  4517  	return
  4518  }
  4519  
  4520  type OnGetMetadataRequestedEventCallbackFunc func(this js.Ref, options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4521  
  4522  func (fn OnGetMetadataRequestedEventCallbackFunc) Register() js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])] {
  4523  	return js.RegisterCallback[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])](
  4524  		fn, abi.FuncPCABIInternal(fn),
  4525  	)
  4526  }
  4527  
  4528  func (fn OnGetMetadataRequestedEventCallbackFunc) DispatchCallback(
  4529  	targetPC uintptr, ctx *js.CallbackContext,
  4530  ) {
  4531  	args := ctx.Args()
  4532  	if len(args) != 3+1 /* js this */ ||
  4533  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  4534  		js.ThrowInvalidCallbackInvocation()
  4535  	}
  4536  	var arg0 GetMetadataRequestedOptions
  4537  	arg0.UpdateFrom(args[0+1])
  4538  	defer arg0.FreeMembers(true)
  4539  
  4540  	if ctx.Return(fn(
  4541  		args[0],
  4542  
  4543  		mark.NoEscape(&arg0),
  4544  		js.Func[func(metadata *EntryMetadata)]{}.FromRef(args[1+1]),
  4545  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4546  	)) {
  4547  		return
  4548  	}
  4549  
  4550  	js.ThrowCallbackValueNotReturned()
  4551  }
  4552  
  4553  type OnGetMetadataRequestedEventCallback[T any] struct {
  4554  	Fn  func(arg T, this js.Ref, options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4555  	Arg T
  4556  }
  4557  
  4558  func (cb *OnGetMetadataRequestedEventCallback[T]) Register() js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])] {
  4559  	return js.RegisterCallback[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])](
  4560  		cb, abi.FuncPCABIInternal(cb.Fn),
  4561  	)
  4562  }
  4563  
  4564  func (cb *OnGetMetadataRequestedEventCallback[T]) DispatchCallback(
  4565  	targetPC uintptr, ctx *js.CallbackContext,
  4566  ) {
  4567  	args := ctx.Args()
  4568  	if len(args) != 3+1 /* js this */ ||
  4569  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  4570  		js.ThrowInvalidCallbackInvocation()
  4571  	}
  4572  	var arg0 GetMetadataRequestedOptions
  4573  	arg0.UpdateFrom(args[0+1])
  4574  	defer arg0.FreeMembers(true)
  4575  
  4576  	if ctx.Return(cb.Fn(
  4577  		cb.Arg,
  4578  		args[0],
  4579  
  4580  		mark.NoEscape(&arg0),
  4581  		js.Func[func(metadata *EntryMetadata)]{}.FromRef(args[1+1]),
  4582  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4583  	)) {
  4584  		return
  4585  	}
  4586  
  4587  	js.ThrowCallbackValueNotReturned()
  4588  }
  4589  
  4590  // HasFuncOnGetMetadataRequested returns true if the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.addListener" exists.
  4591  func HasFuncOnGetMetadataRequested() bool {
  4592  	return js.True == bindings.HasFuncOnGetMetadataRequested()
  4593  }
  4594  
  4595  // FuncOnGetMetadataRequested returns the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.addListener".
  4596  func FuncOnGetMetadataRequested() (fn js.Func[func(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])])]) {
  4597  	bindings.FuncOnGetMetadataRequested(
  4598  		js.Pointer(&fn),
  4599  	)
  4600  	return
  4601  }
  4602  
  4603  // OnGetMetadataRequested calls the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.addListener" directly.
  4604  func OnGetMetadataRequested(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4605  	bindings.CallOnGetMetadataRequested(
  4606  		js.Pointer(&ret),
  4607  		callback.Ref(),
  4608  	)
  4609  
  4610  	return
  4611  }
  4612  
  4613  // TryOnGetMetadataRequested calls the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.addListener"
  4614  // in a try/catch block and returns (_, err, ok = false) when it went through
  4615  // the catch clause.
  4616  func TryOnGetMetadataRequested(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4617  	ok = js.True == bindings.TryOnGetMetadataRequested(
  4618  		js.Pointer(&ret), js.Pointer(&exception),
  4619  		callback.Ref(),
  4620  	)
  4621  
  4622  	return
  4623  }
  4624  
  4625  // HasFuncOffGetMetadataRequested returns true if the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.removeListener" exists.
  4626  func HasFuncOffGetMetadataRequested() bool {
  4627  	return js.True == bindings.HasFuncOffGetMetadataRequested()
  4628  }
  4629  
  4630  // FuncOffGetMetadataRequested returns the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.removeListener".
  4631  func FuncOffGetMetadataRequested() (fn js.Func[func(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])])]) {
  4632  	bindings.FuncOffGetMetadataRequested(
  4633  		js.Pointer(&fn),
  4634  	)
  4635  	return
  4636  }
  4637  
  4638  // OffGetMetadataRequested calls the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.removeListener" directly.
  4639  func OffGetMetadataRequested(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4640  	bindings.CallOffGetMetadataRequested(
  4641  		js.Pointer(&ret),
  4642  		callback.Ref(),
  4643  	)
  4644  
  4645  	return
  4646  }
  4647  
  4648  // TryOffGetMetadataRequested calls the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.removeListener"
  4649  // in a try/catch block and returns (_, err, ok = false) when it went through
  4650  // the catch clause.
  4651  func TryOffGetMetadataRequested(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4652  	ok = js.True == bindings.TryOffGetMetadataRequested(
  4653  		js.Pointer(&ret), js.Pointer(&exception),
  4654  		callback.Ref(),
  4655  	)
  4656  
  4657  	return
  4658  }
  4659  
  4660  // HasFuncHasOnGetMetadataRequested returns true if the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.hasListener" exists.
  4661  func HasFuncHasOnGetMetadataRequested() bool {
  4662  	return js.True == bindings.HasFuncHasOnGetMetadataRequested()
  4663  }
  4664  
  4665  // FuncHasOnGetMetadataRequested returns the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.hasListener".
  4666  func FuncHasOnGetMetadataRequested() (fn js.Func[func(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  4667  	bindings.FuncHasOnGetMetadataRequested(
  4668  		js.Pointer(&fn),
  4669  	)
  4670  	return
  4671  }
  4672  
  4673  // HasOnGetMetadataRequested calls the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.hasListener" directly.
  4674  func HasOnGetMetadataRequested(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  4675  	bindings.CallHasOnGetMetadataRequested(
  4676  		js.Pointer(&ret),
  4677  		callback.Ref(),
  4678  	)
  4679  
  4680  	return
  4681  }
  4682  
  4683  // TryHasOnGetMetadataRequested calls the function "WEBEXT.fileSystemProvider.onGetMetadataRequested.hasListener"
  4684  // in a try/catch block and returns (_, err, ok = false) when it went through
  4685  // the catch clause.
  4686  func TryHasOnGetMetadataRequested(callback js.Func[func(options *GetMetadataRequestedOptions, successCallback js.Func[func(metadata *EntryMetadata)], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  4687  	ok = js.True == bindings.TryHasOnGetMetadataRequested(
  4688  		js.Pointer(&ret), js.Pointer(&exception),
  4689  		callback.Ref(),
  4690  	)
  4691  
  4692  	return
  4693  }
  4694  
  4695  type OnMountRequestedEventCallbackFunc func(this js.Ref, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4696  
  4697  func (fn OnMountRequestedEventCallbackFunc) Register() js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4698  	return js.RegisterCallback[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4699  		fn, abi.FuncPCABIInternal(fn),
  4700  	)
  4701  }
  4702  
  4703  func (fn OnMountRequestedEventCallbackFunc) DispatchCallback(
  4704  	targetPC uintptr, ctx *js.CallbackContext,
  4705  ) {
  4706  	args := ctx.Args()
  4707  	if len(args) != 2+1 /* js this */ ||
  4708  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  4709  		js.ThrowInvalidCallbackInvocation()
  4710  	}
  4711  
  4712  	if ctx.Return(fn(
  4713  		args[0],
  4714  
  4715  		js.Func[func()]{}.FromRef(args[0+1]),
  4716  		js.Func[func(err ProviderError)]{}.FromRef(args[1+1]),
  4717  	)) {
  4718  		return
  4719  	}
  4720  
  4721  	js.ThrowCallbackValueNotReturned()
  4722  }
  4723  
  4724  type OnMountRequestedEventCallback[T any] struct {
  4725  	Fn  func(arg T, this js.Ref, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4726  	Arg T
  4727  }
  4728  
  4729  func (cb *OnMountRequestedEventCallback[T]) Register() js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4730  	return js.RegisterCallback[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4731  		cb, abi.FuncPCABIInternal(cb.Fn),
  4732  	)
  4733  }
  4734  
  4735  func (cb *OnMountRequestedEventCallback[T]) DispatchCallback(
  4736  	targetPC uintptr, ctx *js.CallbackContext,
  4737  ) {
  4738  	args := ctx.Args()
  4739  	if len(args) != 2+1 /* js this */ ||
  4740  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  4741  		js.ThrowInvalidCallbackInvocation()
  4742  	}
  4743  
  4744  	if ctx.Return(cb.Fn(
  4745  		cb.Arg,
  4746  		args[0],
  4747  
  4748  		js.Func[func()]{}.FromRef(args[0+1]),
  4749  		js.Func[func(err ProviderError)]{}.FromRef(args[1+1]),
  4750  	)) {
  4751  		return
  4752  	}
  4753  
  4754  	js.ThrowCallbackValueNotReturned()
  4755  }
  4756  
  4757  // HasFuncOnMountRequested returns true if the function "WEBEXT.fileSystemProvider.onMountRequested.addListener" exists.
  4758  func HasFuncOnMountRequested() bool {
  4759  	return js.True == bindings.HasFuncOnMountRequested()
  4760  }
  4761  
  4762  // FuncOnMountRequested returns the function "WEBEXT.fileSystemProvider.onMountRequested.addListener".
  4763  func FuncOnMountRequested() (fn js.Func[func(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4764  	bindings.FuncOnMountRequested(
  4765  		js.Pointer(&fn),
  4766  	)
  4767  	return
  4768  }
  4769  
  4770  // OnMountRequested calls the function "WEBEXT.fileSystemProvider.onMountRequested.addListener" directly.
  4771  func OnMountRequested(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4772  	bindings.CallOnMountRequested(
  4773  		js.Pointer(&ret),
  4774  		callback.Ref(),
  4775  	)
  4776  
  4777  	return
  4778  }
  4779  
  4780  // TryOnMountRequested calls the function "WEBEXT.fileSystemProvider.onMountRequested.addListener"
  4781  // in a try/catch block and returns (_, err, ok = false) when it went through
  4782  // the catch clause.
  4783  func TryOnMountRequested(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4784  	ok = js.True == bindings.TryOnMountRequested(
  4785  		js.Pointer(&ret), js.Pointer(&exception),
  4786  		callback.Ref(),
  4787  	)
  4788  
  4789  	return
  4790  }
  4791  
  4792  // HasFuncOffMountRequested returns true if the function "WEBEXT.fileSystemProvider.onMountRequested.removeListener" exists.
  4793  func HasFuncOffMountRequested() bool {
  4794  	return js.True == bindings.HasFuncOffMountRequested()
  4795  }
  4796  
  4797  // FuncOffMountRequested returns the function "WEBEXT.fileSystemProvider.onMountRequested.removeListener".
  4798  func FuncOffMountRequested() (fn js.Func[func(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4799  	bindings.FuncOffMountRequested(
  4800  		js.Pointer(&fn),
  4801  	)
  4802  	return
  4803  }
  4804  
  4805  // OffMountRequested calls the function "WEBEXT.fileSystemProvider.onMountRequested.removeListener" directly.
  4806  func OffMountRequested(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4807  	bindings.CallOffMountRequested(
  4808  		js.Pointer(&ret),
  4809  		callback.Ref(),
  4810  	)
  4811  
  4812  	return
  4813  }
  4814  
  4815  // TryOffMountRequested calls the function "WEBEXT.fileSystemProvider.onMountRequested.removeListener"
  4816  // in a try/catch block and returns (_, err, ok = false) when it went through
  4817  // the catch clause.
  4818  func TryOffMountRequested(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4819  	ok = js.True == bindings.TryOffMountRequested(
  4820  		js.Pointer(&ret), js.Pointer(&exception),
  4821  		callback.Ref(),
  4822  	)
  4823  
  4824  	return
  4825  }
  4826  
  4827  // HasFuncHasOnMountRequested returns true if the function "WEBEXT.fileSystemProvider.onMountRequested.hasListener" exists.
  4828  func HasFuncHasOnMountRequested() bool {
  4829  	return js.True == bindings.HasFuncHasOnMountRequested()
  4830  }
  4831  
  4832  // FuncHasOnMountRequested returns the function "WEBEXT.fileSystemProvider.onMountRequested.hasListener".
  4833  func FuncHasOnMountRequested() (fn js.Func[func(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  4834  	bindings.FuncHasOnMountRequested(
  4835  		js.Pointer(&fn),
  4836  	)
  4837  	return
  4838  }
  4839  
  4840  // HasOnMountRequested calls the function "WEBEXT.fileSystemProvider.onMountRequested.hasListener" directly.
  4841  func HasOnMountRequested(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  4842  	bindings.CallHasOnMountRequested(
  4843  		js.Pointer(&ret),
  4844  		callback.Ref(),
  4845  	)
  4846  
  4847  	return
  4848  }
  4849  
  4850  // TryHasOnMountRequested calls the function "WEBEXT.fileSystemProvider.onMountRequested.hasListener"
  4851  // in a try/catch block and returns (_, err, ok = false) when it went through
  4852  // the catch clause.
  4853  func TryHasOnMountRequested(callback js.Func[func(successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  4854  	ok = js.True == bindings.TryHasOnMountRequested(
  4855  		js.Pointer(&ret), js.Pointer(&exception),
  4856  		callback.Ref(),
  4857  	)
  4858  
  4859  	return
  4860  }
  4861  
  4862  type OnMoveEntryRequestedEventCallbackFunc func(this js.Ref, options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4863  
  4864  func (fn OnMoveEntryRequestedEventCallbackFunc) Register() js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4865  	return js.RegisterCallback[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4866  		fn, abi.FuncPCABIInternal(fn),
  4867  	)
  4868  }
  4869  
  4870  func (fn OnMoveEntryRequestedEventCallbackFunc) DispatchCallback(
  4871  	targetPC uintptr, ctx *js.CallbackContext,
  4872  ) {
  4873  	args := ctx.Args()
  4874  	if len(args) != 3+1 /* js this */ ||
  4875  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  4876  		js.ThrowInvalidCallbackInvocation()
  4877  	}
  4878  	var arg0 MoveEntryRequestedOptions
  4879  	arg0.UpdateFrom(args[0+1])
  4880  	defer arg0.FreeMembers(true)
  4881  
  4882  	if ctx.Return(fn(
  4883  		args[0],
  4884  
  4885  		mark.NoEscape(&arg0),
  4886  		js.Func[func()]{}.FromRef(args[1+1]),
  4887  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4888  	)) {
  4889  		return
  4890  	}
  4891  
  4892  	js.ThrowCallbackValueNotReturned()
  4893  }
  4894  
  4895  type OnMoveEntryRequestedEventCallback[T any] struct {
  4896  	Fn  func(arg T, this js.Ref, options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  4897  	Arg T
  4898  }
  4899  
  4900  func (cb *OnMoveEntryRequestedEventCallback[T]) Register() js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  4901  	return js.RegisterCallback[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  4902  		cb, abi.FuncPCABIInternal(cb.Fn),
  4903  	)
  4904  }
  4905  
  4906  func (cb *OnMoveEntryRequestedEventCallback[T]) DispatchCallback(
  4907  	targetPC uintptr, ctx *js.CallbackContext,
  4908  ) {
  4909  	args := ctx.Args()
  4910  	if len(args) != 3+1 /* js this */ ||
  4911  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  4912  		js.ThrowInvalidCallbackInvocation()
  4913  	}
  4914  	var arg0 MoveEntryRequestedOptions
  4915  	arg0.UpdateFrom(args[0+1])
  4916  	defer arg0.FreeMembers(true)
  4917  
  4918  	if ctx.Return(cb.Fn(
  4919  		cb.Arg,
  4920  		args[0],
  4921  
  4922  		mark.NoEscape(&arg0),
  4923  		js.Func[func()]{}.FromRef(args[1+1]),
  4924  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  4925  	)) {
  4926  		return
  4927  	}
  4928  
  4929  	js.ThrowCallbackValueNotReturned()
  4930  }
  4931  
  4932  // HasFuncOnMoveEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.addListener" exists.
  4933  func HasFuncOnMoveEntryRequested() bool {
  4934  	return js.True == bindings.HasFuncOnMoveEntryRequested()
  4935  }
  4936  
  4937  // FuncOnMoveEntryRequested returns the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.addListener".
  4938  func FuncOnMoveEntryRequested() (fn js.Func[func(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4939  	bindings.FuncOnMoveEntryRequested(
  4940  		js.Pointer(&fn),
  4941  	)
  4942  	return
  4943  }
  4944  
  4945  // OnMoveEntryRequested calls the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.addListener" directly.
  4946  func OnMoveEntryRequested(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4947  	bindings.CallOnMoveEntryRequested(
  4948  		js.Pointer(&ret),
  4949  		callback.Ref(),
  4950  	)
  4951  
  4952  	return
  4953  }
  4954  
  4955  // TryOnMoveEntryRequested calls the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.addListener"
  4956  // in a try/catch block and returns (_, err, ok = false) when it went through
  4957  // the catch clause.
  4958  func TryOnMoveEntryRequested(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4959  	ok = js.True == bindings.TryOnMoveEntryRequested(
  4960  		js.Pointer(&ret), js.Pointer(&exception),
  4961  		callback.Ref(),
  4962  	)
  4963  
  4964  	return
  4965  }
  4966  
  4967  // HasFuncOffMoveEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.removeListener" exists.
  4968  func HasFuncOffMoveEntryRequested() bool {
  4969  	return js.True == bindings.HasFuncOffMoveEntryRequested()
  4970  }
  4971  
  4972  // FuncOffMoveEntryRequested returns the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.removeListener".
  4973  func FuncOffMoveEntryRequested() (fn js.Func[func(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  4974  	bindings.FuncOffMoveEntryRequested(
  4975  		js.Pointer(&fn),
  4976  	)
  4977  	return
  4978  }
  4979  
  4980  // OffMoveEntryRequested calls the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.removeListener" directly.
  4981  func OffMoveEntryRequested(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  4982  	bindings.CallOffMoveEntryRequested(
  4983  		js.Pointer(&ret),
  4984  		callback.Ref(),
  4985  	)
  4986  
  4987  	return
  4988  }
  4989  
  4990  // TryOffMoveEntryRequested calls the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.removeListener"
  4991  // in a try/catch block and returns (_, err, ok = false) when it went through
  4992  // the catch clause.
  4993  func TryOffMoveEntryRequested(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  4994  	ok = js.True == bindings.TryOffMoveEntryRequested(
  4995  		js.Pointer(&ret), js.Pointer(&exception),
  4996  		callback.Ref(),
  4997  	)
  4998  
  4999  	return
  5000  }
  5001  
  5002  // HasFuncHasOnMoveEntryRequested returns true if the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.hasListener" exists.
  5003  func HasFuncHasOnMoveEntryRequested() bool {
  5004  	return js.True == bindings.HasFuncHasOnMoveEntryRequested()
  5005  }
  5006  
  5007  // FuncHasOnMoveEntryRequested returns the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.hasListener".
  5008  func FuncHasOnMoveEntryRequested() (fn js.Func[func(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  5009  	bindings.FuncHasOnMoveEntryRequested(
  5010  		js.Pointer(&fn),
  5011  	)
  5012  	return
  5013  }
  5014  
  5015  // HasOnMoveEntryRequested calls the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.hasListener" directly.
  5016  func HasOnMoveEntryRequested(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  5017  	bindings.CallHasOnMoveEntryRequested(
  5018  		js.Pointer(&ret),
  5019  		callback.Ref(),
  5020  	)
  5021  
  5022  	return
  5023  }
  5024  
  5025  // TryHasOnMoveEntryRequested calls the function "WEBEXT.fileSystemProvider.onMoveEntryRequested.hasListener"
  5026  // in a try/catch block and returns (_, err, ok = false) when it went through
  5027  // the catch clause.
  5028  func TryHasOnMoveEntryRequested(callback js.Func[func(options *MoveEntryRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  5029  	ok = js.True == bindings.TryHasOnMoveEntryRequested(
  5030  		js.Pointer(&ret), js.Pointer(&exception),
  5031  		callback.Ref(),
  5032  	)
  5033  
  5034  	return
  5035  }
  5036  
  5037  type OnOpenFileRequestedEventCallbackFunc func(this js.Ref, options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5038  
  5039  func (fn OnOpenFileRequestedEventCallbackFunc) Register() js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5040  	return js.RegisterCallback[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5041  		fn, abi.FuncPCABIInternal(fn),
  5042  	)
  5043  }
  5044  
  5045  func (fn OnOpenFileRequestedEventCallbackFunc) DispatchCallback(
  5046  	targetPC uintptr, ctx *js.CallbackContext,
  5047  ) {
  5048  	args := ctx.Args()
  5049  	if len(args) != 3+1 /* js this */ ||
  5050  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  5051  		js.ThrowInvalidCallbackInvocation()
  5052  	}
  5053  	var arg0 OpenFileRequestedOptions
  5054  	arg0.UpdateFrom(args[0+1])
  5055  	defer arg0.FreeMembers(true)
  5056  
  5057  	if ctx.Return(fn(
  5058  		args[0],
  5059  
  5060  		mark.NoEscape(&arg0),
  5061  		js.Func[func()]{}.FromRef(args[1+1]),
  5062  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5063  	)) {
  5064  		return
  5065  	}
  5066  
  5067  	js.ThrowCallbackValueNotReturned()
  5068  }
  5069  
  5070  type OnOpenFileRequestedEventCallback[T any] struct {
  5071  	Fn  func(arg T, this js.Ref, options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5072  	Arg T
  5073  }
  5074  
  5075  func (cb *OnOpenFileRequestedEventCallback[T]) Register() js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5076  	return js.RegisterCallback[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5077  		cb, abi.FuncPCABIInternal(cb.Fn),
  5078  	)
  5079  }
  5080  
  5081  func (cb *OnOpenFileRequestedEventCallback[T]) DispatchCallback(
  5082  	targetPC uintptr, ctx *js.CallbackContext,
  5083  ) {
  5084  	args := ctx.Args()
  5085  	if len(args) != 3+1 /* js this */ ||
  5086  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  5087  		js.ThrowInvalidCallbackInvocation()
  5088  	}
  5089  	var arg0 OpenFileRequestedOptions
  5090  	arg0.UpdateFrom(args[0+1])
  5091  	defer arg0.FreeMembers(true)
  5092  
  5093  	if ctx.Return(cb.Fn(
  5094  		cb.Arg,
  5095  		args[0],
  5096  
  5097  		mark.NoEscape(&arg0),
  5098  		js.Func[func()]{}.FromRef(args[1+1]),
  5099  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5100  	)) {
  5101  		return
  5102  	}
  5103  
  5104  	js.ThrowCallbackValueNotReturned()
  5105  }
  5106  
  5107  // HasFuncOnOpenFileRequested returns true if the function "WEBEXT.fileSystemProvider.onOpenFileRequested.addListener" exists.
  5108  func HasFuncOnOpenFileRequested() bool {
  5109  	return js.True == bindings.HasFuncOnOpenFileRequested()
  5110  }
  5111  
  5112  // FuncOnOpenFileRequested returns the function "WEBEXT.fileSystemProvider.onOpenFileRequested.addListener".
  5113  func FuncOnOpenFileRequested() (fn js.Func[func(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5114  	bindings.FuncOnOpenFileRequested(
  5115  		js.Pointer(&fn),
  5116  	)
  5117  	return
  5118  }
  5119  
  5120  // OnOpenFileRequested calls the function "WEBEXT.fileSystemProvider.onOpenFileRequested.addListener" directly.
  5121  func OnOpenFileRequested(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5122  	bindings.CallOnOpenFileRequested(
  5123  		js.Pointer(&ret),
  5124  		callback.Ref(),
  5125  	)
  5126  
  5127  	return
  5128  }
  5129  
  5130  // TryOnOpenFileRequested calls the function "WEBEXT.fileSystemProvider.onOpenFileRequested.addListener"
  5131  // in a try/catch block and returns (_, err, ok = false) when it went through
  5132  // the catch clause.
  5133  func TryOnOpenFileRequested(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5134  	ok = js.True == bindings.TryOnOpenFileRequested(
  5135  		js.Pointer(&ret), js.Pointer(&exception),
  5136  		callback.Ref(),
  5137  	)
  5138  
  5139  	return
  5140  }
  5141  
  5142  // HasFuncOffOpenFileRequested returns true if the function "WEBEXT.fileSystemProvider.onOpenFileRequested.removeListener" exists.
  5143  func HasFuncOffOpenFileRequested() bool {
  5144  	return js.True == bindings.HasFuncOffOpenFileRequested()
  5145  }
  5146  
  5147  // FuncOffOpenFileRequested returns the function "WEBEXT.fileSystemProvider.onOpenFileRequested.removeListener".
  5148  func FuncOffOpenFileRequested() (fn js.Func[func(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5149  	bindings.FuncOffOpenFileRequested(
  5150  		js.Pointer(&fn),
  5151  	)
  5152  	return
  5153  }
  5154  
  5155  // OffOpenFileRequested calls the function "WEBEXT.fileSystemProvider.onOpenFileRequested.removeListener" directly.
  5156  func OffOpenFileRequested(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5157  	bindings.CallOffOpenFileRequested(
  5158  		js.Pointer(&ret),
  5159  		callback.Ref(),
  5160  	)
  5161  
  5162  	return
  5163  }
  5164  
  5165  // TryOffOpenFileRequested calls the function "WEBEXT.fileSystemProvider.onOpenFileRequested.removeListener"
  5166  // in a try/catch block and returns (_, err, ok = false) when it went through
  5167  // the catch clause.
  5168  func TryOffOpenFileRequested(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5169  	ok = js.True == bindings.TryOffOpenFileRequested(
  5170  		js.Pointer(&ret), js.Pointer(&exception),
  5171  		callback.Ref(),
  5172  	)
  5173  
  5174  	return
  5175  }
  5176  
  5177  // HasFuncHasOnOpenFileRequested returns true if the function "WEBEXT.fileSystemProvider.onOpenFileRequested.hasListener" exists.
  5178  func HasFuncHasOnOpenFileRequested() bool {
  5179  	return js.True == bindings.HasFuncHasOnOpenFileRequested()
  5180  }
  5181  
  5182  // FuncHasOnOpenFileRequested returns the function "WEBEXT.fileSystemProvider.onOpenFileRequested.hasListener".
  5183  func FuncHasOnOpenFileRequested() (fn js.Func[func(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  5184  	bindings.FuncHasOnOpenFileRequested(
  5185  		js.Pointer(&fn),
  5186  	)
  5187  	return
  5188  }
  5189  
  5190  // HasOnOpenFileRequested calls the function "WEBEXT.fileSystemProvider.onOpenFileRequested.hasListener" directly.
  5191  func HasOnOpenFileRequested(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  5192  	bindings.CallHasOnOpenFileRequested(
  5193  		js.Pointer(&ret),
  5194  		callback.Ref(),
  5195  	)
  5196  
  5197  	return
  5198  }
  5199  
  5200  // TryHasOnOpenFileRequested calls the function "WEBEXT.fileSystemProvider.onOpenFileRequested.hasListener"
  5201  // in a try/catch block and returns (_, err, ok = false) when it went through
  5202  // the catch clause.
  5203  func TryHasOnOpenFileRequested(callback js.Func[func(options *OpenFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  5204  	ok = js.True == bindings.TryHasOnOpenFileRequested(
  5205  		js.Pointer(&ret), js.Pointer(&exception),
  5206  		callback.Ref(),
  5207  	)
  5208  
  5209  	return
  5210  }
  5211  
  5212  type OnReadDirectoryRequestedEventCallbackFunc func(this js.Ref, options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5213  
  5214  func (fn OnReadDirectoryRequestedEventCallbackFunc) Register() js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])] {
  5215  	return js.RegisterCallback[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])](
  5216  		fn, abi.FuncPCABIInternal(fn),
  5217  	)
  5218  }
  5219  
  5220  func (fn OnReadDirectoryRequestedEventCallbackFunc) DispatchCallback(
  5221  	targetPC uintptr, ctx *js.CallbackContext,
  5222  ) {
  5223  	args := ctx.Args()
  5224  	if len(args) != 3+1 /* js this */ ||
  5225  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  5226  		js.ThrowInvalidCallbackInvocation()
  5227  	}
  5228  	var arg0 ReadDirectoryRequestedOptions
  5229  	arg0.UpdateFrom(args[0+1])
  5230  	defer arg0.FreeMembers(true)
  5231  
  5232  	if ctx.Return(fn(
  5233  		args[0],
  5234  
  5235  		mark.NoEscape(&arg0),
  5236  		js.Func[func(entries js.Array[EntryMetadata], hasMore bool)]{}.FromRef(args[1+1]),
  5237  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5238  	)) {
  5239  		return
  5240  	}
  5241  
  5242  	js.ThrowCallbackValueNotReturned()
  5243  }
  5244  
  5245  type OnReadDirectoryRequestedEventCallback[T any] struct {
  5246  	Fn  func(arg T, this js.Ref, options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5247  	Arg T
  5248  }
  5249  
  5250  func (cb *OnReadDirectoryRequestedEventCallback[T]) Register() js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])] {
  5251  	return js.RegisterCallback[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])](
  5252  		cb, abi.FuncPCABIInternal(cb.Fn),
  5253  	)
  5254  }
  5255  
  5256  func (cb *OnReadDirectoryRequestedEventCallback[T]) DispatchCallback(
  5257  	targetPC uintptr, ctx *js.CallbackContext,
  5258  ) {
  5259  	args := ctx.Args()
  5260  	if len(args) != 3+1 /* js this */ ||
  5261  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  5262  		js.ThrowInvalidCallbackInvocation()
  5263  	}
  5264  	var arg0 ReadDirectoryRequestedOptions
  5265  	arg0.UpdateFrom(args[0+1])
  5266  	defer arg0.FreeMembers(true)
  5267  
  5268  	if ctx.Return(cb.Fn(
  5269  		cb.Arg,
  5270  		args[0],
  5271  
  5272  		mark.NoEscape(&arg0),
  5273  		js.Func[func(entries js.Array[EntryMetadata], hasMore bool)]{}.FromRef(args[1+1]),
  5274  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5275  	)) {
  5276  		return
  5277  	}
  5278  
  5279  	js.ThrowCallbackValueNotReturned()
  5280  }
  5281  
  5282  // HasFuncOnReadDirectoryRequested returns true if the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.addListener" exists.
  5283  func HasFuncOnReadDirectoryRequested() bool {
  5284  	return js.True == bindings.HasFuncOnReadDirectoryRequested()
  5285  }
  5286  
  5287  // FuncOnReadDirectoryRequested returns the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.addListener".
  5288  func FuncOnReadDirectoryRequested() (fn js.Func[func(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])])]) {
  5289  	bindings.FuncOnReadDirectoryRequested(
  5290  		js.Pointer(&fn),
  5291  	)
  5292  	return
  5293  }
  5294  
  5295  // OnReadDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.addListener" directly.
  5296  func OnReadDirectoryRequested(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5297  	bindings.CallOnReadDirectoryRequested(
  5298  		js.Pointer(&ret),
  5299  		callback.Ref(),
  5300  	)
  5301  
  5302  	return
  5303  }
  5304  
  5305  // TryOnReadDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.addListener"
  5306  // in a try/catch block and returns (_, err, ok = false) when it went through
  5307  // the catch clause.
  5308  func TryOnReadDirectoryRequested(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5309  	ok = js.True == bindings.TryOnReadDirectoryRequested(
  5310  		js.Pointer(&ret), js.Pointer(&exception),
  5311  		callback.Ref(),
  5312  	)
  5313  
  5314  	return
  5315  }
  5316  
  5317  // HasFuncOffReadDirectoryRequested returns true if the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.removeListener" exists.
  5318  func HasFuncOffReadDirectoryRequested() bool {
  5319  	return js.True == bindings.HasFuncOffReadDirectoryRequested()
  5320  }
  5321  
  5322  // FuncOffReadDirectoryRequested returns the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.removeListener".
  5323  func FuncOffReadDirectoryRequested() (fn js.Func[func(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])])]) {
  5324  	bindings.FuncOffReadDirectoryRequested(
  5325  		js.Pointer(&fn),
  5326  	)
  5327  	return
  5328  }
  5329  
  5330  // OffReadDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.removeListener" directly.
  5331  func OffReadDirectoryRequested(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5332  	bindings.CallOffReadDirectoryRequested(
  5333  		js.Pointer(&ret),
  5334  		callback.Ref(),
  5335  	)
  5336  
  5337  	return
  5338  }
  5339  
  5340  // TryOffReadDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.removeListener"
  5341  // in a try/catch block and returns (_, err, ok = false) when it went through
  5342  // the catch clause.
  5343  func TryOffReadDirectoryRequested(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5344  	ok = js.True == bindings.TryOffReadDirectoryRequested(
  5345  		js.Pointer(&ret), js.Pointer(&exception),
  5346  		callback.Ref(),
  5347  	)
  5348  
  5349  	return
  5350  }
  5351  
  5352  // HasFuncHasOnReadDirectoryRequested returns true if the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.hasListener" exists.
  5353  func HasFuncHasOnReadDirectoryRequested() bool {
  5354  	return js.True == bindings.HasFuncHasOnReadDirectoryRequested()
  5355  }
  5356  
  5357  // FuncHasOnReadDirectoryRequested returns the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.hasListener".
  5358  func FuncHasOnReadDirectoryRequested() (fn js.Func[func(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  5359  	bindings.FuncHasOnReadDirectoryRequested(
  5360  		js.Pointer(&fn),
  5361  	)
  5362  	return
  5363  }
  5364  
  5365  // HasOnReadDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.hasListener" directly.
  5366  func HasOnReadDirectoryRequested(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  5367  	bindings.CallHasOnReadDirectoryRequested(
  5368  		js.Pointer(&ret),
  5369  		callback.Ref(),
  5370  	)
  5371  
  5372  	return
  5373  }
  5374  
  5375  // TryHasOnReadDirectoryRequested calls the function "WEBEXT.fileSystemProvider.onReadDirectoryRequested.hasListener"
  5376  // in a try/catch block and returns (_, err, ok = false) when it went through
  5377  // the catch clause.
  5378  func TryHasOnReadDirectoryRequested(callback js.Func[func(options *ReadDirectoryRequestedOptions, successCallback js.Func[func(entries js.Array[EntryMetadata], hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  5379  	ok = js.True == bindings.TryHasOnReadDirectoryRequested(
  5380  		js.Pointer(&ret), js.Pointer(&exception),
  5381  		callback.Ref(),
  5382  	)
  5383  
  5384  	return
  5385  }
  5386  
  5387  type OnReadFileRequestedEventCallbackFunc func(this js.Ref, options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5388  
  5389  func (fn OnReadFileRequestedEventCallbackFunc) Register() js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])] {
  5390  	return js.RegisterCallback[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])](
  5391  		fn, abi.FuncPCABIInternal(fn),
  5392  	)
  5393  }
  5394  
  5395  func (fn OnReadFileRequestedEventCallbackFunc) DispatchCallback(
  5396  	targetPC uintptr, ctx *js.CallbackContext,
  5397  ) {
  5398  	args := ctx.Args()
  5399  	if len(args) != 3+1 /* js this */ ||
  5400  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  5401  		js.ThrowInvalidCallbackInvocation()
  5402  	}
  5403  	var arg0 ReadFileRequestedOptions
  5404  	arg0.UpdateFrom(args[0+1])
  5405  	defer arg0.FreeMembers(true)
  5406  
  5407  	if ctx.Return(fn(
  5408  		args[0],
  5409  
  5410  		mark.NoEscape(&arg0),
  5411  		js.Func[func(data js.ArrayBuffer, hasMore bool)]{}.FromRef(args[1+1]),
  5412  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5413  	)) {
  5414  		return
  5415  	}
  5416  
  5417  	js.ThrowCallbackValueNotReturned()
  5418  }
  5419  
  5420  type OnReadFileRequestedEventCallback[T any] struct {
  5421  	Fn  func(arg T, this js.Ref, options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5422  	Arg T
  5423  }
  5424  
  5425  func (cb *OnReadFileRequestedEventCallback[T]) Register() js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])] {
  5426  	return js.RegisterCallback[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])](
  5427  		cb, abi.FuncPCABIInternal(cb.Fn),
  5428  	)
  5429  }
  5430  
  5431  func (cb *OnReadFileRequestedEventCallback[T]) DispatchCallback(
  5432  	targetPC uintptr, ctx *js.CallbackContext,
  5433  ) {
  5434  	args := ctx.Args()
  5435  	if len(args) != 3+1 /* js this */ ||
  5436  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  5437  		js.ThrowInvalidCallbackInvocation()
  5438  	}
  5439  	var arg0 ReadFileRequestedOptions
  5440  	arg0.UpdateFrom(args[0+1])
  5441  	defer arg0.FreeMembers(true)
  5442  
  5443  	if ctx.Return(cb.Fn(
  5444  		cb.Arg,
  5445  		args[0],
  5446  
  5447  		mark.NoEscape(&arg0),
  5448  		js.Func[func(data js.ArrayBuffer, hasMore bool)]{}.FromRef(args[1+1]),
  5449  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5450  	)) {
  5451  		return
  5452  	}
  5453  
  5454  	js.ThrowCallbackValueNotReturned()
  5455  }
  5456  
  5457  // HasFuncOnReadFileRequested returns true if the function "WEBEXT.fileSystemProvider.onReadFileRequested.addListener" exists.
  5458  func HasFuncOnReadFileRequested() bool {
  5459  	return js.True == bindings.HasFuncOnReadFileRequested()
  5460  }
  5461  
  5462  // FuncOnReadFileRequested returns the function "WEBEXT.fileSystemProvider.onReadFileRequested.addListener".
  5463  func FuncOnReadFileRequested() (fn js.Func[func(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])])]) {
  5464  	bindings.FuncOnReadFileRequested(
  5465  		js.Pointer(&fn),
  5466  	)
  5467  	return
  5468  }
  5469  
  5470  // OnReadFileRequested calls the function "WEBEXT.fileSystemProvider.onReadFileRequested.addListener" directly.
  5471  func OnReadFileRequested(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5472  	bindings.CallOnReadFileRequested(
  5473  		js.Pointer(&ret),
  5474  		callback.Ref(),
  5475  	)
  5476  
  5477  	return
  5478  }
  5479  
  5480  // TryOnReadFileRequested calls the function "WEBEXT.fileSystemProvider.onReadFileRequested.addListener"
  5481  // in a try/catch block and returns (_, err, ok = false) when it went through
  5482  // the catch clause.
  5483  func TryOnReadFileRequested(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5484  	ok = js.True == bindings.TryOnReadFileRequested(
  5485  		js.Pointer(&ret), js.Pointer(&exception),
  5486  		callback.Ref(),
  5487  	)
  5488  
  5489  	return
  5490  }
  5491  
  5492  // HasFuncOffReadFileRequested returns true if the function "WEBEXT.fileSystemProvider.onReadFileRequested.removeListener" exists.
  5493  func HasFuncOffReadFileRequested() bool {
  5494  	return js.True == bindings.HasFuncOffReadFileRequested()
  5495  }
  5496  
  5497  // FuncOffReadFileRequested returns the function "WEBEXT.fileSystemProvider.onReadFileRequested.removeListener".
  5498  func FuncOffReadFileRequested() (fn js.Func[func(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])])]) {
  5499  	bindings.FuncOffReadFileRequested(
  5500  		js.Pointer(&fn),
  5501  	)
  5502  	return
  5503  }
  5504  
  5505  // OffReadFileRequested calls the function "WEBEXT.fileSystemProvider.onReadFileRequested.removeListener" directly.
  5506  func OffReadFileRequested(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5507  	bindings.CallOffReadFileRequested(
  5508  		js.Pointer(&ret),
  5509  		callback.Ref(),
  5510  	)
  5511  
  5512  	return
  5513  }
  5514  
  5515  // TryOffReadFileRequested calls the function "WEBEXT.fileSystemProvider.onReadFileRequested.removeListener"
  5516  // in a try/catch block and returns (_, err, ok = false) when it went through
  5517  // the catch clause.
  5518  func TryOffReadFileRequested(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5519  	ok = js.True == bindings.TryOffReadFileRequested(
  5520  		js.Pointer(&ret), js.Pointer(&exception),
  5521  		callback.Ref(),
  5522  	)
  5523  
  5524  	return
  5525  }
  5526  
  5527  // HasFuncHasOnReadFileRequested returns true if the function "WEBEXT.fileSystemProvider.onReadFileRequested.hasListener" exists.
  5528  func HasFuncHasOnReadFileRequested() bool {
  5529  	return js.True == bindings.HasFuncHasOnReadFileRequested()
  5530  }
  5531  
  5532  // FuncHasOnReadFileRequested returns the function "WEBEXT.fileSystemProvider.onReadFileRequested.hasListener".
  5533  func FuncHasOnReadFileRequested() (fn js.Func[func(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  5534  	bindings.FuncHasOnReadFileRequested(
  5535  		js.Pointer(&fn),
  5536  	)
  5537  	return
  5538  }
  5539  
  5540  // HasOnReadFileRequested calls the function "WEBEXT.fileSystemProvider.onReadFileRequested.hasListener" directly.
  5541  func HasOnReadFileRequested(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  5542  	bindings.CallHasOnReadFileRequested(
  5543  		js.Pointer(&ret),
  5544  		callback.Ref(),
  5545  	)
  5546  
  5547  	return
  5548  }
  5549  
  5550  // TryHasOnReadFileRequested calls the function "WEBEXT.fileSystemProvider.onReadFileRequested.hasListener"
  5551  // in a try/catch block and returns (_, err, ok = false) when it went through
  5552  // the catch clause.
  5553  func TryHasOnReadFileRequested(callback js.Func[func(options *ReadFileRequestedOptions, successCallback js.Func[func(data js.ArrayBuffer, hasMore bool)], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  5554  	ok = js.True == bindings.TryHasOnReadFileRequested(
  5555  		js.Pointer(&ret), js.Pointer(&exception),
  5556  		callback.Ref(),
  5557  	)
  5558  
  5559  	return
  5560  }
  5561  
  5562  type OnRemoveWatcherRequestedEventCallbackFunc func(this js.Ref, options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5563  
  5564  func (fn OnRemoveWatcherRequestedEventCallbackFunc) Register() js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5565  	return js.RegisterCallback[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5566  		fn, abi.FuncPCABIInternal(fn),
  5567  	)
  5568  }
  5569  
  5570  func (fn OnRemoveWatcherRequestedEventCallbackFunc) DispatchCallback(
  5571  	targetPC uintptr, ctx *js.CallbackContext,
  5572  ) {
  5573  	args := ctx.Args()
  5574  	if len(args) != 3+1 /* js this */ ||
  5575  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  5576  		js.ThrowInvalidCallbackInvocation()
  5577  	}
  5578  	var arg0 RemoveWatcherRequestedOptions
  5579  	arg0.UpdateFrom(args[0+1])
  5580  	defer arg0.FreeMembers(true)
  5581  
  5582  	if ctx.Return(fn(
  5583  		args[0],
  5584  
  5585  		mark.NoEscape(&arg0),
  5586  		js.Func[func()]{}.FromRef(args[1+1]),
  5587  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5588  	)) {
  5589  		return
  5590  	}
  5591  
  5592  	js.ThrowCallbackValueNotReturned()
  5593  }
  5594  
  5595  type OnRemoveWatcherRequestedEventCallback[T any] struct {
  5596  	Fn  func(arg T, this js.Ref, options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5597  	Arg T
  5598  }
  5599  
  5600  func (cb *OnRemoveWatcherRequestedEventCallback[T]) Register() js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5601  	return js.RegisterCallback[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5602  		cb, abi.FuncPCABIInternal(cb.Fn),
  5603  	)
  5604  }
  5605  
  5606  func (cb *OnRemoveWatcherRequestedEventCallback[T]) DispatchCallback(
  5607  	targetPC uintptr, ctx *js.CallbackContext,
  5608  ) {
  5609  	args := ctx.Args()
  5610  	if len(args) != 3+1 /* js this */ ||
  5611  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  5612  		js.ThrowInvalidCallbackInvocation()
  5613  	}
  5614  	var arg0 RemoveWatcherRequestedOptions
  5615  	arg0.UpdateFrom(args[0+1])
  5616  	defer arg0.FreeMembers(true)
  5617  
  5618  	if ctx.Return(cb.Fn(
  5619  		cb.Arg,
  5620  		args[0],
  5621  
  5622  		mark.NoEscape(&arg0),
  5623  		js.Func[func()]{}.FromRef(args[1+1]),
  5624  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5625  	)) {
  5626  		return
  5627  	}
  5628  
  5629  	js.ThrowCallbackValueNotReturned()
  5630  }
  5631  
  5632  // HasFuncOnRemoveWatcherRequested returns true if the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.addListener" exists.
  5633  func HasFuncOnRemoveWatcherRequested() bool {
  5634  	return js.True == bindings.HasFuncOnRemoveWatcherRequested()
  5635  }
  5636  
  5637  // FuncOnRemoveWatcherRequested returns the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.addListener".
  5638  func FuncOnRemoveWatcherRequested() (fn js.Func[func(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5639  	bindings.FuncOnRemoveWatcherRequested(
  5640  		js.Pointer(&fn),
  5641  	)
  5642  	return
  5643  }
  5644  
  5645  // OnRemoveWatcherRequested calls the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.addListener" directly.
  5646  func OnRemoveWatcherRequested(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5647  	bindings.CallOnRemoveWatcherRequested(
  5648  		js.Pointer(&ret),
  5649  		callback.Ref(),
  5650  	)
  5651  
  5652  	return
  5653  }
  5654  
  5655  // TryOnRemoveWatcherRequested calls the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.addListener"
  5656  // in a try/catch block and returns (_, err, ok = false) when it went through
  5657  // the catch clause.
  5658  func TryOnRemoveWatcherRequested(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5659  	ok = js.True == bindings.TryOnRemoveWatcherRequested(
  5660  		js.Pointer(&ret), js.Pointer(&exception),
  5661  		callback.Ref(),
  5662  	)
  5663  
  5664  	return
  5665  }
  5666  
  5667  // HasFuncOffRemoveWatcherRequested returns true if the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.removeListener" exists.
  5668  func HasFuncOffRemoveWatcherRequested() bool {
  5669  	return js.True == bindings.HasFuncOffRemoveWatcherRequested()
  5670  }
  5671  
  5672  // FuncOffRemoveWatcherRequested returns the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.removeListener".
  5673  func FuncOffRemoveWatcherRequested() (fn js.Func[func(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5674  	bindings.FuncOffRemoveWatcherRequested(
  5675  		js.Pointer(&fn),
  5676  	)
  5677  	return
  5678  }
  5679  
  5680  // OffRemoveWatcherRequested calls the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.removeListener" directly.
  5681  func OffRemoveWatcherRequested(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5682  	bindings.CallOffRemoveWatcherRequested(
  5683  		js.Pointer(&ret),
  5684  		callback.Ref(),
  5685  	)
  5686  
  5687  	return
  5688  }
  5689  
  5690  // TryOffRemoveWatcherRequested calls the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.removeListener"
  5691  // in a try/catch block and returns (_, err, ok = false) when it went through
  5692  // the catch clause.
  5693  func TryOffRemoveWatcherRequested(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5694  	ok = js.True == bindings.TryOffRemoveWatcherRequested(
  5695  		js.Pointer(&ret), js.Pointer(&exception),
  5696  		callback.Ref(),
  5697  	)
  5698  
  5699  	return
  5700  }
  5701  
  5702  // HasFuncHasOnRemoveWatcherRequested returns true if the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.hasListener" exists.
  5703  func HasFuncHasOnRemoveWatcherRequested() bool {
  5704  	return js.True == bindings.HasFuncHasOnRemoveWatcherRequested()
  5705  }
  5706  
  5707  // FuncHasOnRemoveWatcherRequested returns the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.hasListener".
  5708  func FuncHasOnRemoveWatcherRequested() (fn js.Func[func(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  5709  	bindings.FuncHasOnRemoveWatcherRequested(
  5710  		js.Pointer(&fn),
  5711  	)
  5712  	return
  5713  }
  5714  
  5715  // HasOnRemoveWatcherRequested calls the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.hasListener" directly.
  5716  func HasOnRemoveWatcherRequested(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  5717  	bindings.CallHasOnRemoveWatcherRequested(
  5718  		js.Pointer(&ret),
  5719  		callback.Ref(),
  5720  	)
  5721  
  5722  	return
  5723  }
  5724  
  5725  // TryHasOnRemoveWatcherRequested calls the function "WEBEXT.fileSystemProvider.onRemoveWatcherRequested.hasListener"
  5726  // in a try/catch block and returns (_, err, ok = false) when it went through
  5727  // the catch clause.
  5728  func TryHasOnRemoveWatcherRequested(callback js.Func[func(options *RemoveWatcherRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  5729  	ok = js.True == bindings.TryHasOnRemoveWatcherRequested(
  5730  		js.Pointer(&ret), js.Pointer(&exception),
  5731  		callback.Ref(),
  5732  	)
  5733  
  5734  	return
  5735  }
  5736  
  5737  type OnTruncateRequestedEventCallbackFunc func(this js.Ref, options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5738  
  5739  func (fn OnTruncateRequestedEventCallbackFunc) Register() js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5740  	return js.RegisterCallback[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5741  		fn, abi.FuncPCABIInternal(fn),
  5742  	)
  5743  }
  5744  
  5745  func (fn OnTruncateRequestedEventCallbackFunc) DispatchCallback(
  5746  	targetPC uintptr, ctx *js.CallbackContext,
  5747  ) {
  5748  	args := ctx.Args()
  5749  	if len(args) != 3+1 /* js this */ ||
  5750  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  5751  		js.ThrowInvalidCallbackInvocation()
  5752  	}
  5753  	var arg0 TruncateRequestedOptions
  5754  	arg0.UpdateFrom(args[0+1])
  5755  	defer arg0.FreeMembers(true)
  5756  
  5757  	if ctx.Return(fn(
  5758  		args[0],
  5759  
  5760  		mark.NoEscape(&arg0),
  5761  		js.Func[func()]{}.FromRef(args[1+1]),
  5762  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5763  	)) {
  5764  		return
  5765  	}
  5766  
  5767  	js.ThrowCallbackValueNotReturned()
  5768  }
  5769  
  5770  type OnTruncateRequestedEventCallback[T any] struct {
  5771  	Fn  func(arg T, this js.Ref, options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5772  	Arg T
  5773  }
  5774  
  5775  func (cb *OnTruncateRequestedEventCallback[T]) Register() js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5776  	return js.RegisterCallback[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5777  		cb, abi.FuncPCABIInternal(cb.Fn),
  5778  	)
  5779  }
  5780  
  5781  func (cb *OnTruncateRequestedEventCallback[T]) DispatchCallback(
  5782  	targetPC uintptr, ctx *js.CallbackContext,
  5783  ) {
  5784  	args := ctx.Args()
  5785  	if len(args) != 3+1 /* js this */ ||
  5786  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  5787  		js.ThrowInvalidCallbackInvocation()
  5788  	}
  5789  	var arg0 TruncateRequestedOptions
  5790  	arg0.UpdateFrom(args[0+1])
  5791  	defer arg0.FreeMembers(true)
  5792  
  5793  	if ctx.Return(cb.Fn(
  5794  		cb.Arg,
  5795  		args[0],
  5796  
  5797  		mark.NoEscape(&arg0),
  5798  		js.Func[func()]{}.FromRef(args[1+1]),
  5799  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5800  	)) {
  5801  		return
  5802  	}
  5803  
  5804  	js.ThrowCallbackValueNotReturned()
  5805  }
  5806  
  5807  // HasFuncOnTruncateRequested returns true if the function "WEBEXT.fileSystemProvider.onTruncateRequested.addListener" exists.
  5808  func HasFuncOnTruncateRequested() bool {
  5809  	return js.True == bindings.HasFuncOnTruncateRequested()
  5810  }
  5811  
  5812  // FuncOnTruncateRequested returns the function "WEBEXT.fileSystemProvider.onTruncateRequested.addListener".
  5813  func FuncOnTruncateRequested() (fn js.Func[func(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5814  	bindings.FuncOnTruncateRequested(
  5815  		js.Pointer(&fn),
  5816  	)
  5817  	return
  5818  }
  5819  
  5820  // OnTruncateRequested calls the function "WEBEXT.fileSystemProvider.onTruncateRequested.addListener" directly.
  5821  func OnTruncateRequested(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5822  	bindings.CallOnTruncateRequested(
  5823  		js.Pointer(&ret),
  5824  		callback.Ref(),
  5825  	)
  5826  
  5827  	return
  5828  }
  5829  
  5830  // TryOnTruncateRequested calls the function "WEBEXT.fileSystemProvider.onTruncateRequested.addListener"
  5831  // in a try/catch block and returns (_, err, ok = false) when it went through
  5832  // the catch clause.
  5833  func TryOnTruncateRequested(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5834  	ok = js.True == bindings.TryOnTruncateRequested(
  5835  		js.Pointer(&ret), js.Pointer(&exception),
  5836  		callback.Ref(),
  5837  	)
  5838  
  5839  	return
  5840  }
  5841  
  5842  // HasFuncOffTruncateRequested returns true if the function "WEBEXT.fileSystemProvider.onTruncateRequested.removeListener" exists.
  5843  func HasFuncOffTruncateRequested() bool {
  5844  	return js.True == bindings.HasFuncOffTruncateRequested()
  5845  }
  5846  
  5847  // FuncOffTruncateRequested returns the function "WEBEXT.fileSystemProvider.onTruncateRequested.removeListener".
  5848  func FuncOffTruncateRequested() (fn js.Func[func(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5849  	bindings.FuncOffTruncateRequested(
  5850  		js.Pointer(&fn),
  5851  	)
  5852  	return
  5853  }
  5854  
  5855  // OffTruncateRequested calls the function "WEBEXT.fileSystemProvider.onTruncateRequested.removeListener" directly.
  5856  func OffTruncateRequested(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5857  	bindings.CallOffTruncateRequested(
  5858  		js.Pointer(&ret),
  5859  		callback.Ref(),
  5860  	)
  5861  
  5862  	return
  5863  }
  5864  
  5865  // TryOffTruncateRequested calls the function "WEBEXT.fileSystemProvider.onTruncateRequested.removeListener"
  5866  // in a try/catch block and returns (_, err, ok = false) when it went through
  5867  // the catch clause.
  5868  func TryOffTruncateRequested(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  5869  	ok = js.True == bindings.TryOffTruncateRequested(
  5870  		js.Pointer(&ret), js.Pointer(&exception),
  5871  		callback.Ref(),
  5872  	)
  5873  
  5874  	return
  5875  }
  5876  
  5877  // HasFuncHasOnTruncateRequested returns true if the function "WEBEXT.fileSystemProvider.onTruncateRequested.hasListener" exists.
  5878  func HasFuncHasOnTruncateRequested() bool {
  5879  	return js.True == bindings.HasFuncHasOnTruncateRequested()
  5880  }
  5881  
  5882  // FuncHasOnTruncateRequested returns the function "WEBEXT.fileSystemProvider.onTruncateRequested.hasListener".
  5883  func FuncHasOnTruncateRequested() (fn js.Func[func(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  5884  	bindings.FuncHasOnTruncateRequested(
  5885  		js.Pointer(&fn),
  5886  	)
  5887  	return
  5888  }
  5889  
  5890  // HasOnTruncateRequested calls the function "WEBEXT.fileSystemProvider.onTruncateRequested.hasListener" directly.
  5891  func HasOnTruncateRequested(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  5892  	bindings.CallHasOnTruncateRequested(
  5893  		js.Pointer(&ret),
  5894  		callback.Ref(),
  5895  	)
  5896  
  5897  	return
  5898  }
  5899  
  5900  // TryHasOnTruncateRequested calls the function "WEBEXT.fileSystemProvider.onTruncateRequested.hasListener"
  5901  // in a try/catch block and returns (_, err, ok = false) when it went through
  5902  // the catch clause.
  5903  func TryHasOnTruncateRequested(callback js.Func[func(options *TruncateRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  5904  	ok = js.True == bindings.TryHasOnTruncateRequested(
  5905  		js.Pointer(&ret), js.Pointer(&exception),
  5906  		callback.Ref(),
  5907  	)
  5908  
  5909  	return
  5910  }
  5911  
  5912  type OnUnmountRequestedEventCallbackFunc func(this js.Ref, options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5913  
  5914  func (fn OnUnmountRequestedEventCallbackFunc) Register() js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5915  	return js.RegisterCallback[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5916  		fn, abi.FuncPCABIInternal(fn),
  5917  	)
  5918  }
  5919  
  5920  func (fn OnUnmountRequestedEventCallbackFunc) DispatchCallback(
  5921  	targetPC uintptr, ctx *js.CallbackContext,
  5922  ) {
  5923  	args := ctx.Args()
  5924  	if len(args) != 3+1 /* js this */ ||
  5925  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  5926  		js.ThrowInvalidCallbackInvocation()
  5927  	}
  5928  	var arg0 UnmountRequestedOptions
  5929  	arg0.UpdateFrom(args[0+1])
  5930  	defer arg0.FreeMembers(true)
  5931  
  5932  	if ctx.Return(fn(
  5933  		args[0],
  5934  
  5935  		mark.NoEscape(&arg0),
  5936  		js.Func[func()]{}.FromRef(args[1+1]),
  5937  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5938  	)) {
  5939  		return
  5940  	}
  5941  
  5942  	js.ThrowCallbackValueNotReturned()
  5943  }
  5944  
  5945  type OnUnmountRequestedEventCallback[T any] struct {
  5946  	Fn  func(arg T, this js.Ref, options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  5947  	Arg T
  5948  }
  5949  
  5950  func (cb *OnUnmountRequestedEventCallback[T]) Register() js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  5951  	return js.RegisterCallback[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  5952  		cb, abi.FuncPCABIInternal(cb.Fn),
  5953  	)
  5954  }
  5955  
  5956  func (cb *OnUnmountRequestedEventCallback[T]) DispatchCallback(
  5957  	targetPC uintptr, ctx *js.CallbackContext,
  5958  ) {
  5959  	args := ctx.Args()
  5960  	if len(args) != 3+1 /* js this */ ||
  5961  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  5962  		js.ThrowInvalidCallbackInvocation()
  5963  	}
  5964  	var arg0 UnmountRequestedOptions
  5965  	arg0.UpdateFrom(args[0+1])
  5966  	defer arg0.FreeMembers(true)
  5967  
  5968  	if ctx.Return(cb.Fn(
  5969  		cb.Arg,
  5970  		args[0],
  5971  
  5972  		mark.NoEscape(&arg0),
  5973  		js.Func[func()]{}.FromRef(args[1+1]),
  5974  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  5975  	)) {
  5976  		return
  5977  	}
  5978  
  5979  	js.ThrowCallbackValueNotReturned()
  5980  }
  5981  
  5982  // HasFuncOnUnmountRequested returns true if the function "WEBEXT.fileSystemProvider.onUnmountRequested.addListener" exists.
  5983  func HasFuncOnUnmountRequested() bool {
  5984  	return js.True == bindings.HasFuncOnUnmountRequested()
  5985  }
  5986  
  5987  // FuncOnUnmountRequested returns the function "WEBEXT.fileSystemProvider.onUnmountRequested.addListener".
  5988  func FuncOnUnmountRequested() (fn js.Func[func(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  5989  	bindings.FuncOnUnmountRequested(
  5990  		js.Pointer(&fn),
  5991  	)
  5992  	return
  5993  }
  5994  
  5995  // OnUnmountRequested calls the function "WEBEXT.fileSystemProvider.onUnmountRequested.addListener" directly.
  5996  func OnUnmountRequested(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  5997  	bindings.CallOnUnmountRequested(
  5998  		js.Pointer(&ret),
  5999  		callback.Ref(),
  6000  	)
  6001  
  6002  	return
  6003  }
  6004  
  6005  // TryOnUnmountRequested calls the function "WEBEXT.fileSystemProvider.onUnmountRequested.addListener"
  6006  // in a try/catch block and returns (_, err, ok = false) when it went through
  6007  // the catch clause.
  6008  func TryOnUnmountRequested(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  6009  	ok = js.True == bindings.TryOnUnmountRequested(
  6010  		js.Pointer(&ret), js.Pointer(&exception),
  6011  		callback.Ref(),
  6012  	)
  6013  
  6014  	return
  6015  }
  6016  
  6017  // HasFuncOffUnmountRequested returns true if the function "WEBEXT.fileSystemProvider.onUnmountRequested.removeListener" exists.
  6018  func HasFuncOffUnmountRequested() bool {
  6019  	return js.True == bindings.HasFuncOffUnmountRequested()
  6020  }
  6021  
  6022  // FuncOffUnmountRequested returns the function "WEBEXT.fileSystemProvider.onUnmountRequested.removeListener".
  6023  func FuncOffUnmountRequested() (fn js.Func[func(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  6024  	bindings.FuncOffUnmountRequested(
  6025  		js.Pointer(&fn),
  6026  	)
  6027  	return
  6028  }
  6029  
  6030  // OffUnmountRequested calls the function "WEBEXT.fileSystemProvider.onUnmountRequested.removeListener" directly.
  6031  func OffUnmountRequested(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  6032  	bindings.CallOffUnmountRequested(
  6033  		js.Pointer(&ret),
  6034  		callback.Ref(),
  6035  	)
  6036  
  6037  	return
  6038  }
  6039  
  6040  // TryOffUnmountRequested calls the function "WEBEXT.fileSystemProvider.onUnmountRequested.removeListener"
  6041  // in a try/catch block and returns (_, err, ok = false) when it went through
  6042  // the catch clause.
  6043  func TryOffUnmountRequested(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  6044  	ok = js.True == bindings.TryOffUnmountRequested(
  6045  		js.Pointer(&ret), js.Pointer(&exception),
  6046  		callback.Ref(),
  6047  	)
  6048  
  6049  	return
  6050  }
  6051  
  6052  // HasFuncHasOnUnmountRequested returns true if the function "WEBEXT.fileSystemProvider.onUnmountRequested.hasListener" exists.
  6053  func HasFuncHasOnUnmountRequested() bool {
  6054  	return js.True == bindings.HasFuncHasOnUnmountRequested()
  6055  }
  6056  
  6057  // FuncHasOnUnmountRequested returns the function "WEBEXT.fileSystemProvider.onUnmountRequested.hasListener".
  6058  func FuncHasOnUnmountRequested() (fn js.Func[func(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  6059  	bindings.FuncHasOnUnmountRequested(
  6060  		js.Pointer(&fn),
  6061  	)
  6062  	return
  6063  }
  6064  
  6065  // HasOnUnmountRequested calls the function "WEBEXT.fileSystemProvider.onUnmountRequested.hasListener" directly.
  6066  func HasOnUnmountRequested(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  6067  	bindings.CallHasOnUnmountRequested(
  6068  		js.Pointer(&ret),
  6069  		callback.Ref(),
  6070  	)
  6071  
  6072  	return
  6073  }
  6074  
  6075  // TryHasOnUnmountRequested calls the function "WEBEXT.fileSystemProvider.onUnmountRequested.hasListener"
  6076  // in a try/catch block and returns (_, err, ok = false) when it went through
  6077  // the catch clause.
  6078  func TryHasOnUnmountRequested(callback js.Func[func(options *UnmountRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  6079  	ok = js.True == bindings.TryHasOnUnmountRequested(
  6080  		js.Pointer(&ret), js.Pointer(&exception),
  6081  		callback.Ref(),
  6082  	)
  6083  
  6084  	return
  6085  }
  6086  
  6087  type OnWriteFileRequestedEventCallbackFunc func(this js.Ref, options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  6088  
  6089  func (fn OnWriteFileRequestedEventCallbackFunc) Register() js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  6090  	return js.RegisterCallback[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  6091  		fn, abi.FuncPCABIInternal(fn),
  6092  	)
  6093  }
  6094  
  6095  func (fn OnWriteFileRequestedEventCallbackFunc) DispatchCallback(
  6096  	targetPC uintptr, ctx *js.CallbackContext,
  6097  ) {
  6098  	args := ctx.Args()
  6099  	if len(args) != 3+1 /* js this */ ||
  6100  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  6101  		js.ThrowInvalidCallbackInvocation()
  6102  	}
  6103  	var arg0 WriteFileRequestedOptions
  6104  	arg0.UpdateFrom(args[0+1])
  6105  	defer arg0.FreeMembers(true)
  6106  
  6107  	if ctx.Return(fn(
  6108  		args[0],
  6109  
  6110  		mark.NoEscape(&arg0),
  6111  		js.Func[func()]{}.FromRef(args[1+1]),
  6112  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  6113  	)) {
  6114  		return
  6115  	}
  6116  
  6117  	js.ThrowCallbackValueNotReturned()
  6118  }
  6119  
  6120  type OnWriteFileRequestedEventCallback[T any] struct {
  6121  	Fn  func(arg T, this js.Ref, options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)]) js.Ref
  6122  	Arg T
  6123  }
  6124  
  6125  func (cb *OnWriteFileRequestedEventCallback[T]) Register() js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])] {
  6126  	return js.RegisterCallback[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])](
  6127  		cb, abi.FuncPCABIInternal(cb.Fn),
  6128  	)
  6129  }
  6130  
  6131  func (cb *OnWriteFileRequestedEventCallback[T]) DispatchCallback(
  6132  	targetPC uintptr, ctx *js.CallbackContext,
  6133  ) {
  6134  	args := ctx.Args()
  6135  	if len(args) != 3+1 /* js this */ ||
  6136  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  6137  		js.ThrowInvalidCallbackInvocation()
  6138  	}
  6139  	var arg0 WriteFileRequestedOptions
  6140  	arg0.UpdateFrom(args[0+1])
  6141  	defer arg0.FreeMembers(true)
  6142  
  6143  	if ctx.Return(cb.Fn(
  6144  		cb.Arg,
  6145  		args[0],
  6146  
  6147  		mark.NoEscape(&arg0),
  6148  		js.Func[func()]{}.FromRef(args[1+1]),
  6149  		js.Func[func(err ProviderError)]{}.FromRef(args[2+1]),
  6150  	)) {
  6151  		return
  6152  	}
  6153  
  6154  	js.ThrowCallbackValueNotReturned()
  6155  }
  6156  
  6157  // HasFuncOnWriteFileRequested returns true if the function "WEBEXT.fileSystemProvider.onWriteFileRequested.addListener" exists.
  6158  func HasFuncOnWriteFileRequested() bool {
  6159  	return js.True == bindings.HasFuncOnWriteFileRequested()
  6160  }
  6161  
  6162  // FuncOnWriteFileRequested returns the function "WEBEXT.fileSystemProvider.onWriteFileRequested.addListener".
  6163  func FuncOnWriteFileRequested() (fn js.Func[func(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  6164  	bindings.FuncOnWriteFileRequested(
  6165  		js.Pointer(&fn),
  6166  	)
  6167  	return
  6168  }
  6169  
  6170  // OnWriteFileRequested calls the function "WEBEXT.fileSystemProvider.onWriteFileRequested.addListener" directly.
  6171  func OnWriteFileRequested(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  6172  	bindings.CallOnWriteFileRequested(
  6173  		js.Pointer(&ret),
  6174  		callback.Ref(),
  6175  	)
  6176  
  6177  	return
  6178  }
  6179  
  6180  // TryOnWriteFileRequested calls the function "WEBEXT.fileSystemProvider.onWriteFileRequested.addListener"
  6181  // in a try/catch block and returns (_, err, ok = false) when it went through
  6182  // the catch clause.
  6183  func TryOnWriteFileRequested(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  6184  	ok = js.True == bindings.TryOnWriteFileRequested(
  6185  		js.Pointer(&ret), js.Pointer(&exception),
  6186  		callback.Ref(),
  6187  	)
  6188  
  6189  	return
  6190  }
  6191  
  6192  // HasFuncOffWriteFileRequested returns true if the function "WEBEXT.fileSystemProvider.onWriteFileRequested.removeListener" exists.
  6193  func HasFuncOffWriteFileRequested() bool {
  6194  	return js.True == bindings.HasFuncOffWriteFileRequested()
  6195  }
  6196  
  6197  // FuncOffWriteFileRequested returns the function "WEBEXT.fileSystemProvider.onWriteFileRequested.removeListener".
  6198  func FuncOffWriteFileRequested() (fn js.Func[func(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])])]) {
  6199  	bindings.FuncOffWriteFileRequested(
  6200  		js.Pointer(&fn),
  6201  	)
  6202  	return
  6203  }
  6204  
  6205  // OffWriteFileRequested calls the function "WEBEXT.fileSystemProvider.onWriteFileRequested.removeListener" directly.
  6206  func OffWriteFileRequested(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void) {
  6207  	bindings.CallOffWriteFileRequested(
  6208  		js.Pointer(&ret),
  6209  		callback.Ref(),
  6210  	)
  6211  
  6212  	return
  6213  }
  6214  
  6215  // TryOffWriteFileRequested calls the function "WEBEXT.fileSystemProvider.onWriteFileRequested.removeListener"
  6216  // in a try/catch block and returns (_, err, ok = false) when it went through
  6217  // the catch clause.
  6218  func TryOffWriteFileRequested(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret js.Void, exception js.Any, ok bool) {
  6219  	ok = js.True == bindings.TryOffWriteFileRequested(
  6220  		js.Pointer(&ret), js.Pointer(&exception),
  6221  		callback.Ref(),
  6222  	)
  6223  
  6224  	return
  6225  }
  6226  
  6227  // HasFuncHasOnWriteFileRequested returns true if the function "WEBEXT.fileSystemProvider.onWriteFileRequested.hasListener" exists.
  6228  func HasFuncHasOnWriteFileRequested() bool {
  6229  	return js.True == bindings.HasFuncHasOnWriteFileRequested()
  6230  }
  6231  
  6232  // FuncHasOnWriteFileRequested returns the function "WEBEXT.fileSystemProvider.onWriteFileRequested.hasListener".
  6233  func FuncHasOnWriteFileRequested() (fn js.Func[func(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) bool]) {
  6234  	bindings.FuncHasOnWriteFileRequested(
  6235  		js.Pointer(&fn),
  6236  	)
  6237  	return
  6238  }
  6239  
  6240  // HasOnWriteFileRequested calls the function "WEBEXT.fileSystemProvider.onWriteFileRequested.hasListener" directly.
  6241  func HasOnWriteFileRequested(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool) {
  6242  	bindings.CallHasOnWriteFileRequested(
  6243  		js.Pointer(&ret),
  6244  		callback.Ref(),
  6245  	)
  6246  
  6247  	return
  6248  }
  6249  
  6250  // TryHasOnWriteFileRequested calls the function "WEBEXT.fileSystemProvider.onWriteFileRequested.hasListener"
  6251  // in a try/catch block and returns (_, err, ok = false) when it went through
  6252  // the catch clause.
  6253  func TryHasOnWriteFileRequested(callback js.Func[func(options *WriteFileRequestedOptions, successCallback js.Func[func()], errorCallback js.Func[func(err ProviderError)])]) (ret bool, exception js.Any, ok bool) {
  6254  	ok = js.True == bindings.TryHasOnWriteFileRequested(
  6255  		js.Pointer(&ret), js.Pointer(&exception),
  6256  		callback.Ref(),
  6257  	)
  6258  
  6259  	return
  6260  }
  6261  
  6262  // HasFuncUnmount returns true if the function "WEBEXT.fileSystemProvider.unmount" exists.
  6263  func HasFuncUnmount() bool {
  6264  	return js.True == bindings.HasFuncUnmount()
  6265  }
  6266  
  6267  // FuncUnmount returns the function "WEBEXT.fileSystemProvider.unmount".
  6268  func FuncUnmount() (fn js.Func[func(options UnmountOptions) js.Promise[js.Void]]) {
  6269  	bindings.FuncUnmount(
  6270  		js.Pointer(&fn),
  6271  	)
  6272  	return
  6273  }
  6274  
  6275  // Unmount calls the function "WEBEXT.fileSystemProvider.unmount" directly.
  6276  func Unmount(options UnmountOptions) (ret js.Promise[js.Void]) {
  6277  	bindings.CallUnmount(
  6278  		js.Pointer(&ret),
  6279  		js.Pointer(&options),
  6280  	)
  6281  
  6282  	return
  6283  }
  6284  
  6285  // TryUnmount calls the function "WEBEXT.fileSystemProvider.unmount"
  6286  // in a try/catch block and returns (_, err, ok = false) when it went through
  6287  // the catch clause.
  6288  func TryUnmount(options UnmountOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  6289  	ok = js.True == bindings.TryUnmount(
  6290  		js.Pointer(&ret), js.Pointer(&exception),
  6291  		js.Pointer(&options),
  6292  	)
  6293  
  6294  	return
  6295  }