github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis39_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/ffi/js"
     8  	"github.com/primecitizens/pcz/std/plat/js/web/bindings"
     9  )
    10  
    11  type IDBRequestReadyState uint32
    12  
    13  const (
    14  	_ IDBRequestReadyState = iota
    15  
    16  	IDBRequestReadyState_PENDING
    17  	IDBRequestReadyState_DONE
    18  )
    19  
    20  func (IDBRequestReadyState) FromRef(str js.Ref) IDBRequestReadyState {
    21  	return IDBRequestReadyState(bindings.ConstOfIDBRequestReadyState(str))
    22  }
    23  
    24  func (x IDBRequestReadyState) String() (string, bool) {
    25  	switch x {
    26  	case IDBRequestReadyState_PENDING:
    27  		return "pending", true
    28  	case IDBRequestReadyState_DONE:
    29  		return "done", true
    30  	default:
    31  		return "", false
    32  	}
    33  }
    34  
    35  type IDBRequest struct {
    36  	EventTarget
    37  }
    38  
    39  func (this IDBRequest) Once() IDBRequest {
    40  	this.ref.Once()
    41  	return this
    42  }
    43  
    44  func (this IDBRequest) Ref() js.Ref {
    45  	return this.EventTarget.Ref()
    46  }
    47  
    48  func (this IDBRequest) FromRef(ref js.Ref) IDBRequest {
    49  	this.EventTarget = this.EventTarget.FromRef(ref)
    50  	return this
    51  }
    52  
    53  func (this IDBRequest) Free() {
    54  	this.ref.Free()
    55  }
    56  
    57  // Result returns the value of property "IDBRequest.result".
    58  //
    59  // It returns ok=false if there is no such property.
    60  func (this IDBRequest) Result() (ret js.Any, ok bool) {
    61  	ok = js.True == bindings.GetIDBRequestResult(
    62  		this.ref, js.Pointer(&ret),
    63  	)
    64  	return
    65  }
    66  
    67  // Error returns the value of property "IDBRequest.error".
    68  //
    69  // It returns ok=false if there is no such property.
    70  func (this IDBRequest) Error() (ret DOMException, ok bool) {
    71  	ok = js.True == bindings.GetIDBRequestError(
    72  		this.ref, js.Pointer(&ret),
    73  	)
    74  	return
    75  }
    76  
    77  // Source returns the value of property "IDBRequest.source".
    78  //
    79  // It returns ok=false if there is no such property.
    80  func (this IDBRequest) Source() (ret OneOf_IDBObjectStore_IDBIndex_IDBCursor, ok bool) {
    81  	ok = js.True == bindings.GetIDBRequestSource(
    82  		this.ref, js.Pointer(&ret),
    83  	)
    84  	return
    85  }
    86  
    87  // Transaction returns the value of property "IDBRequest.transaction".
    88  //
    89  // It returns ok=false if there is no such property.
    90  func (this IDBRequest) Transaction() (ret IDBTransaction, ok bool) {
    91  	ok = js.True == bindings.GetIDBRequestTransaction(
    92  		this.ref, js.Pointer(&ret),
    93  	)
    94  	return
    95  }
    96  
    97  // ReadyState returns the value of property "IDBRequest.readyState".
    98  //
    99  // It returns ok=false if there is no such property.
   100  func (this IDBRequest) ReadyState() (ret IDBRequestReadyState, ok bool) {
   101  	ok = js.True == bindings.GetIDBRequestReadyState(
   102  		this.ref, js.Pointer(&ret),
   103  	)
   104  	return
   105  }
   106  
   107  type OneOf_IDBObjectStore_IDBIndex struct {
   108  	ref js.Ref
   109  }
   110  
   111  func (x OneOf_IDBObjectStore_IDBIndex) Ref() js.Ref {
   112  	return x.ref
   113  }
   114  
   115  func (x OneOf_IDBObjectStore_IDBIndex) Free() {
   116  	x.ref.Free()
   117  }
   118  
   119  func (x OneOf_IDBObjectStore_IDBIndex) FromRef(ref js.Ref) OneOf_IDBObjectStore_IDBIndex {
   120  	return OneOf_IDBObjectStore_IDBIndex{
   121  		ref: ref,
   122  	}
   123  }
   124  
   125  func (x OneOf_IDBObjectStore_IDBIndex) IDBObjectStore() IDBObjectStore {
   126  	return IDBObjectStore{}.FromRef(x.ref)
   127  }
   128  
   129  func (x OneOf_IDBObjectStore_IDBIndex) IDBIndex() IDBIndex {
   130  	return IDBIndex{}.FromRef(x.ref)
   131  }
   132  
   133  type IDBCursor struct {
   134  	ref js.Ref
   135  }
   136  
   137  func (this IDBCursor) Once() IDBCursor {
   138  	this.ref.Once()
   139  	return this
   140  }
   141  
   142  func (this IDBCursor) Ref() js.Ref {
   143  	return this.ref
   144  }
   145  
   146  func (this IDBCursor) FromRef(ref js.Ref) IDBCursor {
   147  	this.ref = ref
   148  	return this
   149  }
   150  
   151  func (this IDBCursor) Free() {
   152  	this.ref.Free()
   153  }
   154  
   155  // Source returns the value of property "IDBCursor.source".
   156  //
   157  // It returns ok=false if there is no such property.
   158  func (this IDBCursor) Source() (ret OneOf_IDBObjectStore_IDBIndex, ok bool) {
   159  	ok = js.True == bindings.GetIDBCursorSource(
   160  		this.ref, js.Pointer(&ret),
   161  	)
   162  	return
   163  }
   164  
   165  // Direction returns the value of property "IDBCursor.direction".
   166  //
   167  // It returns ok=false if there is no such property.
   168  func (this IDBCursor) Direction() (ret IDBCursorDirection, ok bool) {
   169  	ok = js.True == bindings.GetIDBCursorDirection(
   170  		this.ref, js.Pointer(&ret),
   171  	)
   172  	return
   173  }
   174  
   175  // Key returns the value of property "IDBCursor.key".
   176  //
   177  // It returns ok=false if there is no such property.
   178  func (this IDBCursor) Key() (ret js.Any, ok bool) {
   179  	ok = js.True == bindings.GetIDBCursorKey(
   180  		this.ref, js.Pointer(&ret),
   181  	)
   182  	return
   183  }
   184  
   185  // PrimaryKey returns the value of property "IDBCursor.primaryKey".
   186  //
   187  // It returns ok=false if there is no such property.
   188  func (this IDBCursor) PrimaryKey() (ret js.Any, ok bool) {
   189  	ok = js.True == bindings.GetIDBCursorPrimaryKey(
   190  		this.ref, js.Pointer(&ret),
   191  	)
   192  	return
   193  }
   194  
   195  // Request returns the value of property "IDBCursor.request".
   196  //
   197  // It returns ok=false if there is no such property.
   198  func (this IDBCursor) Request() (ret IDBRequest, ok bool) {
   199  	ok = js.True == bindings.GetIDBCursorRequest(
   200  		this.ref, js.Pointer(&ret),
   201  	)
   202  	return
   203  }
   204  
   205  // HasFuncAdvance returns true if the method "IDBCursor.advance" exists.
   206  func (this IDBCursor) HasFuncAdvance() bool {
   207  	return js.True == bindings.HasFuncIDBCursorAdvance(
   208  		this.ref,
   209  	)
   210  }
   211  
   212  // FuncAdvance returns the method "IDBCursor.advance".
   213  func (this IDBCursor) FuncAdvance() (fn js.Func[func(count uint32)]) {
   214  	bindings.FuncIDBCursorAdvance(
   215  		this.ref, js.Pointer(&fn),
   216  	)
   217  	return
   218  }
   219  
   220  // Advance calls the method "IDBCursor.advance".
   221  func (this IDBCursor) Advance(count uint32) (ret js.Void) {
   222  	bindings.CallIDBCursorAdvance(
   223  		this.ref, js.Pointer(&ret),
   224  		uint32(count),
   225  	)
   226  
   227  	return
   228  }
   229  
   230  // TryAdvance calls the method "IDBCursor.advance"
   231  // in a try/catch block and returns (_, err, ok = false) when it went through
   232  // the catch clause.
   233  func (this IDBCursor) TryAdvance(count uint32) (ret js.Void, exception js.Any, ok bool) {
   234  	ok = js.True == bindings.TryIDBCursorAdvance(
   235  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   236  		uint32(count),
   237  	)
   238  
   239  	return
   240  }
   241  
   242  // HasFuncContinue returns true if the method "IDBCursor.continue" exists.
   243  func (this IDBCursor) HasFuncContinue() bool {
   244  	return js.True == bindings.HasFuncIDBCursorContinue(
   245  		this.ref,
   246  	)
   247  }
   248  
   249  // FuncContinue returns the method "IDBCursor.continue".
   250  func (this IDBCursor) FuncContinue() (fn js.Func[func(key js.Any)]) {
   251  	bindings.FuncIDBCursorContinue(
   252  		this.ref, js.Pointer(&fn),
   253  	)
   254  	return
   255  }
   256  
   257  // Continue calls the method "IDBCursor.continue".
   258  func (this IDBCursor) Continue(key js.Any) (ret js.Void) {
   259  	bindings.CallIDBCursorContinue(
   260  		this.ref, js.Pointer(&ret),
   261  		key.Ref(),
   262  	)
   263  
   264  	return
   265  }
   266  
   267  // TryContinue calls the method "IDBCursor.continue"
   268  // in a try/catch block and returns (_, err, ok = false) when it went through
   269  // the catch clause.
   270  func (this IDBCursor) TryContinue(key js.Any) (ret js.Void, exception js.Any, ok bool) {
   271  	ok = js.True == bindings.TryIDBCursorContinue(
   272  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   273  		key.Ref(),
   274  	)
   275  
   276  	return
   277  }
   278  
   279  // HasFuncContinue1 returns true if the method "IDBCursor.continue" exists.
   280  func (this IDBCursor) HasFuncContinue1() bool {
   281  	return js.True == bindings.HasFuncIDBCursorContinue1(
   282  		this.ref,
   283  	)
   284  }
   285  
   286  // FuncContinue1 returns the method "IDBCursor.continue".
   287  func (this IDBCursor) FuncContinue1() (fn js.Func[func()]) {
   288  	bindings.FuncIDBCursorContinue1(
   289  		this.ref, js.Pointer(&fn),
   290  	)
   291  	return
   292  }
   293  
   294  // Continue1 calls the method "IDBCursor.continue".
   295  func (this IDBCursor) Continue1() (ret js.Void) {
   296  	bindings.CallIDBCursorContinue1(
   297  		this.ref, js.Pointer(&ret),
   298  	)
   299  
   300  	return
   301  }
   302  
   303  // TryContinue1 calls the method "IDBCursor.continue"
   304  // in a try/catch block and returns (_, err, ok = false) when it went through
   305  // the catch clause.
   306  func (this IDBCursor) TryContinue1() (ret js.Void, exception js.Any, ok bool) {
   307  	ok = js.True == bindings.TryIDBCursorContinue1(
   308  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   309  	)
   310  
   311  	return
   312  }
   313  
   314  // HasFuncContinuePrimaryKey returns true if the method "IDBCursor.continuePrimaryKey" exists.
   315  func (this IDBCursor) HasFuncContinuePrimaryKey() bool {
   316  	return js.True == bindings.HasFuncIDBCursorContinuePrimaryKey(
   317  		this.ref,
   318  	)
   319  }
   320  
   321  // FuncContinuePrimaryKey returns the method "IDBCursor.continuePrimaryKey".
   322  func (this IDBCursor) FuncContinuePrimaryKey() (fn js.Func[func(key js.Any, primaryKey js.Any)]) {
   323  	bindings.FuncIDBCursorContinuePrimaryKey(
   324  		this.ref, js.Pointer(&fn),
   325  	)
   326  	return
   327  }
   328  
   329  // ContinuePrimaryKey calls the method "IDBCursor.continuePrimaryKey".
   330  func (this IDBCursor) ContinuePrimaryKey(key js.Any, primaryKey js.Any) (ret js.Void) {
   331  	bindings.CallIDBCursorContinuePrimaryKey(
   332  		this.ref, js.Pointer(&ret),
   333  		key.Ref(),
   334  		primaryKey.Ref(),
   335  	)
   336  
   337  	return
   338  }
   339  
   340  // TryContinuePrimaryKey calls the method "IDBCursor.continuePrimaryKey"
   341  // in a try/catch block and returns (_, err, ok = false) when it went through
   342  // the catch clause.
   343  func (this IDBCursor) TryContinuePrimaryKey(key js.Any, primaryKey js.Any) (ret js.Void, exception js.Any, ok bool) {
   344  	ok = js.True == bindings.TryIDBCursorContinuePrimaryKey(
   345  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   346  		key.Ref(),
   347  		primaryKey.Ref(),
   348  	)
   349  
   350  	return
   351  }
   352  
   353  // HasFuncUpdate returns true if the method "IDBCursor.update" exists.
   354  func (this IDBCursor) HasFuncUpdate() bool {
   355  	return js.True == bindings.HasFuncIDBCursorUpdate(
   356  		this.ref,
   357  	)
   358  }
   359  
   360  // FuncUpdate returns the method "IDBCursor.update".
   361  func (this IDBCursor) FuncUpdate() (fn js.Func[func(value js.Any) IDBRequest]) {
   362  	bindings.FuncIDBCursorUpdate(
   363  		this.ref, js.Pointer(&fn),
   364  	)
   365  	return
   366  }
   367  
   368  // Update calls the method "IDBCursor.update".
   369  func (this IDBCursor) Update(value js.Any) (ret IDBRequest) {
   370  	bindings.CallIDBCursorUpdate(
   371  		this.ref, js.Pointer(&ret),
   372  		value.Ref(),
   373  	)
   374  
   375  	return
   376  }
   377  
   378  // TryUpdate calls the method "IDBCursor.update"
   379  // in a try/catch block and returns (_, err, ok = false) when it went through
   380  // the catch clause.
   381  func (this IDBCursor) TryUpdate(value js.Any) (ret IDBRequest, exception js.Any, ok bool) {
   382  	ok = js.True == bindings.TryIDBCursorUpdate(
   383  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   384  		value.Ref(),
   385  	)
   386  
   387  	return
   388  }
   389  
   390  // HasFuncDelete returns true if the method "IDBCursor.delete" exists.
   391  func (this IDBCursor) HasFuncDelete() bool {
   392  	return js.True == bindings.HasFuncIDBCursorDelete(
   393  		this.ref,
   394  	)
   395  }
   396  
   397  // FuncDelete returns the method "IDBCursor.delete".
   398  func (this IDBCursor) FuncDelete() (fn js.Func[func() IDBRequest]) {
   399  	bindings.FuncIDBCursorDelete(
   400  		this.ref, js.Pointer(&fn),
   401  	)
   402  	return
   403  }
   404  
   405  // Delete calls the method "IDBCursor.delete".
   406  func (this IDBCursor) Delete() (ret IDBRequest) {
   407  	bindings.CallIDBCursorDelete(
   408  		this.ref, js.Pointer(&ret),
   409  	)
   410  
   411  	return
   412  }
   413  
   414  // TryDelete calls the method "IDBCursor.delete"
   415  // in a try/catch block and returns (_, err, ok = false) when it went through
   416  // the catch clause.
   417  func (this IDBCursor) TryDelete() (ret IDBRequest, exception js.Any, ok bool) {
   418  	ok = js.True == bindings.TryIDBCursorDelete(
   419  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   420  	)
   421  
   422  	return
   423  }
   424  
   425  type IDBCursorWithValue struct {
   426  	IDBCursor
   427  }
   428  
   429  func (this IDBCursorWithValue) Once() IDBCursorWithValue {
   430  	this.ref.Once()
   431  	return this
   432  }
   433  
   434  func (this IDBCursorWithValue) Ref() js.Ref {
   435  	return this.IDBCursor.Ref()
   436  }
   437  
   438  func (this IDBCursorWithValue) FromRef(ref js.Ref) IDBCursorWithValue {
   439  	this.IDBCursor = this.IDBCursor.FromRef(ref)
   440  	return this
   441  }
   442  
   443  func (this IDBCursorWithValue) Free() {
   444  	this.ref.Free()
   445  }
   446  
   447  // Value returns the value of property "IDBCursorWithValue.value".
   448  //
   449  // It returns ok=false if there is no such property.
   450  func (this IDBCursorWithValue) Value() (ret js.Any, ok bool) {
   451  	ok = js.True == bindings.GetIDBCursorWithValueValue(
   452  		this.ref, js.Pointer(&ret),
   453  	)
   454  	return
   455  }
   456  
   457  type IDBKeyRange struct {
   458  	ref js.Ref
   459  }
   460  
   461  func (this IDBKeyRange) Once() IDBKeyRange {
   462  	this.ref.Once()
   463  	return this
   464  }
   465  
   466  func (this IDBKeyRange) Ref() js.Ref {
   467  	return this.ref
   468  }
   469  
   470  func (this IDBKeyRange) FromRef(ref js.Ref) IDBKeyRange {
   471  	this.ref = ref
   472  	return this
   473  }
   474  
   475  func (this IDBKeyRange) Free() {
   476  	this.ref.Free()
   477  }
   478  
   479  // Lower returns the value of property "IDBKeyRange.lower".
   480  //
   481  // It returns ok=false if there is no such property.
   482  func (this IDBKeyRange) Lower() (ret js.Any, ok bool) {
   483  	ok = js.True == bindings.GetIDBKeyRangeLower(
   484  		this.ref, js.Pointer(&ret),
   485  	)
   486  	return
   487  }
   488  
   489  // Upper returns the value of property "IDBKeyRange.upper".
   490  //
   491  // It returns ok=false if there is no such property.
   492  func (this IDBKeyRange) Upper() (ret js.Any, ok bool) {
   493  	ok = js.True == bindings.GetIDBKeyRangeUpper(
   494  		this.ref, js.Pointer(&ret),
   495  	)
   496  	return
   497  }
   498  
   499  // LowerOpen returns the value of property "IDBKeyRange.lowerOpen".
   500  //
   501  // It returns ok=false if there is no such property.
   502  func (this IDBKeyRange) LowerOpen() (ret bool, ok bool) {
   503  	ok = js.True == bindings.GetIDBKeyRangeLowerOpen(
   504  		this.ref, js.Pointer(&ret),
   505  	)
   506  	return
   507  }
   508  
   509  // UpperOpen returns the value of property "IDBKeyRange.upperOpen".
   510  //
   511  // It returns ok=false if there is no such property.
   512  func (this IDBKeyRange) UpperOpen() (ret bool, ok bool) {
   513  	ok = js.True == bindings.GetIDBKeyRangeUpperOpen(
   514  		this.ref, js.Pointer(&ret),
   515  	)
   516  	return
   517  }
   518  
   519  // HasFuncOnly returns true if the static method "IDBKeyRange.only" exists.
   520  func (this IDBKeyRange) HasFuncOnly() bool {
   521  	return js.True == bindings.HasFuncIDBKeyRangeOnly(
   522  		this.ref,
   523  	)
   524  }
   525  
   526  // FuncOnly returns the static method "IDBKeyRange.only".
   527  func (this IDBKeyRange) FuncOnly() (fn js.Func[func(value js.Any) IDBKeyRange]) {
   528  	bindings.FuncIDBKeyRangeOnly(
   529  		this.ref, js.Pointer(&fn),
   530  	)
   531  	return
   532  }
   533  
   534  // Only calls the static method "IDBKeyRange.only".
   535  func (this IDBKeyRange) Only(value js.Any) (ret IDBKeyRange) {
   536  	bindings.CallIDBKeyRangeOnly(
   537  		this.ref, js.Pointer(&ret),
   538  		value.Ref(),
   539  	)
   540  
   541  	return
   542  }
   543  
   544  // TryOnly calls the static method "IDBKeyRange.only"
   545  // in a try/catch block and returns (_, err, ok = false) when it went through
   546  // the catch clause.
   547  func (this IDBKeyRange) TryOnly(value js.Any) (ret IDBKeyRange, exception js.Any, ok bool) {
   548  	ok = js.True == bindings.TryIDBKeyRangeOnly(
   549  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   550  		value.Ref(),
   551  	)
   552  
   553  	return
   554  }
   555  
   556  // HasFuncLowerBound returns true if the static method "IDBKeyRange.lowerBound" exists.
   557  func (this IDBKeyRange) HasFuncLowerBound() bool {
   558  	return js.True == bindings.HasFuncIDBKeyRangeLowerBound(
   559  		this.ref,
   560  	)
   561  }
   562  
   563  // FuncLowerBound returns the static method "IDBKeyRange.lowerBound".
   564  func (this IDBKeyRange) FuncLowerBound() (fn js.Func[func(lower js.Any, open bool) IDBKeyRange]) {
   565  	bindings.FuncIDBKeyRangeLowerBound(
   566  		this.ref, js.Pointer(&fn),
   567  	)
   568  	return
   569  }
   570  
   571  // LowerBound calls the static method "IDBKeyRange.lowerBound".
   572  func (this IDBKeyRange) LowerBound(lower js.Any, open bool) (ret IDBKeyRange) {
   573  	bindings.CallIDBKeyRangeLowerBound(
   574  		this.ref, js.Pointer(&ret),
   575  		lower.Ref(),
   576  		js.Bool(bool(open)),
   577  	)
   578  
   579  	return
   580  }
   581  
   582  // TryLowerBound calls the static method "IDBKeyRange.lowerBound"
   583  // in a try/catch block and returns (_, err, ok = false) when it went through
   584  // the catch clause.
   585  func (this IDBKeyRange) TryLowerBound(lower js.Any, open bool) (ret IDBKeyRange, exception js.Any, ok bool) {
   586  	ok = js.True == bindings.TryIDBKeyRangeLowerBound(
   587  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   588  		lower.Ref(),
   589  		js.Bool(bool(open)),
   590  	)
   591  
   592  	return
   593  }
   594  
   595  // HasFuncLowerBound1 returns true if the static method "IDBKeyRange.lowerBound" exists.
   596  func (this IDBKeyRange) HasFuncLowerBound1() bool {
   597  	return js.True == bindings.HasFuncIDBKeyRangeLowerBound1(
   598  		this.ref,
   599  	)
   600  }
   601  
   602  // FuncLowerBound1 returns the static method "IDBKeyRange.lowerBound".
   603  func (this IDBKeyRange) FuncLowerBound1() (fn js.Func[func(lower js.Any) IDBKeyRange]) {
   604  	bindings.FuncIDBKeyRangeLowerBound1(
   605  		this.ref, js.Pointer(&fn),
   606  	)
   607  	return
   608  }
   609  
   610  // LowerBound1 calls the static method "IDBKeyRange.lowerBound".
   611  func (this IDBKeyRange) LowerBound1(lower js.Any) (ret IDBKeyRange) {
   612  	bindings.CallIDBKeyRangeLowerBound1(
   613  		this.ref, js.Pointer(&ret),
   614  		lower.Ref(),
   615  	)
   616  
   617  	return
   618  }
   619  
   620  // TryLowerBound1 calls the static method "IDBKeyRange.lowerBound"
   621  // in a try/catch block and returns (_, err, ok = false) when it went through
   622  // the catch clause.
   623  func (this IDBKeyRange) TryLowerBound1(lower js.Any) (ret IDBKeyRange, exception js.Any, ok bool) {
   624  	ok = js.True == bindings.TryIDBKeyRangeLowerBound1(
   625  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   626  		lower.Ref(),
   627  	)
   628  
   629  	return
   630  }
   631  
   632  // HasFuncUpperBound returns true if the static method "IDBKeyRange.upperBound" exists.
   633  func (this IDBKeyRange) HasFuncUpperBound() bool {
   634  	return js.True == bindings.HasFuncIDBKeyRangeUpperBound(
   635  		this.ref,
   636  	)
   637  }
   638  
   639  // FuncUpperBound returns the static method "IDBKeyRange.upperBound".
   640  func (this IDBKeyRange) FuncUpperBound() (fn js.Func[func(upper js.Any, open bool) IDBKeyRange]) {
   641  	bindings.FuncIDBKeyRangeUpperBound(
   642  		this.ref, js.Pointer(&fn),
   643  	)
   644  	return
   645  }
   646  
   647  // UpperBound calls the static method "IDBKeyRange.upperBound".
   648  func (this IDBKeyRange) UpperBound(upper js.Any, open bool) (ret IDBKeyRange) {
   649  	bindings.CallIDBKeyRangeUpperBound(
   650  		this.ref, js.Pointer(&ret),
   651  		upper.Ref(),
   652  		js.Bool(bool(open)),
   653  	)
   654  
   655  	return
   656  }
   657  
   658  // TryUpperBound calls the static method "IDBKeyRange.upperBound"
   659  // in a try/catch block and returns (_, err, ok = false) when it went through
   660  // the catch clause.
   661  func (this IDBKeyRange) TryUpperBound(upper js.Any, open bool) (ret IDBKeyRange, exception js.Any, ok bool) {
   662  	ok = js.True == bindings.TryIDBKeyRangeUpperBound(
   663  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   664  		upper.Ref(),
   665  		js.Bool(bool(open)),
   666  	)
   667  
   668  	return
   669  }
   670  
   671  // HasFuncUpperBound1 returns true if the static method "IDBKeyRange.upperBound" exists.
   672  func (this IDBKeyRange) HasFuncUpperBound1() bool {
   673  	return js.True == bindings.HasFuncIDBKeyRangeUpperBound1(
   674  		this.ref,
   675  	)
   676  }
   677  
   678  // FuncUpperBound1 returns the static method "IDBKeyRange.upperBound".
   679  func (this IDBKeyRange) FuncUpperBound1() (fn js.Func[func(upper js.Any) IDBKeyRange]) {
   680  	bindings.FuncIDBKeyRangeUpperBound1(
   681  		this.ref, js.Pointer(&fn),
   682  	)
   683  	return
   684  }
   685  
   686  // UpperBound1 calls the static method "IDBKeyRange.upperBound".
   687  func (this IDBKeyRange) UpperBound1(upper js.Any) (ret IDBKeyRange) {
   688  	bindings.CallIDBKeyRangeUpperBound1(
   689  		this.ref, js.Pointer(&ret),
   690  		upper.Ref(),
   691  	)
   692  
   693  	return
   694  }
   695  
   696  // TryUpperBound1 calls the static method "IDBKeyRange.upperBound"
   697  // in a try/catch block and returns (_, err, ok = false) when it went through
   698  // the catch clause.
   699  func (this IDBKeyRange) TryUpperBound1(upper js.Any) (ret IDBKeyRange, exception js.Any, ok bool) {
   700  	ok = js.True == bindings.TryIDBKeyRangeUpperBound1(
   701  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   702  		upper.Ref(),
   703  	)
   704  
   705  	return
   706  }
   707  
   708  // HasFuncBound returns true if the static method "IDBKeyRange.bound" exists.
   709  func (this IDBKeyRange) HasFuncBound() bool {
   710  	return js.True == bindings.HasFuncIDBKeyRangeBound(
   711  		this.ref,
   712  	)
   713  }
   714  
   715  // FuncBound returns the static method "IDBKeyRange.bound".
   716  func (this IDBKeyRange) FuncBound() (fn js.Func[func(lower js.Any, upper js.Any, lowerOpen bool, upperOpen bool) IDBKeyRange]) {
   717  	bindings.FuncIDBKeyRangeBound(
   718  		this.ref, js.Pointer(&fn),
   719  	)
   720  	return
   721  }
   722  
   723  // Bound calls the static method "IDBKeyRange.bound".
   724  func (this IDBKeyRange) Bound(lower js.Any, upper js.Any, lowerOpen bool, upperOpen bool) (ret IDBKeyRange) {
   725  	bindings.CallIDBKeyRangeBound(
   726  		this.ref, js.Pointer(&ret),
   727  		lower.Ref(),
   728  		upper.Ref(),
   729  		js.Bool(bool(lowerOpen)),
   730  		js.Bool(bool(upperOpen)),
   731  	)
   732  
   733  	return
   734  }
   735  
   736  // TryBound calls the static method "IDBKeyRange.bound"
   737  // in a try/catch block and returns (_, err, ok = false) when it went through
   738  // the catch clause.
   739  func (this IDBKeyRange) TryBound(lower js.Any, upper js.Any, lowerOpen bool, upperOpen bool) (ret IDBKeyRange, exception js.Any, ok bool) {
   740  	ok = js.True == bindings.TryIDBKeyRangeBound(
   741  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   742  		lower.Ref(),
   743  		upper.Ref(),
   744  		js.Bool(bool(lowerOpen)),
   745  		js.Bool(bool(upperOpen)),
   746  	)
   747  
   748  	return
   749  }
   750  
   751  // HasFuncBound1 returns true if the static method "IDBKeyRange.bound" exists.
   752  func (this IDBKeyRange) HasFuncBound1() bool {
   753  	return js.True == bindings.HasFuncIDBKeyRangeBound1(
   754  		this.ref,
   755  	)
   756  }
   757  
   758  // FuncBound1 returns the static method "IDBKeyRange.bound".
   759  func (this IDBKeyRange) FuncBound1() (fn js.Func[func(lower js.Any, upper js.Any, lowerOpen bool) IDBKeyRange]) {
   760  	bindings.FuncIDBKeyRangeBound1(
   761  		this.ref, js.Pointer(&fn),
   762  	)
   763  	return
   764  }
   765  
   766  // Bound1 calls the static method "IDBKeyRange.bound".
   767  func (this IDBKeyRange) Bound1(lower js.Any, upper js.Any, lowerOpen bool) (ret IDBKeyRange) {
   768  	bindings.CallIDBKeyRangeBound1(
   769  		this.ref, js.Pointer(&ret),
   770  		lower.Ref(),
   771  		upper.Ref(),
   772  		js.Bool(bool(lowerOpen)),
   773  	)
   774  
   775  	return
   776  }
   777  
   778  // TryBound1 calls the static method "IDBKeyRange.bound"
   779  // in a try/catch block and returns (_, err, ok = false) when it went through
   780  // the catch clause.
   781  func (this IDBKeyRange) TryBound1(lower js.Any, upper js.Any, lowerOpen bool) (ret IDBKeyRange, exception js.Any, ok bool) {
   782  	ok = js.True == bindings.TryIDBKeyRangeBound1(
   783  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   784  		lower.Ref(),
   785  		upper.Ref(),
   786  		js.Bool(bool(lowerOpen)),
   787  	)
   788  
   789  	return
   790  }
   791  
   792  // HasFuncBound2 returns true if the static method "IDBKeyRange.bound" exists.
   793  func (this IDBKeyRange) HasFuncBound2() bool {
   794  	return js.True == bindings.HasFuncIDBKeyRangeBound2(
   795  		this.ref,
   796  	)
   797  }
   798  
   799  // FuncBound2 returns the static method "IDBKeyRange.bound".
   800  func (this IDBKeyRange) FuncBound2() (fn js.Func[func(lower js.Any, upper js.Any) IDBKeyRange]) {
   801  	bindings.FuncIDBKeyRangeBound2(
   802  		this.ref, js.Pointer(&fn),
   803  	)
   804  	return
   805  }
   806  
   807  // Bound2 calls the static method "IDBKeyRange.bound".
   808  func (this IDBKeyRange) Bound2(lower js.Any, upper js.Any) (ret IDBKeyRange) {
   809  	bindings.CallIDBKeyRangeBound2(
   810  		this.ref, js.Pointer(&ret),
   811  		lower.Ref(),
   812  		upper.Ref(),
   813  	)
   814  
   815  	return
   816  }
   817  
   818  // TryBound2 calls the static method "IDBKeyRange.bound"
   819  // in a try/catch block and returns (_, err, ok = false) when it went through
   820  // the catch clause.
   821  func (this IDBKeyRange) TryBound2(lower js.Any, upper js.Any) (ret IDBKeyRange, exception js.Any, ok bool) {
   822  	ok = js.True == bindings.TryIDBKeyRangeBound2(
   823  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   824  		lower.Ref(),
   825  		upper.Ref(),
   826  	)
   827  
   828  	return
   829  }
   830  
   831  // HasFuncIncludes returns true if the method "IDBKeyRange.includes" exists.
   832  func (this IDBKeyRange) HasFuncIncludes() bool {
   833  	return js.True == bindings.HasFuncIDBKeyRangeIncludes(
   834  		this.ref,
   835  	)
   836  }
   837  
   838  // FuncIncludes returns the method "IDBKeyRange.includes".
   839  func (this IDBKeyRange) FuncIncludes() (fn js.Func[func(key js.Any) bool]) {
   840  	bindings.FuncIDBKeyRangeIncludes(
   841  		this.ref, js.Pointer(&fn),
   842  	)
   843  	return
   844  }
   845  
   846  // Includes calls the method "IDBKeyRange.includes".
   847  func (this IDBKeyRange) Includes(key js.Any) (ret bool) {
   848  	bindings.CallIDBKeyRangeIncludes(
   849  		this.ref, js.Pointer(&ret),
   850  		key.Ref(),
   851  	)
   852  
   853  	return
   854  }
   855  
   856  // TryIncludes calls the method "IDBKeyRange.includes"
   857  // in a try/catch block and returns (_, err, ok = false) when it went through
   858  // the catch clause.
   859  func (this IDBKeyRange) TryIncludes(key js.Any) (ret bool, exception js.Any, ok bool) {
   860  	ok = js.True == bindings.TryIDBKeyRangeIncludes(
   861  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   862  		key.Ref(),
   863  	)
   864  
   865  	return
   866  }
   867  
   868  type IDBVersionChangeEventInit struct {
   869  	// OldVersion is "IDBVersionChangeEventInit.oldVersion"
   870  	//
   871  	// Optional, defaults to 0.
   872  	//
   873  	// NOTE: FFI_USE_OldVersion MUST be set to true to make this field effective.
   874  	OldVersion uint64
   875  	// NewVersion is "IDBVersionChangeEventInit.newVersion"
   876  	//
   877  	// Optional, defaults to null.
   878  	//
   879  	// NOTE: FFI_USE_NewVersion MUST be set to true to make this field effective.
   880  	NewVersion uint64
   881  	// Bubbles is "IDBVersionChangeEventInit.bubbles"
   882  	//
   883  	// Optional, defaults to false.
   884  	//
   885  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
   886  	Bubbles bool
   887  	// Cancelable is "IDBVersionChangeEventInit.cancelable"
   888  	//
   889  	// Optional, defaults to false.
   890  	//
   891  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
   892  	Cancelable bool
   893  	// Composed is "IDBVersionChangeEventInit.composed"
   894  	//
   895  	// Optional, defaults to false.
   896  	//
   897  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
   898  	Composed bool
   899  
   900  	FFI_USE_OldVersion bool // for OldVersion.
   901  	FFI_USE_NewVersion bool // for NewVersion.
   902  	FFI_USE_Bubbles    bool // for Bubbles.
   903  	FFI_USE_Cancelable bool // for Cancelable.
   904  	FFI_USE_Composed   bool // for Composed.
   905  
   906  	FFI_USE bool
   907  }
   908  
   909  // FromRef calls UpdateFrom and returns a IDBVersionChangeEventInit with all fields set.
   910  func (p IDBVersionChangeEventInit) FromRef(ref js.Ref) IDBVersionChangeEventInit {
   911  	p.UpdateFrom(ref)
   912  	return p
   913  }
   914  
   915  // New creates a new IDBVersionChangeEventInit in the application heap.
   916  func (p IDBVersionChangeEventInit) New() js.Ref {
   917  	return bindings.IDBVersionChangeEventInitJSLoad(
   918  		js.Pointer(&p), js.True, 0,
   919  	)
   920  }
   921  
   922  // UpdateFrom copies value of all fields of the heap object to p.
   923  func (p *IDBVersionChangeEventInit) UpdateFrom(ref js.Ref) {
   924  	bindings.IDBVersionChangeEventInitJSStore(
   925  		js.Pointer(p), ref,
   926  	)
   927  }
   928  
   929  // Update writes all fields of the p to the heap object referenced by ref.
   930  func (p *IDBVersionChangeEventInit) Update(ref js.Ref) {
   931  	bindings.IDBVersionChangeEventInitJSLoad(
   932  		js.Pointer(p), js.False, ref,
   933  	)
   934  }
   935  
   936  // FreeMembers frees fields with heap reference, if recursive is true
   937  // free all heap references reachable from p.
   938  func (p *IDBVersionChangeEventInit) FreeMembers(recursive bool) {
   939  }
   940  
   941  func NewIDBVersionChangeEvent(typ js.String, eventInitDict IDBVersionChangeEventInit) (ret IDBVersionChangeEvent) {
   942  	ret.ref = bindings.NewIDBVersionChangeEventByIDBVersionChangeEvent(
   943  		typ.Ref(),
   944  		js.Pointer(&eventInitDict))
   945  	return
   946  }
   947  
   948  func NewIDBVersionChangeEventByIDBVersionChangeEvent1(typ js.String) (ret IDBVersionChangeEvent) {
   949  	ret.ref = bindings.NewIDBVersionChangeEventByIDBVersionChangeEvent1(
   950  		typ.Ref())
   951  	return
   952  }
   953  
   954  type IDBVersionChangeEvent struct {
   955  	Event
   956  }
   957  
   958  func (this IDBVersionChangeEvent) Once() IDBVersionChangeEvent {
   959  	this.ref.Once()
   960  	return this
   961  }
   962  
   963  func (this IDBVersionChangeEvent) Ref() js.Ref {
   964  	return this.Event.Ref()
   965  }
   966  
   967  func (this IDBVersionChangeEvent) FromRef(ref js.Ref) IDBVersionChangeEvent {
   968  	this.Event = this.Event.FromRef(ref)
   969  	return this
   970  }
   971  
   972  func (this IDBVersionChangeEvent) Free() {
   973  	this.ref.Free()
   974  }
   975  
   976  // OldVersion returns the value of property "IDBVersionChangeEvent.oldVersion".
   977  //
   978  // It returns ok=false if there is no such property.
   979  func (this IDBVersionChangeEvent) OldVersion() (ret uint64, ok bool) {
   980  	ok = js.True == bindings.GetIDBVersionChangeEventOldVersion(
   981  		this.ref, js.Pointer(&ret),
   982  	)
   983  	return
   984  }
   985  
   986  // NewVersion returns the value of property "IDBVersionChangeEvent.newVersion".
   987  //
   988  // It returns ok=false if there is no such property.
   989  func (this IDBVersionChangeEvent) NewVersion() (ret uint64, ok bool) {
   990  	ok = js.True == bindings.GetIDBVersionChangeEventNewVersion(
   991  		this.ref, js.Pointer(&ret),
   992  	)
   993  	return
   994  }
   995  
   996  type IdentityCredential struct {
   997  	Credential
   998  }
   999  
  1000  func (this IdentityCredential) Once() IdentityCredential {
  1001  	this.ref.Once()
  1002  	return this
  1003  }
  1004  
  1005  func (this IdentityCredential) Ref() js.Ref {
  1006  	return this.Credential.Ref()
  1007  }
  1008  
  1009  func (this IdentityCredential) FromRef(ref js.Ref) IdentityCredential {
  1010  	this.Credential = this.Credential.FromRef(ref)
  1011  	return this
  1012  }
  1013  
  1014  func (this IdentityCredential) Free() {
  1015  	this.ref.Free()
  1016  }
  1017  
  1018  // Token returns the value of property "IdentityCredential.token".
  1019  //
  1020  // It returns ok=false if there is no such property.
  1021  func (this IdentityCredential) Token() (ret js.String, ok bool) {
  1022  	ok = js.True == bindings.GetIdentityCredentialToken(
  1023  		this.ref, js.Pointer(&ret),
  1024  	)
  1025  	return
  1026  }
  1027  
  1028  type IdentityUserInfo struct {
  1029  	// Email is "IdentityUserInfo.email"
  1030  	//
  1031  	// Optional
  1032  	Email js.String
  1033  	// Name is "IdentityUserInfo.name"
  1034  	//
  1035  	// Optional
  1036  	Name js.String
  1037  	// GivenName is "IdentityUserInfo.givenName"
  1038  	//
  1039  	// Optional
  1040  	GivenName js.String
  1041  	// Picture is "IdentityUserInfo.picture"
  1042  	//
  1043  	// Optional
  1044  	Picture js.String
  1045  
  1046  	FFI_USE bool
  1047  }
  1048  
  1049  // FromRef calls UpdateFrom and returns a IdentityUserInfo with all fields set.
  1050  func (p IdentityUserInfo) FromRef(ref js.Ref) IdentityUserInfo {
  1051  	p.UpdateFrom(ref)
  1052  	return p
  1053  }
  1054  
  1055  // New creates a new IdentityUserInfo in the application heap.
  1056  func (p IdentityUserInfo) New() js.Ref {
  1057  	return bindings.IdentityUserInfoJSLoad(
  1058  		js.Pointer(&p), js.True, 0,
  1059  	)
  1060  }
  1061  
  1062  // UpdateFrom copies value of all fields of the heap object to p.
  1063  func (p *IdentityUserInfo) UpdateFrom(ref js.Ref) {
  1064  	bindings.IdentityUserInfoJSStore(
  1065  		js.Pointer(p), ref,
  1066  	)
  1067  }
  1068  
  1069  // Update writes all fields of the p to the heap object referenced by ref.
  1070  func (p *IdentityUserInfo) Update(ref js.Ref) {
  1071  	bindings.IdentityUserInfoJSLoad(
  1072  		js.Pointer(p), js.False, ref,
  1073  	)
  1074  }
  1075  
  1076  // FreeMembers frees fields with heap reference, if recursive is true
  1077  // free all heap references reachable from p.
  1078  func (p *IdentityUserInfo) FreeMembers(recursive bool) {
  1079  	js.Free(
  1080  		p.Email.Ref(),
  1081  		p.Name.Ref(),
  1082  		p.GivenName.Ref(),
  1083  		p.Picture.Ref(),
  1084  	)
  1085  	p.Email = p.Email.FromRef(js.Undefined)
  1086  	p.Name = p.Name.FromRef(js.Undefined)
  1087  	p.GivenName = p.GivenName.FromRef(js.Undefined)
  1088  	p.Picture = p.Picture.FromRef(js.Undefined)
  1089  }
  1090  
  1091  type IdentityProvider struct {
  1092  	ref js.Ref
  1093  }
  1094  
  1095  func (this IdentityProvider) Once() IdentityProvider {
  1096  	this.ref.Once()
  1097  	return this
  1098  }
  1099  
  1100  func (this IdentityProvider) Ref() js.Ref {
  1101  	return this.ref
  1102  }
  1103  
  1104  func (this IdentityProvider) FromRef(ref js.Ref) IdentityProvider {
  1105  	this.ref = ref
  1106  	return this
  1107  }
  1108  
  1109  func (this IdentityProvider) Free() {
  1110  	this.ref.Free()
  1111  }
  1112  
  1113  // HasFuncGetUserInfo returns true if the static method "IdentityProvider.getUserInfo" exists.
  1114  func (this IdentityProvider) HasFuncGetUserInfo() bool {
  1115  	return js.True == bindings.HasFuncIdentityProviderGetUserInfo(
  1116  		this.ref,
  1117  	)
  1118  }
  1119  
  1120  // FuncGetUserInfo returns the static method "IdentityProvider.getUserInfo".
  1121  func (this IdentityProvider) FuncGetUserInfo() (fn js.Func[func(config IdentityProviderConfig) js.Promise[js.Array[IdentityUserInfo]]]) {
  1122  	bindings.FuncIdentityProviderGetUserInfo(
  1123  		this.ref, js.Pointer(&fn),
  1124  	)
  1125  	return
  1126  }
  1127  
  1128  // GetUserInfo calls the static method "IdentityProvider.getUserInfo".
  1129  func (this IdentityProvider) GetUserInfo(config IdentityProviderConfig) (ret js.Promise[js.Array[IdentityUserInfo]]) {
  1130  	bindings.CallIdentityProviderGetUserInfo(
  1131  		this.ref, js.Pointer(&ret),
  1132  		js.Pointer(&config),
  1133  	)
  1134  
  1135  	return
  1136  }
  1137  
  1138  // TryGetUserInfo calls the static method "IdentityProvider.getUserInfo"
  1139  // in a try/catch block and returns (_, err, ok = false) when it went through
  1140  // the catch clause.
  1141  func (this IdentityProvider) TryGetUserInfo(config IdentityProviderConfig) (ret js.Promise[js.Array[IdentityUserInfo]], exception js.Any, ok bool) {
  1142  	ok = js.True == bindings.TryIdentityProviderGetUserInfo(
  1143  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1144  		js.Pointer(&config),
  1145  	)
  1146  
  1147  	return
  1148  }
  1149  
  1150  type IdentityProviderIcon struct {
  1151  	// Url is "IdentityProviderIcon.url"
  1152  	//
  1153  	// Required
  1154  	Url js.String
  1155  	// Size is "IdentityProviderIcon.size"
  1156  	//
  1157  	// Optional
  1158  	//
  1159  	// NOTE: FFI_USE_Size MUST be set to true to make this field effective.
  1160  	Size uint32
  1161  
  1162  	FFI_USE_Size bool // for Size.
  1163  
  1164  	FFI_USE bool
  1165  }
  1166  
  1167  // FromRef calls UpdateFrom and returns a IdentityProviderIcon with all fields set.
  1168  func (p IdentityProviderIcon) FromRef(ref js.Ref) IdentityProviderIcon {
  1169  	p.UpdateFrom(ref)
  1170  	return p
  1171  }
  1172  
  1173  // New creates a new IdentityProviderIcon in the application heap.
  1174  func (p IdentityProviderIcon) New() js.Ref {
  1175  	return bindings.IdentityProviderIconJSLoad(
  1176  		js.Pointer(&p), js.True, 0,
  1177  	)
  1178  }
  1179  
  1180  // UpdateFrom copies value of all fields of the heap object to p.
  1181  func (p *IdentityProviderIcon) UpdateFrom(ref js.Ref) {
  1182  	bindings.IdentityProviderIconJSStore(
  1183  		js.Pointer(p), ref,
  1184  	)
  1185  }
  1186  
  1187  // Update writes all fields of the p to the heap object referenced by ref.
  1188  func (p *IdentityProviderIcon) Update(ref js.Ref) {
  1189  	bindings.IdentityProviderIconJSLoad(
  1190  		js.Pointer(p), js.False, ref,
  1191  	)
  1192  }
  1193  
  1194  // FreeMembers frees fields with heap reference, if recursive is true
  1195  // free all heap references reachable from p.
  1196  func (p *IdentityProviderIcon) FreeMembers(recursive bool) {
  1197  	js.Free(
  1198  		p.Url.Ref(),
  1199  	)
  1200  	p.Url = p.Url.FromRef(js.Undefined)
  1201  }
  1202  
  1203  type IdentityProviderBranding struct {
  1204  	// BackgroundColor is "IdentityProviderBranding.background_color"
  1205  	//
  1206  	// Optional
  1207  	BackgroundColor js.String
  1208  	// Color is "IdentityProviderBranding.color"
  1209  	//
  1210  	// Optional
  1211  	Color js.String
  1212  	// Icons is "IdentityProviderBranding.icons"
  1213  	//
  1214  	// Optional
  1215  	Icons js.Array[IdentityProviderIcon]
  1216  	// Name is "IdentityProviderBranding.name"
  1217  	//
  1218  	// Optional
  1219  	Name js.String
  1220  
  1221  	FFI_USE bool
  1222  }
  1223  
  1224  // FromRef calls UpdateFrom and returns a IdentityProviderBranding with all fields set.
  1225  func (p IdentityProviderBranding) FromRef(ref js.Ref) IdentityProviderBranding {
  1226  	p.UpdateFrom(ref)
  1227  	return p
  1228  }
  1229  
  1230  // New creates a new IdentityProviderBranding in the application heap.
  1231  func (p IdentityProviderBranding) New() js.Ref {
  1232  	return bindings.IdentityProviderBrandingJSLoad(
  1233  		js.Pointer(&p), js.True, 0,
  1234  	)
  1235  }
  1236  
  1237  // UpdateFrom copies value of all fields of the heap object to p.
  1238  func (p *IdentityProviderBranding) UpdateFrom(ref js.Ref) {
  1239  	bindings.IdentityProviderBrandingJSStore(
  1240  		js.Pointer(p), ref,
  1241  	)
  1242  }
  1243  
  1244  // Update writes all fields of the p to the heap object referenced by ref.
  1245  func (p *IdentityProviderBranding) Update(ref js.Ref) {
  1246  	bindings.IdentityProviderBrandingJSLoad(
  1247  		js.Pointer(p), js.False, ref,
  1248  	)
  1249  }
  1250  
  1251  // FreeMembers frees fields with heap reference, if recursive is true
  1252  // free all heap references reachable from p.
  1253  func (p *IdentityProviderBranding) FreeMembers(recursive bool) {
  1254  	js.Free(
  1255  		p.BackgroundColor.Ref(),
  1256  		p.Color.Ref(),
  1257  		p.Icons.Ref(),
  1258  		p.Name.Ref(),
  1259  	)
  1260  	p.BackgroundColor = p.BackgroundColor.FromRef(js.Undefined)
  1261  	p.Color = p.Color.FromRef(js.Undefined)
  1262  	p.Icons = p.Icons.FromRef(js.Undefined)
  1263  	p.Name = p.Name.FromRef(js.Undefined)
  1264  }
  1265  
  1266  type IdentityProviderAPIConfig struct {
  1267  	// AccountsEndpoint is "IdentityProviderAPIConfig.accounts_endpoint"
  1268  	//
  1269  	// Required
  1270  	AccountsEndpoint js.String
  1271  	// ClientMetadataEndpoint is "IdentityProviderAPIConfig.client_metadata_endpoint"
  1272  	//
  1273  	// Required
  1274  	ClientMetadataEndpoint js.String
  1275  	// IdAssertionEndpoint is "IdentityProviderAPIConfig.id_assertion_endpoint"
  1276  	//
  1277  	// Required
  1278  	IdAssertionEndpoint js.String
  1279  	// Branding is "IdentityProviderAPIConfig.branding"
  1280  	//
  1281  	// Optional
  1282  	//
  1283  	// NOTE: Branding.FFI_USE MUST be set to true to get Branding used.
  1284  	Branding IdentityProviderBranding
  1285  
  1286  	FFI_USE bool
  1287  }
  1288  
  1289  // FromRef calls UpdateFrom and returns a IdentityProviderAPIConfig with all fields set.
  1290  func (p IdentityProviderAPIConfig) FromRef(ref js.Ref) IdentityProviderAPIConfig {
  1291  	p.UpdateFrom(ref)
  1292  	return p
  1293  }
  1294  
  1295  // New creates a new IdentityProviderAPIConfig in the application heap.
  1296  func (p IdentityProviderAPIConfig) New() js.Ref {
  1297  	return bindings.IdentityProviderAPIConfigJSLoad(
  1298  		js.Pointer(&p), js.True, 0,
  1299  	)
  1300  }
  1301  
  1302  // UpdateFrom copies value of all fields of the heap object to p.
  1303  func (p *IdentityProviderAPIConfig) UpdateFrom(ref js.Ref) {
  1304  	bindings.IdentityProviderAPIConfigJSStore(
  1305  		js.Pointer(p), ref,
  1306  	)
  1307  }
  1308  
  1309  // Update writes all fields of the p to the heap object referenced by ref.
  1310  func (p *IdentityProviderAPIConfig) Update(ref js.Ref) {
  1311  	bindings.IdentityProviderAPIConfigJSLoad(
  1312  		js.Pointer(p), js.False, ref,
  1313  	)
  1314  }
  1315  
  1316  // FreeMembers frees fields with heap reference, if recursive is true
  1317  // free all heap references reachable from p.
  1318  func (p *IdentityProviderAPIConfig) FreeMembers(recursive bool) {
  1319  	js.Free(
  1320  		p.AccountsEndpoint.Ref(),
  1321  		p.ClientMetadataEndpoint.Ref(),
  1322  		p.IdAssertionEndpoint.Ref(),
  1323  	)
  1324  	p.AccountsEndpoint = p.AccountsEndpoint.FromRef(js.Undefined)
  1325  	p.ClientMetadataEndpoint = p.ClientMetadataEndpoint.FromRef(js.Undefined)
  1326  	p.IdAssertionEndpoint = p.IdAssertionEndpoint.FromRef(js.Undefined)
  1327  	if recursive {
  1328  		p.Branding.FreeMembers(true)
  1329  	}
  1330  }
  1331  
  1332  type IdentityProviderAccount struct {
  1333  	// Id is "IdentityProviderAccount.id"
  1334  	//
  1335  	// Required
  1336  	Id js.String
  1337  	// Name is "IdentityProviderAccount.name"
  1338  	//
  1339  	// Required
  1340  	Name js.String
  1341  	// Email is "IdentityProviderAccount.email"
  1342  	//
  1343  	// Required
  1344  	Email js.String
  1345  	// GivenName is "IdentityProviderAccount.given_name"
  1346  	//
  1347  	// Optional
  1348  	GivenName js.String
  1349  	// Picture is "IdentityProviderAccount.picture"
  1350  	//
  1351  	// Optional
  1352  	Picture js.String
  1353  	// ApprovedClients is "IdentityProviderAccount.approved_clients"
  1354  	//
  1355  	// Optional
  1356  	ApprovedClients js.Array[js.String]
  1357  	// LoginHints is "IdentityProviderAccount.login_hints"
  1358  	//
  1359  	// Optional
  1360  	LoginHints js.Array[js.String]
  1361  
  1362  	FFI_USE bool
  1363  }
  1364  
  1365  // FromRef calls UpdateFrom and returns a IdentityProviderAccount with all fields set.
  1366  func (p IdentityProviderAccount) FromRef(ref js.Ref) IdentityProviderAccount {
  1367  	p.UpdateFrom(ref)
  1368  	return p
  1369  }
  1370  
  1371  // New creates a new IdentityProviderAccount in the application heap.
  1372  func (p IdentityProviderAccount) New() js.Ref {
  1373  	return bindings.IdentityProviderAccountJSLoad(
  1374  		js.Pointer(&p), js.True, 0,
  1375  	)
  1376  }
  1377  
  1378  // UpdateFrom copies value of all fields of the heap object to p.
  1379  func (p *IdentityProviderAccount) UpdateFrom(ref js.Ref) {
  1380  	bindings.IdentityProviderAccountJSStore(
  1381  		js.Pointer(p), ref,
  1382  	)
  1383  }
  1384  
  1385  // Update writes all fields of the p to the heap object referenced by ref.
  1386  func (p *IdentityProviderAccount) Update(ref js.Ref) {
  1387  	bindings.IdentityProviderAccountJSLoad(
  1388  		js.Pointer(p), js.False, ref,
  1389  	)
  1390  }
  1391  
  1392  // FreeMembers frees fields with heap reference, if recursive is true
  1393  // free all heap references reachable from p.
  1394  func (p *IdentityProviderAccount) FreeMembers(recursive bool) {
  1395  	js.Free(
  1396  		p.Id.Ref(),
  1397  		p.Name.Ref(),
  1398  		p.Email.Ref(),
  1399  		p.GivenName.Ref(),
  1400  		p.Picture.Ref(),
  1401  		p.ApprovedClients.Ref(),
  1402  		p.LoginHints.Ref(),
  1403  	)
  1404  	p.Id = p.Id.FromRef(js.Undefined)
  1405  	p.Name = p.Name.FromRef(js.Undefined)
  1406  	p.Email = p.Email.FromRef(js.Undefined)
  1407  	p.GivenName = p.GivenName.FromRef(js.Undefined)
  1408  	p.Picture = p.Picture.FromRef(js.Undefined)
  1409  	p.ApprovedClients = p.ApprovedClients.FromRef(js.Undefined)
  1410  	p.LoginHints = p.LoginHints.FromRef(js.Undefined)
  1411  }
  1412  
  1413  type IdentityProviderAccountList struct {
  1414  	// Accounts is "IdentityProviderAccountList.accounts"
  1415  	//
  1416  	// Optional
  1417  	Accounts js.Array[IdentityProviderAccount]
  1418  
  1419  	FFI_USE bool
  1420  }
  1421  
  1422  // FromRef calls UpdateFrom and returns a IdentityProviderAccountList with all fields set.
  1423  func (p IdentityProviderAccountList) FromRef(ref js.Ref) IdentityProviderAccountList {
  1424  	p.UpdateFrom(ref)
  1425  	return p
  1426  }
  1427  
  1428  // New creates a new IdentityProviderAccountList in the application heap.
  1429  func (p IdentityProviderAccountList) New() js.Ref {
  1430  	return bindings.IdentityProviderAccountListJSLoad(
  1431  		js.Pointer(&p), js.True, 0,
  1432  	)
  1433  }
  1434  
  1435  // UpdateFrom copies value of all fields of the heap object to p.
  1436  func (p *IdentityProviderAccountList) UpdateFrom(ref js.Ref) {
  1437  	bindings.IdentityProviderAccountListJSStore(
  1438  		js.Pointer(p), ref,
  1439  	)
  1440  }
  1441  
  1442  // Update writes all fields of the p to the heap object referenced by ref.
  1443  func (p *IdentityProviderAccountList) Update(ref js.Ref) {
  1444  	bindings.IdentityProviderAccountListJSLoad(
  1445  		js.Pointer(p), js.False, ref,
  1446  	)
  1447  }
  1448  
  1449  // FreeMembers frees fields with heap reference, if recursive is true
  1450  // free all heap references reachable from p.
  1451  func (p *IdentityProviderAccountList) FreeMembers(recursive bool) {
  1452  	js.Free(
  1453  		p.Accounts.Ref(),
  1454  	)
  1455  	p.Accounts = p.Accounts.FromRef(js.Undefined)
  1456  }
  1457  
  1458  type IdentityProviderClientMetadata struct {
  1459  	// PrivacyPolicyUrl is "IdentityProviderClientMetadata.privacy_policy_url"
  1460  	//
  1461  	// Optional
  1462  	PrivacyPolicyUrl js.String
  1463  	// TermsOfServiceUrl is "IdentityProviderClientMetadata.terms_of_service_url"
  1464  	//
  1465  	// Optional
  1466  	TermsOfServiceUrl js.String
  1467  
  1468  	FFI_USE bool
  1469  }
  1470  
  1471  // FromRef calls UpdateFrom and returns a IdentityProviderClientMetadata with all fields set.
  1472  func (p IdentityProviderClientMetadata) FromRef(ref js.Ref) IdentityProviderClientMetadata {
  1473  	p.UpdateFrom(ref)
  1474  	return p
  1475  }
  1476  
  1477  // New creates a new IdentityProviderClientMetadata in the application heap.
  1478  func (p IdentityProviderClientMetadata) New() js.Ref {
  1479  	return bindings.IdentityProviderClientMetadataJSLoad(
  1480  		js.Pointer(&p), js.True, 0,
  1481  	)
  1482  }
  1483  
  1484  // UpdateFrom copies value of all fields of the heap object to p.
  1485  func (p *IdentityProviderClientMetadata) UpdateFrom(ref js.Ref) {
  1486  	bindings.IdentityProviderClientMetadataJSStore(
  1487  		js.Pointer(p), ref,
  1488  	)
  1489  }
  1490  
  1491  // Update writes all fields of the p to the heap object referenced by ref.
  1492  func (p *IdentityProviderClientMetadata) Update(ref js.Ref) {
  1493  	bindings.IdentityProviderClientMetadataJSLoad(
  1494  		js.Pointer(p), js.False, ref,
  1495  	)
  1496  }
  1497  
  1498  // FreeMembers frees fields with heap reference, if recursive is true
  1499  // free all heap references reachable from p.
  1500  func (p *IdentityProviderClientMetadata) FreeMembers(recursive bool) {
  1501  	js.Free(
  1502  		p.PrivacyPolicyUrl.Ref(),
  1503  		p.TermsOfServiceUrl.Ref(),
  1504  	)
  1505  	p.PrivacyPolicyUrl = p.PrivacyPolicyUrl.FromRef(js.Undefined)
  1506  	p.TermsOfServiceUrl = p.TermsOfServiceUrl.FromRef(js.Undefined)
  1507  }
  1508  
  1509  type IdentityProviderToken struct {
  1510  	// Token is "IdentityProviderToken.token"
  1511  	//
  1512  	// Required
  1513  	Token js.String
  1514  
  1515  	FFI_USE bool
  1516  }
  1517  
  1518  // FromRef calls UpdateFrom and returns a IdentityProviderToken with all fields set.
  1519  func (p IdentityProviderToken) FromRef(ref js.Ref) IdentityProviderToken {
  1520  	p.UpdateFrom(ref)
  1521  	return p
  1522  }
  1523  
  1524  // New creates a new IdentityProviderToken in the application heap.
  1525  func (p IdentityProviderToken) New() js.Ref {
  1526  	return bindings.IdentityProviderTokenJSLoad(
  1527  		js.Pointer(&p), js.True, 0,
  1528  	)
  1529  }
  1530  
  1531  // UpdateFrom copies value of all fields of the heap object to p.
  1532  func (p *IdentityProviderToken) UpdateFrom(ref js.Ref) {
  1533  	bindings.IdentityProviderTokenJSStore(
  1534  		js.Pointer(p), ref,
  1535  	)
  1536  }
  1537  
  1538  // Update writes all fields of the p to the heap object referenced by ref.
  1539  func (p *IdentityProviderToken) Update(ref js.Ref) {
  1540  	bindings.IdentityProviderTokenJSLoad(
  1541  		js.Pointer(p), js.False, ref,
  1542  	)
  1543  }
  1544  
  1545  // FreeMembers frees fields with heap reference, if recursive is true
  1546  // free all heap references reachable from p.
  1547  func (p *IdentityProviderToken) FreeMembers(recursive bool) {
  1548  	js.Free(
  1549  		p.Token.Ref(),
  1550  	)
  1551  	p.Token = p.Token.FromRef(js.Undefined)
  1552  }
  1553  
  1554  type IdentityProviderWellKnown struct {
  1555  	// ProviderUrls is "IdentityProviderWellKnown.provider_urls"
  1556  	//
  1557  	// Required
  1558  	ProviderUrls js.Array[js.String]
  1559  
  1560  	FFI_USE bool
  1561  }
  1562  
  1563  // FromRef calls UpdateFrom and returns a IdentityProviderWellKnown with all fields set.
  1564  func (p IdentityProviderWellKnown) FromRef(ref js.Ref) IdentityProviderWellKnown {
  1565  	p.UpdateFrom(ref)
  1566  	return p
  1567  }
  1568  
  1569  // New creates a new IdentityProviderWellKnown in the application heap.
  1570  func (p IdentityProviderWellKnown) New() js.Ref {
  1571  	return bindings.IdentityProviderWellKnownJSLoad(
  1572  		js.Pointer(&p), js.True, 0,
  1573  	)
  1574  }
  1575  
  1576  // UpdateFrom copies value of all fields of the heap object to p.
  1577  func (p *IdentityProviderWellKnown) UpdateFrom(ref js.Ref) {
  1578  	bindings.IdentityProviderWellKnownJSStore(
  1579  		js.Pointer(p), ref,
  1580  	)
  1581  }
  1582  
  1583  // Update writes all fields of the p to the heap object referenced by ref.
  1584  func (p *IdentityProviderWellKnown) Update(ref js.Ref) {
  1585  	bindings.IdentityProviderWellKnownJSLoad(
  1586  		js.Pointer(p), js.False, ref,
  1587  	)
  1588  }
  1589  
  1590  // FreeMembers frees fields with heap reference, if recursive is true
  1591  // free all heap references reachable from p.
  1592  func (p *IdentityProviderWellKnown) FreeMembers(recursive bool) {
  1593  	js.Free(
  1594  		p.ProviderUrls.Ref(),
  1595  	)
  1596  	p.ProviderUrls = p.ProviderUrls.FromRef(js.Undefined)
  1597  }
  1598  
  1599  type IdleOptions struct {
  1600  	// Threshold is "IdleOptions.threshold"
  1601  	//
  1602  	// Optional
  1603  	//
  1604  	// NOTE: FFI_USE_Threshold MUST be set to true to make this field effective.
  1605  	Threshold uint64
  1606  	// Signal is "IdleOptions.signal"
  1607  	//
  1608  	// Optional
  1609  	Signal AbortSignal
  1610  
  1611  	FFI_USE_Threshold bool // for Threshold.
  1612  
  1613  	FFI_USE bool
  1614  }
  1615  
  1616  // FromRef calls UpdateFrom and returns a IdleOptions with all fields set.
  1617  func (p IdleOptions) FromRef(ref js.Ref) IdleOptions {
  1618  	p.UpdateFrom(ref)
  1619  	return p
  1620  }
  1621  
  1622  // New creates a new IdleOptions in the application heap.
  1623  func (p IdleOptions) New() js.Ref {
  1624  	return bindings.IdleOptionsJSLoad(
  1625  		js.Pointer(&p), js.True, 0,
  1626  	)
  1627  }
  1628  
  1629  // UpdateFrom copies value of all fields of the heap object to p.
  1630  func (p *IdleOptions) UpdateFrom(ref js.Ref) {
  1631  	bindings.IdleOptionsJSStore(
  1632  		js.Pointer(p), ref,
  1633  	)
  1634  }
  1635  
  1636  // Update writes all fields of the p to the heap object referenced by ref.
  1637  func (p *IdleOptions) Update(ref js.Ref) {
  1638  	bindings.IdleOptionsJSLoad(
  1639  		js.Pointer(p), js.False, ref,
  1640  	)
  1641  }
  1642  
  1643  // FreeMembers frees fields with heap reference, if recursive is true
  1644  // free all heap references reachable from p.
  1645  func (p *IdleOptions) FreeMembers(recursive bool) {
  1646  	js.Free(
  1647  		p.Signal.Ref(),
  1648  	)
  1649  	p.Signal = p.Signal.FromRef(js.Undefined)
  1650  }
  1651  
  1652  type UserIdleState uint32
  1653  
  1654  const (
  1655  	_ UserIdleState = iota
  1656  
  1657  	UserIdleState_ACTIVE
  1658  	UserIdleState_IDLE
  1659  )
  1660  
  1661  func (UserIdleState) FromRef(str js.Ref) UserIdleState {
  1662  	return UserIdleState(bindings.ConstOfUserIdleState(str))
  1663  }
  1664  
  1665  func (x UserIdleState) String() (string, bool) {
  1666  	switch x {
  1667  	case UserIdleState_ACTIVE:
  1668  		return "active", true
  1669  	case UserIdleState_IDLE:
  1670  		return "idle", true
  1671  	default:
  1672  		return "", false
  1673  	}
  1674  }
  1675  
  1676  type ScreenIdleState uint32
  1677  
  1678  const (
  1679  	_ ScreenIdleState = iota
  1680  
  1681  	ScreenIdleState_LOCKED
  1682  	ScreenIdleState_UNLOCKED
  1683  )
  1684  
  1685  func (ScreenIdleState) FromRef(str js.Ref) ScreenIdleState {
  1686  	return ScreenIdleState(bindings.ConstOfScreenIdleState(str))
  1687  }
  1688  
  1689  func (x ScreenIdleState) String() (string, bool) {
  1690  	switch x {
  1691  	case ScreenIdleState_LOCKED:
  1692  		return "locked", true
  1693  	case ScreenIdleState_UNLOCKED:
  1694  		return "unlocked", true
  1695  	default:
  1696  		return "", false
  1697  	}
  1698  }
  1699  
  1700  type IdleDetector struct {
  1701  	EventTarget
  1702  }
  1703  
  1704  func (this IdleDetector) Once() IdleDetector {
  1705  	this.ref.Once()
  1706  	return this
  1707  }
  1708  
  1709  func (this IdleDetector) Ref() js.Ref {
  1710  	return this.EventTarget.Ref()
  1711  }
  1712  
  1713  func (this IdleDetector) FromRef(ref js.Ref) IdleDetector {
  1714  	this.EventTarget = this.EventTarget.FromRef(ref)
  1715  	return this
  1716  }
  1717  
  1718  func (this IdleDetector) Free() {
  1719  	this.ref.Free()
  1720  }
  1721  
  1722  // UserState returns the value of property "IdleDetector.userState".
  1723  //
  1724  // It returns ok=false if there is no such property.
  1725  func (this IdleDetector) UserState() (ret UserIdleState, ok bool) {
  1726  	ok = js.True == bindings.GetIdleDetectorUserState(
  1727  		this.ref, js.Pointer(&ret),
  1728  	)
  1729  	return
  1730  }
  1731  
  1732  // ScreenState returns the value of property "IdleDetector.screenState".
  1733  //
  1734  // It returns ok=false if there is no such property.
  1735  func (this IdleDetector) ScreenState() (ret ScreenIdleState, ok bool) {
  1736  	ok = js.True == bindings.GetIdleDetectorScreenState(
  1737  		this.ref, js.Pointer(&ret),
  1738  	)
  1739  	return
  1740  }
  1741  
  1742  // HasFuncRequestPermission returns true if the static method "IdleDetector.requestPermission" exists.
  1743  func (this IdleDetector) HasFuncRequestPermission() bool {
  1744  	return js.True == bindings.HasFuncIdleDetectorRequestPermission(
  1745  		this.ref,
  1746  	)
  1747  }
  1748  
  1749  // FuncRequestPermission returns the static method "IdleDetector.requestPermission".
  1750  func (this IdleDetector) FuncRequestPermission() (fn js.Func[func() js.Promise[PermissionState]]) {
  1751  	bindings.FuncIdleDetectorRequestPermission(
  1752  		this.ref, js.Pointer(&fn),
  1753  	)
  1754  	return
  1755  }
  1756  
  1757  // RequestPermission calls the static method "IdleDetector.requestPermission".
  1758  func (this IdleDetector) RequestPermission() (ret js.Promise[PermissionState]) {
  1759  	bindings.CallIdleDetectorRequestPermission(
  1760  		this.ref, js.Pointer(&ret),
  1761  	)
  1762  
  1763  	return
  1764  }
  1765  
  1766  // TryRequestPermission calls the static method "IdleDetector.requestPermission"
  1767  // in a try/catch block and returns (_, err, ok = false) when it went through
  1768  // the catch clause.
  1769  func (this IdleDetector) TryRequestPermission() (ret js.Promise[PermissionState], exception js.Any, ok bool) {
  1770  	ok = js.True == bindings.TryIdleDetectorRequestPermission(
  1771  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1772  	)
  1773  
  1774  	return
  1775  }
  1776  
  1777  // HasFuncStart returns true if the method "IdleDetector.start" exists.
  1778  func (this IdleDetector) HasFuncStart() bool {
  1779  	return js.True == bindings.HasFuncIdleDetectorStart(
  1780  		this.ref,
  1781  	)
  1782  }
  1783  
  1784  // FuncStart returns the method "IdleDetector.start".
  1785  func (this IdleDetector) FuncStart() (fn js.Func[func(options IdleOptions) js.Promise[js.Void]]) {
  1786  	bindings.FuncIdleDetectorStart(
  1787  		this.ref, js.Pointer(&fn),
  1788  	)
  1789  	return
  1790  }
  1791  
  1792  // Start calls the method "IdleDetector.start".
  1793  func (this IdleDetector) Start(options IdleOptions) (ret js.Promise[js.Void]) {
  1794  	bindings.CallIdleDetectorStart(
  1795  		this.ref, js.Pointer(&ret),
  1796  		js.Pointer(&options),
  1797  	)
  1798  
  1799  	return
  1800  }
  1801  
  1802  // TryStart calls the method "IdleDetector.start"
  1803  // in a try/catch block and returns (_, err, ok = false) when it went through
  1804  // the catch clause.
  1805  func (this IdleDetector) TryStart(options IdleOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  1806  	ok = js.True == bindings.TryIdleDetectorStart(
  1807  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1808  		js.Pointer(&options),
  1809  	)
  1810  
  1811  	return
  1812  }
  1813  
  1814  // HasFuncStart1 returns true if the method "IdleDetector.start" exists.
  1815  func (this IdleDetector) HasFuncStart1() bool {
  1816  	return js.True == bindings.HasFuncIdleDetectorStart1(
  1817  		this.ref,
  1818  	)
  1819  }
  1820  
  1821  // FuncStart1 returns the method "IdleDetector.start".
  1822  func (this IdleDetector) FuncStart1() (fn js.Func[func() js.Promise[js.Void]]) {
  1823  	bindings.FuncIdleDetectorStart1(
  1824  		this.ref, js.Pointer(&fn),
  1825  	)
  1826  	return
  1827  }
  1828  
  1829  // Start1 calls the method "IdleDetector.start".
  1830  func (this IdleDetector) Start1() (ret js.Promise[js.Void]) {
  1831  	bindings.CallIdleDetectorStart1(
  1832  		this.ref, js.Pointer(&ret),
  1833  	)
  1834  
  1835  	return
  1836  }
  1837  
  1838  // TryStart1 calls the method "IdleDetector.start"
  1839  // in a try/catch block and returns (_, err, ok = false) when it went through
  1840  // the catch clause.
  1841  func (this IdleDetector) TryStart1() (ret js.Promise[js.Void], exception js.Any, ok bool) {
  1842  	ok = js.True == bindings.TryIdleDetectorStart1(
  1843  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1844  	)
  1845  
  1846  	return
  1847  }
  1848  
  1849  type ImageBitmapRenderingContextSettings struct {
  1850  	// Alpha is "ImageBitmapRenderingContextSettings.alpha"
  1851  	//
  1852  	// Optional, defaults to true.
  1853  	//
  1854  	// NOTE: FFI_USE_Alpha MUST be set to true to make this field effective.
  1855  	Alpha bool
  1856  
  1857  	FFI_USE_Alpha bool // for Alpha.
  1858  
  1859  	FFI_USE bool
  1860  }
  1861  
  1862  // FromRef calls UpdateFrom and returns a ImageBitmapRenderingContextSettings with all fields set.
  1863  func (p ImageBitmapRenderingContextSettings) FromRef(ref js.Ref) ImageBitmapRenderingContextSettings {
  1864  	p.UpdateFrom(ref)
  1865  	return p
  1866  }
  1867  
  1868  // New creates a new ImageBitmapRenderingContextSettings in the application heap.
  1869  func (p ImageBitmapRenderingContextSettings) New() js.Ref {
  1870  	return bindings.ImageBitmapRenderingContextSettingsJSLoad(
  1871  		js.Pointer(&p), js.True, 0,
  1872  	)
  1873  }
  1874  
  1875  // UpdateFrom copies value of all fields of the heap object to p.
  1876  func (p *ImageBitmapRenderingContextSettings) UpdateFrom(ref js.Ref) {
  1877  	bindings.ImageBitmapRenderingContextSettingsJSStore(
  1878  		js.Pointer(p), ref,
  1879  	)
  1880  }
  1881  
  1882  // Update writes all fields of the p to the heap object referenced by ref.
  1883  func (p *ImageBitmapRenderingContextSettings) Update(ref js.Ref) {
  1884  	bindings.ImageBitmapRenderingContextSettingsJSLoad(
  1885  		js.Pointer(p), js.False, ref,
  1886  	)
  1887  }
  1888  
  1889  // FreeMembers frees fields with heap reference, if recursive is true
  1890  // free all heap references reachable from p.
  1891  func (p *ImageBitmapRenderingContextSettings) FreeMembers(recursive bool) {
  1892  }
  1893  
  1894  type OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream struct {
  1895  	ref js.Ref
  1896  }
  1897  
  1898  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) Ref() js.Ref {
  1899  	return x.ref
  1900  }
  1901  
  1902  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) Free() {
  1903  	x.ref.Free()
  1904  }
  1905  
  1906  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) FromRef(ref js.Ref) OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream {
  1907  	return OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream{
  1908  		ref: ref,
  1909  	}
  1910  }
  1911  
  1912  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayInt8() js.TypedArray[int8] {
  1913  	return js.TypedArray[int8]{}.FromRef(x.ref)
  1914  }
  1915  
  1916  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayInt16() js.TypedArray[int16] {
  1917  	return js.TypedArray[int16]{}.FromRef(x.ref)
  1918  }
  1919  
  1920  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayInt32() js.TypedArray[int32] {
  1921  	return js.TypedArray[int32]{}.FromRef(x.ref)
  1922  }
  1923  
  1924  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayUint8() js.TypedArray[uint8] {
  1925  	return js.TypedArray[uint8]{}.FromRef(x.ref)
  1926  }
  1927  
  1928  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayUint16() js.TypedArray[uint16] {
  1929  	return js.TypedArray[uint16]{}.FromRef(x.ref)
  1930  }
  1931  
  1932  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayUint32() js.TypedArray[uint32] {
  1933  	return js.TypedArray[uint32]{}.FromRef(x.ref)
  1934  }
  1935  
  1936  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayInt64() js.TypedArray[int64] {
  1937  	return js.TypedArray[int64]{}.FromRef(x.ref)
  1938  }
  1939  
  1940  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayUint64() js.TypedArray[uint64] {
  1941  	return js.TypedArray[uint64]{}.FromRef(x.ref)
  1942  }
  1943  
  1944  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayFloat32() js.TypedArray[float32] {
  1945  	return js.TypedArray[float32]{}.FromRef(x.ref)
  1946  }
  1947  
  1948  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) TypedArrayFloat64() js.TypedArray[float64] {
  1949  	return js.TypedArray[float64]{}.FromRef(x.ref)
  1950  }
  1951  
  1952  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) DataView() js.DataView {
  1953  	return js.DataView{}.FromRef(x.ref)
  1954  }
  1955  
  1956  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) ArrayBuffer() js.ArrayBuffer {
  1957  	return js.ArrayBuffer{}.FromRef(x.ref)
  1958  }
  1959  
  1960  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream) ReadableStream() ReadableStream {
  1961  	return ReadableStream{}.FromRef(x.ref)
  1962  }
  1963  
  1964  type ImageBufferSource = OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_ReadableStream
  1965  
  1966  type PhotoSettings struct {
  1967  	// FillLightMode is "PhotoSettings.fillLightMode"
  1968  	//
  1969  	// Optional
  1970  	FillLightMode FillLightMode
  1971  	// ImageHeight is "PhotoSettings.imageHeight"
  1972  	//
  1973  	// Optional
  1974  	//
  1975  	// NOTE: FFI_USE_ImageHeight MUST be set to true to make this field effective.
  1976  	ImageHeight float64
  1977  	// ImageWidth is "PhotoSettings.imageWidth"
  1978  	//
  1979  	// Optional
  1980  	//
  1981  	// NOTE: FFI_USE_ImageWidth MUST be set to true to make this field effective.
  1982  	ImageWidth float64
  1983  	// RedEyeReduction is "PhotoSettings.redEyeReduction"
  1984  	//
  1985  	// Optional
  1986  	//
  1987  	// NOTE: FFI_USE_RedEyeReduction MUST be set to true to make this field effective.
  1988  	RedEyeReduction bool
  1989  
  1990  	FFI_USE_ImageHeight     bool // for ImageHeight.
  1991  	FFI_USE_ImageWidth      bool // for ImageWidth.
  1992  	FFI_USE_RedEyeReduction bool // for RedEyeReduction.
  1993  
  1994  	FFI_USE bool
  1995  }
  1996  
  1997  // FromRef calls UpdateFrom and returns a PhotoSettings with all fields set.
  1998  func (p PhotoSettings) FromRef(ref js.Ref) PhotoSettings {
  1999  	p.UpdateFrom(ref)
  2000  	return p
  2001  }
  2002  
  2003  // New creates a new PhotoSettings in the application heap.
  2004  func (p PhotoSettings) New() js.Ref {
  2005  	return bindings.PhotoSettingsJSLoad(
  2006  		js.Pointer(&p), js.True, 0,
  2007  	)
  2008  }
  2009  
  2010  // UpdateFrom copies value of all fields of the heap object to p.
  2011  func (p *PhotoSettings) UpdateFrom(ref js.Ref) {
  2012  	bindings.PhotoSettingsJSStore(
  2013  		js.Pointer(p), ref,
  2014  	)
  2015  }
  2016  
  2017  // Update writes all fields of the p to the heap object referenced by ref.
  2018  func (p *PhotoSettings) Update(ref js.Ref) {
  2019  	bindings.PhotoSettingsJSLoad(
  2020  		js.Pointer(p), js.False, ref,
  2021  	)
  2022  }
  2023  
  2024  // FreeMembers frees fields with heap reference, if recursive is true
  2025  // free all heap references reachable from p.
  2026  func (p *PhotoSettings) FreeMembers(recursive bool) {
  2027  }
  2028  
  2029  type RedEyeReduction uint32
  2030  
  2031  const (
  2032  	_ RedEyeReduction = iota
  2033  
  2034  	RedEyeReduction_NEVER
  2035  	RedEyeReduction_ALWAYS
  2036  	RedEyeReduction_CONTROLLABLE
  2037  )
  2038  
  2039  func (RedEyeReduction) FromRef(str js.Ref) RedEyeReduction {
  2040  	return RedEyeReduction(bindings.ConstOfRedEyeReduction(str))
  2041  }
  2042  
  2043  func (x RedEyeReduction) String() (string, bool) {
  2044  	switch x {
  2045  	case RedEyeReduction_NEVER:
  2046  		return "never", true
  2047  	case RedEyeReduction_ALWAYS:
  2048  		return "always", true
  2049  	case RedEyeReduction_CONTROLLABLE:
  2050  		return "controllable", true
  2051  	default:
  2052  		return "", false
  2053  	}
  2054  }
  2055  
  2056  type PhotoCapabilities struct {
  2057  	// RedEyeReduction is "PhotoCapabilities.redEyeReduction"
  2058  	//
  2059  	// Optional
  2060  	RedEyeReduction RedEyeReduction
  2061  	// ImageHeight is "PhotoCapabilities.imageHeight"
  2062  	//
  2063  	// Optional
  2064  	//
  2065  	// NOTE: ImageHeight.FFI_USE MUST be set to true to get ImageHeight used.
  2066  	ImageHeight MediaSettingsRange
  2067  	// ImageWidth is "PhotoCapabilities.imageWidth"
  2068  	//
  2069  	// Optional
  2070  	//
  2071  	// NOTE: ImageWidth.FFI_USE MUST be set to true to get ImageWidth used.
  2072  	ImageWidth MediaSettingsRange
  2073  	// FillLightMode is "PhotoCapabilities.fillLightMode"
  2074  	//
  2075  	// Optional
  2076  	FillLightMode js.Array[FillLightMode]
  2077  
  2078  	FFI_USE bool
  2079  }
  2080  
  2081  // FromRef calls UpdateFrom and returns a PhotoCapabilities with all fields set.
  2082  func (p PhotoCapabilities) FromRef(ref js.Ref) PhotoCapabilities {
  2083  	p.UpdateFrom(ref)
  2084  	return p
  2085  }
  2086  
  2087  // New creates a new PhotoCapabilities in the application heap.
  2088  func (p PhotoCapabilities) New() js.Ref {
  2089  	return bindings.PhotoCapabilitiesJSLoad(
  2090  		js.Pointer(&p), js.True, 0,
  2091  	)
  2092  }
  2093  
  2094  // UpdateFrom copies value of all fields of the heap object to p.
  2095  func (p *PhotoCapabilities) UpdateFrom(ref js.Ref) {
  2096  	bindings.PhotoCapabilitiesJSStore(
  2097  		js.Pointer(p), ref,
  2098  	)
  2099  }
  2100  
  2101  // Update writes all fields of the p to the heap object referenced by ref.
  2102  func (p *PhotoCapabilities) Update(ref js.Ref) {
  2103  	bindings.PhotoCapabilitiesJSLoad(
  2104  		js.Pointer(p), js.False, ref,
  2105  	)
  2106  }
  2107  
  2108  // FreeMembers frees fields with heap reference, if recursive is true
  2109  // free all heap references reachable from p.
  2110  func (p *PhotoCapabilities) FreeMembers(recursive bool) {
  2111  	js.Free(
  2112  		p.FillLightMode.Ref(),
  2113  	)
  2114  	p.FillLightMode = p.FillLightMode.FromRef(js.Undefined)
  2115  	if recursive {
  2116  		p.ImageHeight.FreeMembers(true)
  2117  		p.ImageWidth.FreeMembers(true)
  2118  	}
  2119  }
  2120  
  2121  func NewImageCapture(videoTrack MediaStreamTrack) (ret ImageCapture) {
  2122  	ret.ref = bindings.NewImageCaptureByImageCapture(
  2123  		videoTrack.Ref())
  2124  	return
  2125  }
  2126  
  2127  type ImageCapture struct {
  2128  	ref js.Ref
  2129  }
  2130  
  2131  func (this ImageCapture) Once() ImageCapture {
  2132  	this.ref.Once()
  2133  	return this
  2134  }
  2135  
  2136  func (this ImageCapture) Ref() js.Ref {
  2137  	return this.ref
  2138  }
  2139  
  2140  func (this ImageCapture) FromRef(ref js.Ref) ImageCapture {
  2141  	this.ref = ref
  2142  	return this
  2143  }
  2144  
  2145  func (this ImageCapture) Free() {
  2146  	this.ref.Free()
  2147  }
  2148  
  2149  // Track returns the value of property "ImageCapture.track".
  2150  //
  2151  // It returns ok=false if there is no such property.
  2152  func (this ImageCapture) Track() (ret MediaStreamTrack, ok bool) {
  2153  	ok = js.True == bindings.GetImageCaptureTrack(
  2154  		this.ref, js.Pointer(&ret),
  2155  	)
  2156  	return
  2157  }
  2158  
  2159  // HasFuncTakePhoto returns true if the method "ImageCapture.takePhoto" exists.
  2160  func (this ImageCapture) HasFuncTakePhoto() bool {
  2161  	return js.True == bindings.HasFuncImageCaptureTakePhoto(
  2162  		this.ref,
  2163  	)
  2164  }
  2165  
  2166  // FuncTakePhoto returns the method "ImageCapture.takePhoto".
  2167  func (this ImageCapture) FuncTakePhoto() (fn js.Func[func(photoSettings PhotoSettings) js.Promise[Blob]]) {
  2168  	bindings.FuncImageCaptureTakePhoto(
  2169  		this.ref, js.Pointer(&fn),
  2170  	)
  2171  	return
  2172  }
  2173  
  2174  // TakePhoto calls the method "ImageCapture.takePhoto".
  2175  func (this ImageCapture) TakePhoto(photoSettings PhotoSettings) (ret js.Promise[Blob]) {
  2176  	bindings.CallImageCaptureTakePhoto(
  2177  		this.ref, js.Pointer(&ret),
  2178  		js.Pointer(&photoSettings),
  2179  	)
  2180  
  2181  	return
  2182  }
  2183  
  2184  // TryTakePhoto calls the method "ImageCapture.takePhoto"
  2185  // in a try/catch block and returns (_, err, ok = false) when it went through
  2186  // the catch clause.
  2187  func (this ImageCapture) TryTakePhoto(photoSettings PhotoSettings) (ret js.Promise[Blob], exception js.Any, ok bool) {
  2188  	ok = js.True == bindings.TryImageCaptureTakePhoto(
  2189  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2190  		js.Pointer(&photoSettings),
  2191  	)
  2192  
  2193  	return
  2194  }
  2195  
  2196  // HasFuncTakePhoto1 returns true if the method "ImageCapture.takePhoto" exists.
  2197  func (this ImageCapture) HasFuncTakePhoto1() bool {
  2198  	return js.True == bindings.HasFuncImageCaptureTakePhoto1(
  2199  		this.ref,
  2200  	)
  2201  }
  2202  
  2203  // FuncTakePhoto1 returns the method "ImageCapture.takePhoto".
  2204  func (this ImageCapture) FuncTakePhoto1() (fn js.Func[func() js.Promise[Blob]]) {
  2205  	bindings.FuncImageCaptureTakePhoto1(
  2206  		this.ref, js.Pointer(&fn),
  2207  	)
  2208  	return
  2209  }
  2210  
  2211  // TakePhoto1 calls the method "ImageCapture.takePhoto".
  2212  func (this ImageCapture) TakePhoto1() (ret js.Promise[Blob]) {
  2213  	bindings.CallImageCaptureTakePhoto1(
  2214  		this.ref, js.Pointer(&ret),
  2215  	)
  2216  
  2217  	return
  2218  }
  2219  
  2220  // TryTakePhoto1 calls the method "ImageCapture.takePhoto"
  2221  // in a try/catch block and returns (_, err, ok = false) when it went through
  2222  // the catch clause.
  2223  func (this ImageCapture) TryTakePhoto1() (ret js.Promise[Blob], exception js.Any, ok bool) {
  2224  	ok = js.True == bindings.TryImageCaptureTakePhoto1(
  2225  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2226  	)
  2227  
  2228  	return
  2229  }
  2230  
  2231  // HasFuncGetPhotoCapabilities returns true if the method "ImageCapture.getPhotoCapabilities" exists.
  2232  func (this ImageCapture) HasFuncGetPhotoCapabilities() bool {
  2233  	return js.True == bindings.HasFuncImageCaptureGetPhotoCapabilities(
  2234  		this.ref,
  2235  	)
  2236  }
  2237  
  2238  // FuncGetPhotoCapabilities returns the method "ImageCapture.getPhotoCapabilities".
  2239  func (this ImageCapture) FuncGetPhotoCapabilities() (fn js.Func[func() js.Promise[PhotoCapabilities]]) {
  2240  	bindings.FuncImageCaptureGetPhotoCapabilities(
  2241  		this.ref, js.Pointer(&fn),
  2242  	)
  2243  	return
  2244  }
  2245  
  2246  // GetPhotoCapabilities calls the method "ImageCapture.getPhotoCapabilities".
  2247  func (this ImageCapture) GetPhotoCapabilities() (ret js.Promise[PhotoCapabilities]) {
  2248  	bindings.CallImageCaptureGetPhotoCapabilities(
  2249  		this.ref, js.Pointer(&ret),
  2250  	)
  2251  
  2252  	return
  2253  }
  2254  
  2255  // TryGetPhotoCapabilities calls the method "ImageCapture.getPhotoCapabilities"
  2256  // in a try/catch block and returns (_, err, ok = false) when it went through
  2257  // the catch clause.
  2258  func (this ImageCapture) TryGetPhotoCapabilities() (ret js.Promise[PhotoCapabilities], exception js.Any, ok bool) {
  2259  	ok = js.True == bindings.TryImageCaptureGetPhotoCapabilities(
  2260  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2261  	)
  2262  
  2263  	return
  2264  }
  2265  
  2266  // HasFuncGetPhotoSettings returns true if the method "ImageCapture.getPhotoSettings" exists.
  2267  func (this ImageCapture) HasFuncGetPhotoSettings() bool {
  2268  	return js.True == bindings.HasFuncImageCaptureGetPhotoSettings(
  2269  		this.ref,
  2270  	)
  2271  }
  2272  
  2273  // FuncGetPhotoSettings returns the method "ImageCapture.getPhotoSettings".
  2274  func (this ImageCapture) FuncGetPhotoSettings() (fn js.Func[func() js.Promise[PhotoSettings]]) {
  2275  	bindings.FuncImageCaptureGetPhotoSettings(
  2276  		this.ref, js.Pointer(&fn),
  2277  	)
  2278  	return
  2279  }
  2280  
  2281  // GetPhotoSettings calls the method "ImageCapture.getPhotoSettings".
  2282  func (this ImageCapture) GetPhotoSettings() (ret js.Promise[PhotoSettings]) {
  2283  	bindings.CallImageCaptureGetPhotoSettings(
  2284  		this.ref, js.Pointer(&ret),
  2285  	)
  2286  
  2287  	return
  2288  }
  2289  
  2290  // TryGetPhotoSettings calls the method "ImageCapture.getPhotoSettings"
  2291  // in a try/catch block and returns (_, err, ok = false) when it went through
  2292  // the catch clause.
  2293  func (this ImageCapture) TryGetPhotoSettings() (ret js.Promise[PhotoSettings], exception js.Any, ok bool) {
  2294  	ok = js.True == bindings.TryImageCaptureGetPhotoSettings(
  2295  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2296  	)
  2297  
  2298  	return
  2299  }
  2300  
  2301  // HasFuncGrabFrame returns true if the method "ImageCapture.grabFrame" exists.
  2302  func (this ImageCapture) HasFuncGrabFrame() bool {
  2303  	return js.True == bindings.HasFuncImageCaptureGrabFrame(
  2304  		this.ref,
  2305  	)
  2306  }
  2307  
  2308  // FuncGrabFrame returns the method "ImageCapture.grabFrame".
  2309  func (this ImageCapture) FuncGrabFrame() (fn js.Func[func() js.Promise[ImageBitmap]]) {
  2310  	bindings.FuncImageCaptureGrabFrame(
  2311  		this.ref, js.Pointer(&fn),
  2312  	)
  2313  	return
  2314  }
  2315  
  2316  // GrabFrame calls the method "ImageCapture.grabFrame".
  2317  func (this ImageCapture) GrabFrame() (ret js.Promise[ImageBitmap]) {
  2318  	bindings.CallImageCaptureGrabFrame(
  2319  		this.ref, js.Pointer(&ret),
  2320  	)
  2321  
  2322  	return
  2323  }
  2324  
  2325  // TryGrabFrame calls the method "ImageCapture.grabFrame"
  2326  // in a try/catch block and returns (_, err, ok = false) when it went through
  2327  // the catch clause.
  2328  func (this ImageCapture) TryGrabFrame() (ret js.Promise[ImageBitmap], exception js.Any, ok bool) {
  2329  	ok = js.True == bindings.TryImageCaptureGrabFrame(
  2330  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2331  	)
  2332  
  2333  	return
  2334  }
  2335  
  2336  type ImageDecodeOptions struct {
  2337  	// FrameIndex is "ImageDecodeOptions.frameIndex"
  2338  	//
  2339  	// Optional, defaults to 0.
  2340  	//
  2341  	// NOTE: FFI_USE_FrameIndex MUST be set to true to make this field effective.
  2342  	FrameIndex uint32
  2343  	// CompleteFramesOnly is "ImageDecodeOptions.completeFramesOnly"
  2344  	//
  2345  	// Optional, defaults to true.
  2346  	//
  2347  	// NOTE: FFI_USE_CompleteFramesOnly MUST be set to true to make this field effective.
  2348  	CompleteFramesOnly bool
  2349  
  2350  	FFI_USE_FrameIndex         bool // for FrameIndex.
  2351  	FFI_USE_CompleteFramesOnly bool // for CompleteFramesOnly.
  2352  
  2353  	FFI_USE bool
  2354  }
  2355  
  2356  // FromRef calls UpdateFrom and returns a ImageDecodeOptions with all fields set.
  2357  func (p ImageDecodeOptions) FromRef(ref js.Ref) ImageDecodeOptions {
  2358  	p.UpdateFrom(ref)
  2359  	return p
  2360  }
  2361  
  2362  // New creates a new ImageDecodeOptions in the application heap.
  2363  func (p ImageDecodeOptions) New() js.Ref {
  2364  	return bindings.ImageDecodeOptionsJSLoad(
  2365  		js.Pointer(&p), js.True, 0,
  2366  	)
  2367  }
  2368  
  2369  // UpdateFrom copies value of all fields of the heap object to p.
  2370  func (p *ImageDecodeOptions) UpdateFrom(ref js.Ref) {
  2371  	bindings.ImageDecodeOptionsJSStore(
  2372  		js.Pointer(p), ref,
  2373  	)
  2374  }
  2375  
  2376  // Update writes all fields of the p to the heap object referenced by ref.
  2377  func (p *ImageDecodeOptions) Update(ref js.Ref) {
  2378  	bindings.ImageDecodeOptionsJSLoad(
  2379  		js.Pointer(p), js.False, ref,
  2380  	)
  2381  }
  2382  
  2383  // FreeMembers frees fields with heap reference, if recursive is true
  2384  // free all heap references reachable from p.
  2385  func (p *ImageDecodeOptions) FreeMembers(recursive bool) {
  2386  }
  2387  
  2388  type ImageDecodeResult struct {
  2389  	// Image is "ImageDecodeResult.image"
  2390  	//
  2391  	// Required
  2392  	Image VideoFrame
  2393  	// Complete is "ImageDecodeResult.complete"
  2394  	//
  2395  	// Required
  2396  	Complete bool
  2397  
  2398  	FFI_USE bool
  2399  }
  2400  
  2401  // FromRef calls UpdateFrom and returns a ImageDecodeResult with all fields set.
  2402  func (p ImageDecodeResult) FromRef(ref js.Ref) ImageDecodeResult {
  2403  	p.UpdateFrom(ref)
  2404  	return p
  2405  }
  2406  
  2407  // New creates a new ImageDecodeResult in the application heap.
  2408  func (p ImageDecodeResult) New() js.Ref {
  2409  	return bindings.ImageDecodeResultJSLoad(
  2410  		js.Pointer(&p), js.True, 0,
  2411  	)
  2412  }
  2413  
  2414  // UpdateFrom copies value of all fields of the heap object to p.
  2415  func (p *ImageDecodeResult) UpdateFrom(ref js.Ref) {
  2416  	bindings.ImageDecodeResultJSStore(
  2417  		js.Pointer(p), ref,
  2418  	)
  2419  }
  2420  
  2421  // Update writes all fields of the p to the heap object referenced by ref.
  2422  func (p *ImageDecodeResult) Update(ref js.Ref) {
  2423  	bindings.ImageDecodeResultJSLoad(
  2424  		js.Pointer(p), js.False, ref,
  2425  	)
  2426  }
  2427  
  2428  // FreeMembers frees fields with heap reference, if recursive is true
  2429  // free all heap references reachable from p.
  2430  func (p *ImageDecodeResult) FreeMembers(recursive bool) {
  2431  	js.Free(
  2432  		p.Image.Ref(),
  2433  	)
  2434  	p.Image = p.Image.FromRef(js.Undefined)
  2435  }
  2436  
  2437  type ImageDecoderInit struct {
  2438  	// Type is "ImageDecoderInit.type"
  2439  	//
  2440  	// Required
  2441  	Type js.String
  2442  	// Data is "ImageDecoderInit.data"
  2443  	//
  2444  	// Required
  2445  	Data ImageBufferSource
  2446  	// ColorSpaceConversion is "ImageDecoderInit.colorSpaceConversion"
  2447  	//
  2448  	// Optional, defaults to "default".
  2449  	ColorSpaceConversion ColorSpaceConversion
  2450  	// DesiredWidth is "ImageDecoderInit.desiredWidth"
  2451  	//
  2452  	// Optional
  2453  	//
  2454  	// NOTE: FFI_USE_DesiredWidth MUST be set to true to make this field effective.
  2455  	DesiredWidth uint32
  2456  	// DesiredHeight is "ImageDecoderInit.desiredHeight"
  2457  	//
  2458  	// Optional
  2459  	//
  2460  	// NOTE: FFI_USE_DesiredHeight MUST be set to true to make this field effective.
  2461  	DesiredHeight uint32
  2462  	// PreferAnimation is "ImageDecoderInit.preferAnimation"
  2463  	//
  2464  	// Optional
  2465  	//
  2466  	// NOTE: FFI_USE_PreferAnimation MUST be set to true to make this field effective.
  2467  	PreferAnimation bool
  2468  	// Transfer is "ImageDecoderInit.transfer"
  2469  	//
  2470  	// Optional, defaults to [].
  2471  	Transfer js.Array[js.ArrayBuffer]
  2472  
  2473  	FFI_USE_DesiredWidth    bool // for DesiredWidth.
  2474  	FFI_USE_DesiredHeight   bool // for DesiredHeight.
  2475  	FFI_USE_PreferAnimation bool // for PreferAnimation.
  2476  
  2477  	FFI_USE bool
  2478  }
  2479  
  2480  // FromRef calls UpdateFrom and returns a ImageDecoderInit with all fields set.
  2481  func (p ImageDecoderInit) FromRef(ref js.Ref) ImageDecoderInit {
  2482  	p.UpdateFrom(ref)
  2483  	return p
  2484  }
  2485  
  2486  // New creates a new ImageDecoderInit in the application heap.
  2487  func (p ImageDecoderInit) New() js.Ref {
  2488  	return bindings.ImageDecoderInitJSLoad(
  2489  		js.Pointer(&p), js.True, 0,
  2490  	)
  2491  }
  2492  
  2493  // UpdateFrom copies value of all fields of the heap object to p.
  2494  func (p *ImageDecoderInit) UpdateFrom(ref js.Ref) {
  2495  	bindings.ImageDecoderInitJSStore(
  2496  		js.Pointer(p), ref,
  2497  	)
  2498  }
  2499  
  2500  // Update writes all fields of the p to the heap object referenced by ref.
  2501  func (p *ImageDecoderInit) Update(ref js.Ref) {
  2502  	bindings.ImageDecoderInitJSLoad(
  2503  		js.Pointer(p), js.False, ref,
  2504  	)
  2505  }
  2506  
  2507  // FreeMembers frees fields with heap reference, if recursive is true
  2508  // free all heap references reachable from p.
  2509  func (p *ImageDecoderInit) FreeMembers(recursive bool) {
  2510  	js.Free(
  2511  		p.Type.Ref(),
  2512  		p.Data.Ref(),
  2513  		p.Transfer.Ref(),
  2514  	)
  2515  	p.Type = p.Type.FromRef(js.Undefined)
  2516  	p.Data = p.Data.FromRef(js.Undefined)
  2517  	p.Transfer = p.Transfer.FromRef(js.Undefined)
  2518  }
  2519  
  2520  type ImageTrack struct {
  2521  	ref js.Ref
  2522  }
  2523  
  2524  func (this ImageTrack) Once() ImageTrack {
  2525  	this.ref.Once()
  2526  	return this
  2527  }
  2528  
  2529  func (this ImageTrack) Ref() js.Ref {
  2530  	return this.ref
  2531  }
  2532  
  2533  func (this ImageTrack) FromRef(ref js.Ref) ImageTrack {
  2534  	this.ref = ref
  2535  	return this
  2536  }
  2537  
  2538  func (this ImageTrack) Free() {
  2539  	this.ref.Free()
  2540  }
  2541  
  2542  // Animated returns the value of property "ImageTrack.animated".
  2543  //
  2544  // It returns ok=false if there is no such property.
  2545  func (this ImageTrack) Animated() (ret bool, ok bool) {
  2546  	ok = js.True == bindings.GetImageTrackAnimated(
  2547  		this.ref, js.Pointer(&ret),
  2548  	)
  2549  	return
  2550  }
  2551  
  2552  // FrameCount returns the value of property "ImageTrack.frameCount".
  2553  //
  2554  // It returns ok=false if there is no such property.
  2555  func (this ImageTrack) FrameCount() (ret uint32, ok bool) {
  2556  	ok = js.True == bindings.GetImageTrackFrameCount(
  2557  		this.ref, js.Pointer(&ret),
  2558  	)
  2559  	return
  2560  }
  2561  
  2562  // RepetitionCount returns the value of property "ImageTrack.repetitionCount".
  2563  //
  2564  // It returns ok=false if there is no such property.
  2565  func (this ImageTrack) RepetitionCount() (ret float32, ok bool) {
  2566  	ok = js.True == bindings.GetImageTrackRepetitionCount(
  2567  		this.ref, js.Pointer(&ret),
  2568  	)
  2569  	return
  2570  }
  2571  
  2572  // Selected returns the value of property "ImageTrack.selected".
  2573  //
  2574  // It returns ok=false if there is no such property.
  2575  func (this ImageTrack) Selected() (ret bool, ok bool) {
  2576  	ok = js.True == bindings.GetImageTrackSelected(
  2577  		this.ref, js.Pointer(&ret),
  2578  	)
  2579  	return
  2580  }
  2581  
  2582  // SetSelected sets the value of property "ImageTrack.selected" to val.
  2583  //
  2584  // It returns false if the property cannot be set.
  2585  func (this ImageTrack) SetSelected(val bool) bool {
  2586  	return js.True == bindings.SetImageTrackSelected(
  2587  		this.ref,
  2588  		js.Bool(bool(val)),
  2589  	)
  2590  }
  2591  
  2592  type ImageTrackList struct {
  2593  	ref js.Ref
  2594  }
  2595  
  2596  func (this ImageTrackList) Once() ImageTrackList {
  2597  	this.ref.Once()
  2598  	return this
  2599  }
  2600  
  2601  func (this ImageTrackList) Ref() js.Ref {
  2602  	return this.ref
  2603  }
  2604  
  2605  func (this ImageTrackList) FromRef(ref js.Ref) ImageTrackList {
  2606  	this.ref = ref
  2607  	return this
  2608  }
  2609  
  2610  func (this ImageTrackList) Free() {
  2611  	this.ref.Free()
  2612  }
  2613  
  2614  // Ready returns the value of property "ImageTrackList.ready".
  2615  //
  2616  // It returns ok=false if there is no such property.
  2617  func (this ImageTrackList) Ready() (ret js.Promise[js.Void], ok bool) {
  2618  	ok = js.True == bindings.GetImageTrackListReady(
  2619  		this.ref, js.Pointer(&ret),
  2620  	)
  2621  	return
  2622  }
  2623  
  2624  // Length returns the value of property "ImageTrackList.length".
  2625  //
  2626  // It returns ok=false if there is no such property.
  2627  func (this ImageTrackList) Length() (ret uint32, ok bool) {
  2628  	ok = js.True == bindings.GetImageTrackListLength(
  2629  		this.ref, js.Pointer(&ret),
  2630  	)
  2631  	return
  2632  }
  2633  
  2634  // SelectedIndex returns the value of property "ImageTrackList.selectedIndex".
  2635  //
  2636  // It returns ok=false if there is no such property.
  2637  func (this ImageTrackList) SelectedIndex() (ret int32, ok bool) {
  2638  	ok = js.True == bindings.GetImageTrackListSelectedIndex(
  2639  		this.ref, js.Pointer(&ret),
  2640  	)
  2641  	return
  2642  }
  2643  
  2644  // SelectedTrack returns the value of property "ImageTrackList.selectedTrack".
  2645  //
  2646  // It returns ok=false if there is no such property.
  2647  func (this ImageTrackList) SelectedTrack() (ret ImageTrack, ok bool) {
  2648  	ok = js.True == bindings.GetImageTrackListSelectedTrack(
  2649  		this.ref, js.Pointer(&ret),
  2650  	)
  2651  	return
  2652  }
  2653  
  2654  // HasFuncGet returns true if the method "ImageTrackList." exists.
  2655  func (this ImageTrackList) HasFuncGet() bool {
  2656  	return js.True == bindings.HasFuncImageTrackListGet(
  2657  		this.ref,
  2658  	)
  2659  }
  2660  
  2661  // FuncGet returns the method "ImageTrackList.".
  2662  func (this ImageTrackList) FuncGet() (fn js.Func[func(index uint32) ImageTrack]) {
  2663  	bindings.FuncImageTrackListGet(
  2664  		this.ref, js.Pointer(&fn),
  2665  	)
  2666  	return
  2667  }
  2668  
  2669  // Get calls the method "ImageTrackList.".
  2670  func (this ImageTrackList) Get(index uint32) (ret ImageTrack) {
  2671  	bindings.CallImageTrackListGet(
  2672  		this.ref, js.Pointer(&ret),
  2673  		uint32(index),
  2674  	)
  2675  
  2676  	return
  2677  }
  2678  
  2679  // TryGet calls the method "ImageTrackList."
  2680  // in a try/catch block and returns (_, err, ok = false) when it went through
  2681  // the catch clause.
  2682  func (this ImageTrackList) TryGet(index uint32) (ret ImageTrack, exception js.Any, ok bool) {
  2683  	ok = js.True == bindings.TryImageTrackListGet(
  2684  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2685  		uint32(index),
  2686  	)
  2687  
  2688  	return
  2689  }
  2690  
  2691  func NewImageDecoder(init ImageDecoderInit) (ret ImageDecoder) {
  2692  	ret.ref = bindings.NewImageDecoderByImageDecoder(
  2693  		js.Pointer(&init))
  2694  	return
  2695  }
  2696  
  2697  type ImageDecoder struct {
  2698  	ref js.Ref
  2699  }
  2700  
  2701  func (this ImageDecoder) Once() ImageDecoder {
  2702  	this.ref.Once()
  2703  	return this
  2704  }
  2705  
  2706  func (this ImageDecoder) Ref() js.Ref {
  2707  	return this.ref
  2708  }
  2709  
  2710  func (this ImageDecoder) FromRef(ref js.Ref) ImageDecoder {
  2711  	this.ref = ref
  2712  	return this
  2713  }
  2714  
  2715  func (this ImageDecoder) Free() {
  2716  	this.ref.Free()
  2717  }
  2718  
  2719  // Type returns the value of property "ImageDecoder.type".
  2720  //
  2721  // It returns ok=false if there is no such property.
  2722  func (this ImageDecoder) Type() (ret js.String, ok bool) {
  2723  	ok = js.True == bindings.GetImageDecoderType(
  2724  		this.ref, js.Pointer(&ret),
  2725  	)
  2726  	return
  2727  }
  2728  
  2729  // Complete returns the value of property "ImageDecoder.complete".
  2730  //
  2731  // It returns ok=false if there is no such property.
  2732  func (this ImageDecoder) Complete() (ret bool, ok bool) {
  2733  	ok = js.True == bindings.GetImageDecoderComplete(
  2734  		this.ref, js.Pointer(&ret),
  2735  	)
  2736  	return
  2737  }
  2738  
  2739  // Completed returns the value of property "ImageDecoder.completed".
  2740  //
  2741  // It returns ok=false if there is no such property.
  2742  func (this ImageDecoder) Completed() (ret js.Promise[js.Void], ok bool) {
  2743  	ok = js.True == bindings.GetImageDecoderCompleted(
  2744  		this.ref, js.Pointer(&ret),
  2745  	)
  2746  	return
  2747  }
  2748  
  2749  // Tracks returns the value of property "ImageDecoder.tracks".
  2750  //
  2751  // It returns ok=false if there is no such property.
  2752  func (this ImageDecoder) Tracks() (ret ImageTrackList, ok bool) {
  2753  	ok = js.True == bindings.GetImageDecoderTracks(
  2754  		this.ref, js.Pointer(&ret),
  2755  	)
  2756  	return
  2757  }
  2758  
  2759  // HasFuncDecode returns true if the method "ImageDecoder.decode" exists.
  2760  func (this ImageDecoder) HasFuncDecode() bool {
  2761  	return js.True == bindings.HasFuncImageDecoderDecode(
  2762  		this.ref,
  2763  	)
  2764  }
  2765  
  2766  // FuncDecode returns the method "ImageDecoder.decode".
  2767  func (this ImageDecoder) FuncDecode() (fn js.Func[func(options ImageDecodeOptions) js.Promise[ImageDecodeResult]]) {
  2768  	bindings.FuncImageDecoderDecode(
  2769  		this.ref, js.Pointer(&fn),
  2770  	)
  2771  	return
  2772  }
  2773  
  2774  // Decode calls the method "ImageDecoder.decode".
  2775  func (this ImageDecoder) Decode(options ImageDecodeOptions) (ret js.Promise[ImageDecodeResult]) {
  2776  	bindings.CallImageDecoderDecode(
  2777  		this.ref, js.Pointer(&ret),
  2778  		js.Pointer(&options),
  2779  	)
  2780  
  2781  	return
  2782  }
  2783  
  2784  // TryDecode calls the method "ImageDecoder.decode"
  2785  // in a try/catch block and returns (_, err, ok = false) when it went through
  2786  // the catch clause.
  2787  func (this ImageDecoder) TryDecode(options ImageDecodeOptions) (ret js.Promise[ImageDecodeResult], exception js.Any, ok bool) {
  2788  	ok = js.True == bindings.TryImageDecoderDecode(
  2789  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2790  		js.Pointer(&options),
  2791  	)
  2792  
  2793  	return
  2794  }
  2795  
  2796  // HasFuncDecode1 returns true if the method "ImageDecoder.decode" exists.
  2797  func (this ImageDecoder) HasFuncDecode1() bool {
  2798  	return js.True == bindings.HasFuncImageDecoderDecode1(
  2799  		this.ref,
  2800  	)
  2801  }
  2802  
  2803  // FuncDecode1 returns the method "ImageDecoder.decode".
  2804  func (this ImageDecoder) FuncDecode1() (fn js.Func[func() js.Promise[ImageDecodeResult]]) {
  2805  	bindings.FuncImageDecoderDecode1(
  2806  		this.ref, js.Pointer(&fn),
  2807  	)
  2808  	return
  2809  }
  2810  
  2811  // Decode1 calls the method "ImageDecoder.decode".
  2812  func (this ImageDecoder) Decode1() (ret js.Promise[ImageDecodeResult]) {
  2813  	bindings.CallImageDecoderDecode1(
  2814  		this.ref, js.Pointer(&ret),
  2815  	)
  2816  
  2817  	return
  2818  }
  2819  
  2820  // TryDecode1 calls the method "ImageDecoder.decode"
  2821  // in a try/catch block and returns (_, err, ok = false) when it went through
  2822  // the catch clause.
  2823  func (this ImageDecoder) TryDecode1() (ret js.Promise[ImageDecodeResult], exception js.Any, ok bool) {
  2824  	ok = js.True == bindings.TryImageDecoderDecode1(
  2825  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2826  	)
  2827  
  2828  	return
  2829  }
  2830  
  2831  // HasFuncReset returns true if the method "ImageDecoder.reset" exists.
  2832  func (this ImageDecoder) HasFuncReset() bool {
  2833  	return js.True == bindings.HasFuncImageDecoderReset(
  2834  		this.ref,
  2835  	)
  2836  }
  2837  
  2838  // FuncReset returns the method "ImageDecoder.reset".
  2839  func (this ImageDecoder) FuncReset() (fn js.Func[func()]) {
  2840  	bindings.FuncImageDecoderReset(
  2841  		this.ref, js.Pointer(&fn),
  2842  	)
  2843  	return
  2844  }
  2845  
  2846  // Reset calls the method "ImageDecoder.reset".
  2847  func (this ImageDecoder) Reset() (ret js.Void) {
  2848  	bindings.CallImageDecoderReset(
  2849  		this.ref, js.Pointer(&ret),
  2850  	)
  2851  
  2852  	return
  2853  }
  2854  
  2855  // TryReset calls the method "ImageDecoder.reset"
  2856  // in a try/catch block and returns (_, err, ok = false) when it went through
  2857  // the catch clause.
  2858  func (this ImageDecoder) TryReset() (ret js.Void, exception js.Any, ok bool) {
  2859  	ok = js.True == bindings.TryImageDecoderReset(
  2860  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2861  	)
  2862  
  2863  	return
  2864  }
  2865  
  2866  // HasFuncClose returns true if the method "ImageDecoder.close" exists.
  2867  func (this ImageDecoder) HasFuncClose() bool {
  2868  	return js.True == bindings.HasFuncImageDecoderClose(
  2869  		this.ref,
  2870  	)
  2871  }
  2872  
  2873  // FuncClose returns the method "ImageDecoder.close".
  2874  func (this ImageDecoder) FuncClose() (fn js.Func[func()]) {
  2875  	bindings.FuncImageDecoderClose(
  2876  		this.ref, js.Pointer(&fn),
  2877  	)
  2878  	return
  2879  }
  2880  
  2881  // Close calls the method "ImageDecoder.close".
  2882  func (this ImageDecoder) Close() (ret js.Void) {
  2883  	bindings.CallImageDecoderClose(
  2884  		this.ref, js.Pointer(&ret),
  2885  	)
  2886  
  2887  	return
  2888  }
  2889  
  2890  // TryClose calls the method "ImageDecoder.close"
  2891  // in a try/catch block and returns (_, err, ok = false) when it went through
  2892  // the catch clause.
  2893  func (this ImageDecoder) TryClose() (ret js.Void, exception js.Any, ok bool) {
  2894  	ok = js.True == bindings.TryImageDecoderClose(
  2895  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2896  	)
  2897  
  2898  	return
  2899  }
  2900  
  2901  // HasFuncIsTypeSupported returns true if the static method "ImageDecoder.isTypeSupported" exists.
  2902  func (this ImageDecoder) HasFuncIsTypeSupported() bool {
  2903  	return js.True == bindings.HasFuncImageDecoderIsTypeSupported(
  2904  		this.ref,
  2905  	)
  2906  }
  2907  
  2908  // FuncIsTypeSupported returns the static method "ImageDecoder.isTypeSupported".
  2909  func (this ImageDecoder) FuncIsTypeSupported() (fn js.Func[func(typ js.String) js.Promise[js.Boolean]]) {
  2910  	bindings.FuncImageDecoderIsTypeSupported(
  2911  		this.ref, js.Pointer(&fn),
  2912  	)
  2913  	return
  2914  }
  2915  
  2916  // IsTypeSupported calls the static method "ImageDecoder.isTypeSupported".
  2917  func (this ImageDecoder) IsTypeSupported(typ js.String) (ret js.Promise[js.Boolean]) {
  2918  	bindings.CallImageDecoderIsTypeSupported(
  2919  		this.ref, js.Pointer(&ret),
  2920  		typ.Ref(),
  2921  	)
  2922  
  2923  	return
  2924  }
  2925  
  2926  // TryIsTypeSupported calls the static method "ImageDecoder.isTypeSupported"
  2927  // in a try/catch block and returns (_, err, ok = false) when it went through
  2928  // the catch clause.
  2929  func (this ImageDecoder) TryIsTypeSupported(typ js.String) (ret js.Promise[js.Boolean], exception js.Any, ok bool) {
  2930  	ok = js.True == bindings.TryImageDecoderIsTypeSupported(
  2931  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2932  		typ.Ref(),
  2933  	)
  2934  
  2935  	return
  2936  }
  2937  
  2938  type ImportExportKind uint32
  2939  
  2940  const (
  2941  	_ ImportExportKind = iota
  2942  
  2943  	ImportExportKind_FUNCTION
  2944  	ImportExportKind_TABLE
  2945  	ImportExportKind_MEMORY
  2946  	ImportExportKind_GLOBAL
  2947  )
  2948  
  2949  func (ImportExportKind) FromRef(str js.Ref) ImportExportKind {
  2950  	return ImportExportKind(bindings.ConstOfImportExportKind(str))
  2951  }
  2952  
  2953  func (x ImportExportKind) String() (string, bool) {
  2954  	switch x {
  2955  	case ImportExportKind_FUNCTION:
  2956  		return "function", true
  2957  	case ImportExportKind_TABLE:
  2958  		return "table", true
  2959  	case ImportExportKind_MEMORY:
  2960  		return "memory", true
  2961  	case ImportExportKind_GLOBAL:
  2962  		return "global", true
  2963  	default:
  2964  		return "", false
  2965  	}
  2966  }
  2967  
  2968  type InputDeviceCapabilitiesInit struct {
  2969  	// FiresTouchEvents is "InputDeviceCapabilitiesInit.firesTouchEvents"
  2970  	//
  2971  	// Optional, defaults to false.
  2972  	//
  2973  	// NOTE: FFI_USE_FiresTouchEvents MUST be set to true to make this field effective.
  2974  	FiresTouchEvents bool
  2975  	// PointerMovementScrolls is "InputDeviceCapabilitiesInit.pointerMovementScrolls"
  2976  	//
  2977  	// Optional, defaults to false.
  2978  	//
  2979  	// NOTE: FFI_USE_PointerMovementScrolls MUST be set to true to make this field effective.
  2980  	PointerMovementScrolls bool
  2981  
  2982  	FFI_USE_FiresTouchEvents       bool // for FiresTouchEvents.
  2983  	FFI_USE_PointerMovementScrolls bool // for PointerMovementScrolls.
  2984  
  2985  	FFI_USE bool
  2986  }
  2987  
  2988  // FromRef calls UpdateFrom and returns a InputDeviceCapabilitiesInit with all fields set.
  2989  func (p InputDeviceCapabilitiesInit) FromRef(ref js.Ref) InputDeviceCapabilitiesInit {
  2990  	p.UpdateFrom(ref)
  2991  	return p
  2992  }
  2993  
  2994  // New creates a new InputDeviceCapabilitiesInit in the application heap.
  2995  func (p InputDeviceCapabilitiesInit) New() js.Ref {
  2996  	return bindings.InputDeviceCapabilitiesInitJSLoad(
  2997  		js.Pointer(&p), js.True, 0,
  2998  	)
  2999  }
  3000  
  3001  // UpdateFrom copies value of all fields of the heap object to p.
  3002  func (p *InputDeviceCapabilitiesInit) UpdateFrom(ref js.Ref) {
  3003  	bindings.InputDeviceCapabilitiesInitJSStore(
  3004  		js.Pointer(p), ref,
  3005  	)
  3006  }
  3007  
  3008  // Update writes all fields of the p to the heap object referenced by ref.
  3009  func (p *InputDeviceCapabilitiesInit) Update(ref js.Ref) {
  3010  	bindings.InputDeviceCapabilitiesInitJSLoad(
  3011  		js.Pointer(p), js.False, ref,
  3012  	)
  3013  }
  3014  
  3015  // FreeMembers frees fields with heap reference, if recursive is true
  3016  // free all heap references reachable from p.
  3017  func (p *InputDeviceCapabilitiesInit) FreeMembers(recursive bool) {
  3018  }
  3019  
  3020  func NewInputDeviceCapabilities(deviceInitDict InputDeviceCapabilitiesInit) (ret InputDeviceCapabilities) {
  3021  	ret.ref = bindings.NewInputDeviceCapabilitiesByInputDeviceCapabilities(
  3022  		js.Pointer(&deviceInitDict))
  3023  	return
  3024  }
  3025  
  3026  func NewInputDeviceCapabilitiesByInputDeviceCapabilities1() (ret InputDeviceCapabilities) {
  3027  	ret.ref = bindings.NewInputDeviceCapabilitiesByInputDeviceCapabilities1()
  3028  	return
  3029  }
  3030  
  3031  type InputDeviceCapabilities struct {
  3032  	ref js.Ref
  3033  }
  3034  
  3035  func (this InputDeviceCapabilities) Once() InputDeviceCapabilities {
  3036  	this.ref.Once()
  3037  	return this
  3038  }
  3039  
  3040  func (this InputDeviceCapabilities) Ref() js.Ref {
  3041  	return this.ref
  3042  }
  3043  
  3044  func (this InputDeviceCapabilities) FromRef(ref js.Ref) InputDeviceCapabilities {
  3045  	this.ref = ref
  3046  	return this
  3047  }
  3048  
  3049  func (this InputDeviceCapabilities) Free() {
  3050  	this.ref.Free()
  3051  }
  3052  
  3053  // FiresTouchEvents returns the value of property "InputDeviceCapabilities.firesTouchEvents".
  3054  //
  3055  // It returns ok=false if there is no such property.
  3056  func (this InputDeviceCapabilities) FiresTouchEvents() (ret bool, ok bool) {
  3057  	ok = js.True == bindings.GetInputDeviceCapabilitiesFiresTouchEvents(
  3058  		this.ref, js.Pointer(&ret),
  3059  	)
  3060  	return
  3061  }
  3062  
  3063  // PointerMovementScrolls returns the value of property "InputDeviceCapabilities.pointerMovementScrolls".
  3064  //
  3065  // It returns ok=false if there is no such property.
  3066  func (this InputDeviceCapabilities) PointerMovementScrolls() (ret bool, ok bool) {
  3067  	ok = js.True == bindings.GetInputDeviceCapabilitiesPointerMovementScrolls(
  3068  		this.ref, js.Pointer(&ret),
  3069  	)
  3070  	return
  3071  }
  3072  
  3073  type InputDeviceInfo struct {
  3074  	MediaDeviceInfo
  3075  }
  3076  
  3077  func (this InputDeviceInfo) Once() InputDeviceInfo {
  3078  	this.ref.Once()
  3079  	return this
  3080  }
  3081  
  3082  func (this InputDeviceInfo) Ref() js.Ref {
  3083  	return this.MediaDeviceInfo.Ref()
  3084  }
  3085  
  3086  func (this InputDeviceInfo) FromRef(ref js.Ref) InputDeviceInfo {
  3087  	this.MediaDeviceInfo = this.MediaDeviceInfo.FromRef(ref)
  3088  	return this
  3089  }
  3090  
  3091  func (this InputDeviceInfo) Free() {
  3092  	this.ref.Free()
  3093  }
  3094  
  3095  // HasFuncGetCapabilities returns true if the method "InputDeviceInfo.getCapabilities" exists.
  3096  func (this InputDeviceInfo) HasFuncGetCapabilities() bool {
  3097  	return js.True == bindings.HasFuncInputDeviceInfoGetCapabilities(
  3098  		this.ref,
  3099  	)
  3100  }
  3101  
  3102  // FuncGetCapabilities returns the method "InputDeviceInfo.getCapabilities".
  3103  func (this InputDeviceInfo) FuncGetCapabilities() (fn js.Func[func() MediaTrackCapabilities]) {
  3104  	bindings.FuncInputDeviceInfoGetCapabilities(
  3105  		this.ref, js.Pointer(&fn),
  3106  	)
  3107  	return
  3108  }
  3109  
  3110  // GetCapabilities calls the method "InputDeviceInfo.getCapabilities".
  3111  func (this InputDeviceInfo) GetCapabilities() (ret MediaTrackCapabilities) {
  3112  	bindings.CallInputDeviceInfoGetCapabilities(
  3113  		this.ref, js.Pointer(&ret),
  3114  	)
  3115  
  3116  	return
  3117  }
  3118  
  3119  // TryGetCapabilities calls the method "InputDeviceInfo.getCapabilities"
  3120  // in a try/catch block and returns (_, err, ok = false) when it went through
  3121  // the catch clause.
  3122  func (this InputDeviceInfo) TryGetCapabilities() (ret MediaTrackCapabilities, exception js.Any, ok bool) {
  3123  	ok = js.True == bindings.TryInputDeviceInfoGetCapabilities(
  3124  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3125  	)
  3126  
  3127  	return
  3128  }
  3129  
  3130  type InputEventInit struct {
  3131  	// Data is "InputEventInit.data"
  3132  	//
  3133  	// Optional, defaults to null.
  3134  	Data js.String
  3135  	// IsComposing is "InputEventInit.isComposing"
  3136  	//
  3137  	// Optional, defaults to false.
  3138  	//
  3139  	// NOTE: FFI_USE_IsComposing MUST be set to true to make this field effective.
  3140  	IsComposing bool
  3141  	// InputType is "InputEventInit.inputType"
  3142  	//
  3143  	// Optional, defaults to "".
  3144  	InputType js.String
  3145  	// View is "InputEventInit.view"
  3146  	//
  3147  	// Optional, defaults to null.
  3148  	View Window
  3149  	// Detail is "InputEventInit.detail"
  3150  	//
  3151  	// Optional, defaults to 0.
  3152  	//
  3153  	// NOTE: FFI_USE_Detail MUST be set to true to make this field effective.
  3154  	Detail int32
  3155  	// Bubbles is "InputEventInit.bubbles"
  3156  	//
  3157  	// Optional, defaults to false.
  3158  	//
  3159  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  3160  	Bubbles bool
  3161  	// Cancelable is "InputEventInit.cancelable"
  3162  	//
  3163  	// Optional, defaults to false.
  3164  	//
  3165  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  3166  	Cancelable bool
  3167  	// Composed is "InputEventInit.composed"
  3168  	//
  3169  	// Optional, defaults to false.
  3170  	//
  3171  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  3172  	Composed bool
  3173  	// DataTransfer is "InputEventInit.dataTransfer"
  3174  	//
  3175  	// Optional, defaults to null.
  3176  	DataTransfer DataTransfer
  3177  	// TargetRanges is "InputEventInit.targetRanges"
  3178  	//
  3179  	// Optional, defaults to [].
  3180  	TargetRanges js.Array[StaticRange]
  3181  
  3182  	FFI_USE_IsComposing bool // for IsComposing.
  3183  	FFI_USE_Detail      bool // for Detail.
  3184  	FFI_USE_Bubbles     bool // for Bubbles.
  3185  	FFI_USE_Cancelable  bool // for Cancelable.
  3186  	FFI_USE_Composed    bool // for Composed.
  3187  
  3188  	FFI_USE bool
  3189  }
  3190  
  3191  // FromRef calls UpdateFrom and returns a InputEventInit with all fields set.
  3192  func (p InputEventInit) FromRef(ref js.Ref) InputEventInit {
  3193  	p.UpdateFrom(ref)
  3194  	return p
  3195  }
  3196  
  3197  // New creates a new InputEventInit in the application heap.
  3198  func (p InputEventInit) New() js.Ref {
  3199  	return bindings.InputEventInitJSLoad(
  3200  		js.Pointer(&p), js.True, 0,
  3201  	)
  3202  }
  3203  
  3204  // UpdateFrom copies value of all fields of the heap object to p.
  3205  func (p *InputEventInit) UpdateFrom(ref js.Ref) {
  3206  	bindings.InputEventInitJSStore(
  3207  		js.Pointer(p), ref,
  3208  	)
  3209  }
  3210  
  3211  // Update writes all fields of the p to the heap object referenced by ref.
  3212  func (p *InputEventInit) Update(ref js.Ref) {
  3213  	bindings.InputEventInitJSLoad(
  3214  		js.Pointer(p), js.False, ref,
  3215  	)
  3216  }
  3217  
  3218  // FreeMembers frees fields with heap reference, if recursive is true
  3219  // free all heap references reachable from p.
  3220  func (p *InputEventInit) FreeMembers(recursive bool) {
  3221  	js.Free(
  3222  		p.Data.Ref(),
  3223  		p.InputType.Ref(),
  3224  		p.View.Ref(),
  3225  		p.DataTransfer.Ref(),
  3226  		p.TargetRanges.Ref(),
  3227  	)
  3228  	p.Data = p.Data.FromRef(js.Undefined)
  3229  	p.InputType = p.InputType.FromRef(js.Undefined)
  3230  	p.View = p.View.FromRef(js.Undefined)
  3231  	p.DataTransfer = p.DataTransfer.FromRef(js.Undefined)
  3232  	p.TargetRanges = p.TargetRanges.FromRef(js.Undefined)
  3233  }
  3234  
  3235  func NewInputEvent(typ js.String, eventInitDict InputEventInit) (ret InputEvent) {
  3236  	ret.ref = bindings.NewInputEventByInputEvent(
  3237  		typ.Ref(),
  3238  		js.Pointer(&eventInitDict))
  3239  	return
  3240  }
  3241  
  3242  func NewInputEventByInputEvent1(typ js.String) (ret InputEvent) {
  3243  	ret.ref = bindings.NewInputEventByInputEvent1(
  3244  		typ.Ref())
  3245  	return
  3246  }
  3247  
  3248  type InputEvent struct {
  3249  	UIEvent
  3250  }
  3251  
  3252  func (this InputEvent) Once() InputEvent {
  3253  	this.ref.Once()
  3254  	return this
  3255  }
  3256  
  3257  func (this InputEvent) Ref() js.Ref {
  3258  	return this.UIEvent.Ref()
  3259  }
  3260  
  3261  func (this InputEvent) FromRef(ref js.Ref) InputEvent {
  3262  	this.UIEvent = this.UIEvent.FromRef(ref)
  3263  	return this
  3264  }
  3265  
  3266  func (this InputEvent) Free() {
  3267  	this.ref.Free()
  3268  }
  3269  
  3270  // Data returns the value of property "InputEvent.data".
  3271  //
  3272  // It returns ok=false if there is no such property.
  3273  func (this InputEvent) Data() (ret js.String, ok bool) {
  3274  	ok = js.True == bindings.GetInputEventData(
  3275  		this.ref, js.Pointer(&ret),
  3276  	)
  3277  	return
  3278  }
  3279  
  3280  // IsComposing returns the value of property "InputEvent.isComposing".
  3281  //
  3282  // It returns ok=false if there is no such property.
  3283  func (this InputEvent) IsComposing() (ret bool, ok bool) {
  3284  	ok = js.True == bindings.GetInputEventIsComposing(
  3285  		this.ref, js.Pointer(&ret),
  3286  	)
  3287  	return
  3288  }
  3289  
  3290  // InputType returns the value of property "InputEvent.inputType".
  3291  //
  3292  // It returns ok=false if there is no such property.
  3293  func (this InputEvent) InputType() (ret js.String, ok bool) {
  3294  	ok = js.True == bindings.GetInputEventInputType(
  3295  		this.ref, js.Pointer(&ret),
  3296  	)
  3297  	return
  3298  }
  3299  
  3300  // DataTransfer returns the value of property "InputEvent.dataTransfer".
  3301  //
  3302  // It returns ok=false if there is no such property.
  3303  func (this InputEvent) DataTransfer() (ret DataTransfer, ok bool) {
  3304  	ok = js.True == bindings.GetInputEventDataTransfer(
  3305  		this.ref, js.Pointer(&ret),
  3306  	)
  3307  	return
  3308  }
  3309  
  3310  // HasFuncGetTargetRanges returns true if the method "InputEvent.getTargetRanges" exists.
  3311  func (this InputEvent) HasFuncGetTargetRanges() bool {
  3312  	return js.True == bindings.HasFuncInputEventGetTargetRanges(
  3313  		this.ref,
  3314  	)
  3315  }
  3316  
  3317  // FuncGetTargetRanges returns the method "InputEvent.getTargetRanges".
  3318  func (this InputEvent) FuncGetTargetRanges() (fn js.Func[func() js.Array[StaticRange]]) {
  3319  	bindings.FuncInputEventGetTargetRanges(
  3320  		this.ref, js.Pointer(&fn),
  3321  	)
  3322  	return
  3323  }
  3324  
  3325  // GetTargetRanges calls the method "InputEvent.getTargetRanges".
  3326  func (this InputEvent) GetTargetRanges() (ret js.Array[StaticRange]) {
  3327  	bindings.CallInputEventGetTargetRanges(
  3328  		this.ref, js.Pointer(&ret),
  3329  	)
  3330  
  3331  	return
  3332  }
  3333  
  3334  // TryGetTargetRanges calls the method "InputEvent.getTargetRanges"
  3335  // in a try/catch block and returns (_, err, ok = false) when it went through
  3336  // the catch clause.
  3337  func (this InputEvent) TryGetTargetRanges() (ret js.Array[StaticRange], exception js.Any, ok bool) {
  3338  	ok = js.True == bindings.TryInputEventGetTargetRanges(
  3339  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3340  	)
  3341  
  3342  	return
  3343  }
  3344  
  3345  type ModuleExportDescriptor struct {
  3346  	// Name is "ModuleExportDescriptor.name"
  3347  	//
  3348  	// Required
  3349  	Name js.String
  3350  	// Kind is "ModuleExportDescriptor.kind"
  3351  	//
  3352  	// Required
  3353  	Kind ImportExportKind
  3354  
  3355  	FFI_USE bool
  3356  }
  3357  
  3358  // FromRef calls UpdateFrom and returns a ModuleExportDescriptor with all fields set.
  3359  func (p ModuleExportDescriptor) FromRef(ref js.Ref) ModuleExportDescriptor {
  3360  	p.UpdateFrom(ref)
  3361  	return p
  3362  }
  3363  
  3364  // New creates a new ModuleExportDescriptor in the application heap.
  3365  func (p ModuleExportDescriptor) New() js.Ref {
  3366  	return bindings.ModuleExportDescriptorJSLoad(
  3367  		js.Pointer(&p), js.True, 0,
  3368  	)
  3369  }
  3370  
  3371  // UpdateFrom copies value of all fields of the heap object to p.
  3372  func (p *ModuleExportDescriptor) UpdateFrom(ref js.Ref) {
  3373  	bindings.ModuleExportDescriptorJSStore(
  3374  		js.Pointer(p), ref,
  3375  	)
  3376  }
  3377  
  3378  // Update writes all fields of the p to the heap object referenced by ref.
  3379  func (p *ModuleExportDescriptor) Update(ref js.Ref) {
  3380  	bindings.ModuleExportDescriptorJSLoad(
  3381  		js.Pointer(p), js.False, ref,
  3382  	)
  3383  }
  3384  
  3385  // FreeMembers frees fields with heap reference, if recursive is true
  3386  // free all heap references reachable from p.
  3387  func (p *ModuleExportDescriptor) FreeMembers(recursive bool) {
  3388  	js.Free(
  3389  		p.Name.Ref(),
  3390  	)
  3391  	p.Name = p.Name.FromRef(js.Undefined)
  3392  }
  3393  
  3394  type ModuleImportDescriptor struct {
  3395  	// Module is "ModuleImportDescriptor.module"
  3396  	//
  3397  	// Required
  3398  	Module js.String
  3399  	// Name is "ModuleImportDescriptor.name"
  3400  	//
  3401  	// Required
  3402  	Name js.String
  3403  	// Kind is "ModuleImportDescriptor.kind"
  3404  	//
  3405  	// Required
  3406  	Kind ImportExportKind
  3407  
  3408  	FFI_USE bool
  3409  }
  3410  
  3411  // FromRef calls UpdateFrom and returns a ModuleImportDescriptor with all fields set.
  3412  func (p ModuleImportDescriptor) FromRef(ref js.Ref) ModuleImportDescriptor {
  3413  	p.UpdateFrom(ref)
  3414  	return p
  3415  }
  3416  
  3417  // New creates a new ModuleImportDescriptor in the application heap.
  3418  func (p ModuleImportDescriptor) New() js.Ref {
  3419  	return bindings.ModuleImportDescriptorJSLoad(
  3420  		js.Pointer(&p), js.True, 0,
  3421  	)
  3422  }
  3423  
  3424  // UpdateFrom copies value of all fields of the heap object to p.
  3425  func (p *ModuleImportDescriptor) UpdateFrom(ref js.Ref) {
  3426  	bindings.ModuleImportDescriptorJSStore(
  3427  		js.Pointer(p), ref,
  3428  	)
  3429  }
  3430  
  3431  // Update writes all fields of the p to the heap object referenced by ref.
  3432  func (p *ModuleImportDescriptor) Update(ref js.Ref) {
  3433  	bindings.ModuleImportDescriptorJSLoad(
  3434  		js.Pointer(p), js.False, ref,
  3435  	)
  3436  }
  3437  
  3438  // FreeMembers frees fields with heap reference, if recursive is true
  3439  // free all heap references reachable from p.
  3440  func (p *ModuleImportDescriptor) FreeMembers(recursive bool) {
  3441  	js.Free(
  3442  		p.Module.Ref(),
  3443  		p.Name.Ref(),
  3444  	)
  3445  	p.Module = p.Module.FromRef(js.Undefined)
  3446  	p.Name = p.Name.FromRef(js.Undefined)
  3447  }
  3448  
  3449  func NewModule(bytes BufferSource) (ret Module) {
  3450  	ret.ref = bindings.NewModuleByModule(
  3451  		bytes.Ref())
  3452  	return
  3453  }
  3454  
  3455  type Module struct {
  3456  	ref js.Ref
  3457  }
  3458  
  3459  func (this Module) Once() Module {
  3460  	this.ref.Once()
  3461  	return this
  3462  }
  3463  
  3464  func (this Module) Ref() js.Ref {
  3465  	return this.ref
  3466  }
  3467  
  3468  func (this Module) FromRef(ref js.Ref) Module {
  3469  	this.ref = ref
  3470  	return this
  3471  }
  3472  
  3473  func (this Module) Free() {
  3474  	this.ref.Free()
  3475  }
  3476  
  3477  // HasFuncExports returns true if the static method "Module.exports" exists.
  3478  func (this Module) HasFuncExports() bool {
  3479  	return js.True == bindings.HasFuncModuleExports(
  3480  		this.ref,
  3481  	)
  3482  }
  3483  
  3484  // FuncExports returns the static method "Module.exports".
  3485  func (this Module) FuncExports() (fn js.Func[func(moduleObject Module) js.Array[ModuleExportDescriptor]]) {
  3486  	bindings.FuncModuleExports(
  3487  		this.ref, js.Pointer(&fn),
  3488  	)
  3489  	return
  3490  }
  3491  
  3492  // Exports calls the static method "Module.exports".
  3493  func (this Module) Exports(moduleObject Module) (ret js.Array[ModuleExportDescriptor]) {
  3494  	bindings.CallModuleExports(
  3495  		this.ref, js.Pointer(&ret),
  3496  		moduleObject.Ref(),
  3497  	)
  3498  
  3499  	return
  3500  }
  3501  
  3502  // TryExports calls the static method "Module.exports"
  3503  // in a try/catch block and returns (_, err, ok = false) when it went through
  3504  // the catch clause.
  3505  func (this Module) TryExports(moduleObject Module) (ret js.Array[ModuleExportDescriptor], exception js.Any, ok bool) {
  3506  	ok = js.True == bindings.TryModuleExports(
  3507  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3508  		moduleObject.Ref(),
  3509  	)
  3510  
  3511  	return
  3512  }
  3513  
  3514  // HasFuncImports returns true if the static method "Module.imports" exists.
  3515  func (this Module) HasFuncImports() bool {
  3516  	return js.True == bindings.HasFuncModuleImports(
  3517  		this.ref,
  3518  	)
  3519  }
  3520  
  3521  // FuncImports returns the static method "Module.imports".
  3522  func (this Module) FuncImports() (fn js.Func[func(moduleObject Module) js.Array[ModuleImportDescriptor]]) {
  3523  	bindings.FuncModuleImports(
  3524  		this.ref, js.Pointer(&fn),
  3525  	)
  3526  	return
  3527  }
  3528  
  3529  // Imports calls the static method "Module.imports".
  3530  func (this Module) Imports(moduleObject Module) (ret js.Array[ModuleImportDescriptor]) {
  3531  	bindings.CallModuleImports(
  3532  		this.ref, js.Pointer(&ret),
  3533  		moduleObject.Ref(),
  3534  	)
  3535  
  3536  	return
  3537  }
  3538  
  3539  // TryImports calls the static method "Module.imports"
  3540  // in a try/catch block and returns (_, err, ok = false) when it went through
  3541  // the catch clause.
  3542  func (this Module) TryImports(moduleObject Module) (ret js.Array[ModuleImportDescriptor], exception js.Any, ok bool) {
  3543  	ok = js.True == bindings.TryModuleImports(
  3544  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3545  		moduleObject.Ref(),
  3546  	)
  3547  
  3548  	return
  3549  }
  3550  
  3551  // HasFuncCustomSections returns true if the static method "Module.customSections" exists.
  3552  func (this Module) HasFuncCustomSections() bool {
  3553  	return js.True == bindings.HasFuncModuleCustomSections(
  3554  		this.ref,
  3555  	)
  3556  }
  3557  
  3558  // FuncCustomSections returns the static method "Module.customSections".
  3559  func (this Module) FuncCustomSections() (fn js.Func[func(moduleObject Module, sectionName js.String) js.Array[js.ArrayBuffer]]) {
  3560  	bindings.FuncModuleCustomSections(
  3561  		this.ref, js.Pointer(&fn),
  3562  	)
  3563  	return
  3564  }
  3565  
  3566  // CustomSections calls the static method "Module.customSections".
  3567  func (this Module) CustomSections(moduleObject Module, sectionName js.String) (ret js.Array[js.ArrayBuffer]) {
  3568  	bindings.CallModuleCustomSections(
  3569  		this.ref, js.Pointer(&ret),
  3570  		moduleObject.Ref(),
  3571  		sectionName.Ref(),
  3572  	)
  3573  
  3574  	return
  3575  }
  3576  
  3577  // TryCustomSections calls the static method "Module.customSections"
  3578  // in a try/catch block and returns (_, err, ok = false) when it went through
  3579  // the catch clause.
  3580  func (this Module) TryCustomSections(moduleObject Module, sectionName js.String) (ret js.Array[js.ArrayBuffer], exception js.Any, ok bool) {
  3581  	ok = js.True == bindings.TryModuleCustomSections(
  3582  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3583  		moduleObject.Ref(),
  3584  		sectionName.Ref(),
  3585  	)
  3586  
  3587  	return
  3588  }