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

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package web
     5  
     6  import (
     7  	"github.com/primecitizens/pcz/std/core/abi"
     8  	"github.com/primecitizens/pcz/std/ffi/js"
     9  	"github.com/primecitizens/pcz/std/plat/js/web/bindings"
    10  )
    11  
    12  type IsInputPendingOptions struct {
    13  	// IncludeContinuous is "IsInputPendingOptions.includeContinuous"
    14  	//
    15  	// Optional, defaults to false.
    16  	//
    17  	// NOTE: FFI_USE_IncludeContinuous MUST be set to true to make this field effective.
    18  	IncludeContinuous bool
    19  
    20  	FFI_USE_IncludeContinuous bool // for IncludeContinuous.
    21  
    22  	FFI_USE bool
    23  }
    24  
    25  // FromRef calls UpdateFrom and returns a IsInputPendingOptions with all fields set.
    26  func (p IsInputPendingOptions) FromRef(ref js.Ref) IsInputPendingOptions {
    27  	p.UpdateFrom(ref)
    28  	return p
    29  }
    30  
    31  // New creates a new IsInputPendingOptions in the application heap.
    32  func (p IsInputPendingOptions) New() js.Ref {
    33  	return bindings.IsInputPendingOptionsJSLoad(
    34  		js.Pointer(&p), js.True, 0,
    35  	)
    36  }
    37  
    38  // UpdateFrom copies value of all fields of the heap object to p.
    39  func (p *IsInputPendingOptions) UpdateFrom(ref js.Ref) {
    40  	bindings.IsInputPendingOptionsJSStore(
    41  		js.Pointer(p), ref,
    42  	)
    43  }
    44  
    45  // Update writes all fields of the p to the heap object referenced by ref.
    46  func (p *IsInputPendingOptions) Update(ref js.Ref) {
    47  	bindings.IsInputPendingOptionsJSLoad(
    48  		js.Pointer(p), js.False, ref,
    49  	)
    50  }
    51  
    52  // FreeMembers frees fields with heap reference, if recursive is true
    53  // free all heap references reachable from p.
    54  func (p *IsInputPendingOptions) FreeMembers(recursive bool) {
    55  }
    56  
    57  type Scheduling struct {
    58  	ref js.Ref
    59  }
    60  
    61  func (this Scheduling) Once() Scheduling {
    62  	this.ref.Once()
    63  	return this
    64  }
    65  
    66  func (this Scheduling) Ref() js.Ref {
    67  	return this.ref
    68  }
    69  
    70  func (this Scheduling) FromRef(ref js.Ref) Scheduling {
    71  	this.ref = ref
    72  	return this
    73  }
    74  
    75  func (this Scheduling) Free() {
    76  	this.ref.Free()
    77  }
    78  
    79  // HasFuncIsInputPending returns true if the method "Scheduling.isInputPending" exists.
    80  func (this Scheduling) HasFuncIsInputPending() bool {
    81  	return js.True == bindings.HasFuncSchedulingIsInputPending(
    82  		this.ref,
    83  	)
    84  }
    85  
    86  // FuncIsInputPending returns the method "Scheduling.isInputPending".
    87  func (this Scheduling) FuncIsInputPending() (fn js.Func[func(isInputPendingOptions IsInputPendingOptions) bool]) {
    88  	bindings.FuncSchedulingIsInputPending(
    89  		this.ref, js.Pointer(&fn),
    90  	)
    91  	return
    92  }
    93  
    94  // IsInputPending calls the method "Scheduling.isInputPending".
    95  func (this Scheduling) IsInputPending(isInputPendingOptions IsInputPendingOptions) (ret bool) {
    96  	bindings.CallSchedulingIsInputPending(
    97  		this.ref, js.Pointer(&ret),
    98  		js.Pointer(&isInputPendingOptions),
    99  	)
   100  
   101  	return
   102  }
   103  
   104  // TryIsInputPending calls the method "Scheduling.isInputPending"
   105  // in a try/catch block and returns (_, err, ok = false) when it went through
   106  // the catch clause.
   107  func (this Scheduling) TryIsInputPending(isInputPendingOptions IsInputPendingOptions) (ret bool, exception js.Any, ok bool) {
   108  	ok = js.True == bindings.TrySchedulingIsInputPending(
   109  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   110  		js.Pointer(&isInputPendingOptions),
   111  	)
   112  
   113  	return
   114  }
   115  
   116  // HasFuncIsInputPending1 returns true if the method "Scheduling.isInputPending" exists.
   117  func (this Scheduling) HasFuncIsInputPending1() bool {
   118  	return js.True == bindings.HasFuncSchedulingIsInputPending1(
   119  		this.ref,
   120  	)
   121  }
   122  
   123  // FuncIsInputPending1 returns the method "Scheduling.isInputPending".
   124  func (this Scheduling) FuncIsInputPending1() (fn js.Func[func() bool]) {
   125  	bindings.FuncSchedulingIsInputPending1(
   126  		this.ref, js.Pointer(&fn),
   127  	)
   128  	return
   129  }
   130  
   131  // IsInputPending1 calls the method "Scheduling.isInputPending".
   132  func (this Scheduling) IsInputPending1() (ret bool) {
   133  	bindings.CallSchedulingIsInputPending1(
   134  		this.ref, js.Pointer(&ret),
   135  	)
   136  
   137  	return
   138  }
   139  
   140  // TryIsInputPending1 calls the method "Scheduling.isInputPending"
   141  // in a try/catch block and returns (_, err, ok = false) when it went through
   142  // the catch clause.
   143  func (this Scheduling) TryIsInputPending1() (ret bool, exception js.Any, ok bool) {
   144  	ok = js.True == bindings.TrySchedulingIsInputPending1(
   145  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   146  	)
   147  
   148  	return
   149  }
   150  
   151  type WakeLockType uint32
   152  
   153  const (
   154  	_ WakeLockType = iota
   155  
   156  	WakeLockType_SCREEN
   157  )
   158  
   159  func (WakeLockType) FromRef(str js.Ref) WakeLockType {
   160  	return WakeLockType(bindings.ConstOfWakeLockType(str))
   161  }
   162  
   163  func (x WakeLockType) String() (string, bool) {
   164  	switch x {
   165  	case WakeLockType_SCREEN:
   166  		return "screen", true
   167  	default:
   168  		return "", false
   169  	}
   170  }
   171  
   172  type WakeLockSentinel struct {
   173  	EventTarget
   174  }
   175  
   176  func (this WakeLockSentinel) Once() WakeLockSentinel {
   177  	this.ref.Once()
   178  	return this
   179  }
   180  
   181  func (this WakeLockSentinel) Ref() js.Ref {
   182  	return this.EventTarget.Ref()
   183  }
   184  
   185  func (this WakeLockSentinel) FromRef(ref js.Ref) WakeLockSentinel {
   186  	this.EventTarget = this.EventTarget.FromRef(ref)
   187  	return this
   188  }
   189  
   190  func (this WakeLockSentinel) Free() {
   191  	this.ref.Free()
   192  }
   193  
   194  // Released returns the value of property "WakeLockSentinel.released".
   195  //
   196  // It returns ok=false if there is no such property.
   197  func (this WakeLockSentinel) Released() (ret bool, ok bool) {
   198  	ok = js.True == bindings.GetWakeLockSentinelReleased(
   199  		this.ref, js.Pointer(&ret),
   200  	)
   201  	return
   202  }
   203  
   204  // Type returns the value of property "WakeLockSentinel.type".
   205  //
   206  // It returns ok=false if there is no such property.
   207  func (this WakeLockSentinel) Type() (ret WakeLockType, ok bool) {
   208  	ok = js.True == bindings.GetWakeLockSentinelType(
   209  		this.ref, js.Pointer(&ret),
   210  	)
   211  	return
   212  }
   213  
   214  // HasFuncRelease returns true if the method "WakeLockSentinel.release" exists.
   215  func (this WakeLockSentinel) HasFuncRelease() bool {
   216  	return js.True == bindings.HasFuncWakeLockSentinelRelease(
   217  		this.ref,
   218  	)
   219  }
   220  
   221  // FuncRelease returns the method "WakeLockSentinel.release".
   222  func (this WakeLockSentinel) FuncRelease() (fn js.Func[func() js.Promise[js.Void]]) {
   223  	bindings.FuncWakeLockSentinelRelease(
   224  		this.ref, js.Pointer(&fn),
   225  	)
   226  	return
   227  }
   228  
   229  // Release calls the method "WakeLockSentinel.release".
   230  func (this WakeLockSentinel) Release() (ret js.Promise[js.Void]) {
   231  	bindings.CallWakeLockSentinelRelease(
   232  		this.ref, js.Pointer(&ret),
   233  	)
   234  
   235  	return
   236  }
   237  
   238  // TryRelease calls the method "WakeLockSentinel.release"
   239  // in a try/catch block and returns (_, err, ok = false) when it went through
   240  // the catch clause.
   241  func (this WakeLockSentinel) TryRelease() (ret js.Promise[js.Void], exception js.Any, ok bool) {
   242  	ok = js.True == bindings.TryWakeLockSentinelRelease(
   243  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   244  	)
   245  
   246  	return
   247  }
   248  
   249  type WakeLock struct {
   250  	ref js.Ref
   251  }
   252  
   253  func (this WakeLock) Once() WakeLock {
   254  	this.ref.Once()
   255  	return this
   256  }
   257  
   258  func (this WakeLock) Ref() js.Ref {
   259  	return this.ref
   260  }
   261  
   262  func (this WakeLock) FromRef(ref js.Ref) WakeLock {
   263  	this.ref = ref
   264  	return this
   265  }
   266  
   267  func (this WakeLock) Free() {
   268  	this.ref.Free()
   269  }
   270  
   271  // HasFuncRequest returns true if the method "WakeLock.request" exists.
   272  func (this WakeLock) HasFuncRequest() bool {
   273  	return js.True == bindings.HasFuncWakeLockRequest(
   274  		this.ref,
   275  	)
   276  }
   277  
   278  // FuncRequest returns the method "WakeLock.request".
   279  func (this WakeLock) FuncRequest() (fn js.Func[func(typ WakeLockType) js.Promise[WakeLockSentinel]]) {
   280  	bindings.FuncWakeLockRequest(
   281  		this.ref, js.Pointer(&fn),
   282  	)
   283  	return
   284  }
   285  
   286  // Request calls the method "WakeLock.request".
   287  func (this WakeLock) Request(typ WakeLockType) (ret js.Promise[WakeLockSentinel]) {
   288  	bindings.CallWakeLockRequest(
   289  		this.ref, js.Pointer(&ret),
   290  		uint32(typ),
   291  	)
   292  
   293  	return
   294  }
   295  
   296  // TryRequest calls the method "WakeLock.request"
   297  // in a try/catch block and returns (_, err, ok = false) when it went through
   298  // the catch clause.
   299  func (this WakeLock) TryRequest(typ WakeLockType) (ret js.Promise[WakeLockSentinel], exception js.Any, ok bool) {
   300  	ok = js.True == bindings.TryWakeLockRequest(
   301  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   302  		uint32(typ),
   303  	)
   304  
   305  	return
   306  }
   307  
   308  // HasFuncRequest1 returns true if the method "WakeLock.request" exists.
   309  func (this WakeLock) HasFuncRequest1() bool {
   310  	return js.True == bindings.HasFuncWakeLockRequest1(
   311  		this.ref,
   312  	)
   313  }
   314  
   315  // FuncRequest1 returns the method "WakeLock.request".
   316  func (this WakeLock) FuncRequest1() (fn js.Func[func() js.Promise[WakeLockSentinel]]) {
   317  	bindings.FuncWakeLockRequest1(
   318  		this.ref, js.Pointer(&fn),
   319  	)
   320  	return
   321  }
   322  
   323  // Request1 calls the method "WakeLock.request".
   324  func (this WakeLock) Request1() (ret js.Promise[WakeLockSentinel]) {
   325  	bindings.CallWakeLockRequest1(
   326  		this.ref, js.Pointer(&ret),
   327  	)
   328  
   329  	return
   330  }
   331  
   332  // TryRequest1 calls the method "WakeLock.request"
   333  // in a try/catch block and returns (_, err, ok = false) when it went through
   334  // the catch clause.
   335  func (this WakeLock) TryRequest1() (ret js.Promise[WakeLockSentinel], exception js.Any, ok bool) {
   336  	ok = js.True == bindings.TryWakeLockRequest1(
   337  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   338  	)
   339  
   340  	return
   341  }
   342  
   343  type PointerEventInit struct {
   344  	// PointerId is "PointerEventInit.pointerId"
   345  	//
   346  	// Optional, defaults to 0.
   347  	//
   348  	// NOTE: FFI_USE_PointerId MUST be set to true to make this field effective.
   349  	PointerId int32
   350  	// Width is "PointerEventInit.width"
   351  	//
   352  	// Optional, defaults to 1.
   353  	//
   354  	// NOTE: FFI_USE_Width MUST be set to true to make this field effective.
   355  	Width float64
   356  	// Height is "PointerEventInit.height"
   357  	//
   358  	// Optional, defaults to 1.
   359  	//
   360  	// NOTE: FFI_USE_Height MUST be set to true to make this field effective.
   361  	Height float64
   362  	// Pressure is "PointerEventInit.pressure"
   363  	//
   364  	// Optional, defaults to 0.
   365  	//
   366  	// NOTE: FFI_USE_Pressure MUST be set to true to make this field effective.
   367  	Pressure float32
   368  	// TangentialPressure is "PointerEventInit.tangentialPressure"
   369  	//
   370  	// Optional, defaults to 0.
   371  	//
   372  	// NOTE: FFI_USE_TangentialPressure MUST be set to true to make this field effective.
   373  	TangentialPressure float32
   374  	// TiltX is "PointerEventInit.tiltX"
   375  	//
   376  	// Optional
   377  	//
   378  	// NOTE: FFI_USE_TiltX MUST be set to true to make this field effective.
   379  	TiltX int32
   380  	// TiltY is "PointerEventInit.tiltY"
   381  	//
   382  	// Optional
   383  	//
   384  	// NOTE: FFI_USE_TiltY MUST be set to true to make this field effective.
   385  	TiltY int32
   386  	// Twist is "PointerEventInit.twist"
   387  	//
   388  	// Optional, defaults to 0.
   389  	//
   390  	// NOTE: FFI_USE_Twist MUST be set to true to make this field effective.
   391  	Twist int32
   392  	// AltitudeAngle is "PointerEventInit.altitudeAngle"
   393  	//
   394  	// Optional
   395  	//
   396  	// NOTE: FFI_USE_AltitudeAngle MUST be set to true to make this field effective.
   397  	AltitudeAngle float64
   398  	// AzimuthAngle is "PointerEventInit.azimuthAngle"
   399  	//
   400  	// Optional
   401  	//
   402  	// NOTE: FFI_USE_AzimuthAngle MUST be set to true to make this field effective.
   403  	AzimuthAngle float64
   404  	// PointerType is "PointerEventInit.pointerType"
   405  	//
   406  	// Optional, defaults to "".
   407  	PointerType js.String
   408  	// IsPrimary is "PointerEventInit.isPrimary"
   409  	//
   410  	// Optional, defaults to false.
   411  	//
   412  	// NOTE: FFI_USE_IsPrimary MUST be set to true to make this field effective.
   413  	IsPrimary bool
   414  	// CoalescedEvents is "PointerEventInit.coalescedEvents"
   415  	//
   416  	// Optional, defaults to [].
   417  	CoalescedEvents js.Array[PointerEvent]
   418  	// PredictedEvents is "PointerEventInit.predictedEvents"
   419  	//
   420  	// Optional, defaults to [].
   421  	PredictedEvents js.Array[PointerEvent]
   422  	// MovementX is "PointerEventInit.movementX"
   423  	//
   424  	// Optional, defaults to 0.
   425  	//
   426  	// NOTE: FFI_USE_MovementX MUST be set to true to make this field effective.
   427  	MovementX float64
   428  	// MovementY is "PointerEventInit.movementY"
   429  	//
   430  	// Optional, defaults to 0.
   431  	//
   432  	// NOTE: FFI_USE_MovementY MUST be set to true to make this field effective.
   433  	MovementY float64
   434  
   435  	FFI_USE_PointerId          bool // for PointerId.
   436  	FFI_USE_Width              bool // for Width.
   437  	FFI_USE_Height             bool // for Height.
   438  	FFI_USE_Pressure           bool // for Pressure.
   439  	FFI_USE_TangentialPressure bool // for TangentialPressure.
   440  	FFI_USE_TiltX              bool // for TiltX.
   441  	FFI_USE_TiltY              bool // for TiltY.
   442  	FFI_USE_Twist              bool // for Twist.
   443  	FFI_USE_AltitudeAngle      bool // for AltitudeAngle.
   444  	FFI_USE_AzimuthAngle       bool // for AzimuthAngle.
   445  	FFI_USE_IsPrimary          bool // for IsPrimary.
   446  	FFI_USE_MovementX          bool // for MovementX.
   447  	FFI_USE_MovementY          bool // for MovementY.
   448  
   449  	FFI_USE bool
   450  }
   451  
   452  // FromRef calls UpdateFrom and returns a PointerEventInit with all fields set.
   453  func (p PointerEventInit) FromRef(ref js.Ref) PointerEventInit {
   454  	p.UpdateFrom(ref)
   455  	return p
   456  }
   457  
   458  // New creates a new PointerEventInit in the application heap.
   459  func (p PointerEventInit) New() js.Ref {
   460  	return bindings.PointerEventInitJSLoad(
   461  		js.Pointer(&p), js.True, 0,
   462  	)
   463  }
   464  
   465  // UpdateFrom copies value of all fields of the heap object to p.
   466  func (p *PointerEventInit) UpdateFrom(ref js.Ref) {
   467  	bindings.PointerEventInitJSStore(
   468  		js.Pointer(p), ref,
   469  	)
   470  }
   471  
   472  // Update writes all fields of the p to the heap object referenced by ref.
   473  func (p *PointerEventInit) Update(ref js.Ref) {
   474  	bindings.PointerEventInitJSLoad(
   475  		js.Pointer(p), js.False, ref,
   476  	)
   477  }
   478  
   479  // FreeMembers frees fields with heap reference, if recursive is true
   480  // free all heap references reachable from p.
   481  func (p *PointerEventInit) FreeMembers(recursive bool) {
   482  	js.Free(
   483  		p.PointerType.Ref(),
   484  		p.CoalescedEvents.Ref(),
   485  		p.PredictedEvents.Ref(),
   486  	)
   487  	p.PointerType = p.PointerType.FromRef(js.Undefined)
   488  	p.CoalescedEvents = p.CoalescedEvents.FromRef(js.Undefined)
   489  	p.PredictedEvents = p.PredictedEvents.FromRef(js.Undefined)
   490  }
   491  
   492  func NewPointerEvent(typ js.String, eventInitDict PointerEventInit) (ret PointerEvent) {
   493  	ret.ref = bindings.NewPointerEventByPointerEvent(
   494  		typ.Ref(),
   495  		js.Pointer(&eventInitDict))
   496  	return
   497  }
   498  
   499  func NewPointerEventByPointerEvent1(typ js.String) (ret PointerEvent) {
   500  	ret.ref = bindings.NewPointerEventByPointerEvent1(
   501  		typ.Ref())
   502  	return
   503  }
   504  
   505  type PointerEvent struct {
   506  	MouseEvent
   507  }
   508  
   509  func (this PointerEvent) Once() PointerEvent {
   510  	this.ref.Once()
   511  	return this
   512  }
   513  
   514  func (this PointerEvent) Ref() js.Ref {
   515  	return this.MouseEvent.Ref()
   516  }
   517  
   518  func (this PointerEvent) FromRef(ref js.Ref) PointerEvent {
   519  	this.MouseEvent = this.MouseEvent.FromRef(ref)
   520  	return this
   521  }
   522  
   523  func (this PointerEvent) Free() {
   524  	this.ref.Free()
   525  }
   526  
   527  // PointerId returns the value of property "PointerEvent.pointerId".
   528  //
   529  // It returns ok=false if there is no such property.
   530  func (this PointerEvent) PointerId() (ret int32, ok bool) {
   531  	ok = js.True == bindings.GetPointerEventPointerId(
   532  		this.ref, js.Pointer(&ret),
   533  	)
   534  	return
   535  }
   536  
   537  // Width returns the value of property "PointerEvent.width".
   538  //
   539  // It returns ok=false if there is no such property.
   540  func (this PointerEvent) Width() (ret float64, ok bool) {
   541  	ok = js.True == bindings.GetPointerEventWidth(
   542  		this.ref, js.Pointer(&ret),
   543  	)
   544  	return
   545  }
   546  
   547  // Height returns the value of property "PointerEvent.height".
   548  //
   549  // It returns ok=false if there is no such property.
   550  func (this PointerEvent) Height() (ret float64, ok bool) {
   551  	ok = js.True == bindings.GetPointerEventHeight(
   552  		this.ref, js.Pointer(&ret),
   553  	)
   554  	return
   555  }
   556  
   557  // Pressure returns the value of property "PointerEvent.pressure".
   558  //
   559  // It returns ok=false if there is no such property.
   560  func (this PointerEvent) Pressure() (ret float32, ok bool) {
   561  	ok = js.True == bindings.GetPointerEventPressure(
   562  		this.ref, js.Pointer(&ret),
   563  	)
   564  	return
   565  }
   566  
   567  // TangentialPressure returns the value of property "PointerEvent.tangentialPressure".
   568  //
   569  // It returns ok=false if there is no such property.
   570  func (this PointerEvent) TangentialPressure() (ret float32, ok bool) {
   571  	ok = js.True == bindings.GetPointerEventTangentialPressure(
   572  		this.ref, js.Pointer(&ret),
   573  	)
   574  	return
   575  }
   576  
   577  // TiltX returns the value of property "PointerEvent.tiltX".
   578  //
   579  // It returns ok=false if there is no such property.
   580  func (this PointerEvent) TiltX() (ret int32, ok bool) {
   581  	ok = js.True == bindings.GetPointerEventTiltX(
   582  		this.ref, js.Pointer(&ret),
   583  	)
   584  	return
   585  }
   586  
   587  // TiltY returns the value of property "PointerEvent.tiltY".
   588  //
   589  // It returns ok=false if there is no such property.
   590  func (this PointerEvent) TiltY() (ret int32, ok bool) {
   591  	ok = js.True == bindings.GetPointerEventTiltY(
   592  		this.ref, js.Pointer(&ret),
   593  	)
   594  	return
   595  }
   596  
   597  // Twist returns the value of property "PointerEvent.twist".
   598  //
   599  // It returns ok=false if there is no such property.
   600  func (this PointerEvent) Twist() (ret int32, ok bool) {
   601  	ok = js.True == bindings.GetPointerEventTwist(
   602  		this.ref, js.Pointer(&ret),
   603  	)
   604  	return
   605  }
   606  
   607  // AltitudeAngle returns the value of property "PointerEvent.altitudeAngle".
   608  //
   609  // It returns ok=false if there is no such property.
   610  func (this PointerEvent) AltitudeAngle() (ret float64, ok bool) {
   611  	ok = js.True == bindings.GetPointerEventAltitudeAngle(
   612  		this.ref, js.Pointer(&ret),
   613  	)
   614  	return
   615  }
   616  
   617  // AzimuthAngle returns the value of property "PointerEvent.azimuthAngle".
   618  //
   619  // It returns ok=false if there is no such property.
   620  func (this PointerEvent) AzimuthAngle() (ret float64, ok bool) {
   621  	ok = js.True == bindings.GetPointerEventAzimuthAngle(
   622  		this.ref, js.Pointer(&ret),
   623  	)
   624  	return
   625  }
   626  
   627  // PointerType returns the value of property "PointerEvent.pointerType".
   628  //
   629  // It returns ok=false if there is no such property.
   630  func (this PointerEvent) PointerType() (ret js.String, ok bool) {
   631  	ok = js.True == bindings.GetPointerEventPointerType(
   632  		this.ref, js.Pointer(&ret),
   633  	)
   634  	return
   635  }
   636  
   637  // IsPrimary returns the value of property "PointerEvent.isPrimary".
   638  //
   639  // It returns ok=false if there is no such property.
   640  func (this PointerEvent) IsPrimary() (ret bool, ok bool) {
   641  	ok = js.True == bindings.GetPointerEventIsPrimary(
   642  		this.ref, js.Pointer(&ret),
   643  	)
   644  	return
   645  }
   646  
   647  // HasFuncGetCoalescedEvents returns true if the method "PointerEvent.getCoalescedEvents" exists.
   648  func (this PointerEvent) HasFuncGetCoalescedEvents() bool {
   649  	return js.True == bindings.HasFuncPointerEventGetCoalescedEvents(
   650  		this.ref,
   651  	)
   652  }
   653  
   654  // FuncGetCoalescedEvents returns the method "PointerEvent.getCoalescedEvents".
   655  func (this PointerEvent) FuncGetCoalescedEvents() (fn js.Func[func() js.Array[PointerEvent]]) {
   656  	bindings.FuncPointerEventGetCoalescedEvents(
   657  		this.ref, js.Pointer(&fn),
   658  	)
   659  	return
   660  }
   661  
   662  // GetCoalescedEvents calls the method "PointerEvent.getCoalescedEvents".
   663  func (this PointerEvent) GetCoalescedEvents() (ret js.Array[PointerEvent]) {
   664  	bindings.CallPointerEventGetCoalescedEvents(
   665  		this.ref, js.Pointer(&ret),
   666  	)
   667  
   668  	return
   669  }
   670  
   671  // TryGetCoalescedEvents calls the method "PointerEvent.getCoalescedEvents"
   672  // in a try/catch block and returns (_, err, ok = false) when it went through
   673  // the catch clause.
   674  func (this PointerEvent) TryGetCoalescedEvents() (ret js.Array[PointerEvent], exception js.Any, ok bool) {
   675  	ok = js.True == bindings.TryPointerEventGetCoalescedEvents(
   676  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   677  	)
   678  
   679  	return
   680  }
   681  
   682  // HasFuncGetPredictedEvents returns true if the method "PointerEvent.getPredictedEvents" exists.
   683  func (this PointerEvent) HasFuncGetPredictedEvents() bool {
   684  	return js.True == bindings.HasFuncPointerEventGetPredictedEvents(
   685  		this.ref,
   686  	)
   687  }
   688  
   689  // FuncGetPredictedEvents returns the method "PointerEvent.getPredictedEvents".
   690  func (this PointerEvent) FuncGetPredictedEvents() (fn js.Func[func() js.Array[PointerEvent]]) {
   691  	bindings.FuncPointerEventGetPredictedEvents(
   692  		this.ref, js.Pointer(&fn),
   693  	)
   694  	return
   695  }
   696  
   697  // GetPredictedEvents calls the method "PointerEvent.getPredictedEvents".
   698  func (this PointerEvent) GetPredictedEvents() (ret js.Array[PointerEvent]) {
   699  	bindings.CallPointerEventGetPredictedEvents(
   700  		this.ref, js.Pointer(&ret),
   701  	)
   702  
   703  	return
   704  }
   705  
   706  // TryGetPredictedEvents calls the method "PointerEvent.getPredictedEvents"
   707  // in a try/catch block and returns (_, err, ok = false) when it went through
   708  // the catch clause.
   709  func (this PointerEvent) TryGetPredictedEvents() (ret js.Array[PointerEvent], exception js.Any, ok bool) {
   710  	ok = js.True == bindings.TryPointerEventGetPredictedEvents(
   711  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   712  	)
   713  
   714  	return
   715  }
   716  
   717  type InkTrailStyle struct {
   718  	// Color is "InkTrailStyle.color"
   719  	//
   720  	// Required
   721  	Color js.String
   722  	// Diameter is "InkTrailStyle.diameter"
   723  	//
   724  	// Required
   725  	Diameter float64
   726  
   727  	FFI_USE bool
   728  }
   729  
   730  // FromRef calls UpdateFrom and returns a InkTrailStyle with all fields set.
   731  func (p InkTrailStyle) FromRef(ref js.Ref) InkTrailStyle {
   732  	p.UpdateFrom(ref)
   733  	return p
   734  }
   735  
   736  // New creates a new InkTrailStyle in the application heap.
   737  func (p InkTrailStyle) New() js.Ref {
   738  	return bindings.InkTrailStyleJSLoad(
   739  		js.Pointer(&p), js.True, 0,
   740  	)
   741  }
   742  
   743  // UpdateFrom copies value of all fields of the heap object to p.
   744  func (p *InkTrailStyle) UpdateFrom(ref js.Ref) {
   745  	bindings.InkTrailStyleJSStore(
   746  		js.Pointer(p), ref,
   747  	)
   748  }
   749  
   750  // Update writes all fields of the p to the heap object referenced by ref.
   751  func (p *InkTrailStyle) Update(ref js.Ref) {
   752  	bindings.InkTrailStyleJSLoad(
   753  		js.Pointer(p), js.False, ref,
   754  	)
   755  }
   756  
   757  // FreeMembers frees fields with heap reference, if recursive is true
   758  // free all heap references reachable from p.
   759  func (p *InkTrailStyle) FreeMembers(recursive bool) {
   760  	js.Free(
   761  		p.Color.Ref(),
   762  	)
   763  	p.Color = p.Color.FromRef(js.Undefined)
   764  }
   765  
   766  type InkPresenter struct {
   767  	ref js.Ref
   768  }
   769  
   770  func (this InkPresenter) Once() InkPresenter {
   771  	this.ref.Once()
   772  	return this
   773  }
   774  
   775  func (this InkPresenter) Ref() js.Ref {
   776  	return this.ref
   777  }
   778  
   779  func (this InkPresenter) FromRef(ref js.Ref) InkPresenter {
   780  	this.ref = ref
   781  	return this
   782  }
   783  
   784  func (this InkPresenter) Free() {
   785  	this.ref.Free()
   786  }
   787  
   788  // PresentationArea returns the value of property "InkPresenter.presentationArea".
   789  //
   790  // It returns ok=false if there is no such property.
   791  func (this InkPresenter) PresentationArea() (ret Element, ok bool) {
   792  	ok = js.True == bindings.GetInkPresenterPresentationArea(
   793  		this.ref, js.Pointer(&ret),
   794  	)
   795  	return
   796  }
   797  
   798  // ExpectedImprovement returns the value of property "InkPresenter.expectedImprovement".
   799  //
   800  // It returns ok=false if there is no such property.
   801  func (this InkPresenter) ExpectedImprovement() (ret uint32, ok bool) {
   802  	ok = js.True == bindings.GetInkPresenterExpectedImprovement(
   803  		this.ref, js.Pointer(&ret),
   804  	)
   805  	return
   806  }
   807  
   808  // HasFuncUpdateInkTrailStartPoint returns true if the method "InkPresenter.updateInkTrailStartPoint" exists.
   809  func (this InkPresenter) HasFuncUpdateInkTrailStartPoint() bool {
   810  	return js.True == bindings.HasFuncInkPresenterUpdateInkTrailStartPoint(
   811  		this.ref,
   812  	)
   813  }
   814  
   815  // FuncUpdateInkTrailStartPoint returns the method "InkPresenter.updateInkTrailStartPoint".
   816  func (this InkPresenter) FuncUpdateInkTrailStartPoint() (fn js.Func[func(event PointerEvent, style InkTrailStyle)]) {
   817  	bindings.FuncInkPresenterUpdateInkTrailStartPoint(
   818  		this.ref, js.Pointer(&fn),
   819  	)
   820  	return
   821  }
   822  
   823  // UpdateInkTrailStartPoint calls the method "InkPresenter.updateInkTrailStartPoint".
   824  func (this InkPresenter) UpdateInkTrailStartPoint(event PointerEvent, style InkTrailStyle) (ret js.Void) {
   825  	bindings.CallInkPresenterUpdateInkTrailStartPoint(
   826  		this.ref, js.Pointer(&ret),
   827  		event.Ref(),
   828  		js.Pointer(&style),
   829  	)
   830  
   831  	return
   832  }
   833  
   834  // TryUpdateInkTrailStartPoint calls the method "InkPresenter.updateInkTrailStartPoint"
   835  // in a try/catch block and returns (_, err, ok = false) when it went through
   836  // the catch clause.
   837  func (this InkPresenter) TryUpdateInkTrailStartPoint(event PointerEvent, style InkTrailStyle) (ret js.Void, exception js.Any, ok bool) {
   838  	ok = js.True == bindings.TryInkPresenterUpdateInkTrailStartPoint(
   839  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   840  		event.Ref(),
   841  		js.Pointer(&style),
   842  	)
   843  
   844  	return
   845  }
   846  
   847  type InkPresenterParam struct {
   848  	// PresentationArea is "InkPresenterParam.presentationArea"
   849  	//
   850  	// Optional, defaults to null.
   851  	PresentationArea Element
   852  
   853  	FFI_USE bool
   854  }
   855  
   856  // FromRef calls UpdateFrom and returns a InkPresenterParam with all fields set.
   857  func (p InkPresenterParam) FromRef(ref js.Ref) InkPresenterParam {
   858  	p.UpdateFrom(ref)
   859  	return p
   860  }
   861  
   862  // New creates a new InkPresenterParam in the application heap.
   863  func (p InkPresenterParam) New() js.Ref {
   864  	return bindings.InkPresenterParamJSLoad(
   865  		js.Pointer(&p), js.True, 0,
   866  	)
   867  }
   868  
   869  // UpdateFrom copies value of all fields of the heap object to p.
   870  func (p *InkPresenterParam) UpdateFrom(ref js.Ref) {
   871  	bindings.InkPresenterParamJSStore(
   872  		js.Pointer(p), ref,
   873  	)
   874  }
   875  
   876  // Update writes all fields of the p to the heap object referenced by ref.
   877  func (p *InkPresenterParam) Update(ref js.Ref) {
   878  	bindings.InkPresenterParamJSLoad(
   879  		js.Pointer(p), js.False, ref,
   880  	)
   881  }
   882  
   883  // FreeMembers frees fields with heap reference, if recursive is true
   884  // free all heap references reachable from p.
   885  func (p *InkPresenterParam) FreeMembers(recursive bool) {
   886  	js.Free(
   887  		p.PresentationArea.Ref(),
   888  	)
   889  	p.PresentationArea = p.PresentationArea.FromRef(js.Undefined)
   890  }
   891  
   892  type Ink struct {
   893  	ref js.Ref
   894  }
   895  
   896  func (this Ink) Once() Ink {
   897  	this.ref.Once()
   898  	return this
   899  }
   900  
   901  func (this Ink) Ref() js.Ref {
   902  	return this.ref
   903  }
   904  
   905  func (this Ink) FromRef(ref js.Ref) Ink {
   906  	this.ref = ref
   907  	return this
   908  }
   909  
   910  func (this Ink) Free() {
   911  	this.ref.Free()
   912  }
   913  
   914  // HasFuncRequestPresenter returns true if the method "Ink.requestPresenter" exists.
   915  func (this Ink) HasFuncRequestPresenter() bool {
   916  	return js.True == bindings.HasFuncInkRequestPresenter(
   917  		this.ref,
   918  	)
   919  }
   920  
   921  // FuncRequestPresenter returns the method "Ink.requestPresenter".
   922  func (this Ink) FuncRequestPresenter() (fn js.Func[func(param InkPresenterParam) js.Promise[InkPresenter]]) {
   923  	bindings.FuncInkRequestPresenter(
   924  		this.ref, js.Pointer(&fn),
   925  	)
   926  	return
   927  }
   928  
   929  // RequestPresenter calls the method "Ink.requestPresenter".
   930  func (this Ink) RequestPresenter(param InkPresenterParam) (ret js.Promise[InkPresenter]) {
   931  	bindings.CallInkRequestPresenter(
   932  		this.ref, js.Pointer(&ret),
   933  		js.Pointer(&param),
   934  	)
   935  
   936  	return
   937  }
   938  
   939  // TryRequestPresenter calls the method "Ink.requestPresenter"
   940  // in a try/catch block and returns (_, err, ok = false) when it went through
   941  // the catch clause.
   942  func (this Ink) TryRequestPresenter(param InkPresenterParam) (ret js.Promise[InkPresenter], exception js.Any, ok bool) {
   943  	ok = js.True == bindings.TryInkRequestPresenter(
   944  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   945  		js.Pointer(&param),
   946  	)
   947  
   948  	return
   949  }
   950  
   951  // HasFuncRequestPresenter1 returns true if the method "Ink.requestPresenter" exists.
   952  func (this Ink) HasFuncRequestPresenter1() bool {
   953  	return js.True == bindings.HasFuncInkRequestPresenter1(
   954  		this.ref,
   955  	)
   956  }
   957  
   958  // FuncRequestPresenter1 returns the method "Ink.requestPresenter".
   959  func (this Ink) FuncRequestPresenter1() (fn js.Func[func() js.Promise[InkPresenter]]) {
   960  	bindings.FuncInkRequestPresenter1(
   961  		this.ref, js.Pointer(&fn),
   962  	)
   963  	return
   964  }
   965  
   966  // RequestPresenter1 calls the method "Ink.requestPresenter".
   967  func (this Ink) RequestPresenter1() (ret js.Promise[InkPresenter]) {
   968  	bindings.CallInkRequestPresenter1(
   969  		this.ref, js.Pointer(&ret),
   970  	)
   971  
   972  	return
   973  }
   974  
   975  // TryRequestPresenter1 calls the method "Ink.requestPresenter"
   976  // in a try/catch block and returns (_, err, ok = false) when it went through
   977  // the catch clause.
   978  func (this Ink) TryRequestPresenter1() (ret js.Promise[InkPresenter], exception js.Any, ok bool) {
   979  	ok = js.True == bindings.TryInkRequestPresenter1(
   980  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   981  	)
   982  
   983  	return
   984  }
   985  
   986  type PresentationConnectionState uint32
   987  
   988  const (
   989  	_ PresentationConnectionState = iota
   990  
   991  	PresentationConnectionState_CONNECTING
   992  	PresentationConnectionState_CONNECTED
   993  	PresentationConnectionState_CLOSED
   994  	PresentationConnectionState_TERMINATED
   995  )
   996  
   997  func (PresentationConnectionState) FromRef(str js.Ref) PresentationConnectionState {
   998  	return PresentationConnectionState(bindings.ConstOfPresentationConnectionState(str))
   999  }
  1000  
  1001  func (x PresentationConnectionState) String() (string, bool) {
  1002  	switch x {
  1003  	case PresentationConnectionState_CONNECTING:
  1004  		return "connecting", true
  1005  	case PresentationConnectionState_CONNECTED:
  1006  		return "connected", true
  1007  	case PresentationConnectionState_CLOSED:
  1008  		return "closed", true
  1009  	case PresentationConnectionState_TERMINATED:
  1010  		return "terminated", true
  1011  	default:
  1012  		return "", false
  1013  	}
  1014  }
  1015  
  1016  type PresentationConnection struct {
  1017  	EventTarget
  1018  }
  1019  
  1020  func (this PresentationConnection) Once() PresentationConnection {
  1021  	this.ref.Once()
  1022  	return this
  1023  }
  1024  
  1025  func (this PresentationConnection) Ref() js.Ref {
  1026  	return this.EventTarget.Ref()
  1027  }
  1028  
  1029  func (this PresentationConnection) FromRef(ref js.Ref) PresentationConnection {
  1030  	this.EventTarget = this.EventTarget.FromRef(ref)
  1031  	return this
  1032  }
  1033  
  1034  func (this PresentationConnection) Free() {
  1035  	this.ref.Free()
  1036  }
  1037  
  1038  // Id returns the value of property "PresentationConnection.id".
  1039  //
  1040  // It returns ok=false if there is no such property.
  1041  func (this PresentationConnection) Id() (ret js.String, ok bool) {
  1042  	ok = js.True == bindings.GetPresentationConnectionId(
  1043  		this.ref, js.Pointer(&ret),
  1044  	)
  1045  	return
  1046  }
  1047  
  1048  // Url returns the value of property "PresentationConnection.url".
  1049  //
  1050  // It returns ok=false if there is no such property.
  1051  func (this PresentationConnection) Url() (ret js.String, ok bool) {
  1052  	ok = js.True == bindings.GetPresentationConnectionUrl(
  1053  		this.ref, js.Pointer(&ret),
  1054  	)
  1055  	return
  1056  }
  1057  
  1058  // State returns the value of property "PresentationConnection.state".
  1059  //
  1060  // It returns ok=false if there is no such property.
  1061  func (this PresentationConnection) State() (ret PresentationConnectionState, ok bool) {
  1062  	ok = js.True == bindings.GetPresentationConnectionState(
  1063  		this.ref, js.Pointer(&ret),
  1064  	)
  1065  	return
  1066  }
  1067  
  1068  // BinaryType returns the value of property "PresentationConnection.binaryType".
  1069  //
  1070  // It returns ok=false if there is no such property.
  1071  func (this PresentationConnection) BinaryType() (ret BinaryType, ok bool) {
  1072  	ok = js.True == bindings.GetPresentationConnectionBinaryType(
  1073  		this.ref, js.Pointer(&ret),
  1074  	)
  1075  	return
  1076  }
  1077  
  1078  // SetBinaryType sets the value of property "PresentationConnection.binaryType" to val.
  1079  //
  1080  // It returns false if the property cannot be set.
  1081  func (this PresentationConnection) SetBinaryType(val BinaryType) bool {
  1082  	return js.True == bindings.SetPresentationConnectionBinaryType(
  1083  		this.ref,
  1084  		uint32(val),
  1085  	)
  1086  }
  1087  
  1088  // HasFuncClose returns true if the method "PresentationConnection.close" exists.
  1089  func (this PresentationConnection) HasFuncClose() bool {
  1090  	return js.True == bindings.HasFuncPresentationConnectionClose(
  1091  		this.ref,
  1092  	)
  1093  }
  1094  
  1095  // FuncClose returns the method "PresentationConnection.close".
  1096  func (this PresentationConnection) FuncClose() (fn js.Func[func()]) {
  1097  	bindings.FuncPresentationConnectionClose(
  1098  		this.ref, js.Pointer(&fn),
  1099  	)
  1100  	return
  1101  }
  1102  
  1103  // Close calls the method "PresentationConnection.close".
  1104  func (this PresentationConnection) Close() (ret js.Void) {
  1105  	bindings.CallPresentationConnectionClose(
  1106  		this.ref, js.Pointer(&ret),
  1107  	)
  1108  
  1109  	return
  1110  }
  1111  
  1112  // TryClose calls the method "PresentationConnection.close"
  1113  // in a try/catch block and returns (_, err, ok = false) when it went through
  1114  // the catch clause.
  1115  func (this PresentationConnection) TryClose() (ret js.Void, exception js.Any, ok bool) {
  1116  	ok = js.True == bindings.TryPresentationConnectionClose(
  1117  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1118  	)
  1119  
  1120  	return
  1121  }
  1122  
  1123  // HasFuncTerminate returns true if the method "PresentationConnection.terminate" exists.
  1124  func (this PresentationConnection) HasFuncTerminate() bool {
  1125  	return js.True == bindings.HasFuncPresentationConnectionTerminate(
  1126  		this.ref,
  1127  	)
  1128  }
  1129  
  1130  // FuncTerminate returns the method "PresentationConnection.terminate".
  1131  func (this PresentationConnection) FuncTerminate() (fn js.Func[func()]) {
  1132  	bindings.FuncPresentationConnectionTerminate(
  1133  		this.ref, js.Pointer(&fn),
  1134  	)
  1135  	return
  1136  }
  1137  
  1138  // Terminate calls the method "PresentationConnection.terminate".
  1139  func (this PresentationConnection) Terminate() (ret js.Void) {
  1140  	bindings.CallPresentationConnectionTerminate(
  1141  		this.ref, js.Pointer(&ret),
  1142  	)
  1143  
  1144  	return
  1145  }
  1146  
  1147  // TryTerminate calls the method "PresentationConnection.terminate"
  1148  // in a try/catch block and returns (_, err, ok = false) when it went through
  1149  // the catch clause.
  1150  func (this PresentationConnection) TryTerminate() (ret js.Void, exception js.Any, ok bool) {
  1151  	ok = js.True == bindings.TryPresentationConnectionTerminate(
  1152  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1153  	)
  1154  
  1155  	return
  1156  }
  1157  
  1158  // HasFuncSend returns true if the method "PresentationConnection.send" exists.
  1159  func (this PresentationConnection) HasFuncSend() bool {
  1160  	return js.True == bindings.HasFuncPresentationConnectionSend(
  1161  		this.ref,
  1162  	)
  1163  }
  1164  
  1165  // FuncSend returns the method "PresentationConnection.send".
  1166  func (this PresentationConnection) FuncSend() (fn js.Func[func(message js.String)]) {
  1167  	bindings.FuncPresentationConnectionSend(
  1168  		this.ref, js.Pointer(&fn),
  1169  	)
  1170  	return
  1171  }
  1172  
  1173  // Send calls the method "PresentationConnection.send".
  1174  func (this PresentationConnection) Send(message js.String) (ret js.Void) {
  1175  	bindings.CallPresentationConnectionSend(
  1176  		this.ref, js.Pointer(&ret),
  1177  		message.Ref(),
  1178  	)
  1179  
  1180  	return
  1181  }
  1182  
  1183  // TrySend calls the method "PresentationConnection.send"
  1184  // in a try/catch block and returns (_, err, ok = false) when it went through
  1185  // the catch clause.
  1186  func (this PresentationConnection) TrySend(message js.String) (ret js.Void, exception js.Any, ok bool) {
  1187  	ok = js.True == bindings.TryPresentationConnectionSend(
  1188  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1189  		message.Ref(),
  1190  	)
  1191  
  1192  	return
  1193  }
  1194  
  1195  // HasFuncSend1 returns true if the method "PresentationConnection.send" exists.
  1196  func (this PresentationConnection) HasFuncSend1() bool {
  1197  	return js.True == bindings.HasFuncPresentationConnectionSend1(
  1198  		this.ref,
  1199  	)
  1200  }
  1201  
  1202  // FuncSend1 returns the method "PresentationConnection.send".
  1203  func (this PresentationConnection) FuncSend1() (fn js.Func[func(data Blob)]) {
  1204  	bindings.FuncPresentationConnectionSend1(
  1205  		this.ref, js.Pointer(&fn),
  1206  	)
  1207  	return
  1208  }
  1209  
  1210  // Send1 calls the method "PresentationConnection.send".
  1211  func (this PresentationConnection) Send1(data Blob) (ret js.Void) {
  1212  	bindings.CallPresentationConnectionSend1(
  1213  		this.ref, js.Pointer(&ret),
  1214  		data.Ref(),
  1215  	)
  1216  
  1217  	return
  1218  }
  1219  
  1220  // TrySend1 calls the method "PresentationConnection.send"
  1221  // in a try/catch block and returns (_, err, ok = false) when it went through
  1222  // the catch clause.
  1223  func (this PresentationConnection) TrySend1(data Blob) (ret js.Void, exception js.Any, ok bool) {
  1224  	ok = js.True == bindings.TryPresentationConnectionSend1(
  1225  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1226  		data.Ref(),
  1227  	)
  1228  
  1229  	return
  1230  }
  1231  
  1232  // HasFuncSend2 returns true if the method "PresentationConnection.send" exists.
  1233  func (this PresentationConnection) HasFuncSend2() bool {
  1234  	return js.True == bindings.HasFuncPresentationConnectionSend2(
  1235  		this.ref,
  1236  	)
  1237  }
  1238  
  1239  // FuncSend2 returns the method "PresentationConnection.send".
  1240  func (this PresentationConnection) FuncSend2() (fn js.Func[func(data js.ArrayBuffer)]) {
  1241  	bindings.FuncPresentationConnectionSend2(
  1242  		this.ref, js.Pointer(&fn),
  1243  	)
  1244  	return
  1245  }
  1246  
  1247  // Send2 calls the method "PresentationConnection.send".
  1248  func (this PresentationConnection) Send2(data js.ArrayBuffer) (ret js.Void) {
  1249  	bindings.CallPresentationConnectionSend2(
  1250  		this.ref, js.Pointer(&ret),
  1251  		data.Ref(),
  1252  	)
  1253  
  1254  	return
  1255  }
  1256  
  1257  // TrySend2 calls the method "PresentationConnection.send"
  1258  // in a try/catch block and returns (_, err, ok = false) when it went through
  1259  // the catch clause.
  1260  func (this PresentationConnection) TrySend2(data js.ArrayBuffer) (ret js.Void, exception js.Any, ok bool) {
  1261  	ok = js.True == bindings.TryPresentationConnectionSend2(
  1262  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1263  		data.Ref(),
  1264  	)
  1265  
  1266  	return
  1267  }
  1268  
  1269  // HasFuncSend3 returns true if the method "PresentationConnection.send" exists.
  1270  func (this PresentationConnection) HasFuncSend3() bool {
  1271  	return js.True == bindings.HasFuncPresentationConnectionSend3(
  1272  		this.ref,
  1273  	)
  1274  }
  1275  
  1276  // FuncSend3 returns the method "PresentationConnection.send".
  1277  func (this PresentationConnection) FuncSend3() (fn js.Func[func(data js.ArrayBufferView)]) {
  1278  	bindings.FuncPresentationConnectionSend3(
  1279  		this.ref, js.Pointer(&fn),
  1280  	)
  1281  	return
  1282  }
  1283  
  1284  // Send3 calls the method "PresentationConnection.send".
  1285  func (this PresentationConnection) Send3(data js.ArrayBufferView) (ret js.Void) {
  1286  	bindings.CallPresentationConnectionSend3(
  1287  		this.ref, js.Pointer(&ret),
  1288  		data.Ref(),
  1289  	)
  1290  
  1291  	return
  1292  }
  1293  
  1294  // TrySend3 calls the method "PresentationConnection.send"
  1295  // in a try/catch block and returns (_, err, ok = false) when it went through
  1296  // the catch clause.
  1297  func (this PresentationConnection) TrySend3(data js.ArrayBufferView) (ret js.Void, exception js.Any, ok bool) {
  1298  	ok = js.True == bindings.TryPresentationConnectionSend3(
  1299  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1300  		data.Ref(),
  1301  	)
  1302  
  1303  	return
  1304  }
  1305  
  1306  type PresentationAvailability struct {
  1307  	EventTarget
  1308  }
  1309  
  1310  func (this PresentationAvailability) Once() PresentationAvailability {
  1311  	this.ref.Once()
  1312  	return this
  1313  }
  1314  
  1315  func (this PresentationAvailability) Ref() js.Ref {
  1316  	return this.EventTarget.Ref()
  1317  }
  1318  
  1319  func (this PresentationAvailability) FromRef(ref js.Ref) PresentationAvailability {
  1320  	this.EventTarget = this.EventTarget.FromRef(ref)
  1321  	return this
  1322  }
  1323  
  1324  func (this PresentationAvailability) Free() {
  1325  	this.ref.Free()
  1326  }
  1327  
  1328  // Value returns the value of property "PresentationAvailability.value".
  1329  //
  1330  // It returns ok=false if there is no such property.
  1331  func (this PresentationAvailability) Value() (ret bool, ok bool) {
  1332  	ok = js.True == bindings.GetPresentationAvailabilityValue(
  1333  		this.ref, js.Pointer(&ret),
  1334  	)
  1335  	return
  1336  }
  1337  
  1338  func NewPresentationRequest(url js.String) (ret PresentationRequest) {
  1339  	ret.ref = bindings.NewPresentationRequestByPresentationRequest(
  1340  		url.Ref())
  1341  	return
  1342  }
  1343  
  1344  func NewPresentationRequestByPresentationRequest1(urls js.Array[js.String]) (ret PresentationRequest) {
  1345  	ret.ref = bindings.NewPresentationRequestByPresentationRequest1(
  1346  		urls.Ref())
  1347  	return
  1348  }
  1349  
  1350  type PresentationRequest struct {
  1351  	EventTarget
  1352  }
  1353  
  1354  func (this PresentationRequest) Once() PresentationRequest {
  1355  	this.ref.Once()
  1356  	return this
  1357  }
  1358  
  1359  func (this PresentationRequest) Ref() js.Ref {
  1360  	return this.EventTarget.Ref()
  1361  }
  1362  
  1363  func (this PresentationRequest) FromRef(ref js.Ref) PresentationRequest {
  1364  	this.EventTarget = this.EventTarget.FromRef(ref)
  1365  	return this
  1366  }
  1367  
  1368  func (this PresentationRequest) Free() {
  1369  	this.ref.Free()
  1370  }
  1371  
  1372  // HasFuncStart returns true if the method "PresentationRequest.start" exists.
  1373  func (this PresentationRequest) HasFuncStart() bool {
  1374  	return js.True == bindings.HasFuncPresentationRequestStart(
  1375  		this.ref,
  1376  	)
  1377  }
  1378  
  1379  // FuncStart returns the method "PresentationRequest.start".
  1380  func (this PresentationRequest) FuncStart() (fn js.Func[func() js.Promise[PresentationConnection]]) {
  1381  	bindings.FuncPresentationRequestStart(
  1382  		this.ref, js.Pointer(&fn),
  1383  	)
  1384  	return
  1385  }
  1386  
  1387  // Start calls the method "PresentationRequest.start".
  1388  func (this PresentationRequest) Start() (ret js.Promise[PresentationConnection]) {
  1389  	bindings.CallPresentationRequestStart(
  1390  		this.ref, js.Pointer(&ret),
  1391  	)
  1392  
  1393  	return
  1394  }
  1395  
  1396  // TryStart calls the method "PresentationRequest.start"
  1397  // in a try/catch block and returns (_, err, ok = false) when it went through
  1398  // the catch clause.
  1399  func (this PresentationRequest) TryStart() (ret js.Promise[PresentationConnection], exception js.Any, ok bool) {
  1400  	ok = js.True == bindings.TryPresentationRequestStart(
  1401  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1402  	)
  1403  
  1404  	return
  1405  }
  1406  
  1407  // HasFuncReconnect returns true if the method "PresentationRequest.reconnect" exists.
  1408  func (this PresentationRequest) HasFuncReconnect() bool {
  1409  	return js.True == bindings.HasFuncPresentationRequestReconnect(
  1410  		this.ref,
  1411  	)
  1412  }
  1413  
  1414  // FuncReconnect returns the method "PresentationRequest.reconnect".
  1415  func (this PresentationRequest) FuncReconnect() (fn js.Func[func(presentationId js.String) js.Promise[PresentationConnection]]) {
  1416  	bindings.FuncPresentationRequestReconnect(
  1417  		this.ref, js.Pointer(&fn),
  1418  	)
  1419  	return
  1420  }
  1421  
  1422  // Reconnect calls the method "PresentationRequest.reconnect".
  1423  func (this PresentationRequest) Reconnect(presentationId js.String) (ret js.Promise[PresentationConnection]) {
  1424  	bindings.CallPresentationRequestReconnect(
  1425  		this.ref, js.Pointer(&ret),
  1426  		presentationId.Ref(),
  1427  	)
  1428  
  1429  	return
  1430  }
  1431  
  1432  // TryReconnect calls the method "PresentationRequest.reconnect"
  1433  // in a try/catch block and returns (_, err, ok = false) when it went through
  1434  // the catch clause.
  1435  func (this PresentationRequest) TryReconnect(presentationId js.String) (ret js.Promise[PresentationConnection], exception js.Any, ok bool) {
  1436  	ok = js.True == bindings.TryPresentationRequestReconnect(
  1437  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1438  		presentationId.Ref(),
  1439  	)
  1440  
  1441  	return
  1442  }
  1443  
  1444  // HasFuncGetAvailability returns true if the method "PresentationRequest.getAvailability" exists.
  1445  func (this PresentationRequest) HasFuncGetAvailability() bool {
  1446  	return js.True == bindings.HasFuncPresentationRequestGetAvailability(
  1447  		this.ref,
  1448  	)
  1449  }
  1450  
  1451  // FuncGetAvailability returns the method "PresentationRequest.getAvailability".
  1452  func (this PresentationRequest) FuncGetAvailability() (fn js.Func[func() js.Promise[PresentationAvailability]]) {
  1453  	bindings.FuncPresentationRequestGetAvailability(
  1454  		this.ref, js.Pointer(&fn),
  1455  	)
  1456  	return
  1457  }
  1458  
  1459  // GetAvailability calls the method "PresentationRequest.getAvailability".
  1460  func (this PresentationRequest) GetAvailability() (ret js.Promise[PresentationAvailability]) {
  1461  	bindings.CallPresentationRequestGetAvailability(
  1462  		this.ref, js.Pointer(&ret),
  1463  	)
  1464  
  1465  	return
  1466  }
  1467  
  1468  // TryGetAvailability calls the method "PresentationRequest.getAvailability"
  1469  // in a try/catch block and returns (_, err, ok = false) when it went through
  1470  // the catch clause.
  1471  func (this PresentationRequest) TryGetAvailability() (ret js.Promise[PresentationAvailability], exception js.Any, ok bool) {
  1472  	ok = js.True == bindings.TryPresentationRequestGetAvailability(
  1473  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1474  	)
  1475  
  1476  	return
  1477  }
  1478  
  1479  type PresentationConnectionList struct {
  1480  	EventTarget
  1481  }
  1482  
  1483  func (this PresentationConnectionList) Once() PresentationConnectionList {
  1484  	this.ref.Once()
  1485  	return this
  1486  }
  1487  
  1488  func (this PresentationConnectionList) Ref() js.Ref {
  1489  	return this.EventTarget.Ref()
  1490  }
  1491  
  1492  func (this PresentationConnectionList) FromRef(ref js.Ref) PresentationConnectionList {
  1493  	this.EventTarget = this.EventTarget.FromRef(ref)
  1494  	return this
  1495  }
  1496  
  1497  func (this PresentationConnectionList) Free() {
  1498  	this.ref.Free()
  1499  }
  1500  
  1501  // Connections returns the value of property "PresentationConnectionList.connections".
  1502  //
  1503  // It returns ok=false if there is no such property.
  1504  func (this PresentationConnectionList) Connections() (ret js.FrozenArray[PresentationConnection], ok bool) {
  1505  	ok = js.True == bindings.GetPresentationConnectionListConnections(
  1506  		this.ref, js.Pointer(&ret),
  1507  	)
  1508  	return
  1509  }
  1510  
  1511  type PresentationReceiver struct {
  1512  	ref js.Ref
  1513  }
  1514  
  1515  func (this PresentationReceiver) Once() PresentationReceiver {
  1516  	this.ref.Once()
  1517  	return this
  1518  }
  1519  
  1520  func (this PresentationReceiver) Ref() js.Ref {
  1521  	return this.ref
  1522  }
  1523  
  1524  func (this PresentationReceiver) FromRef(ref js.Ref) PresentationReceiver {
  1525  	this.ref = ref
  1526  	return this
  1527  }
  1528  
  1529  func (this PresentationReceiver) Free() {
  1530  	this.ref.Free()
  1531  }
  1532  
  1533  // ConnectionList returns the value of property "PresentationReceiver.connectionList".
  1534  //
  1535  // It returns ok=false if there is no such property.
  1536  func (this PresentationReceiver) ConnectionList() (ret js.Promise[PresentationConnectionList], ok bool) {
  1537  	ok = js.True == bindings.GetPresentationReceiverConnectionList(
  1538  		this.ref, js.Pointer(&ret),
  1539  	)
  1540  	return
  1541  }
  1542  
  1543  type Presentation struct {
  1544  	ref js.Ref
  1545  }
  1546  
  1547  func (this Presentation) Once() Presentation {
  1548  	this.ref.Once()
  1549  	return this
  1550  }
  1551  
  1552  func (this Presentation) Ref() js.Ref {
  1553  	return this.ref
  1554  }
  1555  
  1556  func (this Presentation) FromRef(ref js.Ref) Presentation {
  1557  	this.ref = ref
  1558  	return this
  1559  }
  1560  
  1561  func (this Presentation) Free() {
  1562  	this.ref.Free()
  1563  }
  1564  
  1565  // DefaultRequest returns the value of property "Presentation.defaultRequest".
  1566  //
  1567  // It returns ok=false if there is no such property.
  1568  func (this Presentation) DefaultRequest() (ret PresentationRequest, ok bool) {
  1569  	ok = js.True == bindings.GetPresentationDefaultRequest(
  1570  		this.ref, js.Pointer(&ret),
  1571  	)
  1572  	return
  1573  }
  1574  
  1575  // SetDefaultRequest sets the value of property "Presentation.defaultRequest" to val.
  1576  //
  1577  // It returns false if the property cannot be set.
  1578  func (this Presentation) SetDefaultRequest(val PresentationRequest) bool {
  1579  	return js.True == bindings.SetPresentationDefaultRequest(
  1580  		this.ref,
  1581  		val.Ref(),
  1582  	)
  1583  }
  1584  
  1585  // Receiver returns the value of property "Presentation.receiver".
  1586  //
  1587  // It returns ok=false if there is no such property.
  1588  func (this Presentation) Receiver() (ret PresentationReceiver, ok bool) {
  1589  	ok = js.True == bindings.GetPresentationReceiver(
  1590  		this.ref, js.Pointer(&ret),
  1591  	)
  1592  	return
  1593  }
  1594  
  1595  type VirtualKeyboard struct {
  1596  	EventTarget
  1597  }
  1598  
  1599  func (this VirtualKeyboard) Once() VirtualKeyboard {
  1600  	this.ref.Once()
  1601  	return this
  1602  }
  1603  
  1604  func (this VirtualKeyboard) Ref() js.Ref {
  1605  	return this.EventTarget.Ref()
  1606  }
  1607  
  1608  func (this VirtualKeyboard) FromRef(ref js.Ref) VirtualKeyboard {
  1609  	this.EventTarget = this.EventTarget.FromRef(ref)
  1610  	return this
  1611  }
  1612  
  1613  func (this VirtualKeyboard) Free() {
  1614  	this.ref.Free()
  1615  }
  1616  
  1617  // BoundingRect returns the value of property "VirtualKeyboard.boundingRect".
  1618  //
  1619  // It returns ok=false if there is no such property.
  1620  func (this VirtualKeyboard) BoundingRect() (ret DOMRect, ok bool) {
  1621  	ok = js.True == bindings.GetVirtualKeyboardBoundingRect(
  1622  		this.ref, js.Pointer(&ret),
  1623  	)
  1624  	return
  1625  }
  1626  
  1627  // OverlaysContent returns the value of property "VirtualKeyboard.overlaysContent".
  1628  //
  1629  // It returns ok=false if there is no such property.
  1630  func (this VirtualKeyboard) OverlaysContent() (ret bool, ok bool) {
  1631  	ok = js.True == bindings.GetVirtualKeyboardOverlaysContent(
  1632  		this.ref, js.Pointer(&ret),
  1633  	)
  1634  	return
  1635  }
  1636  
  1637  // SetOverlaysContent sets the value of property "VirtualKeyboard.overlaysContent" to val.
  1638  //
  1639  // It returns false if the property cannot be set.
  1640  func (this VirtualKeyboard) SetOverlaysContent(val bool) bool {
  1641  	return js.True == bindings.SetVirtualKeyboardOverlaysContent(
  1642  		this.ref,
  1643  		js.Bool(bool(val)),
  1644  	)
  1645  }
  1646  
  1647  // HasFuncShow returns true if the method "VirtualKeyboard.show" exists.
  1648  func (this VirtualKeyboard) HasFuncShow() bool {
  1649  	return js.True == bindings.HasFuncVirtualKeyboardShow(
  1650  		this.ref,
  1651  	)
  1652  }
  1653  
  1654  // FuncShow returns the method "VirtualKeyboard.show".
  1655  func (this VirtualKeyboard) FuncShow() (fn js.Func[func()]) {
  1656  	bindings.FuncVirtualKeyboardShow(
  1657  		this.ref, js.Pointer(&fn),
  1658  	)
  1659  	return
  1660  }
  1661  
  1662  // Show calls the method "VirtualKeyboard.show".
  1663  func (this VirtualKeyboard) Show() (ret js.Void) {
  1664  	bindings.CallVirtualKeyboardShow(
  1665  		this.ref, js.Pointer(&ret),
  1666  	)
  1667  
  1668  	return
  1669  }
  1670  
  1671  // TryShow calls the method "VirtualKeyboard.show"
  1672  // in a try/catch block and returns (_, err, ok = false) when it went through
  1673  // the catch clause.
  1674  func (this VirtualKeyboard) TryShow() (ret js.Void, exception js.Any, ok bool) {
  1675  	ok = js.True == bindings.TryVirtualKeyboardShow(
  1676  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1677  	)
  1678  
  1679  	return
  1680  }
  1681  
  1682  // HasFuncHide returns true if the method "VirtualKeyboard.hide" exists.
  1683  func (this VirtualKeyboard) HasFuncHide() bool {
  1684  	return js.True == bindings.HasFuncVirtualKeyboardHide(
  1685  		this.ref,
  1686  	)
  1687  }
  1688  
  1689  // FuncHide returns the method "VirtualKeyboard.hide".
  1690  func (this VirtualKeyboard) FuncHide() (fn js.Func[func()]) {
  1691  	bindings.FuncVirtualKeyboardHide(
  1692  		this.ref, js.Pointer(&fn),
  1693  	)
  1694  	return
  1695  }
  1696  
  1697  // Hide calls the method "VirtualKeyboard.hide".
  1698  func (this VirtualKeyboard) Hide() (ret js.Void) {
  1699  	bindings.CallVirtualKeyboardHide(
  1700  		this.ref, js.Pointer(&ret),
  1701  	)
  1702  
  1703  	return
  1704  }
  1705  
  1706  // TryHide calls the method "VirtualKeyboard.hide"
  1707  // in a try/catch block and returns (_, err, ok = false) when it went through
  1708  // the catch clause.
  1709  func (this VirtualKeyboard) TryHide() (ret js.Void, exception js.Any, ok bool) {
  1710  	ok = js.True == bindings.TryVirtualKeyboardHide(
  1711  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1712  	)
  1713  
  1714  	return
  1715  }
  1716  
  1717  type NavigatorUABrandVersion struct {
  1718  	// Brand is "NavigatorUABrandVersion.brand"
  1719  	//
  1720  	// Optional
  1721  	Brand js.String
  1722  	// Version is "NavigatorUABrandVersion.version"
  1723  	//
  1724  	// Optional
  1725  	Version js.String
  1726  
  1727  	FFI_USE bool
  1728  }
  1729  
  1730  // FromRef calls UpdateFrom and returns a NavigatorUABrandVersion with all fields set.
  1731  func (p NavigatorUABrandVersion) FromRef(ref js.Ref) NavigatorUABrandVersion {
  1732  	p.UpdateFrom(ref)
  1733  	return p
  1734  }
  1735  
  1736  // New creates a new NavigatorUABrandVersion in the application heap.
  1737  func (p NavigatorUABrandVersion) New() js.Ref {
  1738  	return bindings.NavigatorUABrandVersionJSLoad(
  1739  		js.Pointer(&p), js.True, 0,
  1740  	)
  1741  }
  1742  
  1743  // UpdateFrom copies value of all fields of the heap object to p.
  1744  func (p *NavigatorUABrandVersion) UpdateFrom(ref js.Ref) {
  1745  	bindings.NavigatorUABrandVersionJSStore(
  1746  		js.Pointer(p), ref,
  1747  	)
  1748  }
  1749  
  1750  // Update writes all fields of the p to the heap object referenced by ref.
  1751  func (p *NavigatorUABrandVersion) Update(ref js.Ref) {
  1752  	bindings.NavigatorUABrandVersionJSLoad(
  1753  		js.Pointer(p), js.False, ref,
  1754  	)
  1755  }
  1756  
  1757  // FreeMembers frees fields with heap reference, if recursive is true
  1758  // free all heap references reachable from p.
  1759  func (p *NavigatorUABrandVersion) FreeMembers(recursive bool) {
  1760  	js.Free(
  1761  		p.Brand.Ref(),
  1762  		p.Version.Ref(),
  1763  	)
  1764  	p.Brand = p.Brand.FromRef(js.Undefined)
  1765  	p.Version = p.Version.FromRef(js.Undefined)
  1766  }
  1767  
  1768  type UADataValues struct {
  1769  	// Architecture is "UADataValues.architecture"
  1770  	//
  1771  	// Optional
  1772  	Architecture js.String
  1773  	// Bitness is "UADataValues.bitness"
  1774  	//
  1775  	// Optional
  1776  	Bitness js.String
  1777  	// Brands is "UADataValues.brands"
  1778  	//
  1779  	// Optional
  1780  	Brands js.Array[NavigatorUABrandVersion]
  1781  	// FormFactor is "UADataValues.formFactor"
  1782  	//
  1783  	// Optional
  1784  	FormFactor js.String
  1785  	// FullVersionList is "UADataValues.fullVersionList"
  1786  	//
  1787  	// Optional
  1788  	FullVersionList js.Array[NavigatorUABrandVersion]
  1789  	// Model is "UADataValues.model"
  1790  	//
  1791  	// Optional
  1792  	Model js.String
  1793  	// Mobile is "UADataValues.mobile"
  1794  	//
  1795  	// Optional
  1796  	//
  1797  	// NOTE: FFI_USE_Mobile MUST be set to true to make this field effective.
  1798  	Mobile bool
  1799  	// Platform is "UADataValues.platform"
  1800  	//
  1801  	// Optional
  1802  	Platform js.String
  1803  	// PlatformVersion is "UADataValues.platformVersion"
  1804  	//
  1805  	// Optional
  1806  	PlatformVersion js.String
  1807  	// UaFullVersion is "UADataValues.uaFullVersion"
  1808  	//
  1809  	// Optional
  1810  	UaFullVersion js.String
  1811  	// Wow64 is "UADataValues.wow64"
  1812  	//
  1813  	// Optional
  1814  	//
  1815  	// NOTE: FFI_USE_Wow64 MUST be set to true to make this field effective.
  1816  	Wow64 bool
  1817  
  1818  	FFI_USE_Mobile bool // for Mobile.
  1819  	FFI_USE_Wow64  bool // for Wow64.
  1820  
  1821  	FFI_USE bool
  1822  }
  1823  
  1824  // FromRef calls UpdateFrom and returns a UADataValues with all fields set.
  1825  func (p UADataValues) FromRef(ref js.Ref) UADataValues {
  1826  	p.UpdateFrom(ref)
  1827  	return p
  1828  }
  1829  
  1830  // New creates a new UADataValues in the application heap.
  1831  func (p UADataValues) New() js.Ref {
  1832  	return bindings.UADataValuesJSLoad(
  1833  		js.Pointer(&p), js.True, 0,
  1834  	)
  1835  }
  1836  
  1837  // UpdateFrom copies value of all fields of the heap object to p.
  1838  func (p *UADataValues) UpdateFrom(ref js.Ref) {
  1839  	bindings.UADataValuesJSStore(
  1840  		js.Pointer(p), ref,
  1841  	)
  1842  }
  1843  
  1844  // Update writes all fields of the p to the heap object referenced by ref.
  1845  func (p *UADataValues) Update(ref js.Ref) {
  1846  	bindings.UADataValuesJSLoad(
  1847  		js.Pointer(p), js.False, ref,
  1848  	)
  1849  }
  1850  
  1851  // FreeMembers frees fields with heap reference, if recursive is true
  1852  // free all heap references reachable from p.
  1853  func (p *UADataValues) FreeMembers(recursive bool) {
  1854  	js.Free(
  1855  		p.Architecture.Ref(),
  1856  		p.Bitness.Ref(),
  1857  		p.Brands.Ref(),
  1858  		p.FormFactor.Ref(),
  1859  		p.FullVersionList.Ref(),
  1860  		p.Model.Ref(),
  1861  		p.Platform.Ref(),
  1862  		p.PlatformVersion.Ref(),
  1863  		p.UaFullVersion.Ref(),
  1864  	)
  1865  	p.Architecture = p.Architecture.FromRef(js.Undefined)
  1866  	p.Bitness = p.Bitness.FromRef(js.Undefined)
  1867  	p.Brands = p.Brands.FromRef(js.Undefined)
  1868  	p.FormFactor = p.FormFactor.FromRef(js.Undefined)
  1869  	p.FullVersionList = p.FullVersionList.FromRef(js.Undefined)
  1870  	p.Model = p.Model.FromRef(js.Undefined)
  1871  	p.Platform = p.Platform.FromRef(js.Undefined)
  1872  	p.PlatformVersion = p.PlatformVersion.FromRef(js.Undefined)
  1873  	p.UaFullVersion = p.UaFullVersion.FromRef(js.Undefined)
  1874  }
  1875  
  1876  type UALowEntropyJSON struct {
  1877  	// Brands is "UALowEntropyJSON.brands"
  1878  	//
  1879  	// Optional
  1880  	Brands js.Array[NavigatorUABrandVersion]
  1881  	// Mobile is "UALowEntropyJSON.mobile"
  1882  	//
  1883  	// Optional
  1884  	//
  1885  	// NOTE: FFI_USE_Mobile MUST be set to true to make this field effective.
  1886  	Mobile bool
  1887  	// Platform is "UALowEntropyJSON.platform"
  1888  	//
  1889  	// Optional
  1890  	Platform js.String
  1891  
  1892  	FFI_USE_Mobile bool // for Mobile.
  1893  
  1894  	FFI_USE bool
  1895  }
  1896  
  1897  // FromRef calls UpdateFrom and returns a UALowEntropyJSON with all fields set.
  1898  func (p UALowEntropyJSON) FromRef(ref js.Ref) UALowEntropyJSON {
  1899  	p.UpdateFrom(ref)
  1900  	return p
  1901  }
  1902  
  1903  // New creates a new UALowEntropyJSON in the application heap.
  1904  func (p UALowEntropyJSON) New() js.Ref {
  1905  	return bindings.UALowEntropyJSONJSLoad(
  1906  		js.Pointer(&p), js.True, 0,
  1907  	)
  1908  }
  1909  
  1910  // UpdateFrom copies value of all fields of the heap object to p.
  1911  func (p *UALowEntropyJSON) UpdateFrom(ref js.Ref) {
  1912  	bindings.UALowEntropyJSONJSStore(
  1913  		js.Pointer(p), ref,
  1914  	)
  1915  }
  1916  
  1917  // Update writes all fields of the p to the heap object referenced by ref.
  1918  func (p *UALowEntropyJSON) Update(ref js.Ref) {
  1919  	bindings.UALowEntropyJSONJSLoad(
  1920  		js.Pointer(p), js.False, ref,
  1921  	)
  1922  }
  1923  
  1924  // FreeMembers frees fields with heap reference, if recursive is true
  1925  // free all heap references reachable from p.
  1926  func (p *UALowEntropyJSON) FreeMembers(recursive bool) {
  1927  	js.Free(
  1928  		p.Brands.Ref(),
  1929  		p.Platform.Ref(),
  1930  	)
  1931  	p.Brands = p.Brands.FromRef(js.Undefined)
  1932  	p.Platform = p.Platform.FromRef(js.Undefined)
  1933  }
  1934  
  1935  type NavigatorUAData struct {
  1936  	ref js.Ref
  1937  }
  1938  
  1939  func (this NavigatorUAData) Once() NavigatorUAData {
  1940  	this.ref.Once()
  1941  	return this
  1942  }
  1943  
  1944  func (this NavigatorUAData) Ref() js.Ref {
  1945  	return this.ref
  1946  }
  1947  
  1948  func (this NavigatorUAData) FromRef(ref js.Ref) NavigatorUAData {
  1949  	this.ref = ref
  1950  	return this
  1951  }
  1952  
  1953  func (this NavigatorUAData) Free() {
  1954  	this.ref.Free()
  1955  }
  1956  
  1957  // Brands returns the value of property "NavigatorUAData.brands".
  1958  //
  1959  // It returns ok=false if there is no such property.
  1960  func (this NavigatorUAData) Brands() (ret js.FrozenArray[NavigatorUABrandVersion], ok bool) {
  1961  	ok = js.True == bindings.GetNavigatorUADataBrands(
  1962  		this.ref, js.Pointer(&ret),
  1963  	)
  1964  	return
  1965  }
  1966  
  1967  // Mobile returns the value of property "NavigatorUAData.mobile".
  1968  //
  1969  // It returns ok=false if there is no such property.
  1970  func (this NavigatorUAData) Mobile() (ret bool, ok bool) {
  1971  	ok = js.True == bindings.GetNavigatorUADataMobile(
  1972  		this.ref, js.Pointer(&ret),
  1973  	)
  1974  	return
  1975  }
  1976  
  1977  // Platform returns the value of property "NavigatorUAData.platform".
  1978  //
  1979  // It returns ok=false if there is no such property.
  1980  func (this NavigatorUAData) Platform() (ret js.String, ok bool) {
  1981  	ok = js.True == bindings.GetNavigatorUADataPlatform(
  1982  		this.ref, js.Pointer(&ret),
  1983  	)
  1984  	return
  1985  }
  1986  
  1987  // HasFuncGetHighEntropyValues returns true if the method "NavigatorUAData.getHighEntropyValues" exists.
  1988  func (this NavigatorUAData) HasFuncGetHighEntropyValues() bool {
  1989  	return js.True == bindings.HasFuncNavigatorUADataGetHighEntropyValues(
  1990  		this.ref,
  1991  	)
  1992  }
  1993  
  1994  // FuncGetHighEntropyValues returns the method "NavigatorUAData.getHighEntropyValues".
  1995  func (this NavigatorUAData) FuncGetHighEntropyValues() (fn js.Func[func(hints js.Array[js.String]) js.Promise[UADataValues]]) {
  1996  	bindings.FuncNavigatorUADataGetHighEntropyValues(
  1997  		this.ref, js.Pointer(&fn),
  1998  	)
  1999  	return
  2000  }
  2001  
  2002  // GetHighEntropyValues calls the method "NavigatorUAData.getHighEntropyValues".
  2003  func (this NavigatorUAData) GetHighEntropyValues(hints js.Array[js.String]) (ret js.Promise[UADataValues]) {
  2004  	bindings.CallNavigatorUADataGetHighEntropyValues(
  2005  		this.ref, js.Pointer(&ret),
  2006  		hints.Ref(),
  2007  	)
  2008  
  2009  	return
  2010  }
  2011  
  2012  // TryGetHighEntropyValues calls the method "NavigatorUAData.getHighEntropyValues"
  2013  // in a try/catch block and returns (_, err, ok = false) when it went through
  2014  // the catch clause.
  2015  func (this NavigatorUAData) TryGetHighEntropyValues(hints js.Array[js.String]) (ret js.Promise[UADataValues], exception js.Any, ok bool) {
  2016  	ok = js.True == bindings.TryNavigatorUADataGetHighEntropyValues(
  2017  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2018  		hints.Ref(),
  2019  	)
  2020  
  2021  	return
  2022  }
  2023  
  2024  // HasFuncToJSON returns true if the method "NavigatorUAData.toJSON" exists.
  2025  func (this NavigatorUAData) HasFuncToJSON() bool {
  2026  	return js.True == bindings.HasFuncNavigatorUADataToJSON(
  2027  		this.ref,
  2028  	)
  2029  }
  2030  
  2031  // FuncToJSON returns the method "NavigatorUAData.toJSON".
  2032  func (this NavigatorUAData) FuncToJSON() (fn js.Func[func() UALowEntropyJSON]) {
  2033  	bindings.FuncNavigatorUADataToJSON(
  2034  		this.ref, js.Pointer(&fn),
  2035  	)
  2036  	return
  2037  }
  2038  
  2039  // ToJSON calls the method "NavigatorUAData.toJSON".
  2040  func (this NavigatorUAData) ToJSON() (ret UALowEntropyJSON) {
  2041  	bindings.CallNavigatorUADataToJSON(
  2042  		this.ref, js.Pointer(&ret),
  2043  	)
  2044  
  2045  	return
  2046  }
  2047  
  2048  // TryToJSON calls the method "NavigatorUAData.toJSON"
  2049  // in a try/catch block and returns (_, err, ok = false) when it went through
  2050  // the catch clause.
  2051  func (this NavigatorUAData) TryToJSON() (ret UALowEntropyJSON, exception js.Any, ok bool) {
  2052  	ok = js.True == bindings.TryNavigatorUADataToJSON(
  2053  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2054  	)
  2055  
  2056  	return
  2057  }
  2058  
  2059  type StorageEstimate struct {
  2060  	// Usage is "StorageEstimate.usage"
  2061  	//
  2062  	// Optional
  2063  	//
  2064  	// NOTE: FFI_USE_Usage MUST be set to true to make this field effective.
  2065  	Usage uint64
  2066  	// Quota is "StorageEstimate.quota"
  2067  	//
  2068  	// Optional
  2069  	//
  2070  	// NOTE: FFI_USE_Quota MUST be set to true to make this field effective.
  2071  	Quota uint64
  2072  
  2073  	FFI_USE_Usage bool // for Usage.
  2074  	FFI_USE_Quota bool // for Quota.
  2075  
  2076  	FFI_USE bool
  2077  }
  2078  
  2079  // FromRef calls UpdateFrom and returns a StorageEstimate with all fields set.
  2080  func (p StorageEstimate) FromRef(ref js.Ref) StorageEstimate {
  2081  	p.UpdateFrom(ref)
  2082  	return p
  2083  }
  2084  
  2085  // New creates a new StorageEstimate in the application heap.
  2086  func (p StorageEstimate) New() js.Ref {
  2087  	return bindings.StorageEstimateJSLoad(
  2088  		js.Pointer(&p), js.True, 0,
  2089  	)
  2090  }
  2091  
  2092  // UpdateFrom copies value of all fields of the heap object to p.
  2093  func (p *StorageEstimate) UpdateFrom(ref js.Ref) {
  2094  	bindings.StorageEstimateJSStore(
  2095  		js.Pointer(p), ref,
  2096  	)
  2097  }
  2098  
  2099  // Update writes all fields of the p to the heap object referenced by ref.
  2100  func (p *StorageEstimate) Update(ref js.Ref) {
  2101  	bindings.StorageEstimateJSLoad(
  2102  		js.Pointer(p), js.False, ref,
  2103  	)
  2104  }
  2105  
  2106  // FreeMembers frees fields with heap reference, if recursive is true
  2107  // free all heap references reachable from p.
  2108  func (p *StorageEstimate) FreeMembers(recursive bool) {
  2109  }
  2110  
  2111  type StorageManager struct {
  2112  	ref js.Ref
  2113  }
  2114  
  2115  func (this StorageManager) Once() StorageManager {
  2116  	this.ref.Once()
  2117  	return this
  2118  }
  2119  
  2120  func (this StorageManager) Ref() js.Ref {
  2121  	return this.ref
  2122  }
  2123  
  2124  func (this StorageManager) FromRef(ref js.Ref) StorageManager {
  2125  	this.ref = ref
  2126  	return this
  2127  }
  2128  
  2129  func (this StorageManager) Free() {
  2130  	this.ref.Free()
  2131  }
  2132  
  2133  // HasFuncPersisted returns true if the method "StorageManager.persisted" exists.
  2134  func (this StorageManager) HasFuncPersisted() bool {
  2135  	return js.True == bindings.HasFuncStorageManagerPersisted(
  2136  		this.ref,
  2137  	)
  2138  }
  2139  
  2140  // FuncPersisted returns the method "StorageManager.persisted".
  2141  func (this StorageManager) FuncPersisted() (fn js.Func[func() js.Promise[js.Boolean]]) {
  2142  	bindings.FuncStorageManagerPersisted(
  2143  		this.ref, js.Pointer(&fn),
  2144  	)
  2145  	return
  2146  }
  2147  
  2148  // Persisted calls the method "StorageManager.persisted".
  2149  func (this StorageManager) Persisted() (ret js.Promise[js.Boolean]) {
  2150  	bindings.CallStorageManagerPersisted(
  2151  		this.ref, js.Pointer(&ret),
  2152  	)
  2153  
  2154  	return
  2155  }
  2156  
  2157  // TryPersisted calls the method "StorageManager.persisted"
  2158  // in a try/catch block and returns (_, err, ok = false) when it went through
  2159  // the catch clause.
  2160  func (this StorageManager) TryPersisted() (ret js.Promise[js.Boolean], exception js.Any, ok bool) {
  2161  	ok = js.True == bindings.TryStorageManagerPersisted(
  2162  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2163  	)
  2164  
  2165  	return
  2166  }
  2167  
  2168  // HasFuncPersist returns true if the method "StorageManager.persist" exists.
  2169  func (this StorageManager) HasFuncPersist() bool {
  2170  	return js.True == bindings.HasFuncStorageManagerPersist(
  2171  		this.ref,
  2172  	)
  2173  }
  2174  
  2175  // FuncPersist returns the method "StorageManager.persist".
  2176  func (this StorageManager) FuncPersist() (fn js.Func[func() js.Promise[js.Boolean]]) {
  2177  	bindings.FuncStorageManagerPersist(
  2178  		this.ref, js.Pointer(&fn),
  2179  	)
  2180  	return
  2181  }
  2182  
  2183  // Persist calls the method "StorageManager.persist".
  2184  func (this StorageManager) Persist() (ret js.Promise[js.Boolean]) {
  2185  	bindings.CallStorageManagerPersist(
  2186  		this.ref, js.Pointer(&ret),
  2187  	)
  2188  
  2189  	return
  2190  }
  2191  
  2192  // TryPersist calls the method "StorageManager.persist"
  2193  // in a try/catch block and returns (_, err, ok = false) when it went through
  2194  // the catch clause.
  2195  func (this StorageManager) TryPersist() (ret js.Promise[js.Boolean], exception js.Any, ok bool) {
  2196  	ok = js.True == bindings.TryStorageManagerPersist(
  2197  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2198  	)
  2199  
  2200  	return
  2201  }
  2202  
  2203  // HasFuncEstimate returns true if the method "StorageManager.estimate" exists.
  2204  func (this StorageManager) HasFuncEstimate() bool {
  2205  	return js.True == bindings.HasFuncStorageManagerEstimate(
  2206  		this.ref,
  2207  	)
  2208  }
  2209  
  2210  // FuncEstimate returns the method "StorageManager.estimate".
  2211  func (this StorageManager) FuncEstimate() (fn js.Func[func() js.Promise[StorageEstimate]]) {
  2212  	bindings.FuncStorageManagerEstimate(
  2213  		this.ref, js.Pointer(&fn),
  2214  	)
  2215  	return
  2216  }
  2217  
  2218  // Estimate calls the method "StorageManager.estimate".
  2219  func (this StorageManager) Estimate() (ret js.Promise[StorageEstimate]) {
  2220  	bindings.CallStorageManagerEstimate(
  2221  		this.ref, js.Pointer(&ret),
  2222  	)
  2223  
  2224  	return
  2225  }
  2226  
  2227  // TryEstimate calls the method "StorageManager.estimate"
  2228  // in a try/catch block and returns (_, err, ok = false) when it went through
  2229  // the catch clause.
  2230  func (this StorageManager) TryEstimate() (ret js.Promise[StorageEstimate], exception js.Any, ok bool) {
  2231  	ok = js.True == bindings.TryStorageManagerEstimate(
  2232  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2233  	)
  2234  
  2235  	return
  2236  }
  2237  
  2238  // HasFuncGetDirectory returns true if the method "StorageManager.getDirectory" exists.
  2239  func (this StorageManager) HasFuncGetDirectory() bool {
  2240  	return js.True == bindings.HasFuncStorageManagerGetDirectory(
  2241  		this.ref,
  2242  	)
  2243  }
  2244  
  2245  // FuncGetDirectory returns the method "StorageManager.getDirectory".
  2246  func (this StorageManager) FuncGetDirectory() (fn js.Func[func() js.Promise[FileSystemDirectoryHandle]]) {
  2247  	bindings.FuncStorageManagerGetDirectory(
  2248  		this.ref, js.Pointer(&fn),
  2249  	)
  2250  	return
  2251  }
  2252  
  2253  // GetDirectory calls the method "StorageManager.getDirectory".
  2254  func (this StorageManager) GetDirectory() (ret js.Promise[FileSystemDirectoryHandle]) {
  2255  	bindings.CallStorageManagerGetDirectory(
  2256  		this.ref, js.Pointer(&ret),
  2257  	)
  2258  
  2259  	return
  2260  }
  2261  
  2262  // TryGetDirectory calls the method "StorageManager.getDirectory"
  2263  // in a try/catch block and returns (_, err, ok = false) when it went through
  2264  // the catch clause.
  2265  func (this StorageManager) TryGetDirectory() (ret js.Promise[FileSystemDirectoryHandle], exception js.Any, ok bool) {
  2266  	ok = js.True == bindings.TryStorageManagerGetDirectory(
  2267  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2268  	)
  2269  
  2270  	return
  2271  }
  2272  
  2273  type StorageBucketDurability uint32
  2274  
  2275  const (
  2276  	_ StorageBucketDurability = iota
  2277  
  2278  	StorageBucketDurability_STRICT
  2279  	StorageBucketDurability_RELAXED
  2280  )
  2281  
  2282  func (StorageBucketDurability) FromRef(str js.Ref) StorageBucketDurability {
  2283  	return StorageBucketDurability(bindings.ConstOfStorageBucketDurability(str))
  2284  }
  2285  
  2286  func (x StorageBucketDurability) String() (string, bool) {
  2287  	switch x {
  2288  	case StorageBucketDurability_STRICT:
  2289  		return "strict", true
  2290  	case StorageBucketDurability_RELAXED:
  2291  		return "relaxed", true
  2292  	default:
  2293  		return "", false
  2294  	}
  2295  }
  2296  
  2297  type IDBOpenDBRequest struct {
  2298  	IDBRequest
  2299  }
  2300  
  2301  func (this IDBOpenDBRequest) Once() IDBOpenDBRequest {
  2302  	this.ref.Once()
  2303  	return this
  2304  }
  2305  
  2306  func (this IDBOpenDBRequest) Ref() js.Ref {
  2307  	return this.IDBRequest.Ref()
  2308  }
  2309  
  2310  func (this IDBOpenDBRequest) FromRef(ref js.Ref) IDBOpenDBRequest {
  2311  	this.IDBRequest = this.IDBRequest.FromRef(ref)
  2312  	return this
  2313  }
  2314  
  2315  func (this IDBOpenDBRequest) Free() {
  2316  	this.ref.Free()
  2317  }
  2318  
  2319  type IDBDatabaseInfo struct {
  2320  	// Name is "IDBDatabaseInfo.name"
  2321  	//
  2322  	// Optional
  2323  	Name js.String
  2324  	// Version is "IDBDatabaseInfo.version"
  2325  	//
  2326  	// Optional
  2327  	//
  2328  	// NOTE: FFI_USE_Version MUST be set to true to make this field effective.
  2329  	Version uint64
  2330  
  2331  	FFI_USE_Version bool // for Version.
  2332  
  2333  	FFI_USE bool
  2334  }
  2335  
  2336  // FromRef calls UpdateFrom and returns a IDBDatabaseInfo with all fields set.
  2337  func (p IDBDatabaseInfo) FromRef(ref js.Ref) IDBDatabaseInfo {
  2338  	p.UpdateFrom(ref)
  2339  	return p
  2340  }
  2341  
  2342  // New creates a new IDBDatabaseInfo in the application heap.
  2343  func (p IDBDatabaseInfo) New() js.Ref {
  2344  	return bindings.IDBDatabaseInfoJSLoad(
  2345  		js.Pointer(&p), js.True, 0,
  2346  	)
  2347  }
  2348  
  2349  // UpdateFrom copies value of all fields of the heap object to p.
  2350  func (p *IDBDatabaseInfo) UpdateFrom(ref js.Ref) {
  2351  	bindings.IDBDatabaseInfoJSStore(
  2352  		js.Pointer(p), ref,
  2353  	)
  2354  }
  2355  
  2356  // Update writes all fields of the p to the heap object referenced by ref.
  2357  func (p *IDBDatabaseInfo) Update(ref js.Ref) {
  2358  	bindings.IDBDatabaseInfoJSLoad(
  2359  		js.Pointer(p), js.False, ref,
  2360  	)
  2361  }
  2362  
  2363  // FreeMembers frees fields with heap reference, if recursive is true
  2364  // free all heap references reachable from p.
  2365  func (p *IDBDatabaseInfo) FreeMembers(recursive bool) {
  2366  	js.Free(
  2367  		p.Name.Ref(),
  2368  	)
  2369  	p.Name = p.Name.FromRef(js.Undefined)
  2370  }
  2371  
  2372  type IDBFactory struct {
  2373  	ref js.Ref
  2374  }
  2375  
  2376  func (this IDBFactory) Once() IDBFactory {
  2377  	this.ref.Once()
  2378  	return this
  2379  }
  2380  
  2381  func (this IDBFactory) Ref() js.Ref {
  2382  	return this.ref
  2383  }
  2384  
  2385  func (this IDBFactory) FromRef(ref js.Ref) IDBFactory {
  2386  	this.ref = ref
  2387  	return this
  2388  }
  2389  
  2390  func (this IDBFactory) Free() {
  2391  	this.ref.Free()
  2392  }
  2393  
  2394  // HasFuncOpen returns true if the method "IDBFactory.open" exists.
  2395  func (this IDBFactory) HasFuncOpen() bool {
  2396  	return js.True == bindings.HasFuncIDBFactoryOpen(
  2397  		this.ref,
  2398  	)
  2399  }
  2400  
  2401  // FuncOpen returns the method "IDBFactory.open".
  2402  func (this IDBFactory) FuncOpen() (fn js.Func[func(name js.String, version uint64) IDBOpenDBRequest]) {
  2403  	bindings.FuncIDBFactoryOpen(
  2404  		this.ref, js.Pointer(&fn),
  2405  	)
  2406  	return
  2407  }
  2408  
  2409  // Open calls the method "IDBFactory.open".
  2410  func (this IDBFactory) Open(name js.String, version uint64) (ret IDBOpenDBRequest) {
  2411  	bindings.CallIDBFactoryOpen(
  2412  		this.ref, js.Pointer(&ret),
  2413  		name.Ref(),
  2414  		float64(version),
  2415  	)
  2416  
  2417  	return
  2418  }
  2419  
  2420  // TryOpen calls the method "IDBFactory.open"
  2421  // in a try/catch block and returns (_, err, ok = false) when it went through
  2422  // the catch clause.
  2423  func (this IDBFactory) TryOpen(name js.String, version uint64) (ret IDBOpenDBRequest, exception js.Any, ok bool) {
  2424  	ok = js.True == bindings.TryIDBFactoryOpen(
  2425  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2426  		name.Ref(),
  2427  		float64(version),
  2428  	)
  2429  
  2430  	return
  2431  }
  2432  
  2433  // HasFuncOpen1 returns true if the method "IDBFactory.open" exists.
  2434  func (this IDBFactory) HasFuncOpen1() bool {
  2435  	return js.True == bindings.HasFuncIDBFactoryOpen1(
  2436  		this.ref,
  2437  	)
  2438  }
  2439  
  2440  // FuncOpen1 returns the method "IDBFactory.open".
  2441  func (this IDBFactory) FuncOpen1() (fn js.Func[func(name js.String) IDBOpenDBRequest]) {
  2442  	bindings.FuncIDBFactoryOpen1(
  2443  		this.ref, js.Pointer(&fn),
  2444  	)
  2445  	return
  2446  }
  2447  
  2448  // Open1 calls the method "IDBFactory.open".
  2449  func (this IDBFactory) Open1(name js.String) (ret IDBOpenDBRequest) {
  2450  	bindings.CallIDBFactoryOpen1(
  2451  		this.ref, js.Pointer(&ret),
  2452  		name.Ref(),
  2453  	)
  2454  
  2455  	return
  2456  }
  2457  
  2458  // TryOpen1 calls the method "IDBFactory.open"
  2459  // in a try/catch block and returns (_, err, ok = false) when it went through
  2460  // the catch clause.
  2461  func (this IDBFactory) TryOpen1(name js.String) (ret IDBOpenDBRequest, exception js.Any, ok bool) {
  2462  	ok = js.True == bindings.TryIDBFactoryOpen1(
  2463  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2464  		name.Ref(),
  2465  	)
  2466  
  2467  	return
  2468  }
  2469  
  2470  // HasFuncDeleteDatabase returns true if the method "IDBFactory.deleteDatabase" exists.
  2471  func (this IDBFactory) HasFuncDeleteDatabase() bool {
  2472  	return js.True == bindings.HasFuncIDBFactoryDeleteDatabase(
  2473  		this.ref,
  2474  	)
  2475  }
  2476  
  2477  // FuncDeleteDatabase returns the method "IDBFactory.deleteDatabase".
  2478  func (this IDBFactory) FuncDeleteDatabase() (fn js.Func[func(name js.String) IDBOpenDBRequest]) {
  2479  	bindings.FuncIDBFactoryDeleteDatabase(
  2480  		this.ref, js.Pointer(&fn),
  2481  	)
  2482  	return
  2483  }
  2484  
  2485  // DeleteDatabase calls the method "IDBFactory.deleteDatabase".
  2486  func (this IDBFactory) DeleteDatabase(name js.String) (ret IDBOpenDBRequest) {
  2487  	bindings.CallIDBFactoryDeleteDatabase(
  2488  		this.ref, js.Pointer(&ret),
  2489  		name.Ref(),
  2490  	)
  2491  
  2492  	return
  2493  }
  2494  
  2495  // TryDeleteDatabase calls the method "IDBFactory.deleteDatabase"
  2496  // in a try/catch block and returns (_, err, ok = false) when it went through
  2497  // the catch clause.
  2498  func (this IDBFactory) TryDeleteDatabase(name js.String) (ret IDBOpenDBRequest, exception js.Any, ok bool) {
  2499  	ok = js.True == bindings.TryIDBFactoryDeleteDatabase(
  2500  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2501  		name.Ref(),
  2502  	)
  2503  
  2504  	return
  2505  }
  2506  
  2507  // HasFuncDatabases returns true if the method "IDBFactory.databases" exists.
  2508  func (this IDBFactory) HasFuncDatabases() bool {
  2509  	return js.True == bindings.HasFuncIDBFactoryDatabases(
  2510  		this.ref,
  2511  	)
  2512  }
  2513  
  2514  // FuncDatabases returns the method "IDBFactory.databases".
  2515  func (this IDBFactory) FuncDatabases() (fn js.Func[func() js.Promise[js.Array[IDBDatabaseInfo]]]) {
  2516  	bindings.FuncIDBFactoryDatabases(
  2517  		this.ref, js.Pointer(&fn),
  2518  	)
  2519  	return
  2520  }
  2521  
  2522  // Databases calls the method "IDBFactory.databases".
  2523  func (this IDBFactory) Databases() (ret js.Promise[js.Array[IDBDatabaseInfo]]) {
  2524  	bindings.CallIDBFactoryDatabases(
  2525  		this.ref, js.Pointer(&ret),
  2526  	)
  2527  
  2528  	return
  2529  }
  2530  
  2531  // TryDatabases calls the method "IDBFactory.databases"
  2532  // in a try/catch block and returns (_, err, ok = false) when it went through
  2533  // the catch clause.
  2534  func (this IDBFactory) TryDatabases() (ret js.Promise[js.Array[IDBDatabaseInfo]], exception js.Any, ok bool) {
  2535  	ok = js.True == bindings.TryIDBFactoryDatabases(
  2536  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2537  	)
  2538  
  2539  	return
  2540  }
  2541  
  2542  // HasFuncCmp returns true if the method "IDBFactory.cmp" exists.
  2543  func (this IDBFactory) HasFuncCmp() bool {
  2544  	return js.True == bindings.HasFuncIDBFactoryCmp(
  2545  		this.ref,
  2546  	)
  2547  }
  2548  
  2549  // FuncCmp returns the method "IDBFactory.cmp".
  2550  func (this IDBFactory) FuncCmp() (fn js.Func[func(first js.Any, second js.Any) int16]) {
  2551  	bindings.FuncIDBFactoryCmp(
  2552  		this.ref, js.Pointer(&fn),
  2553  	)
  2554  	return
  2555  }
  2556  
  2557  // Cmp calls the method "IDBFactory.cmp".
  2558  func (this IDBFactory) Cmp(first js.Any, second js.Any) (ret int16) {
  2559  	bindings.CallIDBFactoryCmp(
  2560  		this.ref, js.Pointer(&ret),
  2561  		first.Ref(),
  2562  		second.Ref(),
  2563  	)
  2564  
  2565  	return
  2566  }
  2567  
  2568  // TryCmp calls the method "IDBFactory.cmp"
  2569  // in a try/catch block and returns (_, err, ok = false) when it went through
  2570  // the catch clause.
  2571  func (this IDBFactory) TryCmp(first js.Any, second js.Any) (ret int16, exception js.Any, ok bool) {
  2572  	ok = js.True == bindings.TryIDBFactoryCmp(
  2573  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2574  		first.Ref(),
  2575  		second.Ref(),
  2576  	)
  2577  
  2578  	return
  2579  }
  2580  
  2581  type StorageBucket struct {
  2582  	ref js.Ref
  2583  }
  2584  
  2585  func (this StorageBucket) Once() StorageBucket {
  2586  	this.ref.Once()
  2587  	return this
  2588  }
  2589  
  2590  func (this StorageBucket) Ref() js.Ref {
  2591  	return this.ref
  2592  }
  2593  
  2594  func (this StorageBucket) FromRef(ref js.Ref) StorageBucket {
  2595  	this.ref = ref
  2596  	return this
  2597  }
  2598  
  2599  func (this StorageBucket) Free() {
  2600  	this.ref.Free()
  2601  }
  2602  
  2603  // Name returns the value of property "StorageBucket.name".
  2604  //
  2605  // It returns ok=false if there is no such property.
  2606  func (this StorageBucket) Name() (ret js.String, ok bool) {
  2607  	ok = js.True == bindings.GetStorageBucketName(
  2608  		this.ref, js.Pointer(&ret),
  2609  	)
  2610  	return
  2611  }
  2612  
  2613  // IndexedDB returns the value of property "StorageBucket.indexedDB".
  2614  //
  2615  // It returns ok=false if there is no such property.
  2616  func (this StorageBucket) IndexedDB() (ret IDBFactory, ok bool) {
  2617  	ok = js.True == bindings.GetStorageBucketIndexedDB(
  2618  		this.ref, js.Pointer(&ret),
  2619  	)
  2620  	return
  2621  }
  2622  
  2623  // Caches returns the value of property "StorageBucket.caches".
  2624  //
  2625  // It returns ok=false if there is no such property.
  2626  func (this StorageBucket) Caches() (ret CacheStorage, ok bool) {
  2627  	ok = js.True == bindings.GetStorageBucketCaches(
  2628  		this.ref, js.Pointer(&ret),
  2629  	)
  2630  	return
  2631  }
  2632  
  2633  // HasFuncPersist returns true if the method "StorageBucket.persist" exists.
  2634  func (this StorageBucket) HasFuncPersist() bool {
  2635  	return js.True == bindings.HasFuncStorageBucketPersist(
  2636  		this.ref,
  2637  	)
  2638  }
  2639  
  2640  // FuncPersist returns the method "StorageBucket.persist".
  2641  func (this StorageBucket) FuncPersist() (fn js.Func[func() js.Promise[js.Boolean]]) {
  2642  	bindings.FuncStorageBucketPersist(
  2643  		this.ref, js.Pointer(&fn),
  2644  	)
  2645  	return
  2646  }
  2647  
  2648  // Persist calls the method "StorageBucket.persist".
  2649  func (this StorageBucket) Persist() (ret js.Promise[js.Boolean]) {
  2650  	bindings.CallStorageBucketPersist(
  2651  		this.ref, js.Pointer(&ret),
  2652  	)
  2653  
  2654  	return
  2655  }
  2656  
  2657  // TryPersist calls the method "StorageBucket.persist"
  2658  // in a try/catch block and returns (_, err, ok = false) when it went through
  2659  // the catch clause.
  2660  func (this StorageBucket) TryPersist() (ret js.Promise[js.Boolean], exception js.Any, ok bool) {
  2661  	ok = js.True == bindings.TryStorageBucketPersist(
  2662  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2663  	)
  2664  
  2665  	return
  2666  }
  2667  
  2668  // HasFuncPersisted returns true if the method "StorageBucket.persisted" exists.
  2669  func (this StorageBucket) HasFuncPersisted() bool {
  2670  	return js.True == bindings.HasFuncStorageBucketPersisted(
  2671  		this.ref,
  2672  	)
  2673  }
  2674  
  2675  // FuncPersisted returns the method "StorageBucket.persisted".
  2676  func (this StorageBucket) FuncPersisted() (fn js.Func[func() js.Promise[js.Boolean]]) {
  2677  	bindings.FuncStorageBucketPersisted(
  2678  		this.ref, js.Pointer(&fn),
  2679  	)
  2680  	return
  2681  }
  2682  
  2683  // Persisted calls the method "StorageBucket.persisted".
  2684  func (this StorageBucket) Persisted() (ret js.Promise[js.Boolean]) {
  2685  	bindings.CallStorageBucketPersisted(
  2686  		this.ref, js.Pointer(&ret),
  2687  	)
  2688  
  2689  	return
  2690  }
  2691  
  2692  // TryPersisted calls the method "StorageBucket.persisted"
  2693  // in a try/catch block and returns (_, err, ok = false) when it went through
  2694  // the catch clause.
  2695  func (this StorageBucket) TryPersisted() (ret js.Promise[js.Boolean], exception js.Any, ok bool) {
  2696  	ok = js.True == bindings.TryStorageBucketPersisted(
  2697  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2698  	)
  2699  
  2700  	return
  2701  }
  2702  
  2703  // HasFuncEstimate returns true if the method "StorageBucket.estimate" exists.
  2704  func (this StorageBucket) HasFuncEstimate() bool {
  2705  	return js.True == bindings.HasFuncStorageBucketEstimate(
  2706  		this.ref,
  2707  	)
  2708  }
  2709  
  2710  // FuncEstimate returns the method "StorageBucket.estimate".
  2711  func (this StorageBucket) FuncEstimate() (fn js.Func[func() js.Promise[StorageEstimate]]) {
  2712  	bindings.FuncStorageBucketEstimate(
  2713  		this.ref, js.Pointer(&fn),
  2714  	)
  2715  	return
  2716  }
  2717  
  2718  // Estimate calls the method "StorageBucket.estimate".
  2719  func (this StorageBucket) Estimate() (ret js.Promise[StorageEstimate]) {
  2720  	bindings.CallStorageBucketEstimate(
  2721  		this.ref, js.Pointer(&ret),
  2722  	)
  2723  
  2724  	return
  2725  }
  2726  
  2727  // TryEstimate calls the method "StorageBucket.estimate"
  2728  // in a try/catch block and returns (_, err, ok = false) when it went through
  2729  // the catch clause.
  2730  func (this StorageBucket) TryEstimate() (ret js.Promise[StorageEstimate], exception js.Any, ok bool) {
  2731  	ok = js.True == bindings.TryStorageBucketEstimate(
  2732  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2733  	)
  2734  
  2735  	return
  2736  }
  2737  
  2738  // HasFuncDurability returns true if the method "StorageBucket.durability" exists.
  2739  func (this StorageBucket) HasFuncDurability() bool {
  2740  	return js.True == bindings.HasFuncStorageBucketDurability(
  2741  		this.ref,
  2742  	)
  2743  }
  2744  
  2745  // FuncDurability returns the method "StorageBucket.durability".
  2746  func (this StorageBucket) FuncDurability() (fn js.Func[func() js.Promise[StorageBucketDurability]]) {
  2747  	bindings.FuncStorageBucketDurability(
  2748  		this.ref, js.Pointer(&fn),
  2749  	)
  2750  	return
  2751  }
  2752  
  2753  // Durability calls the method "StorageBucket.durability".
  2754  func (this StorageBucket) Durability() (ret js.Promise[StorageBucketDurability]) {
  2755  	bindings.CallStorageBucketDurability(
  2756  		this.ref, js.Pointer(&ret),
  2757  	)
  2758  
  2759  	return
  2760  }
  2761  
  2762  // TryDurability calls the method "StorageBucket.durability"
  2763  // in a try/catch block and returns (_, err, ok = false) when it went through
  2764  // the catch clause.
  2765  func (this StorageBucket) TryDurability() (ret js.Promise[StorageBucketDurability], exception js.Any, ok bool) {
  2766  	ok = js.True == bindings.TryStorageBucketDurability(
  2767  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2768  	)
  2769  
  2770  	return
  2771  }
  2772  
  2773  // HasFuncSetExpires returns true if the method "StorageBucket.setExpires" exists.
  2774  func (this StorageBucket) HasFuncSetExpires() bool {
  2775  	return js.True == bindings.HasFuncStorageBucketSetExpires(
  2776  		this.ref,
  2777  	)
  2778  }
  2779  
  2780  // FuncSetExpires returns the method "StorageBucket.setExpires".
  2781  func (this StorageBucket) FuncSetExpires() (fn js.Func[func(expires DOMHighResTimeStamp) js.Promise[js.Void]]) {
  2782  	bindings.FuncStorageBucketSetExpires(
  2783  		this.ref, js.Pointer(&fn),
  2784  	)
  2785  	return
  2786  }
  2787  
  2788  // SetExpires calls the method "StorageBucket.setExpires".
  2789  func (this StorageBucket) SetExpires(expires DOMHighResTimeStamp) (ret js.Promise[js.Void]) {
  2790  	bindings.CallStorageBucketSetExpires(
  2791  		this.ref, js.Pointer(&ret),
  2792  		float64(expires),
  2793  	)
  2794  
  2795  	return
  2796  }
  2797  
  2798  // TrySetExpires calls the method "StorageBucket.setExpires"
  2799  // in a try/catch block and returns (_, err, ok = false) when it went through
  2800  // the catch clause.
  2801  func (this StorageBucket) TrySetExpires(expires DOMHighResTimeStamp) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  2802  	ok = js.True == bindings.TryStorageBucketSetExpires(
  2803  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2804  		float64(expires),
  2805  	)
  2806  
  2807  	return
  2808  }
  2809  
  2810  // HasFuncExpires returns true if the method "StorageBucket.expires" exists.
  2811  func (this StorageBucket) HasFuncExpires() bool {
  2812  	return js.True == bindings.HasFuncStorageBucketExpires(
  2813  		this.ref,
  2814  	)
  2815  }
  2816  
  2817  // FuncExpires returns the method "StorageBucket.expires".
  2818  func (this StorageBucket) FuncExpires() (fn js.Func[func() js.Promise[js.Number[DOMHighResTimeStamp]]]) {
  2819  	bindings.FuncStorageBucketExpires(
  2820  		this.ref, js.Pointer(&fn),
  2821  	)
  2822  	return
  2823  }
  2824  
  2825  // Expires calls the method "StorageBucket.expires".
  2826  func (this StorageBucket) Expires() (ret js.Promise[js.Number[DOMHighResTimeStamp]]) {
  2827  	bindings.CallStorageBucketExpires(
  2828  		this.ref, js.Pointer(&ret),
  2829  	)
  2830  
  2831  	return
  2832  }
  2833  
  2834  // TryExpires calls the method "StorageBucket.expires"
  2835  // in a try/catch block and returns (_, err, ok = false) when it went through
  2836  // the catch clause.
  2837  func (this StorageBucket) TryExpires() (ret js.Promise[js.Number[DOMHighResTimeStamp]], exception js.Any, ok bool) {
  2838  	ok = js.True == bindings.TryStorageBucketExpires(
  2839  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2840  	)
  2841  
  2842  	return
  2843  }
  2844  
  2845  // HasFuncGetDirectory returns true if the method "StorageBucket.getDirectory" exists.
  2846  func (this StorageBucket) HasFuncGetDirectory() bool {
  2847  	return js.True == bindings.HasFuncStorageBucketGetDirectory(
  2848  		this.ref,
  2849  	)
  2850  }
  2851  
  2852  // FuncGetDirectory returns the method "StorageBucket.getDirectory".
  2853  func (this StorageBucket) FuncGetDirectory() (fn js.Func[func() js.Promise[FileSystemDirectoryHandle]]) {
  2854  	bindings.FuncStorageBucketGetDirectory(
  2855  		this.ref, js.Pointer(&fn),
  2856  	)
  2857  	return
  2858  }
  2859  
  2860  // GetDirectory calls the method "StorageBucket.getDirectory".
  2861  func (this StorageBucket) GetDirectory() (ret js.Promise[FileSystemDirectoryHandle]) {
  2862  	bindings.CallStorageBucketGetDirectory(
  2863  		this.ref, js.Pointer(&ret),
  2864  	)
  2865  
  2866  	return
  2867  }
  2868  
  2869  // TryGetDirectory calls the method "StorageBucket.getDirectory"
  2870  // in a try/catch block and returns (_, err, ok = false) when it went through
  2871  // the catch clause.
  2872  func (this StorageBucket) TryGetDirectory() (ret js.Promise[FileSystemDirectoryHandle], exception js.Any, ok bool) {
  2873  	ok = js.True == bindings.TryStorageBucketGetDirectory(
  2874  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2875  	)
  2876  
  2877  	return
  2878  }
  2879  
  2880  type StorageBucketOptions struct {
  2881  	// Persisted is "StorageBucketOptions.persisted"
  2882  	//
  2883  	// Optional, defaults to null.
  2884  	//
  2885  	// NOTE: FFI_USE_Persisted MUST be set to true to make this field effective.
  2886  	Persisted bool
  2887  	// Durability is "StorageBucketOptions.durability"
  2888  	//
  2889  	// Optional, defaults to null.
  2890  	Durability StorageBucketDurability
  2891  	// Quota is "StorageBucketOptions.quota"
  2892  	//
  2893  	// Optional, defaults to null.
  2894  	//
  2895  	// NOTE: FFI_USE_Quota MUST be set to true to make this field effective.
  2896  	Quota uint64
  2897  	// Expires is "StorageBucketOptions.expires"
  2898  	//
  2899  	// Optional, defaults to null.
  2900  	//
  2901  	// NOTE: FFI_USE_Expires MUST be set to true to make this field effective.
  2902  	Expires DOMHighResTimeStamp
  2903  
  2904  	FFI_USE_Persisted bool // for Persisted.
  2905  	FFI_USE_Quota     bool // for Quota.
  2906  	FFI_USE_Expires   bool // for Expires.
  2907  
  2908  	FFI_USE bool
  2909  }
  2910  
  2911  // FromRef calls UpdateFrom and returns a StorageBucketOptions with all fields set.
  2912  func (p StorageBucketOptions) FromRef(ref js.Ref) StorageBucketOptions {
  2913  	p.UpdateFrom(ref)
  2914  	return p
  2915  }
  2916  
  2917  // New creates a new StorageBucketOptions in the application heap.
  2918  func (p StorageBucketOptions) New() js.Ref {
  2919  	return bindings.StorageBucketOptionsJSLoad(
  2920  		js.Pointer(&p), js.True, 0,
  2921  	)
  2922  }
  2923  
  2924  // UpdateFrom copies value of all fields of the heap object to p.
  2925  func (p *StorageBucketOptions) UpdateFrom(ref js.Ref) {
  2926  	bindings.StorageBucketOptionsJSStore(
  2927  		js.Pointer(p), ref,
  2928  	)
  2929  }
  2930  
  2931  // Update writes all fields of the p to the heap object referenced by ref.
  2932  func (p *StorageBucketOptions) Update(ref js.Ref) {
  2933  	bindings.StorageBucketOptionsJSLoad(
  2934  		js.Pointer(p), js.False, ref,
  2935  	)
  2936  }
  2937  
  2938  // FreeMembers frees fields with heap reference, if recursive is true
  2939  // free all heap references reachable from p.
  2940  func (p *StorageBucketOptions) FreeMembers(recursive bool) {
  2941  }
  2942  
  2943  type StorageBucketManager struct {
  2944  	ref js.Ref
  2945  }
  2946  
  2947  func (this StorageBucketManager) Once() StorageBucketManager {
  2948  	this.ref.Once()
  2949  	return this
  2950  }
  2951  
  2952  func (this StorageBucketManager) Ref() js.Ref {
  2953  	return this.ref
  2954  }
  2955  
  2956  func (this StorageBucketManager) FromRef(ref js.Ref) StorageBucketManager {
  2957  	this.ref = ref
  2958  	return this
  2959  }
  2960  
  2961  func (this StorageBucketManager) Free() {
  2962  	this.ref.Free()
  2963  }
  2964  
  2965  // HasFuncOpen returns true if the method "StorageBucketManager.open" exists.
  2966  func (this StorageBucketManager) HasFuncOpen() bool {
  2967  	return js.True == bindings.HasFuncStorageBucketManagerOpen(
  2968  		this.ref,
  2969  	)
  2970  }
  2971  
  2972  // FuncOpen returns the method "StorageBucketManager.open".
  2973  func (this StorageBucketManager) FuncOpen() (fn js.Func[func(name js.String, options StorageBucketOptions) js.Promise[StorageBucket]]) {
  2974  	bindings.FuncStorageBucketManagerOpen(
  2975  		this.ref, js.Pointer(&fn),
  2976  	)
  2977  	return
  2978  }
  2979  
  2980  // Open calls the method "StorageBucketManager.open".
  2981  func (this StorageBucketManager) Open(name js.String, options StorageBucketOptions) (ret js.Promise[StorageBucket]) {
  2982  	bindings.CallStorageBucketManagerOpen(
  2983  		this.ref, js.Pointer(&ret),
  2984  		name.Ref(),
  2985  		js.Pointer(&options),
  2986  	)
  2987  
  2988  	return
  2989  }
  2990  
  2991  // TryOpen calls the method "StorageBucketManager.open"
  2992  // in a try/catch block and returns (_, err, ok = false) when it went through
  2993  // the catch clause.
  2994  func (this StorageBucketManager) TryOpen(name js.String, options StorageBucketOptions) (ret js.Promise[StorageBucket], exception js.Any, ok bool) {
  2995  	ok = js.True == bindings.TryStorageBucketManagerOpen(
  2996  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2997  		name.Ref(),
  2998  		js.Pointer(&options),
  2999  	)
  3000  
  3001  	return
  3002  }
  3003  
  3004  // HasFuncOpen1 returns true if the method "StorageBucketManager.open" exists.
  3005  func (this StorageBucketManager) HasFuncOpen1() bool {
  3006  	return js.True == bindings.HasFuncStorageBucketManagerOpen1(
  3007  		this.ref,
  3008  	)
  3009  }
  3010  
  3011  // FuncOpen1 returns the method "StorageBucketManager.open".
  3012  func (this StorageBucketManager) FuncOpen1() (fn js.Func[func(name js.String) js.Promise[StorageBucket]]) {
  3013  	bindings.FuncStorageBucketManagerOpen1(
  3014  		this.ref, js.Pointer(&fn),
  3015  	)
  3016  	return
  3017  }
  3018  
  3019  // Open1 calls the method "StorageBucketManager.open".
  3020  func (this StorageBucketManager) Open1(name js.String) (ret js.Promise[StorageBucket]) {
  3021  	bindings.CallStorageBucketManagerOpen1(
  3022  		this.ref, js.Pointer(&ret),
  3023  		name.Ref(),
  3024  	)
  3025  
  3026  	return
  3027  }
  3028  
  3029  // TryOpen1 calls the method "StorageBucketManager.open"
  3030  // in a try/catch block and returns (_, err, ok = false) when it went through
  3031  // the catch clause.
  3032  func (this StorageBucketManager) TryOpen1(name js.String) (ret js.Promise[StorageBucket], exception js.Any, ok bool) {
  3033  	ok = js.True == bindings.TryStorageBucketManagerOpen1(
  3034  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3035  		name.Ref(),
  3036  	)
  3037  
  3038  	return
  3039  }
  3040  
  3041  // HasFuncKeys returns true if the method "StorageBucketManager.keys" exists.
  3042  func (this StorageBucketManager) HasFuncKeys() bool {
  3043  	return js.True == bindings.HasFuncStorageBucketManagerKeys(
  3044  		this.ref,
  3045  	)
  3046  }
  3047  
  3048  // FuncKeys returns the method "StorageBucketManager.keys".
  3049  func (this StorageBucketManager) FuncKeys() (fn js.Func[func() js.Promise[js.Array[js.String]]]) {
  3050  	bindings.FuncStorageBucketManagerKeys(
  3051  		this.ref, js.Pointer(&fn),
  3052  	)
  3053  	return
  3054  }
  3055  
  3056  // Keys calls the method "StorageBucketManager.keys".
  3057  func (this StorageBucketManager) Keys() (ret js.Promise[js.Array[js.String]]) {
  3058  	bindings.CallStorageBucketManagerKeys(
  3059  		this.ref, js.Pointer(&ret),
  3060  	)
  3061  
  3062  	return
  3063  }
  3064  
  3065  // TryKeys calls the method "StorageBucketManager.keys"
  3066  // in a try/catch block and returns (_, err, ok = false) when it went through
  3067  // the catch clause.
  3068  func (this StorageBucketManager) TryKeys() (ret js.Promise[js.Array[js.String]], exception js.Any, ok bool) {
  3069  	ok = js.True == bindings.TryStorageBucketManagerKeys(
  3070  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3071  	)
  3072  
  3073  	return
  3074  }
  3075  
  3076  // HasFuncDelete returns true if the method "StorageBucketManager.delete" exists.
  3077  func (this StorageBucketManager) HasFuncDelete() bool {
  3078  	return js.True == bindings.HasFuncStorageBucketManagerDelete(
  3079  		this.ref,
  3080  	)
  3081  }
  3082  
  3083  // FuncDelete returns the method "StorageBucketManager.delete".
  3084  func (this StorageBucketManager) FuncDelete() (fn js.Func[func(name js.String) js.Promise[js.Void]]) {
  3085  	bindings.FuncStorageBucketManagerDelete(
  3086  		this.ref, js.Pointer(&fn),
  3087  	)
  3088  	return
  3089  }
  3090  
  3091  // Delete calls the method "StorageBucketManager.delete".
  3092  func (this StorageBucketManager) Delete(name js.String) (ret js.Promise[js.Void]) {
  3093  	bindings.CallStorageBucketManagerDelete(
  3094  		this.ref, js.Pointer(&ret),
  3095  		name.Ref(),
  3096  	)
  3097  
  3098  	return
  3099  }
  3100  
  3101  // TryDelete calls the method "StorageBucketManager.delete"
  3102  // in a try/catch block and returns (_, err, ok = false) when it went through
  3103  // the catch clause.
  3104  func (this StorageBucketManager) TryDelete(name js.String) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  3105  	ok = js.True == bindings.TryStorageBucketManagerDelete(
  3106  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3107  		name.Ref(),
  3108  	)
  3109  
  3110  	return
  3111  }
  3112  
  3113  type LockGrantedCallbackFunc func(this js.Ref, lock Lock) js.Ref
  3114  
  3115  func (fn LockGrantedCallbackFunc) Register() js.Func[func(lock Lock) js.Promise[js.Any]] {
  3116  	return js.RegisterCallback[func(lock Lock) js.Promise[js.Any]](
  3117  		fn, abi.FuncPCABIInternal(fn),
  3118  	)
  3119  }
  3120  
  3121  func (fn LockGrantedCallbackFunc) DispatchCallback(
  3122  	targetPC uintptr, ctx *js.CallbackContext,
  3123  ) {
  3124  	args := ctx.Args()
  3125  	if len(args) != 1+1 /* js this */ ||
  3126  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3127  		js.ThrowInvalidCallbackInvocation()
  3128  	}
  3129  
  3130  	if ctx.Return(fn(
  3131  		args[0],
  3132  
  3133  		Lock{}.FromRef(args[0+1]),
  3134  	)) {
  3135  		return
  3136  	}
  3137  
  3138  	js.ThrowCallbackValueNotReturned()
  3139  }
  3140  
  3141  type LockGrantedCallback[T any] struct {
  3142  	Fn  func(arg T, this js.Ref, lock Lock) js.Ref
  3143  	Arg T
  3144  }
  3145  
  3146  func (cb *LockGrantedCallback[T]) Register() js.Func[func(lock Lock) js.Promise[js.Any]] {
  3147  	return js.RegisterCallback[func(lock Lock) js.Promise[js.Any]](
  3148  		cb, abi.FuncPCABIInternal(cb.Fn),
  3149  	)
  3150  }
  3151  
  3152  func (cb *LockGrantedCallback[T]) DispatchCallback(
  3153  	targetPC uintptr, ctx *js.CallbackContext,
  3154  ) {
  3155  	args := ctx.Args()
  3156  	if len(args) != 1+1 /* js this */ ||
  3157  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3158  		js.ThrowInvalidCallbackInvocation()
  3159  	}
  3160  
  3161  	if ctx.Return(cb.Fn(
  3162  		cb.Arg,
  3163  		args[0],
  3164  
  3165  		Lock{}.FromRef(args[0+1]),
  3166  	)) {
  3167  		return
  3168  	}
  3169  
  3170  	js.ThrowCallbackValueNotReturned()
  3171  }
  3172  
  3173  type LockMode uint32
  3174  
  3175  const (
  3176  	_ LockMode = iota
  3177  
  3178  	LockMode_SHARED
  3179  	LockMode_EXCLUSIVE
  3180  )
  3181  
  3182  func (LockMode) FromRef(str js.Ref) LockMode {
  3183  	return LockMode(bindings.ConstOfLockMode(str))
  3184  }
  3185  
  3186  func (x LockMode) String() (string, bool) {
  3187  	switch x {
  3188  	case LockMode_SHARED:
  3189  		return "shared", true
  3190  	case LockMode_EXCLUSIVE:
  3191  		return "exclusive", true
  3192  	default:
  3193  		return "", false
  3194  	}
  3195  }
  3196  
  3197  type Lock struct {
  3198  	ref js.Ref
  3199  }
  3200  
  3201  func (this Lock) Once() Lock {
  3202  	this.ref.Once()
  3203  	return this
  3204  }
  3205  
  3206  func (this Lock) Ref() js.Ref {
  3207  	return this.ref
  3208  }
  3209  
  3210  func (this Lock) FromRef(ref js.Ref) Lock {
  3211  	this.ref = ref
  3212  	return this
  3213  }
  3214  
  3215  func (this Lock) Free() {
  3216  	this.ref.Free()
  3217  }
  3218  
  3219  // Name returns the value of property "Lock.name".
  3220  //
  3221  // It returns ok=false if there is no such property.
  3222  func (this Lock) Name() (ret js.String, ok bool) {
  3223  	ok = js.True == bindings.GetLockName(
  3224  		this.ref, js.Pointer(&ret),
  3225  	)
  3226  	return
  3227  }
  3228  
  3229  // Mode returns the value of property "Lock.mode".
  3230  //
  3231  // It returns ok=false if there is no such property.
  3232  func (this Lock) Mode() (ret LockMode, ok bool) {
  3233  	ok = js.True == bindings.GetLockMode(
  3234  		this.ref, js.Pointer(&ret),
  3235  	)
  3236  	return
  3237  }
  3238  
  3239  type LockOptions struct {
  3240  	// Mode is "LockOptions.mode"
  3241  	//
  3242  	// Optional, defaults to "exclusive".
  3243  	Mode LockMode
  3244  	// IfAvailable is "LockOptions.ifAvailable"
  3245  	//
  3246  	// Optional, defaults to false.
  3247  	//
  3248  	// NOTE: FFI_USE_IfAvailable MUST be set to true to make this field effective.
  3249  	IfAvailable bool
  3250  	// Steal is "LockOptions.steal"
  3251  	//
  3252  	// Optional, defaults to false.
  3253  	//
  3254  	// NOTE: FFI_USE_Steal MUST be set to true to make this field effective.
  3255  	Steal bool
  3256  	// Signal is "LockOptions.signal"
  3257  	//
  3258  	// Optional
  3259  	Signal AbortSignal
  3260  
  3261  	FFI_USE_IfAvailable bool // for IfAvailable.
  3262  	FFI_USE_Steal       bool // for Steal.
  3263  
  3264  	FFI_USE bool
  3265  }
  3266  
  3267  // FromRef calls UpdateFrom and returns a LockOptions with all fields set.
  3268  func (p LockOptions) FromRef(ref js.Ref) LockOptions {
  3269  	p.UpdateFrom(ref)
  3270  	return p
  3271  }
  3272  
  3273  // New creates a new LockOptions in the application heap.
  3274  func (p LockOptions) New() js.Ref {
  3275  	return bindings.LockOptionsJSLoad(
  3276  		js.Pointer(&p), js.True, 0,
  3277  	)
  3278  }
  3279  
  3280  // UpdateFrom copies value of all fields of the heap object to p.
  3281  func (p *LockOptions) UpdateFrom(ref js.Ref) {
  3282  	bindings.LockOptionsJSStore(
  3283  		js.Pointer(p), ref,
  3284  	)
  3285  }
  3286  
  3287  // Update writes all fields of the p to the heap object referenced by ref.
  3288  func (p *LockOptions) Update(ref js.Ref) {
  3289  	bindings.LockOptionsJSLoad(
  3290  		js.Pointer(p), js.False, ref,
  3291  	)
  3292  }
  3293  
  3294  // FreeMembers frees fields with heap reference, if recursive is true
  3295  // free all heap references reachable from p.
  3296  func (p *LockOptions) FreeMembers(recursive bool) {
  3297  	js.Free(
  3298  		p.Signal.Ref(),
  3299  	)
  3300  	p.Signal = p.Signal.FromRef(js.Undefined)
  3301  }
  3302  
  3303  type LockInfo struct {
  3304  	// Name is "LockInfo.name"
  3305  	//
  3306  	// Optional
  3307  	Name js.String
  3308  	// Mode is "LockInfo.mode"
  3309  	//
  3310  	// Optional
  3311  	Mode LockMode
  3312  	// ClientId is "LockInfo.clientId"
  3313  	//
  3314  	// Optional
  3315  	ClientId js.String
  3316  
  3317  	FFI_USE bool
  3318  }
  3319  
  3320  // FromRef calls UpdateFrom and returns a LockInfo with all fields set.
  3321  func (p LockInfo) FromRef(ref js.Ref) LockInfo {
  3322  	p.UpdateFrom(ref)
  3323  	return p
  3324  }
  3325  
  3326  // New creates a new LockInfo in the application heap.
  3327  func (p LockInfo) New() js.Ref {
  3328  	return bindings.LockInfoJSLoad(
  3329  		js.Pointer(&p), js.True, 0,
  3330  	)
  3331  }
  3332  
  3333  // UpdateFrom copies value of all fields of the heap object to p.
  3334  func (p *LockInfo) UpdateFrom(ref js.Ref) {
  3335  	bindings.LockInfoJSStore(
  3336  		js.Pointer(p), ref,
  3337  	)
  3338  }
  3339  
  3340  // Update writes all fields of the p to the heap object referenced by ref.
  3341  func (p *LockInfo) Update(ref js.Ref) {
  3342  	bindings.LockInfoJSLoad(
  3343  		js.Pointer(p), js.False, ref,
  3344  	)
  3345  }
  3346  
  3347  // FreeMembers frees fields with heap reference, if recursive is true
  3348  // free all heap references reachable from p.
  3349  func (p *LockInfo) FreeMembers(recursive bool) {
  3350  	js.Free(
  3351  		p.Name.Ref(),
  3352  		p.ClientId.Ref(),
  3353  	)
  3354  	p.Name = p.Name.FromRef(js.Undefined)
  3355  	p.ClientId = p.ClientId.FromRef(js.Undefined)
  3356  }
  3357  
  3358  type LockManagerSnapshot struct {
  3359  	// Held is "LockManagerSnapshot.held"
  3360  	//
  3361  	// Optional
  3362  	Held js.Array[LockInfo]
  3363  	// Pending is "LockManagerSnapshot.pending"
  3364  	//
  3365  	// Optional
  3366  	Pending js.Array[LockInfo]
  3367  
  3368  	FFI_USE bool
  3369  }
  3370  
  3371  // FromRef calls UpdateFrom and returns a LockManagerSnapshot with all fields set.
  3372  func (p LockManagerSnapshot) FromRef(ref js.Ref) LockManagerSnapshot {
  3373  	p.UpdateFrom(ref)
  3374  	return p
  3375  }
  3376  
  3377  // New creates a new LockManagerSnapshot in the application heap.
  3378  func (p LockManagerSnapshot) New() js.Ref {
  3379  	return bindings.LockManagerSnapshotJSLoad(
  3380  		js.Pointer(&p), js.True, 0,
  3381  	)
  3382  }
  3383  
  3384  // UpdateFrom copies value of all fields of the heap object to p.
  3385  func (p *LockManagerSnapshot) UpdateFrom(ref js.Ref) {
  3386  	bindings.LockManagerSnapshotJSStore(
  3387  		js.Pointer(p), ref,
  3388  	)
  3389  }
  3390  
  3391  // Update writes all fields of the p to the heap object referenced by ref.
  3392  func (p *LockManagerSnapshot) Update(ref js.Ref) {
  3393  	bindings.LockManagerSnapshotJSLoad(
  3394  		js.Pointer(p), js.False, ref,
  3395  	)
  3396  }
  3397  
  3398  // FreeMembers frees fields with heap reference, if recursive is true
  3399  // free all heap references reachable from p.
  3400  func (p *LockManagerSnapshot) FreeMembers(recursive bool) {
  3401  	js.Free(
  3402  		p.Held.Ref(),
  3403  		p.Pending.Ref(),
  3404  	)
  3405  	p.Held = p.Held.FromRef(js.Undefined)
  3406  	p.Pending = p.Pending.FromRef(js.Undefined)
  3407  }
  3408  
  3409  type LockManager struct {
  3410  	ref js.Ref
  3411  }
  3412  
  3413  func (this LockManager) Once() LockManager {
  3414  	this.ref.Once()
  3415  	return this
  3416  }
  3417  
  3418  func (this LockManager) Ref() js.Ref {
  3419  	return this.ref
  3420  }
  3421  
  3422  func (this LockManager) FromRef(ref js.Ref) LockManager {
  3423  	this.ref = ref
  3424  	return this
  3425  }
  3426  
  3427  func (this LockManager) Free() {
  3428  	this.ref.Free()
  3429  }
  3430  
  3431  // HasFuncRequest returns true if the method "LockManager.request" exists.
  3432  func (this LockManager) HasFuncRequest() bool {
  3433  	return js.True == bindings.HasFuncLockManagerRequest(
  3434  		this.ref,
  3435  	)
  3436  }
  3437  
  3438  // FuncRequest returns the method "LockManager.request".
  3439  func (this LockManager) FuncRequest() (fn js.Func[func(name js.String, callback js.Func[func(lock Lock) js.Promise[js.Any]]) js.Promise[js.Any]]) {
  3440  	bindings.FuncLockManagerRequest(
  3441  		this.ref, js.Pointer(&fn),
  3442  	)
  3443  	return
  3444  }
  3445  
  3446  // Request calls the method "LockManager.request".
  3447  func (this LockManager) Request(name js.String, callback js.Func[func(lock Lock) js.Promise[js.Any]]) (ret js.Promise[js.Any]) {
  3448  	bindings.CallLockManagerRequest(
  3449  		this.ref, js.Pointer(&ret),
  3450  		name.Ref(),
  3451  		callback.Ref(),
  3452  	)
  3453  
  3454  	return
  3455  }
  3456  
  3457  // TryRequest calls the method "LockManager.request"
  3458  // in a try/catch block and returns (_, err, ok = false) when it went through
  3459  // the catch clause.
  3460  func (this LockManager) TryRequest(name js.String, callback js.Func[func(lock Lock) js.Promise[js.Any]]) (ret js.Promise[js.Any], exception js.Any, ok bool) {
  3461  	ok = js.True == bindings.TryLockManagerRequest(
  3462  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3463  		name.Ref(),
  3464  		callback.Ref(),
  3465  	)
  3466  
  3467  	return
  3468  }
  3469  
  3470  // HasFuncRequest1 returns true if the method "LockManager.request" exists.
  3471  func (this LockManager) HasFuncRequest1() bool {
  3472  	return js.True == bindings.HasFuncLockManagerRequest1(
  3473  		this.ref,
  3474  	)
  3475  }
  3476  
  3477  // FuncRequest1 returns the method "LockManager.request".
  3478  func (this LockManager) FuncRequest1() (fn js.Func[func(name js.String, options LockOptions, callback js.Func[func(lock Lock) js.Promise[js.Any]]) js.Promise[js.Any]]) {
  3479  	bindings.FuncLockManagerRequest1(
  3480  		this.ref, js.Pointer(&fn),
  3481  	)
  3482  	return
  3483  }
  3484  
  3485  // Request1 calls the method "LockManager.request".
  3486  func (this LockManager) Request1(name js.String, options LockOptions, callback js.Func[func(lock Lock) js.Promise[js.Any]]) (ret js.Promise[js.Any]) {
  3487  	bindings.CallLockManagerRequest1(
  3488  		this.ref, js.Pointer(&ret),
  3489  		name.Ref(),
  3490  		js.Pointer(&options),
  3491  		callback.Ref(),
  3492  	)
  3493  
  3494  	return
  3495  }
  3496  
  3497  // TryRequest1 calls the method "LockManager.request"
  3498  // in a try/catch block and returns (_, err, ok = false) when it went through
  3499  // the catch clause.
  3500  func (this LockManager) TryRequest1(name js.String, options LockOptions, callback js.Func[func(lock Lock) js.Promise[js.Any]]) (ret js.Promise[js.Any], exception js.Any, ok bool) {
  3501  	ok = js.True == bindings.TryLockManagerRequest1(
  3502  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3503  		name.Ref(),
  3504  		js.Pointer(&options),
  3505  		callback.Ref(),
  3506  	)
  3507  
  3508  	return
  3509  }
  3510  
  3511  // HasFuncQuery returns true if the method "LockManager.query" exists.
  3512  func (this LockManager) HasFuncQuery() bool {
  3513  	return js.True == bindings.HasFuncLockManagerQuery(
  3514  		this.ref,
  3515  	)
  3516  }
  3517  
  3518  // FuncQuery returns the method "LockManager.query".
  3519  func (this LockManager) FuncQuery() (fn js.Func[func() js.Promise[LockManagerSnapshot]]) {
  3520  	bindings.FuncLockManagerQuery(
  3521  		this.ref, js.Pointer(&fn),
  3522  	)
  3523  	return
  3524  }
  3525  
  3526  // Query calls the method "LockManager.query".
  3527  func (this LockManager) Query() (ret js.Promise[LockManagerSnapshot]) {
  3528  	bindings.CallLockManagerQuery(
  3529  		this.ref, js.Pointer(&ret),
  3530  	)
  3531  
  3532  	return
  3533  }
  3534  
  3535  // TryQuery calls the method "LockManager.query"
  3536  // in a try/catch block and returns (_, err, ok = false) when it went through
  3537  // the catch clause.
  3538  func (this LockManager) TryQuery() (ret js.Promise[LockManagerSnapshot], exception js.Any, ok bool) {
  3539  	ok = js.True == bindings.TryLockManagerQuery(
  3540  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3541  	)
  3542  
  3543  	return
  3544  }
  3545  
  3546  type MimeType struct {
  3547  	ref js.Ref
  3548  }
  3549  
  3550  func (this MimeType) Once() MimeType {
  3551  	this.ref.Once()
  3552  	return this
  3553  }
  3554  
  3555  func (this MimeType) Ref() js.Ref {
  3556  	return this.ref
  3557  }
  3558  
  3559  func (this MimeType) FromRef(ref js.Ref) MimeType {
  3560  	this.ref = ref
  3561  	return this
  3562  }
  3563  
  3564  func (this MimeType) Free() {
  3565  	this.ref.Free()
  3566  }
  3567  
  3568  // Type returns the value of property "MimeType.type".
  3569  //
  3570  // It returns ok=false if there is no such property.
  3571  func (this MimeType) Type() (ret js.String, ok bool) {
  3572  	ok = js.True == bindings.GetMimeTypeType(
  3573  		this.ref, js.Pointer(&ret),
  3574  	)
  3575  	return
  3576  }
  3577  
  3578  // Description returns the value of property "MimeType.description".
  3579  //
  3580  // It returns ok=false if there is no such property.
  3581  func (this MimeType) Description() (ret js.String, ok bool) {
  3582  	ok = js.True == bindings.GetMimeTypeDescription(
  3583  		this.ref, js.Pointer(&ret),
  3584  	)
  3585  	return
  3586  }
  3587  
  3588  // Suffixes returns the value of property "MimeType.suffixes".
  3589  //
  3590  // It returns ok=false if there is no such property.
  3591  func (this MimeType) Suffixes() (ret js.String, ok bool) {
  3592  	ok = js.True == bindings.GetMimeTypeSuffixes(
  3593  		this.ref, js.Pointer(&ret),
  3594  	)
  3595  	return
  3596  }
  3597  
  3598  // EnabledPlugin returns the value of property "MimeType.enabledPlugin".
  3599  //
  3600  // It returns ok=false if there is no such property.
  3601  func (this MimeType) EnabledPlugin() (ret Plugin, ok bool) {
  3602  	ok = js.True == bindings.GetMimeTypeEnabledPlugin(
  3603  		this.ref, js.Pointer(&ret),
  3604  	)
  3605  	return
  3606  }
  3607  
  3608  type Plugin struct {
  3609  	ref js.Ref
  3610  }
  3611  
  3612  func (this Plugin) Once() Plugin {
  3613  	this.ref.Once()
  3614  	return this
  3615  }
  3616  
  3617  func (this Plugin) Ref() js.Ref {
  3618  	return this.ref
  3619  }
  3620  
  3621  func (this Plugin) FromRef(ref js.Ref) Plugin {
  3622  	this.ref = ref
  3623  	return this
  3624  }
  3625  
  3626  func (this Plugin) Free() {
  3627  	this.ref.Free()
  3628  }
  3629  
  3630  // Name returns the value of property "Plugin.name".
  3631  //
  3632  // It returns ok=false if there is no such property.
  3633  func (this Plugin) Name() (ret js.String, ok bool) {
  3634  	ok = js.True == bindings.GetPluginName(
  3635  		this.ref, js.Pointer(&ret),
  3636  	)
  3637  	return
  3638  }
  3639  
  3640  // Description returns the value of property "Plugin.description".
  3641  //
  3642  // It returns ok=false if there is no such property.
  3643  func (this Plugin) Description() (ret js.String, ok bool) {
  3644  	ok = js.True == bindings.GetPluginDescription(
  3645  		this.ref, js.Pointer(&ret),
  3646  	)
  3647  	return
  3648  }
  3649  
  3650  // Filename returns the value of property "Plugin.filename".
  3651  //
  3652  // It returns ok=false if there is no such property.
  3653  func (this Plugin) Filename() (ret js.String, ok bool) {
  3654  	ok = js.True == bindings.GetPluginFilename(
  3655  		this.ref, js.Pointer(&ret),
  3656  	)
  3657  	return
  3658  }
  3659  
  3660  // Length returns the value of property "Plugin.length".
  3661  //
  3662  // It returns ok=false if there is no such property.
  3663  func (this Plugin) Length() (ret uint32, ok bool) {
  3664  	ok = js.True == bindings.GetPluginLength(
  3665  		this.ref, js.Pointer(&ret),
  3666  	)
  3667  	return
  3668  }
  3669  
  3670  // HasFuncItem returns true if the method "Plugin.item" exists.
  3671  func (this Plugin) HasFuncItem() bool {
  3672  	return js.True == bindings.HasFuncPluginItem(
  3673  		this.ref,
  3674  	)
  3675  }
  3676  
  3677  // FuncItem returns the method "Plugin.item".
  3678  func (this Plugin) FuncItem() (fn js.Func[func(index uint32) MimeType]) {
  3679  	bindings.FuncPluginItem(
  3680  		this.ref, js.Pointer(&fn),
  3681  	)
  3682  	return
  3683  }
  3684  
  3685  // Item calls the method "Plugin.item".
  3686  func (this Plugin) Item(index uint32) (ret MimeType) {
  3687  	bindings.CallPluginItem(
  3688  		this.ref, js.Pointer(&ret),
  3689  		uint32(index),
  3690  	)
  3691  
  3692  	return
  3693  }
  3694  
  3695  // TryItem calls the method "Plugin.item"
  3696  // in a try/catch block and returns (_, err, ok = false) when it went through
  3697  // the catch clause.
  3698  func (this Plugin) TryItem(index uint32) (ret MimeType, exception js.Any, ok bool) {
  3699  	ok = js.True == bindings.TryPluginItem(
  3700  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3701  		uint32(index),
  3702  	)
  3703  
  3704  	return
  3705  }
  3706  
  3707  // HasFuncNamedItem returns true if the method "Plugin.namedItem" exists.
  3708  func (this Plugin) HasFuncNamedItem() bool {
  3709  	return js.True == bindings.HasFuncPluginNamedItem(
  3710  		this.ref,
  3711  	)
  3712  }
  3713  
  3714  // FuncNamedItem returns the method "Plugin.namedItem".
  3715  func (this Plugin) FuncNamedItem() (fn js.Func[func(name js.String) MimeType]) {
  3716  	bindings.FuncPluginNamedItem(
  3717  		this.ref, js.Pointer(&fn),
  3718  	)
  3719  	return
  3720  }
  3721  
  3722  // NamedItem calls the method "Plugin.namedItem".
  3723  func (this Plugin) NamedItem(name js.String) (ret MimeType) {
  3724  	bindings.CallPluginNamedItem(
  3725  		this.ref, js.Pointer(&ret),
  3726  		name.Ref(),
  3727  	)
  3728  
  3729  	return
  3730  }
  3731  
  3732  // TryNamedItem calls the method "Plugin.namedItem"
  3733  // in a try/catch block and returns (_, err, ok = false) when it went through
  3734  // the catch clause.
  3735  func (this Plugin) TryNamedItem(name js.String) (ret MimeType, exception js.Any, ok bool) {
  3736  	ok = js.True == bindings.TryPluginNamedItem(
  3737  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3738  		name.Ref(),
  3739  	)
  3740  
  3741  	return
  3742  }
  3743  
  3744  type PluginArray struct {
  3745  	ref js.Ref
  3746  }
  3747  
  3748  func (this PluginArray) Once() PluginArray {
  3749  	this.ref.Once()
  3750  	return this
  3751  }
  3752  
  3753  func (this PluginArray) Ref() js.Ref {
  3754  	return this.ref
  3755  }
  3756  
  3757  func (this PluginArray) FromRef(ref js.Ref) PluginArray {
  3758  	this.ref = ref
  3759  	return this
  3760  }
  3761  
  3762  func (this PluginArray) Free() {
  3763  	this.ref.Free()
  3764  }
  3765  
  3766  // Length returns the value of property "PluginArray.length".
  3767  //
  3768  // It returns ok=false if there is no such property.
  3769  func (this PluginArray) Length() (ret uint32, ok bool) {
  3770  	ok = js.True == bindings.GetPluginArrayLength(
  3771  		this.ref, js.Pointer(&ret),
  3772  	)
  3773  	return
  3774  }
  3775  
  3776  // HasFuncRefresh returns true if the method "PluginArray.refresh" exists.
  3777  func (this PluginArray) HasFuncRefresh() bool {
  3778  	return js.True == bindings.HasFuncPluginArrayRefresh(
  3779  		this.ref,
  3780  	)
  3781  }
  3782  
  3783  // FuncRefresh returns the method "PluginArray.refresh".
  3784  func (this PluginArray) FuncRefresh() (fn js.Func[func()]) {
  3785  	bindings.FuncPluginArrayRefresh(
  3786  		this.ref, js.Pointer(&fn),
  3787  	)
  3788  	return
  3789  }
  3790  
  3791  // Refresh calls the method "PluginArray.refresh".
  3792  func (this PluginArray) Refresh() (ret js.Void) {
  3793  	bindings.CallPluginArrayRefresh(
  3794  		this.ref, js.Pointer(&ret),
  3795  	)
  3796  
  3797  	return
  3798  }
  3799  
  3800  // TryRefresh calls the method "PluginArray.refresh"
  3801  // in a try/catch block and returns (_, err, ok = false) when it went through
  3802  // the catch clause.
  3803  func (this PluginArray) TryRefresh() (ret js.Void, exception js.Any, ok bool) {
  3804  	ok = js.True == bindings.TryPluginArrayRefresh(
  3805  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3806  	)
  3807  
  3808  	return
  3809  }
  3810  
  3811  // HasFuncItem returns true if the method "PluginArray.item" exists.
  3812  func (this PluginArray) HasFuncItem() bool {
  3813  	return js.True == bindings.HasFuncPluginArrayItem(
  3814  		this.ref,
  3815  	)
  3816  }
  3817  
  3818  // FuncItem returns the method "PluginArray.item".
  3819  func (this PluginArray) FuncItem() (fn js.Func[func(index uint32) Plugin]) {
  3820  	bindings.FuncPluginArrayItem(
  3821  		this.ref, js.Pointer(&fn),
  3822  	)
  3823  	return
  3824  }
  3825  
  3826  // Item calls the method "PluginArray.item".
  3827  func (this PluginArray) Item(index uint32) (ret Plugin) {
  3828  	bindings.CallPluginArrayItem(
  3829  		this.ref, js.Pointer(&ret),
  3830  		uint32(index),
  3831  	)
  3832  
  3833  	return
  3834  }
  3835  
  3836  // TryItem calls the method "PluginArray.item"
  3837  // in a try/catch block and returns (_, err, ok = false) when it went through
  3838  // the catch clause.
  3839  func (this PluginArray) TryItem(index uint32) (ret Plugin, exception js.Any, ok bool) {
  3840  	ok = js.True == bindings.TryPluginArrayItem(
  3841  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3842  		uint32(index),
  3843  	)
  3844  
  3845  	return
  3846  }
  3847  
  3848  // HasFuncNamedItem returns true if the method "PluginArray.namedItem" exists.
  3849  func (this PluginArray) HasFuncNamedItem() bool {
  3850  	return js.True == bindings.HasFuncPluginArrayNamedItem(
  3851  		this.ref,
  3852  	)
  3853  }
  3854  
  3855  // FuncNamedItem returns the method "PluginArray.namedItem".
  3856  func (this PluginArray) FuncNamedItem() (fn js.Func[func(name js.String) Plugin]) {
  3857  	bindings.FuncPluginArrayNamedItem(
  3858  		this.ref, js.Pointer(&fn),
  3859  	)
  3860  	return
  3861  }
  3862  
  3863  // NamedItem calls the method "PluginArray.namedItem".
  3864  func (this PluginArray) NamedItem(name js.String) (ret Plugin) {
  3865  	bindings.CallPluginArrayNamedItem(
  3866  		this.ref, js.Pointer(&ret),
  3867  		name.Ref(),
  3868  	)
  3869  
  3870  	return
  3871  }
  3872  
  3873  // TryNamedItem calls the method "PluginArray.namedItem"
  3874  // in a try/catch block and returns (_, err, ok = false) when it went through
  3875  // the catch clause.
  3876  func (this PluginArray) TryNamedItem(name js.String) (ret Plugin, exception js.Any, ok bool) {
  3877  	ok = js.True == bindings.TryPluginArrayNamedItem(
  3878  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3879  		name.Ref(),
  3880  	)
  3881  
  3882  	return
  3883  }
  3884  
  3885  type MimeTypeArray struct {
  3886  	ref js.Ref
  3887  }
  3888  
  3889  func (this MimeTypeArray) Once() MimeTypeArray {
  3890  	this.ref.Once()
  3891  	return this
  3892  }
  3893  
  3894  func (this MimeTypeArray) Ref() js.Ref {
  3895  	return this.ref
  3896  }
  3897  
  3898  func (this MimeTypeArray) FromRef(ref js.Ref) MimeTypeArray {
  3899  	this.ref = ref
  3900  	return this
  3901  }
  3902  
  3903  func (this MimeTypeArray) Free() {
  3904  	this.ref.Free()
  3905  }
  3906  
  3907  // Length returns the value of property "MimeTypeArray.length".
  3908  //
  3909  // It returns ok=false if there is no such property.
  3910  func (this MimeTypeArray) Length() (ret uint32, ok bool) {
  3911  	ok = js.True == bindings.GetMimeTypeArrayLength(
  3912  		this.ref, js.Pointer(&ret),
  3913  	)
  3914  	return
  3915  }
  3916  
  3917  // HasFuncItem returns true if the method "MimeTypeArray.item" exists.
  3918  func (this MimeTypeArray) HasFuncItem() bool {
  3919  	return js.True == bindings.HasFuncMimeTypeArrayItem(
  3920  		this.ref,
  3921  	)
  3922  }
  3923  
  3924  // FuncItem returns the method "MimeTypeArray.item".
  3925  func (this MimeTypeArray) FuncItem() (fn js.Func[func(index uint32) MimeType]) {
  3926  	bindings.FuncMimeTypeArrayItem(
  3927  		this.ref, js.Pointer(&fn),
  3928  	)
  3929  	return
  3930  }
  3931  
  3932  // Item calls the method "MimeTypeArray.item".
  3933  func (this MimeTypeArray) Item(index uint32) (ret MimeType) {
  3934  	bindings.CallMimeTypeArrayItem(
  3935  		this.ref, js.Pointer(&ret),
  3936  		uint32(index),
  3937  	)
  3938  
  3939  	return
  3940  }
  3941  
  3942  // TryItem calls the method "MimeTypeArray.item"
  3943  // in a try/catch block and returns (_, err, ok = false) when it went through
  3944  // the catch clause.
  3945  func (this MimeTypeArray) TryItem(index uint32) (ret MimeType, exception js.Any, ok bool) {
  3946  	ok = js.True == bindings.TryMimeTypeArrayItem(
  3947  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3948  		uint32(index),
  3949  	)
  3950  
  3951  	return
  3952  }
  3953  
  3954  // HasFuncNamedItem returns true if the method "MimeTypeArray.namedItem" exists.
  3955  func (this MimeTypeArray) HasFuncNamedItem() bool {
  3956  	return js.True == bindings.HasFuncMimeTypeArrayNamedItem(
  3957  		this.ref,
  3958  	)
  3959  }
  3960  
  3961  // FuncNamedItem returns the method "MimeTypeArray.namedItem".
  3962  func (this MimeTypeArray) FuncNamedItem() (fn js.Func[func(name js.String) MimeType]) {
  3963  	bindings.FuncMimeTypeArrayNamedItem(
  3964  		this.ref, js.Pointer(&fn),
  3965  	)
  3966  	return
  3967  }
  3968  
  3969  // NamedItem calls the method "MimeTypeArray.namedItem".
  3970  func (this MimeTypeArray) NamedItem(name js.String) (ret MimeType) {
  3971  	bindings.CallMimeTypeArrayNamedItem(
  3972  		this.ref, js.Pointer(&ret),
  3973  		name.Ref(),
  3974  	)
  3975  
  3976  	return
  3977  }
  3978  
  3979  // TryNamedItem calls the method "MimeTypeArray.namedItem"
  3980  // in a try/catch block and returns (_, err, ok = false) when it went through
  3981  // the catch clause.
  3982  func (this MimeTypeArray) TryNamedItem(name js.String) (ret MimeType, exception js.Any, ok bool) {
  3983  	ok = js.True == bindings.TryMimeTypeArrayNamedItem(
  3984  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3985  		name.Ref(),
  3986  	)
  3987  
  3988  	return
  3989  }
  3990  
  3991  type MLNamedArrayBufferViews = js.Record[js.ArrayBufferView]
  3992  
  3993  type MLComputeResult struct {
  3994  	// Inputs is "MLComputeResult.inputs"
  3995  	//
  3996  	// Optional
  3997  	Inputs MLNamedArrayBufferViews
  3998  	// Outputs is "MLComputeResult.outputs"
  3999  	//
  4000  	// Optional
  4001  	Outputs MLNamedArrayBufferViews
  4002  
  4003  	FFI_USE bool
  4004  }
  4005  
  4006  // FromRef calls UpdateFrom and returns a MLComputeResult with all fields set.
  4007  func (p MLComputeResult) FromRef(ref js.Ref) MLComputeResult {
  4008  	p.UpdateFrom(ref)
  4009  	return p
  4010  }
  4011  
  4012  // New creates a new MLComputeResult in the application heap.
  4013  func (p MLComputeResult) New() js.Ref {
  4014  	return bindings.MLComputeResultJSLoad(
  4015  		js.Pointer(&p), js.True, 0,
  4016  	)
  4017  }
  4018  
  4019  // UpdateFrom copies value of all fields of the heap object to p.
  4020  func (p *MLComputeResult) UpdateFrom(ref js.Ref) {
  4021  	bindings.MLComputeResultJSStore(
  4022  		js.Pointer(p), ref,
  4023  	)
  4024  }
  4025  
  4026  // Update writes all fields of the p to the heap object referenced by ref.
  4027  func (p *MLComputeResult) Update(ref js.Ref) {
  4028  	bindings.MLComputeResultJSLoad(
  4029  		js.Pointer(p), js.False, ref,
  4030  	)
  4031  }
  4032  
  4033  // FreeMembers frees fields with heap reference, if recursive is true
  4034  // free all heap references reachable from p.
  4035  func (p *MLComputeResult) FreeMembers(recursive bool) {
  4036  	js.Free(
  4037  		p.Inputs.Ref(),
  4038  		p.Outputs.Ref(),
  4039  	)
  4040  	p.Inputs = p.Inputs.FromRef(js.Undefined)
  4041  	p.Outputs = p.Outputs.FromRef(js.Undefined)
  4042  }
  4043  
  4044  type MLGraph struct {
  4045  	ref js.Ref
  4046  }
  4047  
  4048  func (this MLGraph) Once() MLGraph {
  4049  	this.ref.Once()
  4050  	return this
  4051  }
  4052  
  4053  func (this MLGraph) Ref() js.Ref {
  4054  	return this.ref
  4055  }
  4056  
  4057  func (this MLGraph) FromRef(ref js.Ref) MLGraph {
  4058  	this.ref = ref
  4059  	return this
  4060  }
  4061  
  4062  func (this MLGraph) Free() {
  4063  	this.ref.Free()
  4064  }