github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis22_js_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package web
     5  
     6  import (
     7  	"github.com/primecitizens/pcz/std/core/abi"
     8  	"github.com/primecitizens/pcz/std/ffi/js"
     9  	"github.com/primecitizens/pcz/std/plat/js/web/bindings"
    10  )
    11  
    12  type OneOf_Client_undefined struct {
    13  	ref js.Ref
    14  }
    15  
    16  func (x OneOf_Client_undefined) Ref() js.Ref {
    17  	return x.ref
    18  }
    19  
    20  func (x OneOf_Client_undefined) Free() {
    21  	x.ref.Free()
    22  }
    23  
    24  func (x OneOf_Client_undefined) FromRef(ref js.Ref) OneOf_Client_undefined {
    25  	return OneOf_Client_undefined{
    26  		ref: ref,
    27  	}
    28  }
    29  
    30  func (x OneOf_Client_undefined) Undefined() bool {
    31  	return x.ref == js.Undefined
    32  }
    33  
    34  func (x OneOf_Client_undefined) Client() Client {
    35  	return Client{}.FromRef(x.ref)
    36  }
    37  
    38  type WindowClient struct {
    39  	Client
    40  }
    41  
    42  func (this WindowClient) Once() WindowClient {
    43  	this.ref.Once()
    44  	return this
    45  }
    46  
    47  func (this WindowClient) Ref() js.Ref {
    48  	return this.Client.Ref()
    49  }
    50  
    51  func (this WindowClient) FromRef(ref js.Ref) WindowClient {
    52  	this.Client = this.Client.FromRef(ref)
    53  	return this
    54  }
    55  
    56  func (this WindowClient) Free() {
    57  	this.ref.Free()
    58  }
    59  
    60  // VisibilityState returns the value of property "WindowClient.visibilityState".
    61  //
    62  // It returns ok=false if there is no such property.
    63  func (this WindowClient) VisibilityState() (ret DocumentVisibilityState, ok bool) {
    64  	ok = js.True == bindings.GetWindowClientVisibilityState(
    65  		this.ref, js.Pointer(&ret),
    66  	)
    67  	return
    68  }
    69  
    70  // Focused returns the value of property "WindowClient.focused".
    71  //
    72  // It returns ok=false if there is no such property.
    73  func (this WindowClient) Focused() (ret bool, ok bool) {
    74  	ok = js.True == bindings.GetWindowClientFocused(
    75  		this.ref, js.Pointer(&ret),
    76  	)
    77  	return
    78  }
    79  
    80  // AncestorOrigins returns the value of property "WindowClient.ancestorOrigins".
    81  //
    82  // It returns ok=false if there is no such property.
    83  func (this WindowClient) AncestorOrigins() (ret js.FrozenArray[js.String], ok bool) {
    84  	ok = js.True == bindings.GetWindowClientAncestorOrigins(
    85  		this.ref, js.Pointer(&ret),
    86  	)
    87  	return
    88  }
    89  
    90  // HasFuncFocus returns true if the method "WindowClient.focus" exists.
    91  func (this WindowClient) HasFuncFocus() bool {
    92  	return js.True == bindings.HasFuncWindowClientFocus(
    93  		this.ref,
    94  	)
    95  }
    96  
    97  // FuncFocus returns the method "WindowClient.focus".
    98  func (this WindowClient) FuncFocus() (fn js.Func[func() js.Promise[WindowClient]]) {
    99  	bindings.FuncWindowClientFocus(
   100  		this.ref, js.Pointer(&fn),
   101  	)
   102  	return
   103  }
   104  
   105  // Focus calls the method "WindowClient.focus".
   106  func (this WindowClient) Focus() (ret js.Promise[WindowClient]) {
   107  	bindings.CallWindowClientFocus(
   108  		this.ref, js.Pointer(&ret),
   109  	)
   110  
   111  	return
   112  }
   113  
   114  // TryFocus calls the method "WindowClient.focus"
   115  // in a try/catch block and returns (_, err, ok = false) when it went through
   116  // the catch clause.
   117  func (this WindowClient) TryFocus() (ret js.Promise[WindowClient], exception js.Any, ok bool) {
   118  	ok = js.True == bindings.TryWindowClientFocus(
   119  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   120  	)
   121  
   122  	return
   123  }
   124  
   125  // HasFuncNavigate returns true if the method "WindowClient.navigate" exists.
   126  func (this WindowClient) HasFuncNavigate() bool {
   127  	return js.True == bindings.HasFuncWindowClientNavigate(
   128  		this.ref,
   129  	)
   130  }
   131  
   132  // FuncNavigate returns the method "WindowClient.navigate".
   133  func (this WindowClient) FuncNavigate() (fn js.Func[func(url js.String) js.Promise[WindowClient]]) {
   134  	bindings.FuncWindowClientNavigate(
   135  		this.ref, js.Pointer(&fn),
   136  	)
   137  	return
   138  }
   139  
   140  // Navigate calls the method "WindowClient.navigate".
   141  func (this WindowClient) Navigate(url js.String) (ret js.Promise[WindowClient]) {
   142  	bindings.CallWindowClientNavigate(
   143  		this.ref, js.Pointer(&ret),
   144  		url.Ref(),
   145  	)
   146  
   147  	return
   148  }
   149  
   150  // TryNavigate calls the method "WindowClient.navigate"
   151  // in a try/catch block and returns (_, err, ok = false) when it went through
   152  // the catch clause.
   153  func (this WindowClient) TryNavigate(url js.String) (ret js.Promise[WindowClient], exception js.Any, ok bool) {
   154  	ok = js.True == bindings.TryWindowClientNavigate(
   155  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   156  		url.Ref(),
   157  	)
   158  
   159  	return
   160  }
   161  
   162  type Clients struct {
   163  	ref js.Ref
   164  }
   165  
   166  func (this Clients) Once() Clients {
   167  	this.ref.Once()
   168  	return this
   169  }
   170  
   171  func (this Clients) Ref() js.Ref {
   172  	return this.ref
   173  }
   174  
   175  func (this Clients) FromRef(ref js.Ref) Clients {
   176  	this.ref = ref
   177  	return this
   178  }
   179  
   180  func (this Clients) Free() {
   181  	this.ref.Free()
   182  }
   183  
   184  // HasFuncGet returns true if the method "Clients.get" exists.
   185  func (this Clients) HasFuncGet() bool {
   186  	return js.True == bindings.HasFuncClientsGet(
   187  		this.ref,
   188  	)
   189  }
   190  
   191  // FuncGet returns the method "Clients.get".
   192  func (this Clients) FuncGet() (fn js.Func[func(id js.String) js.Promise[OneOf_Client_undefined]]) {
   193  	bindings.FuncClientsGet(
   194  		this.ref, js.Pointer(&fn),
   195  	)
   196  	return
   197  }
   198  
   199  // Get calls the method "Clients.get".
   200  func (this Clients) Get(id js.String) (ret js.Promise[OneOf_Client_undefined]) {
   201  	bindings.CallClientsGet(
   202  		this.ref, js.Pointer(&ret),
   203  		id.Ref(),
   204  	)
   205  
   206  	return
   207  }
   208  
   209  // TryGet calls the method "Clients.get"
   210  // in a try/catch block and returns (_, err, ok = false) when it went through
   211  // the catch clause.
   212  func (this Clients) TryGet(id js.String) (ret js.Promise[OneOf_Client_undefined], exception js.Any, ok bool) {
   213  	ok = js.True == bindings.TryClientsGet(
   214  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   215  		id.Ref(),
   216  	)
   217  
   218  	return
   219  }
   220  
   221  // HasFuncMatchAll returns true if the method "Clients.matchAll" exists.
   222  func (this Clients) HasFuncMatchAll() bool {
   223  	return js.True == bindings.HasFuncClientsMatchAll(
   224  		this.ref,
   225  	)
   226  }
   227  
   228  // FuncMatchAll returns the method "Clients.matchAll".
   229  func (this Clients) FuncMatchAll() (fn js.Func[func(options ClientQueryOptions) js.Promise[js.FrozenArray[Client]]]) {
   230  	bindings.FuncClientsMatchAll(
   231  		this.ref, js.Pointer(&fn),
   232  	)
   233  	return
   234  }
   235  
   236  // MatchAll calls the method "Clients.matchAll".
   237  func (this Clients) MatchAll(options ClientQueryOptions) (ret js.Promise[js.FrozenArray[Client]]) {
   238  	bindings.CallClientsMatchAll(
   239  		this.ref, js.Pointer(&ret),
   240  		js.Pointer(&options),
   241  	)
   242  
   243  	return
   244  }
   245  
   246  // TryMatchAll calls the method "Clients.matchAll"
   247  // in a try/catch block and returns (_, err, ok = false) when it went through
   248  // the catch clause.
   249  func (this Clients) TryMatchAll(options ClientQueryOptions) (ret js.Promise[js.FrozenArray[Client]], exception js.Any, ok bool) {
   250  	ok = js.True == bindings.TryClientsMatchAll(
   251  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   252  		js.Pointer(&options),
   253  	)
   254  
   255  	return
   256  }
   257  
   258  // HasFuncMatchAll1 returns true if the method "Clients.matchAll" exists.
   259  func (this Clients) HasFuncMatchAll1() bool {
   260  	return js.True == bindings.HasFuncClientsMatchAll1(
   261  		this.ref,
   262  	)
   263  }
   264  
   265  // FuncMatchAll1 returns the method "Clients.matchAll".
   266  func (this Clients) FuncMatchAll1() (fn js.Func[func() js.Promise[js.FrozenArray[Client]]]) {
   267  	bindings.FuncClientsMatchAll1(
   268  		this.ref, js.Pointer(&fn),
   269  	)
   270  	return
   271  }
   272  
   273  // MatchAll1 calls the method "Clients.matchAll".
   274  func (this Clients) MatchAll1() (ret js.Promise[js.FrozenArray[Client]]) {
   275  	bindings.CallClientsMatchAll1(
   276  		this.ref, js.Pointer(&ret),
   277  	)
   278  
   279  	return
   280  }
   281  
   282  // TryMatchAll1 calls the method "Clients.matchAll"
   283  // in a try/catch block and returns (_, err, ok = false) when it went through
   284  // the catch clause.
   285  func (this Clients) TryMatchAll1() (ret js.Promise[js.FrozenArray[Client]], exception js.Any, ok bool) {
   286  	ok = js.True == bindings.TryClientsMatchAll1(
   287  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   288  	)
   289  
   290  	return
   291  }
   292  
   293  // HasFuncOpenWindow returns true if the method "Clients.openWindow" exists.
   294  func (this Clients) HasFuncOpenWindow() bool {
   295  	return js.True == bindings.HasFuncClientsOpenWindow(
   296  		this.ref,
   297  	)
   298  }
   299  
   300  // FuncOpenWindow returns the method "Clients.openWindow".
   301  func (this Clients) FuncOpenWindow() (fn js.Func[func(url js.String) js.Promise[WindowClient]]) {
   302  	bindings.FuncClientsOpenWindow(
   303  		this.ref, js.Pointer(&fn),
   304  	)
   305  	return
   306  }
   307  
   308  // OpenWindow calls the method "Clients.openWindow".
   309  func (this Clients) OpenWindow(url js.String) (ret js.Promise[WindowClient]) {
   310  	bindings.CallClientsOpenWindow(
   311  		this.ref, js.Pointer(&ret),
   312  		url.Ref(),
   313  	)
   314  
   315  	return
   316  }
   317  
   318  // TryOpenWindow calls the method "Clients.openWindow"
   319  // in a try/catch block and returns (_, err, ok = false) when it went through
   320  // the catch clause.
   321  func (this Clients) TryOpenWindow(url js.String) (ret js.Promise[WindowClient], exception js.Any, ok bool) {
   322  	ok = js.True == bindings.TryClientsOpenWindow(
   323  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   324  		url.Ref(),
   325  	)
   326  
   327  	return
   328  }
   329  
   330  // HasFuncClaim returns true if the method "Clients.claim" exists.
   331  func (this Clients) HasFuncClaim() bool {
   332  	return js.True == bindings.HasFuncClientsClaim(
   333  		this.ref,
   334  	)
   335  }
   336  
   337  // FuncClaim returns the method "Clients.claim".
   338  func (this Clients) FuncClaim() (fn js.Func[func() js.Promise[js.Void]]) {
   339  	bindings.FuncClientsClaim(
   340  		this.ref, js.Pointer(&fn),
   341  	)
   342  	return
   343  }
   344  
   345  // Claim calls the method "Clients.claim".
   346  func (this Clients) Claim() (ret js.Promise[js.Void]) {
   347  	bindings.CallClientsClaim(
   348  		this.ref, js.Pointer(&ret),
   349  	)
   350  
   351  	return
   352  }
   353  
   354  // TryClaim calls the method "Clients.claim"
   355  // in a try/catch block and returns (_, err, ok = false) when it went through
   356  // the catch clause.
   357  func (this Clients) TryClaim() (ret js.Promise[js.Void], exception js.Any, ok bool) {
   358  	ok = js.True == bindings.TryClientsClaim(
   359  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   360  	)
   361  
   362  	return
   363  }
   364  
   365  type OneOf_String_Blob struct {
   366  	ref js.Ref
   367  }
   368  
   369  func (x OneOf_String_Blob) Ref() js.Ref {
   370  	return x.ref
   371  }
   372  
   373  func (x OneOf_String_Blob) Free() {
   374  	x.ref.Free()
   375  }
   376  
   377  func (x OneOf_String_Blob) FromRef(ref js.Ref) OneOf_String_Blob {
   378  	return OneOf_String_Blob{
   379  		ref: ref,
   380  	}
   381  }
   382  
   383  func (x OneOf_String_Blob) String() js.String {
   384  	return js.String{}.FromRef(x.ref)
   385  }
   386  
   387  func (x OneOf_String_Blob) Blob() Blob {
   388  	return Blob{}.FromRef(x.ref)
   389  }
   390  
   391  type ClipboardItemData = js.Promise[OneOf_String_Blob]
   392  
   393  type PresentationStyle uint32
   394  
   395  const (
   396  	_ PresentationStyle = iota
   397  
   398  	PresentationStyle_UNSPECIFIED
   399  	PresentationStyle_INLINE
   400  	PresentationStyle_ATTACHMENT
   401  )
   402  
   403  func (PresentationStyle) FromRef(str js.Ref) PresentationStyle {
   404  	return PresentationStyle(bindings.ConstOfPresentationStyle(str))
   405  }
   406  
   407  func (x PresentationStyle) String() (string, bool) {
   408  	switch x {
   409  	case PresentationStyle_UNSPECIFIED:
   410  		return "unspecified", true
   411  	case PresentationStyle_INLINE:
   412  		return "inline", true
   413  	case PresentationStyle_ATTACHMENT:
   414  		return "attachment", true
   415  	default:
   416  		return "", false
   417  	}
   418  }
   419  
   420  type ClipboardItemOptions struct {
   421  	// PresentationStyle is "ClipboardItemOptions.presentationStyle"
   422  	//
   423  	// Optional, defaults to "unspecified".
   424  	PresentationStyle PresentationStyle
   425  
   426  	FFI_USE bool
   427  }
   428  
   429  // FromRef calls UpdateFrom and returns a ClipboardItemOptions with all fields set.
   430  func (p ClipboardItemOptions) FromRef(ref js.Ref) ClipboardItemOptions {
   431  	p.UpdateFrom(ref)
   432  	return p
   433  }
   434  
   435  // New creates a new ClipboardItemOptions in the application heap.
   436  func (p ClipboardItemOptions) New() js.Ref {
   437  	return bindings.ClipboardItemOptionsJSLoad(
   438  		js.Pointer(&p), js.True, 0,
   439  	)
   440  }
   441  
   442  // UpdateFrom copies value of all fields of the heap object to p.
   443  func (p *ClipboardItemOptions) UpdateFrom(ref js.Ref) {
   444  	bindings.ClipboardItemOptionsJSStore(
   445  		js.Pointer(p), ref,
   446  	)
   447  }
   448  
   449  // Update writes all fields of the p to the heap object referenced by ref.
   450  func (p *ClipboardItemOptions) Update(ref js.Ref) {
   451  	bindings.ClipboardItemOptionsJSLoad(
   452  		js.Pointer(p), js.False, ref,
   453  	)
   454  }
   455  
   456  // FreeMembers frees fields with heap reference, if recursive is true
   457  // free all heap references reachable from p.
   458  func (p *ClipboardItemOptions) FreeMembers(recursive bool) {
   459  }
   460  
   461  func NewClipboardItem(items js.Record[ClipboardItemData], options ClipboardItemOptions) (ret ClipboardItem) {
   462  	ret.ref = bindings.NewClipboardItemByClipboardItem(
   463  		items.Ref(),
   464  		js.Pointer(&options))
   465  	return
   466  }
   467  
   468  func NewClipboardItemByClipboardItem1(items js.Record[ClipboardItemData]) (ret ClipboardItem) {
   469  	ret.ref = bindings.NewClipboardItemByClipboardItem1(
   470  		items.Ref())
   471  	return
   472  }
   473  
   474  type ClipboardItem struct {
   475  	ref js.Ref
   476  }
   477  
   478  func (this ClipboardItem) Once() ClipboardItem {
   479  	this.ref.Once()
   480  	return this
   481  }
   482  
   483  func (this ClipboardItem) Ref() js.Ref {
   484  	return this.ref
   485  }
   486  
   487  func (this ClipboardItem) FromRef(ref js.Ref) ClipboardItem {
   488  	this.ref = ref
   489  	return this
   490  }
   491  
   492  func (this ClipboardItem) Free() {
   493  	this.ref.Free()
   494  }
   495  
   496  // PresentationStyle returns the value of property "ClipboardItem.presentationStyle".
   497  //
   498  // It returns ok=false if there is no such property.
   499  func (this ClipboardItem) PresentationStyle() (ret PresentationStyle, ok bool) {
   500  	ok = js.True == bindings.GetClipboardItemPresentationStyle(
   501  		this.ref, js.Pointer(&ret),
   502  	)
   503  	return
   504  }
   505  
   506  // Types returns the value of property "ClipboardItem.types".
   507  //
   508  // It returns ok=false if there is no such property.
   509  func (this ClipboardItem) Types() (ret js.FrozenArray[js.String], ok bool) {
   510  	ok = js.True == bindings.GetClipboardItemTypes(
   511  		this.ref, js.Pointer(&ret),
   512  	)
   513  	return
   514  }
   515  
   516  // HasFuncGetType returns true if the method "ClipboardItem.getType" exists.
   517  func (this ClipboardItem) HasFuncGetType() bool {
   518  	return js.True == bindings.HasFuncClipboardItemGetType(
   519  		this.ref,
   520  	)
   521  }
   522  
   523  // FuncGetType returns the method "ClipboardItem.getType".
   524  func (this ClipboardItem) FuncGetType() (fn js.Func[func(typ js.String) js.Promise[Blob]]) {
   525  	bindings.FuncClipboardItemGetType(
   526  		this.ref, js.Pointer(&fn),
   527  	)
   528  	return
   529  }
   530  
   531  // GetType calls the method "ClipboardItem.getType".
   532  func (this ClipboardItem) GetType(typ js.String) (ret js.Promise[Blob]) {
   533  	bindings.CallClipboardItemGetType(
   534  		this.ref, js.Pointer(&ret),
   535  		typ.Ref(),
   536  	)
   537  
   538  	return
   539  }
   540  
   541  // TryGetType calls the method "ClipboardItem.getType"
   542  // in a try/catch block and returns (_, err, ok = false) when it went through
   543  // the catch clause.
   544  func (this ClipboardItem) TryGetType(typ js.String) (ret js.Promise[Blob], exception js.Any, ok bool) {
   545  	ok = js.True == bindings.TryClipboardItemGetType(
   546  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   547  		typ.Ref(),
   548  	)
   549  
   550  	return
   551  }
   552  
   553  type ClipboardItems = js.Array[ClipboardItem]
   554  
   555  type Clipboard struct {
   556  	EventTarget
   557  }
   558  
   559  func (this Clipboard) Once() Clipboard {
   560  	this.ref.Once()
   561  	return this
   562  }
   563  
   564  func (this Clipboard) Ref() js.Ref {
   565  	return this.EventTarget.Ref()
   566  }
   567  
   568  func (this Clipboard) FromRef(ref js.Ref) Clipboard {
   569  	this.EventTarget = this.EventTarget.FromRef(ref)
   570  	return this
   571  }
   572  
   573  func (this Clipboard) Free() {
   574  	this.ref.Free()
   575  }
   576  
   577  // HasFuncRead returns true if the method "Clipboard.read" exists.
   578  func (this Clipboard) HasFuncRead() bool {
   579  	return js.True == bindings.HasFuncClipboardRead(
   580  		this.ref,
   581  	)
   582  }
   583  
   584  // FuncRead returns the method "Clipboard.read".
   585  func (this Clipboard) FuncRead() (fn js.Func[func() js.Promise[ClipboardItems]]) {
   586  	bindings.FuncClipboardRead(
   587  		this.ref, js.Pointer(&fn),
   588  	)
   589  	return
   590  }
   591  
   592  // Read calls the method "Clipboard.read".
   593  func (this Clipboard) Read() (ret js.Promise[ClipboardItems]) {
   594  	bindings.CallClipboardRead(
   595  		this.ref, js.Pointer(&ret),
   596  	)
   597  
   598  	return
   599  }
   600  
   601  // TryRead calls the method "Clipboard.read"
   602  // in a try/catch block and returns (_, err, ok = false) when it went through
   603  // the catch clause.
   604  func (this Clipboard) TryRead() (ret js.Promise[ClipboardItems], exception js.Any, ok bool) {
   605  	ok = js.True == bindings.TryClipboardRead(
   606  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   607  	)
   608  
   609  	return
   610  }
   611  
   612  // HasFuncReadText returns true if the method "Clipboard.readText" exists.
   613  func (this Clipboard) HasFuncReadText() bool {
   614  	return js.True == bindings.HasFuncClipboardReadText(
   615  		this.ref,
   616  	)
   617  }
   618  
   619  // FuncReadText returns the method "Clipboard.readText".
   620  func (this Clipboard) FuncReadText() (fn js.Func[func() js.Promise[js.String]]) {
   621  	bindings.FuncClipboardReadText(
   622  		this.ref, js.Pointer(&fn),
   623  	)
   624  	return
   625  }
   626  
   627  // ReadText calls the method "Clipboard.readText".
   628  func (this Clipboard) ReadText() (ret js.Promise[js.String]) {
   629  	bindings.CallClipboardReadText(
   630  		this.ref, js.Pointer(&ret),
   631  	)
   632  
   633  	return
   634  }
   635  
   636  // TryReadText calls the method "Clipboard.readText"
   637  // in a try/catch block and returns (_, err, ok = false) when it went through
   638  // the catch clause.
   639  func (this Clipboard) TryReadText() (ret js.Promise[js.String], exception js.Any, ok bool) {
   640  	ok = js.True == bindings.TryClipboardReadText(
   641  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   642  	)
   643  
   644  	return
   645  }
   646  
   647  // HasFuncWrite returns true if the method "Clipboard.write" exists.
   648  func (this Clipboard) HasFuncWrite() bool {
   649  	return js.True == bindings.HasFuncClipboardWrite(
   650  		this.ref,
   651  	)
   652  }
   653  
   654  // FuncWrite returns the method "Clipboard.write".
   655  func (this Clipboard) FuncWrite() (fn js.Func[func(data ClipboardItems) js.Promise[js.Void]]) {
   656  	bindings.FuncClipboardWrite(
   657  		this.ref, js.Pointer(&fn),
   658  	)
   659  	return
   660  }
   661  
   662  // Write calls the method "Clipboard.write".
   663  func (this Clipboard) Write(data ClipboardItems) (ret js.Promise[js.Void]) {
   664  	bindings.CallClipboardWrite(
   665  		this.ref, js.Pointer(&ret),
   666  		data.Ref(),
   667  	)
   668  
   669  	return
   670  }
   671  
   672  // TryWrite calls the method "Clipboard.write"
   673  // in a try/catch block and returns (_, err, ok = false) when it went through
   674  // the catch clause.
   675  func (this Clipboard) TryWrite(data ClipboardItems) (ret js.Promise[js.Void], exception js.Any, ok bool) {
   676  	ok = js.True == bindings.TryClipboardWrite(
   677  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   678  		data.Ref(),
   679  	)
   680  
   681  	return
   682  }
   683  
   684  // HasFuncWriteText returns true if the method "Clipboard.writeText" exists.
   685  func (this Clipboard) HasFuncWriteText() bool {
   686  	return js.True == bindings.HasFuncClipboardWriteText(
   687  		this.ref,
   688  	)
   689  }
   690  
   691  // FuncWriteText returns the method "Clipboard.writeText".
   692  func (this Clipboard) FuncWriteText() (fn js.Func[func(data js.String) js.Promise[js.Void]]) {
   693  	bindings.FuncClipboardWriteText(
   694  		this.ref, js.Pointer(&fn),
   695  	)
   696  	return
   697  }
   698  
   699  // WriteText calls the method "Clipboard.writeText".
   700  func (this Clipboard) WriteText(data js.String) (ret js.Promise[js.Void]) {
   701  	bindings.CallClipboardWriteText(
   702  		this.ref, js.Pointer(&ret),
   703  		data.Ref(),
   704  	)
   705  
   706  	return
   707  }
   708  
   709  // TryWriteText calls the method "Clipboard.writeText"
   710  // in a try/catch block and returns (_, err, ok = false) when it went through
   711  // the catch clause.
   712  func (this Clipboard) TryWriteText(data js.String) (ret js.Promise[js.Void], exception js.Any, ok bool) {
   713  	ok = js.True == bindings.TryClipboardWriteText(
   714  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   715  		data.Ref(),
   716  	)
   717  
   718  	return
   719  }
   720  
   721  type FunctionStringCallbackFunc func(this js.Ref, data js.String) js.Ref
   722  
   723  func (fn FunctionStringCallbackFunc) Register() js.Func[func(data js.String)] {
   724  	return js.RegisterCallback[func(data js.String)](
   725  		fn, abi.FuncPCABIInternal(fn),
   726  	)
   727  }
   728  
   729  func (fn FunctionStringCallbackFunc) DispatchCallback(
   730  	targetPC uintptr, ctx *js.CallbackContext,
   731  ) {
   732  	args := ctx.Args()
   733  	if len(args) != 1+1 /* js this */ ||
   734  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   735  		js.ThrowInvalidCallbackInvocation()
   736  	}
   737  
   738  	if ctx.Return(fn(
   739  		args[0],
   740  
   741  		js.String{}.FromRef(args[0+1]),
   742  	)) {
   743  		return
   744  	}
   745  
   746  	js.ThrowCallbackValueNotReturned()
   747  }
   748  
   749  type FunctionStringCallback[T any] struct {
   750  	Fn  func(arg T, this js.Ref, data js.String) js.Ref
   751  	Arg T
   752  }
   753  
   754  func (cb *FunctionStringCallback[T]) Register() js.Func[func(data js.String)] {
   755  	return js.RegisterCallback[func(data js.String)](
   756  		cb, abi.FuncPCABIInternal(cb.Fn),
   757  	)
   758  }
   759  
   760  func (cb *FunctionStringCallback[T]) DispatchCallback(
   761  	targetPC uintptr, ctx *js.CallbackContext,
   762  ) {
   763  	args := ctx.Args()
   764  	if len(args) != 1+1 /* js this */ ||
   765  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   766  		js.ThrowInvalidCallbackInvocation()
   767  	}
   768  
   769  	if ctx.Return(cb.Fn(
   770  		cb.Arg,
   771  		args[0],
   772  
   773  		js.String{}.FromRef(args[0+1]),
   774  	)) {
   775  		return
   776  	}
   777  
   778  	js.ThrowCallbackValueNotReturned()
   779  }
   780  
   781  type PermissionState uint32
   782  
   783  const (
   784  	_ PermissionState = iota
   785  
   786  	PermissionState_GRANTED
   787  	PermissionState_DENIED
   788  	PermissionState_PROMPT
   789  )
   790  
   791  func (PermissionState) FromRef(str js.Ref) PermissionState {
   792  	return PermissionState(bindings.ConstOfPermissionState(str))
   793  }
   794  
   795  func (x PermissionState) String() (string, bool) {
   796  	switch x {
   797  	case PermissionState_GRANTED:
   798  		return "granted", true
   799  	case PermissionState_DENIED:
   800  		return "denied", true
   801  	case PermissionState_PROMPT:
   802  		return "prompt", true
   803  	default:
   804  		return "", false
   805  	}
   806  }
   807  
   808  type FileSystemPermissionMode uint32
   809  
   810  const (
   811  	_ FileSystemPermissionMode = iota
   812  
   813  	FileSystemPermissionMode_READ
   814  	FileSystemPermissionMode_READWRITE
   815  )
   816  
   817  func (FileSystemPermissionMode) FromRef(str js.Ref) FileSystemPermissionMode {
   818  	return FileSystemPermissionMode(bindings.ConstOfFileSystemPermissionMode(str))
   819  }
   820  
   821  func (x FileSystemPermissionMode) String() (string, bool) {
   822  	switch x {
   823  	case FileSystemPermissionMode_READ:
   824  		return "read", true
   825  	case FileSystemPermissionMode_READWRITE:
   826  		return "readwrite", true
   827  	default:
   828  		return "", false
   829  	}
   830  }
   831  
   832  type FileSystemHandlePermissionDescriptor struct {
   833  	// Mode is "FileSystemHandlePermissionDescriptor.mode"
   834  	//
   835  	// Optional, defaults to "read".
   836  	Mode FileSystemPermissionMode
   837  
   838  	FFI_USE bool
   839  }
   840  
   841  // FromRef calls UpdateFrom and returns a FileSystemHandlePermissionDescriptor with all fields set.
   842  func (p FileSystemHandlePermissionDescriptor) FromRef(ref js.Ref) FileSystemHandlePermissionDescriptor {
   843  	p.UpdateFrom(ref)
   844  	return p
   845  }
   846  
   847  // New creates a new FileSystemHandlePermissionDescriptor in the application heap.
   848  func (p FileSystemHandlePermissionDescriptor) New() js.Ref {
   849  	return bindings.FileSystemHandlePermissionDescriptorJSLoad(
   850  		js.Pointer(&p), js.True, 0,
   851  	)
   852  }
   853  
   854  // UpdateFrom copies value of all fields of the heap object to p.
   855  func (p *FileSystemHandlePermissionDescriptor) UpdateFrom(ref js.Ref) {
   856  	bindings.FileSystemHandlePermissionDescriptorJSStore(
   857  		js.Pointer(p), ref,
   858  	)
   859  }
   860  
   861  // Update writes all fields of the p to the heap object referenced by ref.
   862  func (p *FileSystemHandlePermissionDescriptor) Update(ref js.Ref) {
   863  	bindings.FileSystemHandlePermissionDescriptorJSLoad(
   864  		js.Pointer(p), js.False, ref,
   865  	)
   866  }
   867  
   868  // FreeMembers frees fields with heap reference, if recursive is true
   869  // free all heap references reachable from p.
   870  func (p *FileSystemHandlePermissionDescriptor) FreeMembers(recursive bool) {
   871  }
   872  
   873  type FileSystemHandleKind uint32
   874  
   875  const (
   876  	_ FileSystemHandleKind = iota
   877  
   878  	FileSystemHandleKind_FILE
   879  	FileSystemHandleKind_DIRECTORY
   880  )
   881  
   882  func (FileSystemHandleKind) FromRef(str js.Ref) FileSystemHandleKind {
   883  	return FileSystemHandleKind(bindings.ConstOfFileSystemHandleKind(str))
   884  }
   885  
   886  func (x FileSystemHandleKind) String() (string, bool) {
   887  	switch x {
   888  	case FileSystemHandleKind_FILE:
   889  		return "file", true
   890  	case FileSystemHandleKind_DIRECTORY:
   891  		return "directory", true
   892  	default:
   893  		return "", false
   894  	}
   895  }
   896  
   897  type FileSystemHandle struct {
   898  	ref js.Ref
   899  }
   900  
   901  func (this FileSystemHandle) Once() FileSystemHandle {
   902  	this.ref.Once()
   903  	return this
   904  }
   905  
   906  func (this FileSystemHandle) Ref() js.Ref {
   907  	return this.ref
   908  }
   909  
   910  func (this FileSystemHandle) FromRef(ref js.Ref) FileSystemHandle {
   911  	this.ref = ref
   912  	return this
   913  }
   914  
   915  func (this FileSystemHandle) Free() {
   916  	this.ref.Free()
   917  }
   918  
   919  // Kind returns the value of property "FileSystemHandle.kind".
   920  //
   921  // It returns ok=false if there is no such property.
   922  func (this FileSystemHandle) Kind() (ret FileSystemHandleKind, ok bool) {
   923  	ok = js.True == bindings.GetFileSystemHandleKind(
   924  		this.ref, js.Pointer(&ret),
   925  	)
   926  	return
   927  }
   928  
   929  // Name returns the value of property "FileSystemHandle.name".
   930  //
   931  // It returns ok=false if there is no such property.
   932  func (this FileSystemHandle) Name() (ret js.String, ok bool) {
   933  	ok = js.True == bindings.GetFileSystemHandleName(
   934  		this.ref, js.Pointer(&ret),
   935  	)
   936  	return
   937  }
   938  
   939  // HasFuncIsSameEntry returns true if the method "FileSystemHandle.isSameEntry" exists.
   940  func (this FileSystemHandle) HasFuncIsSameEntry() bool {
   941  	return js.True == bindings.HasFuncFileSystemHandleIsSameEntry(
   942  		this.ref,
   943  	)
   944  }
   945  
   946  // FuncIsSameEntry returns the method "FileSystemHandle.isSameEntry".
   947  func (this FileSystemHandle) FuncIsSameEntry() (fn js.Func[func(other FileSystemHandle) js.Promise[js.Boolean]]) {
   948  	bindings.FuncFileSystemHandleIsSameEntry(
   949  		this.ref, js.Pointer(&fn),
   950  	)
   951  	return
   952  }
   953  
   954  // IsSameEntry calls the method "FileSystemHandle.isSameEntry".
   955  func (this FileSystemHandle) IsSameEntry(other FileSystemHandle) (ret js.Promise[js.Boolean]) {
   956  	bindings.CallFileSystemHandleIsSameEntry(
   957  		this.ref, js.Pointer(&ret),
   958  		other.Ref(),
   959  	)
   960  
   961  	return
   962  }
   963  
   964  // TryIsSameEntry calls the method "FileSystemHandle.isSameEntry"
   965  // in a try/catch block and returns (_, err, ok = false) when it went through
   966  // the catch clause.
   967  func (this FileSystemHandle) TryIsSameEntry(other FileSystemHandle) (ret js.Promise[js.Boolean], exception js.Any, ok bool) {
   968  	ok = js.True == bindings.TryFileSystemHandleIsSameEntry(
   969  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   970  		other.Ref(),
   971  	)
   972  
   973  	return
   974  }
   975  
   976  // HasFuncQueryPermission returns true if the method "FileSystemHandle.queryPermission" exists.
   977  func (this FileSystemHandle) HasFuncQueryPermission() bool {
   978  	return js.True == bindings.HasFuncFileSystemHandleQueryPermission(
   979  		this.ref,
   980  	)
   981  }
   982  
   983  // FuncQueryPermission returns the method "FileSystemHandle.queryPermission".
   984  func (this FileSystemHandle) FuncQueryPermission() (fn js.Func[func(descriptor FileSystemHandlePermissionDescriptor) js.Promise[PermissionState]]) {
   985  	bindings.FuncFileSystemHandleQueryPermission(
   986  		this.ref, js.Pointer(&fn),
   987  	)
   988  	return
   989  }
   990  
   991  // QueryPermission calls the method "FileSystemHandle.queryPermission".
   992  func (this FileSystemHandle) QueryPermission(descriptor FileSystemHandlePermissionDescriptor) (ret js.Promise[PermissionState]) {
   993  	bindings.CallFileSystemHandleQueryPermission(
   994  		this.ref, js.Pointer(&ret),
   995  		js.Pointer(&descriptor),
   996  	)
   997  
   998  	return
   999  }
  1000  
  1001  // TryQueryPermission calls the method "FileSystemHandle.queryPermission"
  1002  // in a try/catch block and returns (_, err, ok = false) when it went through
  1003  // the catch clause.
  1004  func (this FileSystemHandle) TryQueryPermission(descriptor FileSystemHandlePermissionDescriptor) (ret js.Promise[PermissionState], exception js.Any, ok bool) {
  1005  	ok = js.True == bindings.TryFileSystemHandleQueryPermission(
  1006  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1007  		js.Pointer(&descriptor),
  1008  	)
  1009  
  1010  	return
  1011  }
  1012  
  1013  // HasFuncQueryPermission1 returns true if the method "FileSystemHandle.queryPermission" exists.
  1014  func (this FileSystemHandle) HasFuncQueryPermission1() bool {
  1015  	return js.True == bindings.HasFuncFileSystemHandleQueryPermission1(
  1016  		this.ref,
  1017  	)
  1018  }
  1019  
  1020  // FuncQueryPermission1 returns the method "FileSystemHandle.queryPermission".
  1021  func (this FileSystemHandle) FuncQueryPermission1() (fn js.Func[func() js.Promise[PermissionState]]) {
  1022  	bindings.FuncFileSystemHandleQueryPermission1(
  1023  		this.ref, js.Pointer(&fn),
  1024  	)
  1025  	return
  1026  }
  1027  
  1028  // QueryPermission1 calls the method "FileSystemHandle.queryPermission".
  1029  func (this FileSystemHandle) QueryPermission1() (ret js.Promise[PermissionState]) {
  1030  	bindings.CallFileSystemHandleQueryPermission1(
  1031  		this.ref, js.Pointer(&ret),
  1032  	)
  1033  
  1034  	return
  1035  }
  1036  
  1037  // TryQueryPermission1 calls the method "FileSystemHandle.queryPermission"
  1038  // in a try/catch block and returns (_, err, ok = false) when it went through
  1039  // the catch clause.
  1040  func (this FileSystemHandle) TryQueryPermission1() (ret js.Promise[PermissionState], exception js.Any, ok bool) {
  1041  	ok = js.True == bindings.TryFileSystemHandleQueryPermission1(
  1042  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1043  	)
  1044  
  1045  	return
  1046  }
  1047  
  1048  // HasFuncRequestPermission returns true if the method "FileSystemHandle.requestPermission" exists.
  1049  func (this FileSystemHandle) HasFuncRequestPermission() bool {
  1050  	return js.True == bindings.HasFuncFileSystemHandleRequestPermission(
  1051  		this.ref,
  1052  	)
  1053  }
  1054  
  1055  // FuncRequestPermission returns the method "FileSystemHandle.requestPermission".
  1056  func (this FileSystemHandle) FuncRequestPermission() (fn js.Func[func(descriptor FileSystemHandlePermissionDescriptor) js.Promise[PermissionState]]) {
  1057  	bindings.FuncFileSystemHandleRequestPermission(
  1058  		this.ref, js.Pointer(&fn),
  1059  	)
  1060  	return
  1061  }
  1062  
  1063  // RequestPermission calls the method "FileSystemHandle.requestPermission".
  1064  func (this FileSystemHandle) RequestPermission(descriptor FileSystemHandlePermissionDescriptor) (ret js.Promise[PermissionState]) {
  1065  	bindings.CallFileSystemHandleRequestPermission(
  1066  		this.ref, js.Pointer(&ret),
  1067  		js.Pointer(&descriptor),
  1068  	)
  1069  
  1070  	return
  1071  }
  1072  
  1073  // TryRequestPermission calls the method "FileSystemHandle.requestPermission"
  1074  // in a try/catch block and returns (_, err, ok = false) when it went through
  1075  // the catch clause.
  1076  func (this FileSystemHandle) TryRequestPermission(descriptor FileSystemHandlePermissionDescriptor) (ret js.Promise[PermissionState], exception js.Any, ok bool) {
  1077  	ok = js.True == bindings.TryFileSystemHandleRequestPermission(
  1078  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1079  		js.Pointer(&descriptor),
  1080  	)
  1081  
  1082  	return
  1083  }
  1084  
  1085  // HasFuncRequestPermission1 returns true if the method "FileSystemHandle.requestPermission" exists.
  1086  func (this FileSystemHandle) HasFuncRequestPermission1() bool {
  1087  	return js.True == bindings.HasFuncFileSystemHandleRequestPermission1(
  1088  		this.ref,
  1089  	)
  1090  }
  1091  
  1092  // FuncRequestPermission1 returns the method "FileSystemHandle.requestPermission".
  1093  func (this FileSystemHandle) FuncRequestPermission1() (fn js.Func[func() js.Promise[PermissionState]]) {
  1094  	bindings.FuncFileSystemHandleRequestPermission1(
  1095  		this.ref, js.Pointer(&fn),
  1096  	)
  1097  	return
  1098  }
  1099  
  1100  // RequestPermission1 calls the method "FileSystemHandle.requestPermission".
  1101  func (this FileSystemHandle) RequestPermission1() (ret js.Promise[PermissionState]) {
  1102  	bindings.CallFileSystemHandleRequestPermission1(
  1103  		this.ref, js.Pointer(&ret),
  1104  	)
  1105  
  1106  	return
  1107  }
  1108  
  1109  // TryRequestPermission1 calls the method "FileSystemHandle.requestPermission"
  1110  // in a try/catch block and returns (_, err, ok = false) when it went through
  1111  // the catch clause.
  1112  func (this FileSystemHandle) TryRequestPermission1() (ret js.Promise[PermissionState], exception js.Any, ok bool) {
  1113  	ok = js.True == bindings.TryFileSystemHandleRequestPermission1(
  1114  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1115  	)
  1116  
  1117  	return
  1118  }
  1119  
  1120  type FileSystemEntryCallbackFunc func(this js.Ref, entry FileSystemEntry) js.Ref
  1121  
  1122  func (fn FileSystemEntryCallbackFunc) Register() js.Func[func(entry FileSystemEntry)] {
  1123  	return js.RegisterCallback[func(entry FileSystemEntry)](
  1124  		fn, abi.FuncPCABIInternal(fn),
  1125  	)
  1126  }
  1127  
  1128  func (fn FileSystemEntryCallbackFunc) DispatchCallback(
  1129  	targetPC uintptr, ctx *js.CallbackContext,
  1130  ) {
  1131  	args := ctx.Args()
  1132  	if len(args) != 1+1 /* js this */ ||
  1133  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1134  		js.ThrowInvalidCallbackInvocation()
  1135  	}
  1136  
  1137  	if ctx.Return(fn(
  1138  		args[0],
  1139  
  1140  		FileSystemEntry{}.FromRef(args[0+1]),
  1141  	)) {
  1142  		return
  1143  	}
  1144  
  1145  	js.ThrowCallbackValueNotReturned()
  1146  }
  1147  
  1148  type FileSystemEntryCallback[T any] struct {
  1149  	Fn  func(arg T, this js.Ref, entry FileSystemEntry) js.Ref
  1150  	Arg T
  1151  }
  1152  
  1153  func (cb *FileSystemEntryCallback[T]) Register() js.Func[func(entry FileSystemEntry)] {
  1154  	return js.RegisterCallback[func(entry FileSystemEntry)](
  1155  		cb, abi.FuncPCABIInternal(cb.Fn),
  1156  	)
  1157  }
  1158  
  1159  func (cb *FileSystemEntryCallback[T]) DispatchCallback(
  1160  	targetPC uintptr, ctx *js.CallbackContext,
  1161  ) {
  1162  	args := ctx.Args()
  1163  	if len(args) != 1+1 /* js this */ ||
  1164  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1165  		js.ThrowInvalidCallbackInvocation()
  1166  	}
  1167  
  1168  	if ctx.Return(cb.Fn(
  1169  		cb.Arg,
  1170  		args[0],
  1171  
  1172  		FileSystemEntry{}.FromRef(args[0+1]),
  1173  	)) {
  1174  		return
  1175  	}
  1176  
  1177  	js.ThrowCallbackValueNotReturned()
  1178  }
  1179  
  1180  type ErrorCallbackFunc func(this js.Ref, err DOMException) js.Ref
  1181  
  1182  func (fn ErrorCallbackFunc) Register() js.Func[func(err DOMException)] {
  1183  	return js.RegisterCallback[func(err DOMException)](
  1184  		fn, abi.FuncPCABIInternal(fn),
  1185  	)
  1186  }
  1187  
  1188  func (fn ErrorCallbackFunc) DispatchCallback(
  1189  	targetPC uintptr, ctx *js.CallbackContext,
  1190  ) {
  1191  	args := ctx.Args()
  1192  	if len(args) != 1+1 /* js this */ ||
  1193  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1194  		js.ThrowInvalidCallbackInvocation()
  1195  	}
  1196  
  1197  	if ctx.Return(fn(
  1198  		args[0],
  1199  
  1200  		DOMException{}.FromRef(args[0+1]),
  1201  	)) {
  1202  		return
  1203  	}
  1204  
  1205  	js.ThrowCallbackValueNotReturned()
  1206  }
  1207  
  1208  type ErrorCallback[T any] struct {
  1209  	Fn  func(arg T, this js.Ref, err DOMException) js.Ref
  1210  	Arg T
  1211  }
  1212  
  1213  func (cb *ErrorCallback[T]) Register() js.Func[func(err DOMException)] {
  1214  	return js.RegisterCallback[func(err DOMException)](
  1215  		cb, abi.FuncPCABIInternal(cb.Fn),
  1216  	)
  1217  }
  1218  
  1219  func (cb *ErrorCallback[T]) DispatchCallback(
  1220  	targetPC uintptr, ctx *js.CallbackContext,
  1221  ) {
  1222  	args := ctx.Args()
  1223  	if len(args) != 1+1 /* js this */ ||
  1224  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1225  		js.ThrowInvalidCallbackInvocation()
  1226  	}
  1227  
  1228  	if ctx.Return(cb.Fn(
  1229  		cb.Arg,
  1230  		args[0],
  1231  
  1232  		DOMException{}.FromRef(args[0+1]),
  1233  	)) {
  1234  		return
  1235  	}
  1236  
  1237  	js.ThrowCallbackValueNotReturned()
  1238  }
  1239  
  1240  type FileSystemEntriesCallbackFunc func(this js.Ref, entries js.Array[FileSystemEntry]) js.Ref
  1241  
  1242  func (fn FileSystemEntriesCallbackFunc) Register() js.Func[func(entries js.Array[FileSystemEntry])] {
  1243  	return js.RegisterCallback[func(entries js.Array[FileSystemEntry])](
  1244  		fn, abi.FuncPCABIInternal(fn),
  1245  	)
  1246  }
  1247  
  1248  func (fn FileSystemEntriesCallbackFunc) DispatchCallback(
  1249  	targetPC uintptr, ctx *js.CallbackContext,
  1250  ) {
  1251  	args := ctx.Args()
  1252  	if len(args) != 1+1 /* js this */ ||
  1253  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1254  		js.ThrowInvalidCallbackInvocation()
  1255  	}
  1256  
  1257  	if ctx.Return(fn(
  1258  		args[0],
  1259  
  1260  		js.Array[FileSystemEntry]{}.FromRef(args[0+1]),
  1261  	)) {
  1262  		return
  1263  	}
  1264  
  1265  	js.ThrowCallbackValueNotReturned()
  1266  }
  1267  
  1268  type FileSystemEntriesCallback[T any] struct {
  1269  	Fn  func(arg T, this js.Ref, entries js.Array[FileSystemEntry]) js.Ref
  1270  	Arg T
  1271  }
  1272  
  1273  func (cb *FileSystemEntriesCallback[T]) Register() js.Func[func(entries js.Array[FileSystemEntry])] {
  1274  	return js.RegisterCallback[func(entries js.Array[FileSystemEntry])](
  1275  		cb, abi.FuncPCABIInternal(cb.Fn),
  1276  	)
  1277  }
  1278  
  1279  func (cb *FileSystemEntriesCallback[T]) DispatchCallback(
  1280  	targetPC uintptr, ctx *js.CallbackContext,
  1281  ) {
  1282  	args := ctx.Args()
  1283  	if len(args) != 1+1 /* js this */ ||
  1284  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1285  		js.ThrowInvalidCallbackInvocation()
  1286  	}
  1287  
  1288  	if ctx.Return(cb.Fn(
  1289  		cb.Arg,
  1290  		args[0],
  1291  
  1292  		js.Array[FileSystemEntry]{}.FromRef(args[0+1]),
  1293  	)) {
  1294  		return
  1295  	}
  1296  
  1297  	js.ThrowCallbackValueNotReturned()
  1298  }
  1299  
  1300  type FileSystemDirectoryReader struct {
  1301  	ref js.Ref
  1302  }
  1303  
  1304  func (this FileSystemDirectoryReader) Once() FileSystemDirectoryReader {
  1305  	this.ref.Once()
  1306  	return this
  1307  }
  1308  
  1309  func (this FileSystemDirectoryReader) Ref() js.Ref {
  1310  	return this.ref
  1311  }
  1312  
  1313  func (this FileSystemDirectoryReader) FromRef(ref js.Ref) FileSystemDirectoryReader {
  1314  	this.ref = ref
  1315  	return this
  1316  }
  1317  
  1318  func (this FileSystemDirectoryReader) Free() {
  1319  	this.ref.Free()
  1320  }
  1321  
  1322  // HasFuncReadEntries returns true if the method "FileSystemDirectoryReader.readEntries" exists.
  1323  func (this FileSystemDirectoryReader) HasFuncReadEntries() bool {
  1324  	return js.True == bindings.HasFuncFileSystemDirectoryReaderReadEntries(
  1325  		this.ref,
  1326  	)
  1327  }
  1328  
  1329  // FuncReadEntries returns the method "FileSystemDirectoryReader.readEntries".
  1330  func (this FileSystemDirectoryReader) FuncReadEntries() (fn js.Func[func(successCallback js.Func[func(entries js.Array[FileSystemEntry])], errorCallback js.Func[func(err DOMException)])]) {
  1331  	bindings.FuncFileSystemDirectoryReaderReadEntries(
  1332  		this.ref, js.Pointer(&fn),
  1333  	)
  1334  	return
  1335  }
  1336  
  1337  // ReadEntries calls the method "FileSystemDirectoryReader.readEntries".
  1338  func (this FileSystemDirectoryReader) ReadEntries(successCallback js.Func[func(entries js.Array[FileSystemEntry])], errorCallback js.Func[func(err DOMException)]) (ret js.Void) {
  1339  	bindings.CallFileSystemDirectoryReaderReadEntries(
  1340  		this.ref, js.Pointer(&ret),
  1341  		successCallback.Ref(),
  1342  		errorCallback.Ref(),
  1343  	)
  1344  
  1345  	return
  1346  }
  1347  
  1348  // TryReadEntries calls the method "FileSystemDirectoryReader.readEntries"
  1349  // in a try/catch block and returns (_, err, ok = false) when it went through
  1350  // the catch clause.
  1351  func (this FileSystemDirectoryReader) TryReadEntries(successCallback js.Func[func(entries js.Array[FileSystemEntry])], errorCallback js.Func[func(err DOMException)]) (ret js.Void, exception js.Any, ok bool) {
  1352  	ok = js.True == bindings.TryFileSystemDirectoryReaderReadEntries(
  1353  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1354  		successCallback.Ref(),
  1355  		errorCallback.Ref(),
  1356  	)
  1357  
  1358  	return
  1359  }
  1360  
  1361  // HasFuncReadEntries1 returns true if the method "FileSystemDirectoryReader.readEntries" exists.
  1362  func (this FileSystemDirectoryReader) HasFuncReadEntries1() bool {
  1363  	return js.True == bindings.HasFuncFileSystemDirectoryReaderReadEntries1(
  1364  		this.ref,
  1365  	)
  1366  }
  1367  
  1368  // FuncReadEntries1 returns the method "FileSystemDirectoryReader.readEntries".
  1369  func (this FileSystemDirectoryReader) FuncReadEntries1() (fn js.Func[func(successCallback js.Func[func(entries js.Array[FileSystemEntry])])]) {
  1370  	bindings.FuncFileSystemDirectoryReaderReadEntries1(
  1371  		this.ref, js.Pointer(&fn),
  1372  	)
  1373  	return
  1374  }
  1375  
  1376  // ReadEntries1 calls the method "FileSystemDirectoryReader.readEntries".
  1377  func (this FileSystemDirectoryReader) ReadEntries1(successCallback js.Func[func(entries js.Array[FileSystemEntry])]) (ret js.Void) {
  1378  	bindings.CallFileSystemDirectoryReaderReadEntries1(
  1379  		this.ref, js.Pointer(&ret),
  1380  		successCallback.Ref(),
  1381  	)
  1382  
  1383  	return
  1384  }
  1385  
  1386  // TryReadEntries1 calls the method "FileSystemDirectoryReader.readEntries"
  1387  // in a try/catch block and returns (_, err, ok = false) when it went through
  1388  // the catch clause.
  1389  func (this FileSystemDirectoryReader) TryReadEntries1(successCallback js.Func[func(entries js.Array[FileSystemEntry])]) (ret js.Void, exception js.Any, ok bool) {
  1390  	ok = js.True == bindings.TryFileSystemDirectoryReaderReadEntries1(
  1391  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1392  		successCallback.Ref(),
  1393  	)
  1394  
  1395  	return
  1396  }
  1397  
  1398  type FileSystemFlags struct {
  1399  	// Create is "FileSystemFlags.create"
  1400  	//
  1401  	// Optional, defaults to false.
  1402  	//
  1403  	// NOTE: FFI_USE_Create MUST be set to true to make this field effective.
  1404  	Create bool
  1405  	// Exclusive is "FileSystemFlags.exclusive"
  1406  	//
  1407  	// Optional, defaults to false.
  1408  	//
  1409  	// NOTE: FFI_USE_Exclusive MUST be set to true to make this field effective.
  1410  	Exclusive bool
  1411  
  1412  	FFI_USE_Create    bool // for Create.
  1413  	FFI_USE_Exclusive bool // for Exclusive.
  1414  
  1415  	FFI_USE bool
  1416  }
  1417  
  1418  // FromRef calls UpdateFrom and returns a FileSystemFlags with all fields set.
  1419  func (p FileSystemFlags) FromRef(ref js.Ref) FileSystemFlags {
  1420  	p.UpdateFrom(ref)
  1421  	return p
  1422  }
  1423  
  1424  // New creates a new FileSystemFlags in the application heap.
  1425  func (p FileSystemFlags) New() js.Ref {
  1426  	return bindings.FileSystemFlagsJSLoad(
  1427  		js.Pointer(&p), js.True, 0,
  1428  	)
  1429  }
  1430  
  1431  // UpdateFrom copies value of all fields of the heap object to p.
  1432  func (p *FileSystemFlags) UpdateFrom(ref js.Ref) {
  1433  	bindings.FileSystemFlagsJSStore(
  1434  		js.Pointer(p), ref,
  1435  	)
  1436  }
  1437  
  1438  // Update writes all fields of the p to the heap object referenced by ref.
  1439  func (p *FileSystemFlags) Update(ref js.Ref) {
  1440  	bindings.FileSystemFlagsJSLoad(
  1441  		js.Pointer(p), js.False, ref,
  1442  	)
  1443  }
  1444  
  1445  // FreeMembers frees fields with heap reference, if recursive is true
  1446  // free all heap references reachable from p.
  1447  func (p *FileSystemFlags) FreeMembers(recursive bool) {
  1448  }
  1449  
  1450  type FileSystemDirectoryEntry struct {
  1451  	FileSystemEntry
  1452  }
  1453  
  1454  func (this FileSystemDirectoryEntry) Once() FileSystemDirectoryEntry {
  1455  	this.ref.Once()
  1456  	return this
  1457  }
  1458  
  1459  func (this FileSystemDirectoryEntry) Ref() js.Ref {
  1460  	return this.FileSystemEntry.Ref()
  1461  }
  1462  
  1463  func (this FileSystemDirectoryEntry) FromRef(ref js.Ref) FileSystemDirectoryEntry {
  1464  	this.FileSystemEntry = this.FileSystemEntry.FromRef(ref)
  1465  	return this
  1466  }
  1467  
  1468  func (this FileSystemDirectoryEntry) Free() {
  1469  	this.ref.Free()
  1470  }
  1471  
  1472  // HasFuncCreateReader returns true if the method "FileSystemDirectoryEntry.createReader" exists.
  1473  func (this FileSystemDirectoryEntry) HasFuncCreateReader() bool {
  1474  	return js.True == bindings.HasFuncFileSystemDirectoryEntryCreateReader(
  1475  		this.ref,
  1476  	)
  1477  }
  1478  
  1479  // FuncCreateReader returns the method "FileSystemDirectoryEntry.createReader".
  1480  func (this FileSystemDirectoryEntry) FuncCreateReader() (fn js.Func[func() FileSystemDirectoryReader]) {
  1481  	bindings.FuncFileSystemDirectoryEntryCreateReader(
  1482  		this.ref, js.Pointer(&fn),
  1483  	)
  1484  	return
  1485  }
  1486  
  1487  // CreateReader calls the method "FileSystemDirectoryEntry.createReader".
  1488  func (this FileSystemDirectoryEntry) CreateReader() (ret FileSystemDirectoryReader) {
  1489  	bindings.CallFileSystemDirectoryEntryCreateReader(
  1490  		this.ref, js.Pointer(&ret),
  1491  	)
  1492  
  1493  	return
  1494  }
  1495  
  1496  // TryCreateReader calls the method "FileSystemDirectoryEntry.createReader"
  1497  // in a try/catch block and returns (_, err, ok = false) when it went through
  1498  // the catch clause.
  1499  func (this FileSystemDirectoryEntry) TryCreateReader() (ret FileSystemDirectoryReader, exception js.Any, ok bool) {
  1500  	ok = js.True == bindings.TryFileSystemDirectoryEntryCreateReader(
  1501  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1502  	)
  1503  
  1504  	return
  1505  }
  1506  
  1507  // HasFuncGetFile returns true if the method "FileSystemDirectoryEntry.getFile" exists.
  1508  func (this FileSystemDirectoryEntry) HasFuncGetFile() bool {
  1509  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetFile(
  1510  		this.ref,
  1511  	)
  1512  }
  1513  
  1514  // FuncGetFile returns the method "FileSystemDirectoryEntry.getFile".
  1515  func (this FileSystemDirectoryEntry) FuncGetFile() (fn js.Func[func(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)])]) {
  1516  	bindings.FuncFileSystemDirectoryEntryGetFile(
  1517  		this.ref, js.Pointer(&fn),
  1518  	)
  1519  	return
  1520  }
  1521  
  1522  // GetFile calls the method "FileSystemDirectoryEntry.getFile".
  1523  func (this FileSystemDirectoryEntry) GetFile(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)]) (ret js.Void) {
  1524  	bindings.CallFileSystemDirectoryEntryGetFile(
  1525  		this.ref, js.Pointer(&ret),
  1526  		path.Ref(),
  1527  		js.Pointer(&options),
  1528  		successCallback.Ref(),
  1529  		errorCallback.Ref(),
  1530  	)
  1531  
  1532  	return
  1533  }
  1534  
  1535  // TryGetFile calls the method "FileSystemDirectoryEntry.getFile"
  1536  // in a try/catch block and returns (_, err, ok = false) when it went through
  1537  // the catch clause.
  1538  func (this FileSystemDirectoryEntry) TryGetFile(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)]) (ret js.Void, exception js.Any, ok bool) {
  1539  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetFile(
  1540  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1541  		path.Ref(),
  1542  		js.Pointer(&options),
  1543  		successCallback.Ref(),
  1544  		errorCallback.Ref(),
  1545  	)
  1546  
  1547  	return
  1548  }
  1549  
  1550  // HasFuncGetFile1 returns true if the method "FileSystemDirectoryEntry.getFile" exists.
  1551  func (this FileSystemDirectoryEntry) HasFuncGetFile1() bool {
  1552  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetFile1(
  1553  		this.ref,
  1554  	)
  1555  }
  1556  
  1557  // FuncGetFile1 returns the method "FileSystemDirectoryEntry.getFile".
  1558  func (this FileSystemDirectoryEntry) FuncGetFile1() (fn js.Func[func(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)])]) {
  1559  	bindings.FuncFileSystemDirectoryEntryGetFile1(
  1560  		this.ref, js.Pointer(&fn),
  1561  	)
  1562  	return
  1563  }
  1564  
  1565  // GetFile1 calls the method "FileSystemDirectoryEntry.getFile".
  1566  func (this FileSystemDirectoryEntry) GetFile1(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)]) (ret js.Void) {
  1567  	bindings.CallFileSystemDirectoryEntryGetFile1(
  1568  		this.ref, js.Pointer(&ret),
  1569  		path.Ref(),
  1570  		js.Pointer(&options),
  1571  		successCallback.Ref(),
  1572  	)
  1573  
  1574  	return
  1575  }
  1576  
  1577  // TryGetFile1 calls the method "FileSystemDirectoryEntry.getFile"
  1578  // in a try/catch block and returns (_, err, ok = false) when it went through
  1579  // the catch clause.
  1580  func (this FileSystemDirectoryEntry) TryGetFile1(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)]) (ret js.Void, exception js.Any, ok bool) {
  1581  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetFile1(
  1582  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1583  		path.Ref(),
  1584  		js.Pointer(&options),
  1585  		successCallback.Ref(),
  1586  	)
  1587  
  1588  	return
  1589  }
  1590  
  1591  // HasFuncGetFile2 returns true if the method "FileSystemDirectoryEntry.getFile" exists.
  1592  func (this FileSystemDirectoryEntry) HasFuncGetFile2() bool {
  1593  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetFile2(
  1594  		this.ref,
  1595  	)
  1596  }
  1597  
  1598  // FuncGetFile2 returns the method "FileSystemDirectoryEntry.getFile".
  1599  func (this FileSystemDirectoryEntry) FuncGetFile2() (fn js.Func[func(path js.String, options FileSystemFlags)]) {
  1600  	bindings.FuncFileSystemDirectoryEntryGetFile2(
  1601  		this.ref, js.Pointer(&fn),
  1602  	)
  1603  	return
  1604  }
  1605  
  1606  // GetFile2 calls the method "FileSystemDirectoryEntry.getFile".
  1607  func (this FileSystemDirectoryEntry) GetFile2(path js.String, options FileSystemFlags) (ret js.Void) {
  1608  	bindings.CallFileSystemDirectoryEntryGetFile2(
  1609  		this.ref, js.Pointer(&ret),
  1610  		path.Ref(),
  1611  		js.Pointer(&options),
  1612  	)
  1613  
  1614  	return
  1615  }
  1616  
  1617  // TryGetFile2 calls the method "FileSystemDirectoryEntry.getFile"
  1618  // in a try/catch block and returns (_, err, ok = false) when it went through
  1619  // the catch clause.
  1620  func (this FileSystemDirectoryEntry) TryGetFile2(path js.String, options FileSystemFlags) (ret js.Void, exception js.Any, ok bool) {
  1621  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetFile2(
  1622  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1623  		path.Ref(),
  1624  		js.Pointer(&options),
  1625  	)
  1626  
  1627  	return
  1628  }
  1629  
  1630  // HasFuncGetFile3 returns true if the method "FileSystemDirectoryEntry.getFile" exists.
  1631  func (this FileSystemDirectoryEntry) HasFuncGetFile3() bool {
  1632  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetFile3(
  1633  		this.ref,
  1634  	)
  1635  }
  1636  
  1637  // FuncGetFile3 returns the method "FileSystemDirectoryEntry.getFile".
  1638  func (this FileSystemDirectoryEntry) FuncGetFile3() (fn js.Func[func(path js.String)]) {
  1639  	bindings.FuncFileSystemDirectoryEntryGetFile3(
  1640  		this.ref, js.Pointer(&fn),
  1641  	)
  1642  	return
  1643  }
  1644  
  1645  // GetFile3 calls the method "FileSystemDirectoryEntry.getFile".
  1646  func (this FileSystemDirectoryEntry) GetFile3(path js.String) (ret js.Void) {
  1647  	bindings.CallFileSystemDirectoryEntryGetFile3(
  1648  		this.ref, js.Pointer(&ret),
  1649  		path.Ref(),
  1650  	)
  1651  
  1652  	return
  1653  }
  1654  
  1655  // TryGetFile3 calls the method "FileSystemDirectoryEntry.getFile"
  1656  // in a try/catch block and returns (_, err, ok = false) when it went through
  1657  // the catch clause.
  1658  func (this FileSystemDirectoryEntry) TryGetFile3(path js.String) (ret js.Void, exception js.Any, ok bool) {
  1659  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetFile3(
  1660  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1661  		path.Ref(),
  1662  	)
  1663  
  1664  	return
  1665  }
  1666  
  1667  // HasFuncGetFile4 returns true if the method "FileSystemDirectoryEntry.getFile" exists.
  1668  func (this FileSystemDirectoryEntry) HasFuncGetFile4() bool {
  1669  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetFile4(
  1670  		this.ref,
  1671  	)
  1672  }
  1673  
  1674  // FuncGetFile4 returns the method "FileSystemDirectoryEntry.getFile".
  1675  func (this FileSystemDirectoryEntry) FuncGetFile4() (fn js.Func[func()]) {
  1676  	bindings.FuncFileSystemDirectoryEntryGetFile4(
  1677  		this.ref, js.Pointer(&fn),
  1678  	)
  1679  	return
  1680  }
  1681  
  1682  // GetFile4 calls the method "FileSystemDirectoryEntry.getFile".
  1683  func (this FileSystemDirectoryEntry) GetFile4() (ret js.Void) {
  1684  	bindings.CallFileSystemDirectoryEntryGetFile4(
  1685  		this.ref, js.Pointer(&ret),
  1686  	)
  1687  
  1688  	return
  1689  }
  1690  
  1691  // TryGetFile4 calls the method "FileSystemDirectoryEntry.getFile"
  1692  // in a try/catch block and returns (_, err, ok = false) when it went through
  1693  // the catch clause.
  1694  func (this FileSystemDirectoryEntry) TryGetFile4() (ret js.Void, exception js.Any, ok bool) {
  1695  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetFile4(
  1696  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1697  	)
  1698  
  1699  	return
  1700  }
  1701  
  1702  // HasFuncGetDirectory returns true if the method "FileSystemDirectoryEntry.getDirectory" exists.
  1703  func (this FileSystemDirectoryEntry) HasFuncGetDirectory() bool {
  1704  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetDirectory(
  1705  		this.ref,
  1706  	)
  1707  }
  1708  
  1709  // FuncGetDirectory returns the method "FileSystemDirectoryEntry.getDirectory".
  1710  func (this FileSystemDirectoryEntry) FuncGetDirectory() (fn js.Func[func(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)])]) {
  1711  	bindings.FuncFileSystemDirectoryEntryGetDirectory(
  1712  		this.ref, js.Pointer(&fn),
  1713  	)
  1714  	return
  1715  }
  1716  
  1717  // GetDirectory calls the method "FileSystemDirectoryEntry.getDirectory".
  1718  func (this FileSystemDirectoryEntry) GetDirectory(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)]) (ret js.Void) {
  1719  	bindings.CallFileSystemDirectoryEntryGetDirectory(
  1720  		this.ref, js.Pointer(&ret),
  1721  		path.Ref(),
  1722  		js.Pointer(&options),
  1723  		successCallback.Ref(),
  1724  		errorCallback.Ref(),
  1725  	)
  1726  
  1727  	return
  1728  }
  1729  
  1730  // TryGetDirectory calls the method "FileSystemDirectoryEntry.getDirectory"
  1731  // in a try/catch block and returns (_, err, ok = false) when it went through
  1732  // the catch clause.
  1733  func (this FileSystemDirectoryEntry) TryGetDirectory(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)]) (ret js.Void, exception js.Any, ok bool) {
  1734  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetDirectory(
  1735  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1736  		path.Ref(),
  1737  		js.Pointer(&options),
  1738  		successCallback.Ref(),
  1739  		errorCallback.Ref(),
  1740  	)
  1741  
  1742  	return
  1743  }
  1744  
  1745  // HasFuncGetDirectory1 returns true if the method "FileSystemDirectoryEntry.getDirectory" exists.
  1746  func (this FileSystemDirectoryEntry) HasFuncGetDirectory1() bool {
  1747  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetDirectory1(
  1748  		this.ref,
  1749  	)
  1750  }
  1751  
  1752  // FuncGetDirectory1 returns the method "FileSystemDirectoryEntry.getDirectory".
  1753  func (this FileSystemDirectoryEntry) FuncGetDirectory1() (fn js.Func[func(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)])]) {
  1754  	bindings.FuncFileSystemDirectoryEntryGetDirectory1(
  1755  		this.ref, js.Pointer(&fn),
  1756  	)
  1757  	return
  1758  }
  1759  
  1760  // GetDirectory1 calls the method "FileSystemDirectoryEntry.getDirectory".
  1761  func (this FileSystemDirectoryEntry) GetDirectory1(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)]) (ret js.Void) {
  1762  	bindings.CallFileSystemDirectoryEntryGetDirectory1(
  1763  		this.ref, js.Pointer(&ret),
  1764  		path.Ref(),
  1765  		js.Pointer(&options),
  1766  		successCallback.Ref(),
  1767  	)
  1768  
  1769  	return
  1770  }
  1771  
  1772  // TryGetDirectory1 calls the method "FileSystemDirectoryEntry.getDirectory"
  1773  // in a try/catch block and returns (_, err, ok = false) when it went through
  1774  // the catch clause.
  1775  func (this FileSystemDirectoryEntry) TryGetDirectory1(path js.String, options FileSystemFlags, successCallback js.Func[func(entry FileSystemEntry)]) (ret js.Void, exception js.Any, ok bool) {
  1776  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetDirectory1(
  1777  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1778  		path.Ref(),
  1779  		js.Pointer(&options),
  1780  		successCallback.Ref(),
  1781  	)
  1782  
  1783  	return
  1784  }
  1785  
  1786  // HasFuncGetDirectory2 returns true if the method "FileSystemDirectoryEntry.getDirectory" exists.
  1787  func (this FileSystemDirectoryEntry) HasFuncGetDirectory2() bool {
  1788  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetDirectory2(
  1789  		this.ref,
  1790  	)
  1791  }
  1792  
  1793  // FuncGetDirectory2 returns the method "FileSystemDirectoryEntry.getDirectory".
  1794  func (this FileSystemDirectoryEntry) FuncGetDirectory2() (fn js.Func[func(path js.String, options FileSystemFlags)]) {
  1795  	bindings.FuncFileSystemDirectoryEntryGetDirectory2(
  1796  		this.ref, js.Pointer(&fn),
  1797  	)
  1798  	return
  1799  }
  1800  
  1801  // GetDirectory2 calls the method "FileSystemDirectoryEntry.getDirectory".
  1802  func (this FileSystemDirectoryEntry) GetDirectory2(path js.String, options FileSystemFlags) (ret js.Void) {
  1803  	bindings.CallFileSystemDirectoryEntryGetDirectory2(
  1804  		this.ref, js.Pointer(&ret),
  1805  		path.Ref(),
  1806  		js.Pointer(&options),
  1807  	)
  1808  
  1809  	return
  1810  }
  1811  
  1812  // TryGetDirectory2 calls the method "FileSystemDirectoryEntry.getDirectory"
  1813  // in a try/catch block and returns (_, err, ok = false) when it went through
  1814  // the catch clause.
  1815  func (this FileSystemDirectoryEntry) TryGetDirectory2(path js.String, options FileSystemFlags) (ret js.Void, exception js.Any, ok bool) {
  1816  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetDirectory2(
  1817  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1818  		path.Ref(),
  1819  		js.Pointer(&options),
  1820  	)
  1821  
  1822  	return
  1823  }
  1824  
  1825  // HasFuncGetDirectory3 returns true if the method "FileSystemDirectoryEntry.getDirectory" exists.
  1826  func (this FileSystemDirectoryEntry) HasFuncGetDirectory3() bool {
  1827  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetDirectory3(
  1828  		this.ref,
  1829  	)
  1830  }
  1831  
  1832  // FuncGetDirectory3 returns the method "FileSystemDirectoryEntry.getDirectory".
  1833  func (this FileSystemDirectoryEntry) FuncGetDirectory3() (fn js.Func[func(path js.String)]) {
  1834  	bindings.FuncFileSystemDirectoryEntryGetDirectory3(
  1835  		this.ref, js.Pointer(&fn),
  1836  	)
  1837  	return
  1838  }
  1839  
  1840  // GetDirectory3 calls the method "FileSystemDirectoryEntry.getDirectory".
  1841  func (this FileSystemDirectoryEntry) GetDirectory3(path js.String) (ret js.Void) {
  1842  	bindings.CallFileSystemDirectoryEntryGetDirectory3(
  1843  		this.ref, js.Pointer(&ret),
  1844  		path.Ref(),
  1845  	)
  1846  
  1847  	return
  1848  }
  1849  
  1850  // TryGetDirectory3 calls the method "FileSystemDirectoryEntry.getDirectory"
  1851  // in a try/catch block and returns (_, err, ok = false) when it went through
  1852  // the catch clause.
  1853  func (this FileSystemDirectoryEntry) TryGetDirectory3(path js.String) (ret js.Void, exception js.Any, ok bool) {
  1854  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetDirectory3(
  1855  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1856  		path.Ref(),
  1857  	)
  1858  
  1859  	return
  1860  }
  1861  
  1862  // HasFuncGetDirectory4 returns true if the method "FileSystemDirectoryEntry.getDirectory" exists.
  1863  func (this FileSystemDirectoryEntry) HasFuncGetDirectory4() bool {
  1864  	return js.True == bindings.HasFuncFileSystemDirectoryEntryGetDirectory4(
  1865  		this.ref,
  1866  	)
  1867  }
  1868  
  1869  // FuncGetDirectory4 returns the method "FileSystemDirectoryEntry.getDirectory".
  1870  func (this FileSystemDirectoryEntry) FuncGetDirectory4() (fn js.Func[func()]) {
  1871  	bindings.FuncFileSystemDirectoryEntryGetDirectory4(
  1872  		this.ref, js.Pointer(&fn),
  1873  	)
  1874  	return
  1875  }
  1876  
  1877  // GetDirectory4 calls the method "FileSystemDirectoryEntry.getDirectory".
  1878  func (this FileSystemDirectoryEntry) GetDirectory4() (ret js.Void) {
  1879  	bindings.CallFileSystemDirectoryEntryGetDirectory4(
  1880  		this.ref, js.Pointer(&ret),
  1881  	)
  1882  
  1883  	return
  1884  }
  1885  
  1886  // TryGetDirectory4 calls the method "FileSystemDirectoryEntry.getDirectory"
  1887  // in a try/catch block and returns (_, err, ok = false) when it went through
  1888  // the catch clause.
  1889  func (this FileSystemDirectoryEntry) TryGetDirectory4() (ret js.Void, exception js.Any, ok bool) {
  1890  	ok = js.True == bindings.TryFileSystemDirectoryEntryGetDirectory4(
  1891  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1892  	)
  1893  
  1894  	return
  1895  }
  1896  
  1897  type FileSystem struct {
  1898  	ref js.Ref
  1899  }
  1900  
  1901  func (this FileSystem) Once() FileSystem {
  1902  	this.ref.Once()
  1903  	return this
  1904  }
  1905  
  1906  func (this FileSystem) Ref() js.Ref {
  1907  	return this.ref
  1908  }
  1909  
  1910  func (this FileSystem) FromRef(ref js.Ref) FileSystem {
  1911  	this.ref = ref
  1912  	return this
  1913  }
  1914  
  1915  func (this FileSystem) Free() {
  1916  	this.ref.Free()
  1917  }
  1918  
  1919  // Name returns the value of property "FileSystem.name".
  1920  //
  1921  // It returns ok=false if there is no such property.
  1922  func (this FileSystem) Name() (ret js.String, ok bool) {
  1923  	ok = js.True == bindings.GetFileSystemName(
  1924  		this.ref, js.Pointer(&ret),
  1925  	)
  1926  	return
  1927  }
  1928  
  1929  // Root returns the value of property "FileSystem.root".
  1930  //
  1931  // It returns ok=false if there is no such property.
  1932  func (this FileSystem) Root() (ret FileSystemDirectoryEntry, ok bool) {
  1933  	ok = js.True == bindings.GetFileSystemRoot(
  1934  		this.ref, js.Pointer(&ret),
  1935  	)
  1936  	return
  1937  }
  1938  
  1939  type FileSystemEntry struct {
  1940  	ref js.Ref
  1941  }
  1942  
  1943  func (this FileSystemEntry) Once() FileSystemEntry {
  1944  	this.ref.Once()
  1945  	return this
  1946  }
  1947  
  1948  func (this FileSystemEntry) Ref() js.Ref {
  1949  	return this.ref
  1950  }
  1951  
  1952  func (this FileSystemEntry) FromRef(ref js.Ref) FileSystemEntry {
  1953  	this.ref = ref
  1954  	return this
  1955  }
  1956  
  1957  func (this FileSystemEntry) Free() {
  1958  	this.ref.Free()
  1959  }
  1960  
  1961  // IsFile returns the value of property "FileSystemEntry.isFile".
  1962  //
  1963  // It returns ok=false if there is no such property.
  1964  func (this FileSystemEntry) IsFile() (ret bool, ok bool) {
  1965  	ok = js.True == bindings.GetFileSystemEntryIsFile(
  1966  		this.ref, js.Pointer(&ret),
  1967  	)
  1968  	return
  1969  }
  1970  
  1971  // IsDirectory returns the value of property "FileSystemEntry.isDirectory".
  1972  //
  1973  // It returns ok=false if there is no such property.
  1974  func (this FileSystemEntry) IsDirectory() (ret bool, ok bool) {
  1975  	ok = js.True == bindings.GetFileSystemEntryIsDirectory(
  1976  		this.ref, js.Pointer(&ret),
  1977  	)
  1978  	return
  1979  }
  1980  
  1981  // Name returns the value of property "FileSystemEntry.name".
  1982  //
  1983  // It returns ok=false if there is no such property.
  1984  func (this FileSystemEntry) Name() (ret js.String, ok bool) {
  1985  	ok = js.True == bindings.GetFileSystemEntryName(
  1986  		this.ref, js.Pointer(&ret),
  1987  	)
  1988  	return
  1989  }
  1990  
  1991  // FullPath returns the value of property "FileSystemEntry.fullPath".
  1992  //
  1993  // It returns ok=false if there is no such property.
  1994  func (this FileSystemEntry) FullPath() (ret js.String, ok bool) {
  1995  	ok = js.True == bindings.GetFileSystemEntryFullPath(
  1996  		this.ref, js.Pointer(&ret),
  1997  	)
  1998  	return
  1999  }
  2000  
  2001  // Filesystem returns the value of property "FileSystemEntry.filesystem".
  2002  //
  2003  // It returns ok=false if there is no such property.
  2004  func (this FileSystemEntry) Filesystem() (ret FileSystem, ok bool) {
  2005  	ok = js.True == bindings.GetFileSystemEntryFilesystem(
  2006  		this.ref, js.Pointer(&ret),
  2007  	)
  2008  	return
  2009  }
  2010  
  2011  // HasFuncGetParent returns true if the method "FileSystemEntry.getParent" exists.
  2012  func (this FileSystemEntry) HasFuncGetParent() bool {
  2013  	return js.True == bindings.HasFuncFileSystemEntryGetParent(
  2014  		this.ref,
  2015  	)
  2016  }
  2017  
  2018  // FuncGetParent returns the method "FileSystemEntry.getParent".
  2019  func (this FileSystemEntry) FuncGetParent() (fn js.Func[func(successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)])]) {
  2020  	bindings.FuncFileSystemEntryGetParent(
  2021  		this.ref, js.Pointer(&fn),
  2022  	)
  2023  	return
  2024  }
  2025  
  2026  // GetParent calls the method "FileSystemEntry.getParent".
  2027  func (this FileSystemEntry) GetParent(successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)]) (ret js.Void) {
  2028  	bindings.CallFileSystemEntryGetParent(
  2029  		this.ref, js.Pointer(&ret),
  2030  		successCallback.Ref(),
  2031  		errorCallback.Ref(),
  2032  	)
  2033  
  2034  	return
  2035  }
  2036  
  2037  // TryGetParent calls the method "FileSystemEntry.getParent"
  2038  // in a try/catch block and returns (_, err, ok = false) when it went through
  2039  // the catch clause.
  2040  func (this FileSystemEntry) TryGetParent(successCallback js.Func[func(entry FileSystemEntry)], errorCallback js.Func[func(err DOMException)]) (ret js.Void, exception js.Any, ok bool) {
  2041  	ok = js.True == bindings.TryFileSystemEntryGetParent(
  2042  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2043  		successCallback.Ref(),
  2044  		errorCallback.Ref(),
  2045  	)
  2046  
  2047  	return
  2048  }
  2049  
  2050  // HasFuncGetParent1 returns true if the method "FileSystemEntry.getParent" exists.
  2051  func (this FileSystemEntry) HasFuncGetParent1() bool {
  2052  	return js.True == bindings.HasFuncFileSystemEntryGetParent1(
  2053  		this.ref,
  2054  	)
  2055  }
  2056  
  2057  // FuncGetParent1 returns the method "FileSystemEntry.getParent".
  2058  func (this FileSystemEntry) FuncGetParent1() (fn js.Func[func(successCallback js.Func[func(entry FileSystemEntry)])]) {
  2059  	bindings.FuncFileSystemEntryGetParent1(
  2060  		this.ref, js.Pointer(&fn),
  2061  	)
  2062  	return
  2063  }
  2064  
  2065  // GetParent1 calls the method "FileSystemEntry.getParent".
  2066  func (this FileSystemEntry) GetParent1(successCallback js.Func[func(entry FileSystemEntry)]) (ret js.Void) {
  2067  	bindings.CallFileSystemEntryGetParent1(
  2068  		this.ref, js.Pointer(&ret),
  2069  		successCallback.Ref(),
  2070  	)
  2071  
  2072  	return
  2073  }
  2074  
  2075  // TryGetParent1 calls the method "FileSystemEntry.getParent"
  2076  // in a try/catch block and returns (_, err, ok = false) when it went through
  2077  // the catch clause.
  2078  func (this FileSystemEntry) TryGetParent1(successCallback js.Func[func(entry FileSystemEntry)]) (ret js.Void, exception js.Any, ok bool) {
  2079  	ok = js.True == bindings.TryFileSystemEntryGetParent1(
  2080  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2081  		successCallback.Ref(),
  2082  	)
  2083  
  2084  	return
  2085  }
  2086  
  2087  // HasFuncGetParent2 returns true if the method "FileSystemEntry.getParent" exists.
  2088  func (this FileSystemEntry) HasFuncGetParent2() bool {
  2089  	return js.True == bindings.HasFuncFileSystemEntryGetParent2(
  2090  		this.ref,
  2091  	)
  2092  }
  2093  
  2094  // FuncGetParent2 returns the method "FileSystemEntry.getParent".
  2095  func (this FileSystemEntry) FuncGetParent2() (fn js.Func[func()]) {
  2096  	bindings.FuncFileSystemEntryGetParent2(
  2097  		this.ref, js.Pointer(&fn),
  2098  	)
  2099  	return
  2100  }
  2101  
  2102  // GetParent2 calls the method "FileSystemEntry.getParent".
  2103  func (this FileSystemEntry) GetParent2() (ret js.Void) {
  2104  	bindings.CallFileSystemEntryGetParent2(
  2105  		this.ref, js.Pointer(&ret),
  2106  	)
  2107  
  2108  	return
  2109  }
  2110  
  2111  // TryGetParent2 calls the method "FileSystemEntry.getParent"
  2112  // in a try/catch block and returns (_, err, ok = false) when it went through
  2113  // the catch clause.
  2114  func (this FileSystemEntry) TryGetParent2() (ret js.Void, exception js.Any, ok bool) {
  2115  	ok = js.True == bindings.TryFileSystemEntryGetParent2(
  2116  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2117  	)
  2118  
  2119  	return
  2120  }
  2121  
  2122  type DataTransferItem struct {
  2123  	ref js.Ref
  2124  }
  2125  
  2126  func (this DataTransferItem) Once() DataTransferItem {
  2127  	this.ref.Once()
  2128  	return this
  2129  }
  2130  
  2131  func (this DataTransferItem) Ref() js.Ref {
  2132  	return this.ref
  2133  }
  2134  
  2135  func (this DataTransferItem) FromRef(ref js.Ref) DataTransferItem {
  2136  	this.ref = ref
  2137  	return this
  2138  }
  2139  
  2140  func (this DataTransferItem) Free() {
  2141  	this.ref.Free()
  2142  }
  2143  
  2144  // Kind returns the value of property "DataTransferItem.kind".
  2145  //
  2146  // It returns ok=false if there is no such property.
  2147  func (this DataTransferItem) Kind() (ret js.String, ok bool) {
  2148  	ok = js.True == bindings.GetDataTransferItemKind(
  2149  		this.ref, js.Pointer(&ret),
  2150  	)
  2151  	return
  2152  }
  2153  
  2154  // Type returns the value of property "DataTransferItem.type".
  2155  //
  2156  // It returns ok=false if there is no such property.
  2157  func (this DataTransferItem) Type() (ret js.String, ok bool) {
  2158  	ok = js.True == bindings.GetDataTransferItemType(
  2159  		this.ref, js.Pointer(&ret),
  2160  	)
  2161  	return
  2162  }
  2163  
  2164  // HasFuncGetAsString returns true if the method "DataTransferItem.getAsString" exists.
  2165  func (this DataTransferItem) HasFuncGetAsString() bool {
  2166  	return js.True == bindings.HasFuncDataTransferItemGetAsString(
  2167  		this.ref,
  2168  	)
  2169  }
  2170  
  2171  // FuncGetAsString returns the method "DataTransferItem.getAsString".
  2172  func (this DataTransferItem) FuncGetAsString() (fn js.Func[func(callback js.Func[func(data js.String)])]) {
  2173  	bindings.FuncDataTransferItemGetAsString(
  2174  		this.ref, js.Pointer(&fn),
  2175  	)
  2176  	return
  2177  }
  2178  
  2179  // GetAsString calls the method "DataTransferItem.getAsString".
  2180  func (this DataTransferItem) GetAsString(callback js.Func[func(data js.String)]) (ret js.Void) {
  2181  	bindings.CallDataTransferItemGetAsString(
  2182  		this.ref, js.Pointer(&ret),
  2183  		callback.Ref(),
  2184  	)
  2185  
  2186  	return
  2187  }
  2188  
  2189  // TryGetAsString calls the method "DataTransferItem.getAsString"
  2190  // in a try/catch block and returns (_, err, ok = false) when it went through
  2191  // the catch clause.
  2192  func (this DataTransferItem) TryGetAsString(callback js.Func[func(data js.String)]) (ret js.Void, exception js.Any, ok bool) {
  2193  	ok = js.True == bindings.TryDataTransferItemGetAsString(
  2194  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2195  		callback.Ref(),
  2196  	)
  2197  
  2198  	return
  2199  }
  2200  
  2201  // HasFuncGetAsFile returns true if the method "DataTransferItem.getAsFile" exists.
  2202  func (this DataTransferItem) HasFuncGetAsFile() bool {
  2203  	return js.True == bindings.HasFuncDataTransferItemGetAsFile(
  2204  		this.ref,
  2205  	)
  2206  }
  2207  
  2208  // FuncGetAsFile returns the method "DataTransferItem.getAsFile".
  2209  func (this DataTransferItem) FuncGetAsFile() (fn js.Func[func() File]) {
  2210  	bindings.FuncDataTransferItemGetAsFile(
  2211  		this.ref, js.Pointer(&fn),
  2212  	)
  2213  	return
  2214  }
  2215  
  2216  // GetAsFile calls the method "DataTransferItem.getAsFile".
  2217  func (this DataTransferItem) GetAsFile() (ret File) {
  2218  	bindings.CallDataTransferItemGetAsFile(
  2219  		this.ref, js.Pointer(&ret),
  2220  	)
  2221  
  2222  	return
  2223  }
  2224  
  2225  // TryGetAsFile calls the method "DataTransferItem.getAsFile"
  2226  // in a try/catch block and returns (_, err, ok = false) when it went through
  2227  // the catch clause.
  2228  func (this DataTransferItem) TryGetAsFile() (ret File, exception js.Any, ok bool) {
  2229  	ok = js.True == bindings.TryDataTransferItemGetAsFile(
  2230  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2231  	)
  2232  
  2233  	return
  2234  }
  2235  
  2236  // HasFuncGetAsFileSystemHandle returns true if the method "DataTransferItem.getAsFileSystemHandle" exists.
  2237  func (this DataTransferItem) HasFuncGetAsFileSystemHandle() bool {
  2238  	return js.True == bindings.HasFuncDataTransferItemGetAsFileSystemHandle(
  2239  		this.ref,
  2240  	)
  2241  }
  2242  
  2243  // FuncGetAsFileSystemHandle returns the method "DataTransferItem.getAsFileSystemHandle".
  2244  func (this DataTransferItem) FuncGetAsFileSystemHandle() (fn js.Func[func() js.Promise[FileSystemHandle]]) {
  2245  	bindings.FuncDataTransferItemGetAsFileSystemHandle(
  2246  		this.ref, js.Pointer(&fn),
  2247  	)
  2248  	return
  2249  }
  2250  
  2251  // GetAsFileSystemHandle calls the method "DataTransferItem.getAsFileSystemHandle".
  2252  func (this DataTransferItem) GetAsFileSystemHandle() (ret js.Promise[FileSystemHandle]) {
  2253  	bindings.CallDataTransferItemGetAsFileSystemHandle(
  2254  		this.ref, js.Pointer(&ret),
  2255  	)
  2256  
  2257  	return
  2258  }
  2259  
  2260  // TryGetAsFileSystemHandle calls the method "DataTransferItem.getAsFileSystemHandle"
  2261  // in a try/catch block and returns (_, err, ok = false) when it went through
  2262  // the catch clause.
  2263  func (this DataTransferItem) TryGetAsFileSystemHandle() (ret js.Promise[FileSystemHandle], exception js.Any, ok bool) {
  2264  	ok = js.True == bindings.TryDataTransferItemGetAsFileSystemHandle(
  2265  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2266  	)
  2267  
  2268  	return
  2269  }
  2270  
  2271  // HasFuncWebkitGetAsEntry returns true if the method "DataTransferItem.webkitGetAsEntry" exists.
  2272  func (this DataTransferItem) HasFuncWebkitGetAsEntry() bool {
  2273  	return js.True == bindings.HasFuncDataTransferItemWebkitGetAsEntry(
  2274  		this.ref,
  2275  	)
  2276  }
  2277  
  2278  // FuncWebkitGetAsEntry returns the method "DataTransferItem.webkitGetAsEntry".
  2279  func (this DataTransferItem) FuncWebkitGetAsEntry() (fn js.Func[func() FileSystemEntry]) {
  2280  	bindings.FuncDataTransferItemWebkitGetAsEntry(
  2281  		this.ref, js.Pointer(&fn),
  2282  	)
  2283  	return
  2284  }
  2285  
  2286  // WebkitGetAsEntry calls the method "DataTransferItem.webkitGetAsEntry".
  2287  func (this DataTransferItem) WebkitGetAsEntry() (ret FileSystemEntry) {
  2288  	bindings.CallDataTransferItemWebkitGetAsEntry(
  2289  		this.ref, js.Pointer(&ret),
  2290  	)
  2291  
  2292  	return
  2293  }
  2294  
  2295  // TryWebkitGetAsEntry calls the method "DataTransferItem.webkitGetAsEntry"
  2296  // in a try/catch block and returns (_, err, ok = false) when it went through
  2297  // the catch clause.
  2298  func (this DataTransferItem) TryWebkitGetAsEntry() (ret FileSystemEntry, exception js.Any, ok bool) {
  2299  	ok = js.True == bindings.TryDataTransferItemWebkitGetAsEntry(
  2300  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2301  	)
  2302  
  2303  	return
  2304  }
  2305  
  2306  type DataTransferItemList struct {
  2307  	ref js.Ref
  2308  }
  2309  
  2310  func (this DataTransferItemList) Once() DataTransferItemList {
  2311  	this.ref.Once()
  2312  	return this
  2313  }
  2314  
  2315  func (this DataTransferItemList) Ref() js.Ref {
  2316  	return this.ref
  2317  }
  2318  
  2319  func (this DataTransferItemList) FromRef(ref js.Ref) DataTransferItemList {
  2320  	this.ref = ref
  2321  	return this
  2322  }
  2323  
  2324  func (this DataTransferItemList) Free() {
  2325  	this.ref.Free()
  2326  }
  2327  
  2328  // Length returns the value of property "DataTransferItemList.length".
  2329  //
  2330  // It returns ok=false if there is no such property.
  2331  func (this DataTransferItemList) Length() (ret uint32, ok bool) {
  2332  	ok = js.True == bindings.GetDataTransferItemListLength(
  2333  		this.ref, js.Pointer(&ret),
  2334  	)
  2335  	return
  2336  }
  2337  
  2338  // HasFuncGet returns true if the method "DataTransferItemList." exists.
  2339  func (this DataTransferItemList) HasFuncGet() bool {
  2340  	return js.True == bindings.HasFuncDataTransferItemListGet(
  2341  		this.ref,
  2342  	)
  2343  }
  2344  
  2345  // FuncGet returns the method "DataTransferItemList.".
  2346  func (this DataTransferItemList) FuncGet() (fn js.Func[func(index uint32) DataTransferItem]) {
  2347  	bindings.FuncDataTransferItemListGet(
  2348  		this.ref, js.Pointer(&fn),
  2349  	)
  2350  	return
  2351  }
  2352  
  2353  // Get calls the method "DataTransferItemList.".
  2354  func (this DataTransferItemList) Get(index uint32) (ret DataTransferItem) {
  2355  	bindings.CallDataTransferItemListGet(
  2356  		this.ref, js.Pointer(&ret),
  2357  		uint32(index),
  2358  	)
  2359  
  2360  	return
  2361  }
  2362  
  2363  // TryGet calls the method "DataTransferItemList."
  2364  // in a try/catch block and returns (_, err, ok = false) when it went through
  2365  // the catch clause.
  2366  func (this DataTransferItemList) TryGet(index uint32) (ret DataTransferItem, exception js.Any, ok bool) {
  2367  	ok = js.True == bindings.TryDataTransferItemListGet(
  2368  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2369  		uint32(index),
  2370  	)
  2371  
  2372  	return
  2373  }
  2374  
  2375  // HasFuncAdd returns true if the method "DataTransferItemList.add" exists.
  2376  func (this DataTransferItemList) HasFuncAdd() bool {
  2377  	return js.True == bindings.HasFuncDataTransferItemListAdd(
  2378  		this.ref,
  2379  	)
  2380  }
  2381  
  2382  // FuncAdd returns the method "DataTransferItemList.add".
  2383  func (this DataTransferItemList) FuncAdd() (fn js.Func[func(data js.String, typ js.String) DataTransferItem]) {
  2384  	bindings.FuncDataTransferItemListAdd(
  2385  		this.ref, js.Pointer(&fn),
  2386  	)
  2387  	return
  2388  }
  2389  
  2390  // Add calls the method "DataTransferItemList.add".
  2391  func (this DataTransferItemList) Add(data js.String, typ js.String) (ret DataTransferItem) {
  2392  	bindings.CallDataTransferItemListAdd(
  2393  		this.ref, js.Pointer(&ret),
  2394  		data.Ref(),
  2395  		typ.Ref(),
  2396  	)
  2397  
  2398  	return
  2399  }
  2400  
  2401  // TryAdd calls the method "DataTransferItemList.add"
  2402  // in a try/catch block and returns (_, err, ok = false) when it went through
  2403  // the catch clause.
  2404  func (this DataTransferItemList) TryAdd(data js.String, typ js.String) (ret DataTransferItem, exception js.Any, ok bool) {
  2405  	ok = js.True == bindings.TryDataTransferItemListAdd(
  2406  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2407  		data.Ref(),
  2408  		typ.Ref(),
  2409  	)
  2410  
  2411  	return
  2412  }
  2413  
  2414  // HasFuncAdd1 returns true if the method "DataTransferItemList.add" exists.
  2415  func (this DataTransferItemList) HasFuncAdd1() bool {
  2416  	return js.True == bindings.HasFuncDataTransferItemListAdd1(
  2417  		this.ref,
  2418  	)
  2419  }
  2420  
  2421  // FuncAdd1 returns the method "DataTransferItemList.add".
  2422  func (this DataTransferItemList) FuncAdd1() (fn js.Func[func(data File) DataTransferItem]) {
  2423  	bindings.FuncDataTransferItemListAdd1(
  2424  		this.ref, js.Pointer(&fn),
  2425  	)
  2426  	return
  2427  }
  2428  
  2429  // Add1 calls the method "DataTransferItemList.add".
  2430  func (this DataTransferItemList) Add1(data File) (ret DataTransferItem) {
  2431  	bindings.CallDataTransferItemListAdd1(
  2432  		this.ref, js.Pointer(&ret),
  2433  		data.Ref(),
  2434  	)
  2435  
  2436  	return
  2437  }
  2438  
  2439  // TryAdd1 calls the method "DataTransferItemList.add"
  2440  // in a try/catch block and returns (_, err, ok = false) when it went through
  2441  // the catch clause.
  2442  func (this DataTransferItemList) TryAdd1(data File) (ret DataTransferItem, exception js.Any, ok bool) {
  2443  	ok = js.True == bindings.TryDataTransferItemListAdd1(
  2444  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2445  		data.Ref(),
  2446  	)
  2447  
  2448  	return
  2449  }
  2450  
  2451  // HasFuncRemove returns true if the method "DataTransferItemList.remove" exists.
  2452  func (this DataTransferItemList) HasFuncRemove() bool {
  2453  	return js.True == bindings.HasFuncDataTransferItemListRemove(
  2454  		this.ref,
  2455  	)
  2456  }
  2457  
  2458  // FuncRemove returns the method "DataTransferItemList.remove".
  2459  func (this DataTransferItemList) FuncRemove() (fn js.Func[func(index uint32)]) {
  2460  	bindings.FuncDataTransferItemListRemove(
  2461  		this.ref, js.Pointer(&fn),
  2462  	)
  2463  	return
  2464  }
  2465  
  2466  // Remove calls the method "DataTransferItemList.remove".
  2467  func (this DataTransferItemList) Remove(index uint32) (ret js.Void) {
  2468  	bindings.CallDataTransferItemListRemove(
  2469  		this.ref, js.Pointer(&ret),
  2470  		uint32(index),
  2471  	)
  2472  
  2473  	return
  2474  }
  2475  
  2476  // TryRemove calls the method "DataTransferItemList.remove"
  2477  // in a try/catch block and returns (_, err, ok = false) when it went through
  2478  // the catch clause.
  2479  func (this DataTransferItemList) TryRemove(index uint32) (ret js.Void, exception js.Any, ok bool) {
  2480  	ok = js.True == bindings.TryDataTransferItemListRemove(
  2481  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2482  		uint32(index),
  2483  	)
  2484  
  2485  	return
  2486  }
  2487  
  2488  // HasFuncClear returns true if the method "DataTransferItemList.clear" exists.
  2489  func (this DataTransferItemList) HasFuncClear() bool {
  2490  	return js.True == bindings.HasFuncDataTransferItemListClear(
  2491  		this.ref,
  2492  	)
  2493  }
  2494  
  2495  // FuncClear returns the method "DataTransferItemList.clear".
  2496  func (this DataTransferItemList) FuncClear() (fn js.Func[func()]) {
  2497  	bindings.FuncDataTransferItemListClear(
  2498  		this.ref, js.Pointer(&fn),
  2499  	)
  2500  	return
  2501  }
  2502  
  2503  // Clear calls the method "DataTransferItemList.clear".
  2504  func (this DataTransferItemList) Clear() (ret js.Void) {
  2505  	bindings.CallDataTransferItemListClear(
  2506  		this.ref, js.Pointer(&ret),
  2507  	)
  2508  
  2509  	return
  2510  }
  2511  
  2512  // TryClear calls the method "DataTransferItemList.clear"
  2513  // in a try/catch block and returns (_, err, ok = false) when it went through
  2514  // the catch clause.
  2515  func (this DataTransferItemList) TryClear() (ret js.Void, exception js.Any, ok bool) {
  2516  	ok = js.True == bindings.TryDataTransferItemListClear(
  2517  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2518  	)
  2519  
  2520  	return
  2521  }
  2522  
  2523  type FileList struct {
  2524  	ref js.Ref
  2525  }
  2526  
  2527  func (this FileList) Once() FileList {
  2528  	this.ref.Once()
  2529  	return this
  2530  }
  2531  
  2532  func (this FileList) Ref() js.Ref {
  2533  	return this.ref
  2534  }
  2535  
  2536  func (this FileList) FromRef(ref js.Ref) FileList {
  2537  	this.ref = ref
  2538  	return this
  2539  }
  2540  
  2541  func (this FileList) Free() {
  2542  	this.ref.Free()
  2543  }
  2544  
  2545  // Length returns the value of property "FileList.length".
  2546  //
  2547  // It returns ok=false if there is no such property.
  2548  func (this FileList) Length() (ret uint32, ok bool) {
  2549  	ok = js.True == bindings.GetFileListLength(
  2550  		this.ref, js.Pointer(&ret),
  2551  	)
  2552  	return
  2553  }
  2554  
  2555  // HasFuncItem returns true if the method "FileList.item" exists.
  2556  func (this FileList) HasFuncItem() bool {
  2557  	return js.True == bindings.HasFuncFileListItem(
  2558  		this.ref,
  2559  	)
  2560  }
  2561  
  2562  // FuncItem returns the method "FileList.item".
  2563  func (this FileList) FuncItem() (fn js.Func[func(index uint32) File]) {
  2564  	bindings.FuncFileListItem(
  2565  		this.ref, js.Pointer(&fn),
  2566  	)
  2567  	return
  2568  }
  2569  
  2570  // Item calls the method "FileList.item".
  2571  func (this FileList) Item(index uint32) (ret File) {
  2572  	bindings.CallFileListItem(
  2573  		this.ref, js.Pointer(&ret),
  2574  		uint32(index),
  2575  	)
  2576  
  2577  	return
  2578  }
  2579  
  2580  // TryItem calls the method "FileList.item"
  2581  // in a try/catch block and returns (_, err, ok = false) when it went through
  2582  // the catch clause.
  2583  func (this FileList) TryItem(index uint32) (ret File, exception js.Any, ok bool) {
  2584  	ok = js.True == bindings.TryFileListItem(
  2585  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2586  		uint32(index),
  2587  	)
  2588  
  2589  	return
  2590  }
  2591  
  2592  type DataTransfer struct {
  2593  	ref js.Ref
  2594  }
  2595  
  2596  func (this DataTransfer) Once() DataTransfer {
  2597  	this.ref.Once()
  2598  	return this
  2599  }
  2600  
  2601  func (this DataTransfer) Ref() js.Ref {
  2602  	return this.ref
  2603  }
  2604  
  2605  func (this DataTransfer) FromRef(ref js.Ref) DataTransfer {
  2606  	this.ref = ref
  2607  	return this
  2608  }
  2609  
  2610  func (this DataTransfer) Free() {
  2611  	this.ref.Free()
  2612  }
  2613  
  2614  // DropEffect returns the value of property "DataTransfer.dropEffect".
  2615  //
  2616  // It returns ok=false if there is no such property.
  2617  func (this DataTransfer) DropEffect() (ret js.String, ok bool) {
  2618  	ok = js.True == bindings.GetDataTransferDropEffect(
  2619  		this.ref, js.Pointer(&ret),
  2620  	)
  2621  	return
  2622  }
  2623  
  2624  // SetDropEffect sets the value of property "DataTransfer.dropEffect" to val.
  2625  //
  2626  // It returns false if the property cannot be set.
  2627  func (this DataTransfer) SetDropEffect(val js.String) bool {
  2628  	return js.True == bindings.SetDataTransferDropEffect(
  2629  		this.ref,
  2630  		val.Ref(),
  2631  	)
  2632  }
  2633  
  2634  // EffectAllowed returns the value of property "DataTransfer.effectAllowed".
  2635  //
  2636  // It returns ok=false if there is no such property.
  2637  func (this DataTransfer) EffectAllowed() (ret js.String, ok bool) {
  2638  	ok = js.True == bindings.GetDataTransferEffectAllowed(
  2639  		this.ref, js.Pointer(&ret),
  2640  	)
  2641  	return
  2642  }
  2643  
  2644  // SetEffectAllowed sets the value of property "DataTransfer.effectAllowed" to val.
  2645  //
  2646  // It returns false if the property cannot be set.
  2647  func (this DataTransfer) SetEffectAllowed(val js.String) bool {
  2648  	return js.True == bindings.SetDataTransferEffectAllowed(
  2649  		this.ref,
  2650  		val.Ref(),
  2651  	)
  2652  }
  2653  
  2654  // Items returns the value of property "DataTransfer.items".
  2655  //
  2656  // It returns ok=false if there is no such property.
  2657  func (this DataTransfer) Items() (ret DataTransferItemList, ok bool) {
  2658  	ok = js.True == bindings.GetDataTransferItems(
  2659  		this.ref, js.Pointer(&ret),
  2660  	)
  2661  	return
  2662  }
  2663  
  2664  // Types returns the value of property "DataTransfer.types".
  2665  //
  2666  // It returns ok=false if there is no such property.
  2667  func (this DataTransfer) Types() (ret js.FrozenArray[js.String], ok bool) {
  2668  	ok = js.True == bindings.GetDataTransferTypes(
  2669  		this.ref, js.Pointer(&ret),
  2670  	)
  2671  	return
  2672  }
  2673  
  2674  // Files returns the value of property "DataTransfer.files".
  2675  //
  2676  // It returns ok=false if there is no such property.
  2677  func (this DataTransfer) Files() (ret FileList, ok bool) {
  2678  	ok = js.True == bindings.GetDataTransferFiles(
  2679  		this.ref, js.Pointer(&ret),
  2680  	)
  2681  	return
  2682  }
  2683  
  2684  // HasFuncSetDragImage returns true if the method "DataTransfer.setDragImage" exists.
  2685  func (this DataTransfer) HasFuncSetDragImage() bool {
  2686  	return js.True == bindings.HasFuncDataTransferSetDragImage(
  2687  		this.ref,
  2688  	)
  2689  }
  2690  
  2691  // FuncSetDragImage returns the method "DataTransfer.setDragImage".
  2692  func (this DataTransfer) FuncSetDragImage() (fn js.Func[func(image Element, x int32, y int32)]) {
  2693  	bindings.FuncDataTransferSetDragImage(
  2694  		this.ref, js.Pointer(&fn),
  2695  	)
  2696  	return
  2697  }
  2698  
  2699  // SetDragImage calls the method "DataTransfer.setDragImage".
  2700  func (this DataTransfer) SetDragImage(image Element, x int32, y int32) (ret js.Void) {
  2701  	bindings.CallDataTransferSetDragImage(
  2702  		this.ref, js.Pointer(&ret),
  2703  		image.Ref(),
  2704  		int32(x),
  2705  		int32(y),
  2706  	)
  2707  
  2708  	return
  2709  }
  2710  
  2711  // TrySetDragImage calls the method "DataTransfer.setDragImage"
  2712  // in a try/catch block and returns (_, err, ok = false) when it went through
  2713  // the catch clause.
  2714  func (this DataTransfer) TrySetDragImage(image Element, x int32, y int32) (ret js.Void, exception js.Any, ok bool) {
  2715  	ok = js.True == bindings.TryDataTransferSetDragImage(
  2716  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2717  		image.Ref(),
  2718  		int32(x),
  2719  		int32(y),
  2720  	)
  2721  
  2722  	return
  2723  }
  2724  
  2725  // HasFuncGetData returns true if the method "DataTransfer.getData" exists.
  2726  func (this DataTransfer) HasFuncGetData() bool {
  2727  	return js.True == bindings.HasFuncDataTransferGetData(
  2728  		this.ref,
  2729  	)
  2730  }
  2731  
  2732  // FuncGetData returns the method "DataTransfer.getData".
  2733  func (this DataTransfer) FuncGetData() (fn js.Func[func(format js.String) js.String]) {
  2734  	bindings.FuncDataTransferGetData(
  2735  		this.ref, js.Pointer(&fn),
  2736  	)
  2737  	return
  2738  }
  2739  
  2740  // GetData calls the method "DataTransfer.getData".
  2741  func (this DataTransfer) GetData(format js.String) (ret js.String) {
  2742  	bindings.CallDataTransferGetData(
  2743  		this.ref, js.Pointer(&ret),
  2744  		format.Ref(),
  2745  	)
  2746  
  2747  	return
  2748  }
  2749  
  2750  // TryGetData calls the method "DataTransfer.getData"
  2751  // in a try/catch block and returns (_, err, ok = false) when it went through
  2752  // the catch clause.
  2753  func (this DataTransfer) TryGetData(format js.String) (ret js.String, exception js.Any, ok bool) {
  2754  	ok = js.True == bindings.TryDataTransferGetData(
  2755  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2756  		format.Ref(),
  2757  	)
  2758  
  2759  	return
  2760  }
  2761  
  2762  // HasFuncSetData returns true if the method "DataTransfer.setData" exists.
  2763  func (this DataTransfer) HasFuncSetData() bool {
  2764  	return js.True == bindings.HasFuncDataTransferSetData(
  2765  		this.ref,
  2766  	)
  2767  }
  2768  
  2769  // FuncSetData returns the method "DataTransfer.setData".
  2770  func (this DataTransfer) FuncSetData() (fn js.Func[func(format js.String, data js.String)]) {
  2771  	bindings.FuncDataTransferSetData(
  2772  		this.ref, js.Pointer(&fn),
  2773  	)
  2774  	return
  2775  }
  2776  
  2777  // SetData calls the method "DataTransfer.setData".
  2778  func (this DataTransfer) SetData(format js.String, data js.String) (ret js.Void) {
  2779  	bindings.CallDataTransferSetData(
  2780  		this.ref, js.Pointer(&ret),
  2781  		format.Ref(),
  2782  		data.Ref(),
  2783  	)
  2784  
  2785  	return
  2786  }
  2787  
  2788  // TrySetData calls the method "DataTransfer.setData"
  2789  // in a try/catch block and returns (_, err, ok = false) when it went through
  2790  // the catch clause.
  2791  func (this DataTransfer) TrySetData(format js.String, data js.String) (ret js.Void, exception js.Any, ok bool) {
  2792  	ok = js.True == bindings.TryDataTransferSetData(
  2793  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2794  		format.Ref(),
  2795  		data.Ref(),
  2796  	)
  2797  
  2798  	return
  2799  }
  2800  
  2801  // HasFuncClearData returns true if the method "DataTransfer.clearData" exists.
  2802  func (this DataTransfer) HasFuncClearData() bool {
  2803  	return js.True == bindings.HasFuncDataTransferClearData(
  2804  		this.ref,
  2805  	)
  2806  }
  2807  
  2808  // FuncClearData returns the method "DataTransfer.clearData".
  2809  func (this DataTransfer) FuncClearData() (fn js.Func[func(format js.String)]) {
  2810  	bindings.FuncDataTransferClearData(
  2811  		this.ref, js.Pointer(&fn),
  2812  	)
  2813  	return
  2814  }
  2815  
  2816  // ClearData calls the method "DataTransfer.clearData".
  2817  func (this DataTransfer) ClearData(format js.String) (ret js.Void) {
  2818  	bindings.CallDataTransferClearData(
  2819  		this.ref, js.Pointer(&ret),
  2820  		format.Ref(),
  2821  	)
  2822  
  2823  	return
  2824  }
  2825  
  2826  // TryClearData calls the method "DataTransfer.clearData"
  2827  // in a try/catch block and returns (_, err, ok = false) when it went through
  2828  // the catch clause.
  2829  func (this DataTransfer) TryClearData(format js.String) (ret js.Void, exception js.Any, ok bool) {
  2830  	ok = js.True == bindings.TryDataTransferClearData(
  2831  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2832  		format.Ref(),
  2833  	)
  2834  
  2835  	return
  2836  }
  2837  
  2838  // HasFuncClearData1 returns true if the method "DataTransfer.clearData" exists.
  2839  func (this DataTransfer) HasFuncClearData1() bool {
  2840  	return js.True == bindings.HasFuncDataTransferClearData1(
  2841  		this.ref,
  2842  	)
  2843  }
  2844  
  2845  // FuncClearData1 returns the method "DataTransfer.clearData".
  2846  func (this DataTransfer) FuncClearData1() (fn js.Func[func()]) {
  2847  	bindings.FuncDataTransferClearData1(
  2848  		this.ref, js.Pointer(&fn),
  2849  	)
  2850  	return
  2851  }
  2852  
  2853  // ClearData1 calls the method "DataTransfer.clearData".
  2854  func (this DataTransfer) ClearData1() (ret js.Void) {
  2855  	bindings.CallDataTransferClearData1(
  2856  		this.ref, js.Pointer(&ret),
  2857  	)
  2858  
  2859  	return
  2860  }
  2861  
  2862  // TryClearData1 calls the method "DataTransfer.clearData"
  2863  // in a try/catch block and returns (_, err, ok = false) when it went through
  2864  // the catch clause.
  2865  func (this DataTransfer) TryClearData1() (ret js.Void, exception js.Any, ok bool) {
  2866  	ok = js.True == bindings.TryDataTransferClearData1(
  2867  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2868  	)
  2869  
  2870  	return
  2871  }
  2872  
  2873  type ClipboardEventInit struct {
  2874  	// ClipboardData is "ClipboardEventInit.clipboardData"
  2875  	//
  2876  	// Optional, defaults to null.
  2877  	ClipboardData DataTransfer
  2878  	// Bubbles is "ClipboardEventInit.bubbles"
  2879  	//
  2880  	// Optional, defaults to false.
  2881  	//
  2882  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  2883  	Bubbles bool
  2884  	// Cancelable is "ClipboardEventInit.cancelable"
  2885  	//
  2886  	// Optional, defaults to false.
  2887  	//
  2888  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  2889  	Cancelable bool
  2890  	// Composed is "ClipboardEventInit.composed"
  2891  	//
  2892  	// Optional, defaults to false.
  2893  	//
  2894  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  2895  	Composed bool
  2896  
  2897  	FFI_USE_Bubbles    bool // for Bubbles.
  2898  	FFI_USE_Cancelable bool // for Cancelable.
  2899  	FFI_USE_Composed   bool // for Composed.
  2900  
  2901  	FFI_USE bool
  2902  }
  2903  
  2904  // FromRef calls UpdateFrom and returns a ClipboardEventInit with all fields set.
  2905  func (p ClipboardEventInit) FromRef(ref js.Ref) ClipboardEventInit {
  2906  	p.UpdateFrom(ref)
  2907  	return p
  2908  }
  2909  
  2910  // New creates a new ClipboardEventInit in the application heap.
  2911  func (p ClipboardEventInit) New() js.Ref {
  2912  	return bindings.ClipboardEventInitJSLoad(
  2913  		js.Pointer(&p), js.True, 0,
  2914  	)
  2915  }
  2916  
  2917  // UpdateFrom copies value of all fields of the heap object to p.
  2918  func (p *ClipboardEventInit) UpdateFrom(ref js.Ref) {
  2919  	bindings.ClipboardEventInitJSStore(
  2920  		js.Pointer(p), ref,
  2921  	)
  2922  }
  2923  
  2924  // Update writes all fields of the p to the heap object referenced by ref.
  2925  func (p *ClipboardEventInit) Update(ref js.Ref) {
  2926  	bindings.ClipboardEventInitJSLoad(
  2927  		js.Pointer(p), js.False, ref,
  2928  	)
  2929  }
  2930  
  2931  // FreeMembers frees fields with heap reference, if recursive is true
  2932  // free all heap references reachable from p.
  2933  func (p *ClipboardEventInit) FreeMembers(recursive bool) {
  2934  	js.Free(
  2935  		p.ClipboardData.Ref(),
  2936  	)
  2937  	p.ClipboardData = p.ClipboardData.FromRef(js.Undefined)
  2938  }
  2939  
  2940  func NewClipboardEvent(typ js.String, eventInitDict ClipboardEventInit) (ret ClipboardEvent) {
  2941  	ret.ref = bindings.NewClipboardEventByClipboardEvent(
  2942  		typ.Ref(),
  2943  		js.Pointer(&eventInitDict))
  2944  	return
  2945  }
  2946  
  2947  func NewClipboardEventByClipboardEvent1(typ js.String) (ret ClipboardEvent) {
  2948  	ret.ref = bindings.NewClipboardEventByClipboardEvent1(
  2949  		typ.Ref())
  2950  	return
  2951  }
  2952  
  2953  type ClipboardEvent struct {
  2954  	Event
  2955  }
  2956  
  2957  func (this ClipboardEvent) Once() ClipboardEvent {
  2958  	this.ref.Once()
  2959  	return this
  2960  }
  2961  
  2962  func (this ClipboardEvent) Ref() js.Ref {
  2963  	return this.Event.Ref()
  2964  }
  2965  
  2966  func (this ClipboardEvent) FromRef(ref js.Ref) ClipboardEvent {
  2967  	this.Event = this.Event.FromRef(ref)
  2968  	return this
  2969  }
  2970  
  2971  func (this ClipboardEvent) Free() {
  2972  	this.ref.Free()
  2973  }
  2974  
  2975  // ClipboardData returns the value of property "ClipboardEvent.clipboardData".
  2976  //
  2977  // It returns ok=false if there is no such property.
  2978  func (this ClipboardEvent) ClipboardData() (ret DataTransfer, ok bool) {
  2979  	ok = js.True == bindings.GetClipboardEventClipboardData(
  2980  		this.ref, js.Pointer(&ret),
  2981  	)
  2982  	return
  2983  }
  2984  
  2985  type ClipboardPermissionDescriptor struct {
  2986  	// AllowWithoutGesture is "ClipboardPermissionDescriptor.allowWithoutGesture"
  2987  	//
  2988  	// Optional, defaults to false.
  2989  	//
  2990  	// NOTE: FFI_USE_AllowWithoutGesture MUST be set to true to make this field effective.
  2991  	AllowWithoutGesture bool
  2992  	// Name is "ClipboardPermissionDescriptor.name"
  2993  	//
  2994  	// Required
  2995  	Name js.String
  2996  
  2997  	FFI_USE_AllowWithoutGesture bool // for AllowWithoutGesture.
  2998  
  2999  	FFI_USE bool
  3000  }
  3001  
  3002  // FromRef calls UpdateFrom and returns a ClipboardPermissionDescriptor with all fields set.
  3003  func (p ClipboardPermissionDescriptor) FromRef(ref js.Ref) ClipboardPermissionDescriptor {
  3004  	p.UpdateFrom(ref)
  3005  	return p
  3006  }
  3007  
  3008  // New creates a new ClipboardPermissionDescriptor in the application heap.
  3009  func (p ClipboardPermissionDescriptor) New() js.Ref {
  3010  	return bindings.ClipboardPermissionDescriptorJSLoad(
  3011  		js.Pointer(&p), js.True, 0,
  3012  	)
  3013  }
  3014  
  3015  // UpdateFrom copies value of all fields of the heap object to p.
  3016  func (p *ClipboardPermissionDescriptor) UpdateFrom(ref js.Ref) {
  3017  	bindings.ClipboardPermissionDescriptorJSStore(
  3018  		js.Pointer(p), ref,
  3019  	)
  3020  }
  3021  
  3022  // Update writes all fields of the p to the heap object referenced by ref.
  3023  func (p *ClipboardPermissionDescriptor) Update(ref js.Ref) {
  3024  	bindings.ClipboardPermissionDescriptorJSLoad(
  3025  		js.Pointer(p), js.False, ref,
  3026  	)
  3027  }
  3028  
  3029  // FreeMembers frees fields with heap reference, if recursive is true
  3030  // free all heap references reachable from p.
  3031  func (p *ClipboardPermissionDescriptor) FreeMembers(recursive bool) {
  3032  	js.Free(
  3033  		p.Name.Ref(),
  3034  	)
  3035  	p.Name = p.Name.FromRef(js.Undefined)
  3036  }
  3037  
  3038  type CloseEventInit struct {
  3039  	// WasClean is "CloseEventInit.wasClean"
  3040  	//
  3041  	// Optional, defaults to false.
  3042  	//
  3043  	// NOTE: FFI_USE_WasClean MUST be set to true to make this field effective.
  3044  	WasClean bool
  3045  	// Code is "CloseEventInit.code"
  3046  	//
  3047  	// Optional, defaults to 0.
  3048  	//
  3049  	// NOTE: FFI_USE_Code MUST be set to true to make this field effective.
  3050  	Code uint16
  3051  	// Reason is "CloseEventInit.reason"
  3052  	//
  3053  	// Optional, defaults to "".
  3054  	Reason js.String
  3055  	// Bubbles is "CloseEventInit.bubbles"
  3056  	//
  3057  	// Optional, defaults to false.
  3058  	//
  3059  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  3060  	Bubbles bool
  3061  	// Cancelable is "CloseEventInit.cancelable"
  3062  	//
  3063  	// Optional, defaults to false.
  3064  	//
  3065  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  3066  	Cancelable bool
  3067  	// Composed is "CloseEventInit.composed"
  3068  	//
  3069  	// Optional, defaults to false.
  3070  	//
  3071  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  3072  	Composed bool
  3073  
  3074  	FFI_USE_WasClean   bool // for WasClean.
  3075  	FFI_USE_Code       bool // for Code.
  3076  	FFI_USE_Bubbles    bool // for Bubbles.
  3077  	FFI_USE_Cancelable bool // for Cancelable.
  3078  	FFI_USE_Composed   bool // for Composed.
  3079  
  3080  	FFI_USE bool
  3081  }
  3082  
  3083  // FromRef calls UpdateFrom and returns a CloseEventInit with all fields set.
  3084  func (p CloseEventInit) FromRef(ref js.Ref) CloseEventInit {
  3085  	p.UpdateFrom(ref)
  3086  	return p
  3087  }
  3088  
  3089  // New creates a new CloseEventInit in the application heap.
  3090  func (p CloseEventInit) New() js.Ref {
  3091  	return bindings.CloseEventInitJSLoad(
  3092  		js.Pointer(&p), js.True, 0,
  3093  	)
  3094  }
  3095  
  3096  // UpdateFrom copies value of all fields of the heap object to p.
  3097  func (p *CloseEventInit) UpdateFrom(ref js.Ref) {
  3098  	bindings.CloseEventInitJSStore(
  3099  		js.Pointer(p), ref,
  3100  	)
  3101  }
  3102  
  3103  // Update writes all fields of the p to the heap object referenced by ref.
  3104  func (p *CloseEventInit) Update(ref js.Ref) {
  3105  	bindings.CloseEventInitJSLoad(
  3106  		js.Pointer(p), js.False, ref,
  3107  	)
  3108  }
  3109  
  3110  // FreeMembers frees fields with heap reference, if recursive is true
  3111  // free all heap references reachable from p.
  3112  func (p *CloseEventInit) FreeMembers(recursive bool) {
  3113  	js.Free(
  3114  		p.Reason.Ref(),
  3115  	)
  3116  	p.Reason = p.Reason.FromRef(js.Undefined)
  3117  }
  3118  
  3119  func NewCloseEvent(typ js.String, eventInitDict CloseEventInit) (ret CloseEvent) {
  3120  	ret.ref = bindings.NewCloseEventByCloseEvent(
  3121  		typ.Ref(),
  3122  		js.Pointer(&eventInitDict))
  3123  	return
  3124  }
  3125  
  3126  func NewCloseEventByCloseEvent1(typ js.String) (ret CloseEvent) {
  3127  	ret.ref = bindings.NewCloseEventByCloseEvent1(
  3128  		typ.Ref())
  3129  	return
  3130  }
  3131  
  3132  type CloseEvent struct {
  3133  	Event
  3134  }
  3135  
  3136  func (this CloseEvent) Once() CloseEvent {
  3137  	this.ref.Once()
  3138  	return this
  3139  }
  3140  
  3141  func (this CloseEvent) Ref() js.Ref {
  3142  	return this.Event.Ref()
  3143  }
  3144  
  3145  func (this CloseEvent) FromRef(ref js.Ref) CloseEvent {
  3146  	this.Event = this.Event.FromRef(ref)
  3147  	return this
  3148  }
  3149  
  3150  func (this CloseEvent) Free() {
  3151  	this.ref.Free()
  3152  }
  3153  
  3154  // WasClean returns the value of property "CloseEvent.wasClean".
  3155  //
  3156  // It returns ok=false if there is no such property.
  3157  func (this CloseEvent) WasClean() (ret bool, ok bool) {
  3158  	ok = js.True == bindings.GetCloseEventWasClean(
  3159  		this.ref, js.Pointer(&ret),
  3160  	)
  3161  	return
  3162  }
  3163  
  3164  // Code returns the value of property "CloseEvent.code".
  3165  //
  3166  // It returns ok=false if there is no such property.
  3167  func (this CloseEvent) Code() (ret uint16, ok bool) {
  3168  	ok = js.True == bindings.GetCloseEventCode(
  3169  		this.ref, js.Pointer(&ret),
  3170  	)
  3171  	return
  3172  }
  3173  
  3174  // Reason returns the value of property "CloseEvent.reason".
  3175  //
  3176  // It returns ok=false if there is no such property.
  3177  func (this CloseEvent) Reason() (ret js.String, ok bool) {
  3178  	ok = js.True == bindings.GetCloseEventReason(
  3179  		this.ref, js.Pointer(&ret),
  3180  	)
  3181  	return
  3182  }
  3183  
  3184  type CollectedClientAdditionalPaymentData struct {
  3185  	// RpId is "CollectedClientAdditionalPaymentData.rpId"
  3186  	//
  3187  	// Required
  3188  	RpId js.String
  3189  	// TopOrigin is "CollectedClientAdditionalPaymentData.topOrigin"
  3190  	//
  3191  	// Required
  3192  	TopOrigin js.String
  3193  	// PayeeName is "CollectedClientAdditionalPaymentData.payeeName"
  3194  	//
  3195  	// Optional
  3196  	PayeeName js.String
  3197  	// PayeeOrigin is "CollectedClientAdditionalPaymentData.payeeOrigin"
  3198  	//
  3199  	// Optional
  3200  	PayeeOrigin js.String
  3201  	// Total is "CollectedClientAdditionalPaymentData.total"
  3202  	//
  3203  	// Required
  3204  	//
  3205  	// NOTE: Total.FFI_USE MUST be set to true to get Total used.
  3206  	Total PaymentCurrencyAmount
  3207  	// Instrument is "CollectedClientAdditionalPaymentData.instrument"
  3208  	//
  3209  	// Required
  3210  	//
  3211  	// NOTE: Instrument.FFI_USE MUST be set to true to get Instrument used.
  3212  	Instrument PaymentCredentialInstrument
  3213  
  3214  	FFI_USE bool
  3215  }
  3216  
  3217  // FromRef calls UpdateFrom and returns a CollectedClientAdditionalPaymentData with all fields set.
  3218  func (p CollectedClientAdditionalPaymentData) FromRef(ref js.Ref) CollectedClientAdditionalPaymentData {
  3219  	p.UpdateFrom(ref)
  3220  	return p
  3221  }
  3222  
  3223  // New creates a new CollectedClientAdditionalPaymentData in the application heap.
  3224  func (p CollectedClientAdditionalPaymentData) New() js.Ref {
  3225  	return bindings.CollectedClientAdditionalPaymentDataJSLoad(
  3226  		js.Pointer(&p), js.True, 0,
  3227  	)
  3228  }
  3229  
  3230  // UpdateFrom copies value of all fields of the heap object to p.
  3231  func (p *CollectedClientAdditionalPaymentData) UpdateFrom(ref js.Ref) {
  3232  	bindings.CollectedClientAdditionalPaymentDataJSStore(
  3233  		js.Pointer(p), ref,
  3234  	)
  3235  }
  3236  
  3237  // Update writes all fields of the p to the heap object referenced by ref.
  3238  func (p *CollectedClientAdditionalPaymentData) Update(ref js.Ref) {
  3239  	bindings.CollectedClientAdditionalPaymentDataJSLoad(
  3240  		js.Pointer(p), js.False, ref,
  3241  	)
  3242  }
  3243  
  3244  // FreeMembers frees fields with heap reference, if recursive is true
  3245  // free all heap references reachable from p.
  3246  func (p *CollectedClientAdditionalPaymentData) FreeMembers(recursive bool) {
  3247  	js.Free(
  3248  		p.RpId.Ref(),
  3249  		p.TopOrigin.Ref(),
  3250  		p.PayeeName.Ref(),
  3251  		p.PayeeOrigin.Ref(),
  3252  	)
  3253  	p.RpId = p.RpId.FromRef(js.Undefined)
  3254  	p.TopOrigin = p.TopOrigin.FromRef(js.Undefined)
  3255  	p.PayeeName = p.PayeeName.FromRef(js.Undefined)
  3256  	p.PayeeOrigin = p.PayeeOrigin.FromRef(js.Undefined)
  3257  	if recursive {
  3258  		p.Total.FreeMembers(true)
  3259  		p.Instrument.FreeMembers(true)
  3260  	}
  3261  }
  3262  
  3263  type CollectedClientData struct {
  3264  	// Type is "CollectedClientData.type"
  3265  	//
  3266  	// Required
  3267  	Type js.String
  3268  	// Challenge is "CollectedClientData.challenge"
  3269  	//
  3270  	// Required
  3271  	Challenge js.String
  3272  	// Origin is "CollectedClientData.origin"
  3273  	//
  3274  	// Required
  3275  	Origin js.String
  3276  	// TopOrigin is "CollectedClientData.topOrigin"
  3277  	//
  3278  	// Optional
  3279  	TopOrigin js.String
  3280  	// CrossOrigin is "CollectedClientData.crossOrigin"
  3281  	//
  3282  	// Optional
  3283  	//
  3284  	// NOTE: FFI_USE_CrossOrigin MUST be set to true to make this field effective.
  3285  	CrossOrigin bool
  3286  
  3287  	FFI_USE_CrossOrigin bool // for CrossOrigin.
  3288  
  3289  	FFI_USE bool
  3290  }
  3291  
  3292  // FromRef calls UpdateFrom and returns a CollectedClientData with all fields set.
  3293  func (p CollectedClientData) FromRef(ref js.Ref) CollectedClientData {
  3294  	p.UpdateFrom(ref)
  3295  	return p
  3296  }
  3297  
  3298  // New creates a new CollectedClientData in the application heap.
  3299  func (p CollectedClientData) New() js.Ref {
  3300  	return bindings.CollectedClientDataJSLoad(
  3301  		js.Pointer(&p), js.True, 0,
  3302  	)
  3303  }
  3304  
  3305  // UpdateFrom copies value of all fields of the heap object to p.
  3306  func (p *CollectedClientData) UpdateFrom(ref js.Ref) {
  3307  	bindings.CollectedClientDataJSStore(
  3308  		js.Pointer(p), ref,
  3309  	)
  3310  }
  3311  
  3312  // Update writes all fields of the p to the heap object referenced by ref.
  3313  func (p *CollectedClientData) Update(ref js.Ref) {
  3314  	bindings.CollectedClientDataJSLoad(
  3315  		js.Pointer(p), js.False, ref,
  3316  	)
  3317  }
  3318  
  3319  // FreeMembers frees fields with heap reference, if recursive is true
  3320  // free all heap references reachable from p.
  3321  func (p *CollectedClientData) FreeMembers(recursive bool) {
  3322  	js.Free(
  3323  		p.Type.Ref(),
  3324  		p.Challenge.Ref(),
  3325  		p.Origin.Ref(),
  3326  		p.TopOrigin.Ref(),
  3327  	)
  3328  	p.Type = p.Type.FromRef(js.Undefined)
  3329  	p.Challenge = p.Challenge.FromRef(js.Undefined)
  3330  	p.Origin = p.Origin.FromRef(js.Undefined)
  3331  	p.TopOrigin = p.TopOrigin.FromRef(js.Undefined)
  3332  }
  3333  
  3334  type CollectedClientPaymentData struct {
  3335  	// Payment is "CollectedClientPaymentData.payment"
  3336  	//
  3337  	// Required
  3338  	//
  3339  	// NOTE: Payment.FFI_USE MUST be set to true to get Payment used.
  3340  	Payment CollectedClientAdditionalPaymentData
  3341  	// Type is "CollectedClientPaymentData.type"
  3342  	//
  3343  	// Required
  3344  	Type js.String
  3345  	// Challenge is "CollectedClientPaymentData.challenge"
  3346  	//
  3347  	// Required
  3348  	Challenge js.String
  3349  	// Origin is "CollectedClientPaymentData.origin"
  3350  	//
  3351  	// Required
  3352  	Origin js.String
  3353  	// TopOrigin is "CollectedClientPaymentData.topOrigin"
  3354  	//
  3355  	// Optional
  3356  	TopOrigin js.String
  3357  	// CrossOrigin is "CollectedClientPaymentData.crossOrigin"
  3358  	//
  3359  	// Optional
  3360  	//
  3361  	// NOTE: FFI_USE_CrossOrigin MUST be set to true to make this field effective.
  3362  	CrossOrigin bool
  3363  
  3364  	FFI_USE_CrossOrigin bool // for CrossOrigin.
  3365  
  3366  	FFI_USE bool
  3367  }
  3368  
  3369  // FromRef calls UpdateFrom and returns a CollectedClientPaymentData with all fields set.
  3370  func (p CollectedClientPaymentData) FromRef(ref js.Ref) CollectedClientPaymentData {
  3371  	p.UpdateFrom(ref)
  3372  	return p
  3373  }
  3374  
  3375  // New creates a new CollectedClientPaymentData in the application heap.
  3376  func (p CollectedClientPaymentData) New() js.Ref {
  3377  	return bindings.CollectedClientPaymentDataJSLoad(
  3378  		js.Pointer(&p), js.True, 0,
  3379  	)
  3380  }
  3381  
  3382  // UpdateFrom copies value of all fields of the heap object to p.
  3383  func (p *CollectedClientPaymentData) UpdateFrom(ref js.Ref) {
  3384  	bindings.CollectedClientPaymentDataJSStore(
  3385  		js.Pointer(p), ref,
  3386  	)
  3387  }
  3388  
  3389  // Update writes all fields of the p to the heap object referenced by ref.
  3390  func (p *CollectedClientPaymentData) Update(ref js.Ref) {
  3391  	bindings.CollectedClientPaymentDataJSLoad(
  3392  		js.Pointer(p), js.False, ref,
  3393  	)
  3394  }
  3395  
  3396  // FreeMembers frees fields with heap reference, if recursive is true
  3397  // free all heap references reachable from p.
  3398  func (p *CollectedClientPaymentData) FreeMembers(recursive bool) {
  3399  	js.Free(
  3400  		p.Type.Ref(),
  3401  		p.Challenge.Ref(),
  3402  		p.Origin.Ref(),
  3403  		p.TopOrigin.Ref(),
  3404  	)
  3405  	p.Type = p.Type.FromRef(js.Undefined)
  3406  	p.Challenge = p.Challenge.FromRef(js.Undefined)
  3407  	p.Origin = p.Origin.FromRef(js.Undefined)
  3408  	p.TopOrigin = p.TopOrigin.FromRef(js.Undefined)
  3409  	if recursive {
  3410  		p.Payment.FreeMembers(true)
  3411  	}
  3412  }
  3413  
  3414  type ColorGamut uint32
  3415  
  3416  const (
  3417  	_ ColorGamut = iota
  3418  
  3419  	ColorGamut_SRGB
  3420  	ColorGamut_P3
  3421  	ColorGamut_REC2020
  3422  )
  3423  
  3424  func (ColorGamut) FromRef(str js.Ref) ColorGamut {
  3425  	return ColorGamut(bindings.ConstOfColorGamut(str))
  3426  }
  3427  
  3428  func (x ColorGamut) String() (string, bool) {
  3429  	switch x {
  3430  	case ColorGamut_SRGB:
  3431  		return "srgb", true
  3432  	case ColorGamut_P3:
  3433  		return "p3", true
  3434  	case ColorGamut_REC2020:
  3435  		return "rec2020", true
  3436  	default:
  3437  		return "", false
  3438  	}
  3439  }
  3440  
  3441  type ColorSelectionOptions struct {
  3442  	// Signal is "ColorSelectionOptions.signal"
  3443  	//
  3444  	// Optional
  3445  	Signal AbortSignal
  3446  
  3447  	FFI_USE bool
  3448  }
  3449  
  3450  // FromRef calls UpdateFrom and returns a ColorSelectionOptions with all fields set.
  3451  func (p ColorSelectionOptions) FromRef(ref js.Ref) ColorSelectionOptions {
  3452  	p.UpdateFrom(ref)
  3453  	return p
  3454  }
  3455  
  3456  // New creates a new ColorSelectionOptions in the application heap.
  3457  func (p ColorSelectionOptions) New() js.Ref {
  3458  	return bindings.ColorSelectionOptionsJSLoad(
  3459  		js.Pointer(&p), js.True, 0,
  3460  	)
  3461  }
  3462  
  3463  // UpdateFrom copies value of all fields of the heap object to p.
  3464  func (p *ColorSelectionOptions) UpdateFrom(ref js.Ref) {
  3465  	bindings.ColorSelectionOptionsJSStore(
  3466  		js.Pointer(p), ref,
  3467  	)
  3468  }
  3469  
  3470  // Update writes all fields of the p to the heap object referenced by ref.
  3471  func (p *ColorSelectionOptions) Update(ref js.Ref) {
  3472  	bindings.ColorSelectionOptionsJSLoad(
  3473  		js.Pointer(p), js.False, ref,
  3474  	)
  3475  }
  3476  
  3477  // FreeMembers frees fields with heap reference, if recursive is true
  3478  // free all heap references reachable from p.
  3479  func (p *ColorSelectionOptions) FreeMembers(recursive bool) {
  3480  	js.Free(
  3481  		p.Signal.Ref(),
  3482  	)
  3483  	p.Signal = p.Signal.FromRef(js.Undefined)
  3484  }
  3485  
  3486  type ColorSelectionResult struct {
  3487  	// SRGBHex is "ColorSelectionResult.sRGBHex"
  3488  	//
  3489  	// Optional
  3490  	SRGBHex js.String
  3491  
  3492  	FFI_USE bool
  3493  }
  3494  
  3495  // FromRef calls UpdateFrom and returns a ColorSelectionResult with all fields set.
  3496  func (p ColorSelectionResult) FromRef(ref js.Ref) ColorSelectionResult {
  3497  	p.UpdateFrom(ref)
  3498  	return p
  3499  }
  3500  
  3501  // New creates a new ColorSelectionResult in the application heap.
  3502  func (p ColorSelectionResult) New() js.Ref {
  3503  	return bindings.ColorSelectionResultJSLoad(
  3504  		js.Pointer(&p), js.True, 0,
  3505  	)
  3506  }
  3507  
  3508  // UpdateFrom copies value of all fields of the heap object to p.
  3509  func (p *ColorSelectionResult) UpdateFrom(ref js.Ref) {
  3510  	bindings.ColorSelectionResultJSStore(
  3511  		js.Pointer(p), ref,
  3512  	)
  3513  }
  3514  
  3515  // Update writes all fields of the p to the heap object referenced by ref.
  3516  func (p *ColorSelectionResult) Update(ref js.Ref) {
  3517  	bindings.ColorSelectionResultJSLoad(
  3518  		js.Pointer(p), js.False, ref,
  3519  	)
  3520  }
  3521  
  3522  // FreeMembers frees fields with heap reference, if recursive is true
  3523  // free all heap references reachable from p.
  3524  func (p *ColorSelectionResult) FreeMembers(recursive bool) {
  3525  	js.Free(
  3526  		p.SRGBHex.Ref(),
  3527  	)
  3528  	p.SRGBHex = p.SRGBHex.FromRef(js.Undefined)
  3529  }
  3530  
  3531  type ColorSpaceConversion uint32
  3532  
  3533  const (
  3534  	_ ColorSpaceConversion = iota
  3535  
  3536  	ColorSpaceConversion_NONE
  3537  	ColorSpaceConversion_DEFAULT
  3538  )
  3539  
  3540  func (ColorSpaceConversion) FromRef(str js.Ref) ColorSpaceConversion {
  3541  	return ColorSpaceConversion(bindings.ConstOfColorSpaceConversion(str))
  3542  }
  3543  
  3544  func (x ColorSpaceConversion) String() (string, bool) {
  3545  	switch x {
  3546  	case ColorSpaceConversion_NONE:
  3547  		return "none", true
  3548  	case ColorSpaceConversion_DEFAULT:
  3549  		return "default", true
  3550  	default:
  3551  		return "", false
  3552  	}
  3553  }
  3554  
  3555  type CompositeOperation uint32
  3556  
  3557  const (
  3558  	_ CompositeOperation = iota
  3559  
  3560  	CompositeOperation_REPLACE
  3561  	CompositeOperation_ADD
  3562  	CompositeOperation_ACCUMULATE
  3563  )
  3564  
  3565  func (CompositeOperation) FromRef(str js.Ref) CompositeOperation {
  3566  	return CompositeOperation(bindings.ConstOfCompositeOperation(str))
  3567  }
  3568  
  3569  func (x CompositeOperation) String() (string, bool) {
  3570  	switch x {
  3571  	case CompositeOperation_REPLACE:
  3572  		return "replace", true
  3573  	case CompositeOperation_ADD:
  3574  		return "add", true
  3575  	case CompositeOperation_ACCUMULATE:
  3576  		return "accumulate", true
  3577  	default:
  3578  		return "", false
  3579  	}
  3580  }
  3581  
  3582  type WindowPostMessageOptions struct {
  3583  	// TargetOrigin is "WindowPostMessageOptions.targetOrigin"
  3584  	//
  3585  	// Optional, defaults to "/".
  3586  	TargetOrigin js.String
  3587  	// Transfer is "WindowPostMessageOptions.transfer"
  3588  	//
  3589  	// Optional, defaults to [].
  3590  	Transfer js.Array[js.Object]
  3591  
  3592  	FFI_USE bool
  3593  }
  3594  
  3595  // FromRef calls UpdateFrom and returns a WindowPostMessageOptions with all fields set.
  3596  func (p WindowPostMessageOptions) FromRef(ref js.Ref) WindowPostMessageOptions {
  3597  	p.UpdateFrom(ref)
  3598  	return p
  3599  }
  3600  
  3601  // New creates a new WindowPostMessageOptions in the application heap.
  3602  func (p WindowPostMessageOptions) New() js.Ref {
  3603  	return bindings.WindowPostMessageOptionsJSLoad(
  3604  		js.Pointer(&p), js.True, 0,
  3605  	)
  3606  }
  3607  
  3608  // UpdateFrom copies value of all fields of the heap object to p.
  3609  func (p *WindowPostMessageOptions) UpdateFrom(ref js.Ref) {
  3610  	bindings.WindowPostMessageOptionsJSStore(
  3611  		js.Pointer(p), ref,
  3612  	)
  3613  }
  3614  
  3615  // Update writes all fields of the p to the heap object referenced by ref.
  3616  func (p *WindowPostMessageOptions) Update(ref js.Ref) {
  3617  	bindings.WindowPostMessageOptionsJSLoad(
  3618  		js.Pointer(p), js.False, ref,
  3619  	)
  3620  }
  3621  
  3622  // FreeMembers frees fields with heap reference, if recursive is true
  3623  // free all heap references reachable from p.
  3624  func (p *WindowPostMessageOptions) FreeMembers(recursive bool) {
  3625  	js.Free(
  3626  		p.TargetOrigin.Ref(),
  3627  		p.Transfer.Ref(),
  3628  	)
  3629  	p.TargetOrigin = p.TargetOrigin.FromRef(js.Undefined)
  3630  	p.Transfer = p.Transfer.FromRef(js.Undefined)
  3631  }
  3632  
  3633  type MediaQueryList struct {
  3634  	EventTarget
  3635  }
  3636  
  3637  func (this MediaQueryList) Once() MediaQueryList {
  3638  	this.ref.Once()
  3639  	return this
  3640  }
  3641  
  3642  func (this MediaQueryList) Ref() js.Ref {
  3643  	return this.EventTarget.Ref()
  3644  }
  3645  
  3646  func (this MediaQueryList) FromRef(ref js.Ref) MediaQueryList {
  3647  	this.EventTarget = this.EventTarget.FromRef(ref)
  3648  	return this
  3649  }
  3650  
  3651  func (this MediaQueryList) Free() {
  3652  	this.ref.Free()
  3653  }
  3654  
  3655  // Media returns the value of property "MediaQueryList.media".
  3656  //
  3657  // It returns ok=false if there is no such property.
  3658  func (this MediaQueryList) Media() (ret js.String, ok bool) {
  3659  	ok = js.True == bindings.GetMediaQueryListMedia(
  3660  		this.ref, js.Pointer(&ret),
  3661  	)
  3662  	return
  3663  }
  3664  
  3665  // Matches returns the value of property "MediaQueryList.matches".
  3666  //
  3667  // It returns ok=false if there is no such property.
  3668  func (this MediaQueryList) Matches() (ret bool, ok bool) {
  3669  	ok = js.True == bindings.GetMediaQueryListMatches(
  3670  		this.ref, js.Pointer(&ret),
  3671  	)
  3672  	return
  3673  }
  3674  
  3675  // HasFuncAddListener returns true if the method "MediaQueryList.addListener" exists.
  3676  func (this MediaQueryList) HasFuncAddListener() bool {
  3677  	return js.True == bindings.HasFuncMediaQueryListAddListener(
  3678  		this.ref,
  3679  	)
  3680  }
  3681  
  3682  // FuncAddListener returns the method "MediaQueryList.addListener".
  3683  func (this MediaQueryList) FuncAddListener() (fn js.Func[func(callback js.Func[func(event Event)])]) {
  3684  	bindings.FuncMediaQueryListAddListener(
  3685  		this.ref, js.Pointer(&fn),
  3686  	)
  3687  	return
  3688  }
  3689  
  3690  // AddListener calls the method "MediaQueryList.addListener".
  3691  func (this MediaQueryList) AddListener(callback js.Func[func(event Event)]) (ret js.Void) {
  3692  	bindings.CallMediaQueryListAddListener(
  3693  		this.ref, js.Pointer(&ret),
  3694  		callback.Ref(),
  3695  	)
  3696  
  3697  	return
  3698  }
  3699  
  3700  // TryAddListener calls the method "MediaQueryList.addListener"
  3701  // in a try/catch block and returns (_, err, ok = false) when it went through
  3702  // the catch clause.
  3703  func (this MediaQueryList) TryAddListener(callback js.Func[func(event Event)]) (ret js.Void, exception js.Any, ok bool) {
  3704  	ok = js.True == bindings.TryMediaQueryListAddListener(
  3705  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3706  		callback.Ref(),
  3707  	)
  3708  
  3709  	return
  3710  }
  3711  
  3712  // HasFuncRemoveListener returns true if the method "MediaQueryList.removeListener" exists.
  3713  func (this MediaQueryList) HasFuncRemoveListener() bool {
  3714  	return js.True == bindings.HasFuncMediaQueryListRemoveListener(
  3715  		this.ref,
  3716  	)
  3717  }
  3718  
  3719  // FuncRemoveListener returns the method "MediaQueryList.removeListener".
  3720  func (this MediaQueryList) FuncRemoveListener() (fn js.Func[func(callback js.Func[func(event Event)])]) {
  3721  	bindings.FuncMediaQueryListRemoveListener(
  3722  		this.ref, js.Pointer(&fn),
  3723  	)
  3724  	return
  3725  }
  3726  
  3727  // RemoveListener calls the method "MediaQueryList.removeListener".
  3728  func (this MediaQueryList) RemoveListener(callback js.Func[func(event Event)]) (ret js.Void) {
  3729  	bindings.CallMediaQueryListRemoveListener(
  3730  		this.ref, js.Pointer(&ret),
  3731  		callback.Ref(),
  3732  	)
  3733  
  3734  	return
  3735  }
  3736  
  3737  // TryRemoveListener calls the method "MediaQueryList.removeListener"
  3738  // in a try/catch block and returns (_, err, ok = false) when it went through
  3739  // the catch clause.
  3740  func (this MediaQueryList) TryRemoveListener(callback js.Func[func(event Event)]) (ret js.Void, exception js.Any, ok bool) {
  3741  	ok = js.True == bindings.TryMediaQueryListRemoveListener(
  3742  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3743  		callback.Ref(),
  3744  	)
  3745  
  3746  	return
  3747  }