github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis07_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 DecodeSuccessCallbackFunc func(this js.Ref, decodedData AudioBuffer) js.Ref
    13  
    14  func (fn DecodeSuccessCallbackFunc) Register() js.Func[func(decodedData AudioBuffer)] {
    15  	return js.RegisterCallback[func(decodedData AudioBuffer)](
    16  		fn, abi.FuncPCABIInternal(fn),
    17  	)
    18  }
    19  
    20  func (fn DecodeSuccessCallbackFunc) DispatchCallback(
    21  	targetPC uintptr, ctx *js.CallbackContext,
    22  ) {
    23  	args := ctx.Args()
    24  	if len(args) != 1+1 /* js this */ ||
    25  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
    26  		js.ThrowInvalidCallbackInvocation()
    27  	}
    28  
    29  	if ctx.Return(fn(
    30  		args[0],
    31  
    32  		AudioBuffer{}.FromRef(args[0+1]),
    33  	)) {
    34  		return
    35  	}
    36  
    37  	js.ThrowCallbackValueNotReturned()
    38  }
    39  
    40  type DecodeSuccessCallback[T any] struct {
    41  	Fn  func(arg T, this js.Ref, decodedData AudioBuffer) js.Ref
    42  	Arg T
    43  }
    44  
    45  func (cb *DecodeSuccessCallback[T]) Register() js.Func[func(decodedData AudioBuffer)] {
    46  	return js.RegisterCallback[func(decodedData AudioBuffer)](
    47  		cb, abi.FuncPCABIInternal(cb.Fn),
    48  	)
    49  }
    50  
    51  func (cb *DecodeSuccessCallback[T]) DispatchCallback(
    52  	targetPC uintptr, ctx *js.CallbackContext,
    53  ) {
    54  	args := ctx.Args()
    55  	if len(args) != 1+1 /* js this */ ||
    56  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
    57  		js.ThrowInvalidCallbackInvocation()
    58  	}
    59  
    60  	if ctx.Return(cb.Fn(
    61  		cb.Arg,
    62  		args[0],
    63  
    64  		AudioBuffer{}.FromRef(args[0+1]),
    65  	)) {
    66  		return
    67  	}
    68  
    69  	js.ThrowCallbackValueNotReturned()
    70  }
    71  
    72  type DecodeErrorCallbackFunc func(this js.Ref, err DOMException) js.Ref
    73  
    74  func (fn DecodeErrorCallbackFunc) Register() js.Func[func(err DOMException)] {
    75  	return js.RegisterCallback[func(err DOMException)](
    76  		fn, abi.FuncPCABIInternal(fn),
    77  	)
    78  }
    79  
    80  func (fn DecodeErrorCallbackFunc) DispatchCallback(
    81  	targetPC uintptr, ctx *js.CallbackContext,
    82  ) {
    83  	args := ctx.Args()
    84  	if len(args) != 1+1 /* js this */ ||
    85  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
    86  		js.ThrowInvalidCallbackInvocation()
    87  	}
    88  
    89  	if ctx.Return(fn(
    90  		args[0],
    91  
    92  		DOMException{}.FromRef(args[0+1]),
    93  	)) {
    94  		return
    95  	}
    96  
    97  	js.ThrowCallbackValueNotReturned()
    98  }
    99  
   100  type DecodeErrorCallback[T any] struct {
   101  	Fn  func(arg T, this js.Ref, err DOMException) js.Ref
   102  	Arg T
   103  }
   104  
   105  func (cb *DecodeErrorCallback[T]) Register() js.Func[func(err DOMException)] {
   106  	return js.RegisterCallback[func(err DOMException)](
   107  		cb, abi.FuncPCABIInternal(cb.Fn),
   108  	)
   109  }
   110  
   111  func (cb *DecodeErrorCallback[T]) DispatchCallback(
   112  	targetPC uintptr, ctx *js.CallbackContext,
   113  ) {
   114  	args := ctx.Args()
   115  	if len(args) != 1+1 /* js this */ ||
   116  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   117  		js.ThrowInvalidCallbackInvocation()
   118  	}
   119  
   120  	if ctx.Return(cb.Fn(
   121  		cb.Arg,
   122  		args[0],
   123  
   124  		DOMException{}.FromRef(args[0+1]),
   125  	)) {
   126  		return
   127  	}
   128  
   129  	js.ThrowCallbackValueNotReturned()
   130  }
   131  
   132  const (
   133  	DOMException_INDEX_SIZE_ERR              uint16 = 1
   134  	DOMException_DOMSTRING_SIZE_ERR          uint16 = 2
   135  	DOMException_HIERARCHY_REQUEST_ERR       uint16 = 3
   136  	DOMException_WRONG_DOCUMENT_ERR          uint16 = 4
   137  	DOMException_INVALID_CHARACTER_ERR       uint16 = 5
   138  	DOMException_NO_DATA_ALLOWED_ERR         uint16 = 6
   139  	DOMException_NO_MODIFICATION_ALLOWED_ERR uint16 = 7
   140  	DOMException_NOT_FOUND_ERR               uint16 = 8
   141  	DOMException_NOT_SUPPORTED_ERR           uint16 = 9
   142  	DOMException_INUSE_ATTRIBUTE_ERR         uint16 = 10
   143  	DOMException_INVALID_STATE_ERR           uint16 = 11
   144  	DOMException_SYNTAX_ERR                  uint16 = 12
   145  	DOMException_INVALID_MODIFICATION_ERR    uint16 = 13
   146  	DOMException_NAMESPACE_ERR               uint16 = 14
   147  	DOMException_INVALID_ACCESS_ERR          uint16 = 15
   148  	DOMException_VALIDATION_ERR              uint16 = 16
   149  	DOMException_TYPE_MISMATCH_ERR           uint16 = 17
   150  	DOMException_SECURITY_ERR                uint16 = 18
   151  	DOMException_NETWORK_ERR                 uint16 = 19
   152  	DOMException_ABORT_ERR                   uint16 = 20
   153  	DOMException_URL_MISMATCH_ERR            uint16 = 21
   154  	DOMException_QUOTA_EXCEEDED_ERR          uint16 = 22
   155  	DOMException_TIMEOUT_ERR                 uint16 = 23
   156  	DOMException_INVALID_NODE_TYPE_ERR       uint16 = 24
   157  	DOMException_DATA_CLONE_ERR              uint16 = 25
   158  )
   159  
   160  func NewDOMException(message js.String, name js.String) (ret DOMException) {
   161  	ret.ref = bindings.NewDOMExceptionByDOMException(
   162  		message.Ref(),
   163  		name.Ref())
   164  	return
   165  }
   166  
   167  func NewDOMExceptionByDOMException1(message js.String) (ret DOMException) {
   168  	ret.ref = bindings.NewDOMExceptionByDOMException1(
   169  		message.Ref())
   170  	return
   171  }
   172  
   173  func NewDOMExceptionByDOMException2() (ret DOMException) {
   174  	ret.ref = bindings.NewDOMExceptionByDOMException2()
   175  	return
   176  }
   177  
   178  type DOMException struct {
   179  	ref js.Ref
   180  }
   181  
   182  func (this DOMException) Once() DOMException {
   183  	this.ref.Once()
   184  	return this
   185  }
   186  
   187  func (this DOMException) Ref() js.Ref {
   188  	return this.ref
   189  }
   190  
   191  func (this DOMException) FromRef(ref js.Ref) DOMException {
   192  	this.ref = ref
   193  	return this
   194  }
   195  
   196  func (this DOMException) Free() {
   197  	this.ref.Free()
   198  }
   199  
   200  // Name returns the value of property "DOMException.name".
   201  //
   202  // It returns ok=false if there is no such property.
   203  func (this DOMException) Name() (ret js.String, ok bool) {
   204  	ok = js.True == bindings.GetDOMExceptionName(
   205  		this.ref, js.Pointer(&ret),
   206  	)
   207  	return
   208  }
   209  
   210  // Message returns the value of property "DOMException.message".
   211  //
   212  // It returns ok=false if there is no such property.
   213  func (this DOMException) Message() (ret js.String, ok bool) {
   214  	ok = js.True == bindings.GetDOMExceptionMessage(
   215  		this.ref, js.Pointer(&ret),
   216  	)
   217  	return
   218  }
   219  
   220  // Code returns the value of property "DOMException.code".
   221  //
   222  // It returns ok=false if there is no such property.
   223  func (this DOMException) Code() (ret uint16, ok bool) {
   224  	ok = js.True == bindings.GetDOMExceptionCode(
   225  		this.ref, js.Pointer(&ret),
   226  	)
   227  	return
   228  }
   229  
   230  type AudioDestinationNode struct {
   231  	AudioNode
   232  }
   233  
   234  func (this AudioDestinationNode) Once() AudioDestinationNode {
   235  	this.ref.Once()
   236  	return this
   237  }
   238  
   239  func (this AudioDestinationNode) Ref() js.Ref {
   240  	return this.AudioNode.Ref()
   241  }
   242  
   243  func (this AudioDestinationNode) FromRef(ref js.Ref) AudioDestinationNode {
   244  	this.AudioNode = this.AudioNode.FromRef(ref)
   245  	return this
   246  }
   247  
   248  func (this AudioDestinationNode) Free() {
   249  	this.ref.Free()
   250  }
   251  
   252  // MaxChannelCount returns the value of property "AudioDestinationNode.maxChannelCount".
   253  //
   254  // It returns ok=false if there is no such property.
   255  func (this AudioDestinationNode) MaxChannelCount() (ret uint32, ok bool) {
   256  	ok = js.True == bindings.GetAudioDestinationNodeMaxChannelCount(
   257  		this.ref, js.Pointer(&ret),
   258  	)
   259  	return
   260  }
   261  
   262  type AudioListener struct {
   263  	ref js.Ref
   264  }
   265  
   266  func (this AudioListener) Once() AudioListener {
   267  	this.ref.Once()
   268  	return this
   269  }
   270  
   271  func (this AudioListener) Ref() js.Ref {
   272  	return this.ref
   273  }
   274  
   275  func (this AudioListener) FromRef(ref js.Ref) AudioListener {
   276  	this.ref = ref
   277  	return this
   278  }
   279  
   280  func (this AudioListener) Free() {
   281  	this.ref.Free()
   282  }
   283  
   284  // PositionX returns the value of property "AudioListener.positionX".
   285  //
   286  // It returns ok=false if there is no such property.
   287  func (this AudioListener) PositionX() (ret AudioParam, ok bool) {
   288  	ok = js.True == bindings.GetAudioListenerPositionX(
   289  		this.ref, js.Pointer(&ret),
   290  	)
   291  	return
   292  }
   293  
   294  // PositionY returns the value of property "AudioListener.positionY".
   295  //
   296  // It returns ok=false if there is no such property.
   297  func (this AudioListener) PositionY() (ret AudioParam, ok bool) {
   298  	ok = js.True == bindings.GetAudioListenerPositionY(
   299  		this.ref, js.Pointer(&ret),
   300  	)
   301  	return
   302  }
   303  
   304  // PositionZ returns the value of property "AudioListener.positionZ".
   305  //
   306  // It returns ok=false if there is no such property.
   307  func (this AudioListener) PositionZ() (ret AudioParam, ok bool) {
   308  	ok = js.True == bindings.GetAudioListenerPositionZ(
   309  		this.ref, js.Pointer(&ret),
   310  	)
   311  	return
   312  }
   313  
   314  // ForwardX returns the value of property "AudioListener.forwardX".
   315  //
   316  // It returns ok=false if there is no such property.
   317  func (this AudioListener) ForwardX() (ret AudioParam, ok bool) {
   318  	ok = js.True == bindings.GetAudioListenerForwardX(
   319  		this.ref, js.Pointer(&ret),
   320  	)
   321  	return
   322  }
   323  
   324  // ForwardY returns the value of property "AudioListener.forwardY".
   325  //
   326  // It returns ok=false if there is no such property.
   327  func (this AudioListener) ForwardY() (ret AudioParam, ok bool) {
   328  	ok = js.True == bindings.GetAudioListenerForwardY(
   329  		this.ref, js.Pointer(&ret),
   330  	)
   331  	return
   332  }
   333  
   334  // ForwardZ returns the value of property "AudioListener.forwardZ".
   335  //
   336  // It returns ok=false if there is no such property.
   337  func (this AudioListener) ForwardZ() (ret AudioParam, ok bool) {
   338  	ok = js.True == bindings.GetAudioListenerForwardZ(
   339  		this.ref, js.Pointer(&ret),
   340  	)
   341  	return
   342  }
   343  
   344  // UpX returns the value of property "AudioListener.upX".
   345  //
   346  // It returns ok=false if there is no such property.
   347  func (this AudioListener) UpX() (ret AudioParam, ok bool) {
   348  	ok = js.True == bindings.GetAudioListenerUpX(
   349  		this.ref, js.Pointer(&ret),
   350  	)
   351  	return
   352  }
   353  
   354  // UpY returns the value of property "AudioListener.upY".
   355  //
   356  // It returns ok=false if there is no such property.
   357  func (this AudioListener) UpY() (ret AudioParam, ok bool) {
   358  	ok = js.True == bindings.GetAudioListenerUpY(
   359  		this.ref, js.Pointer(&ret),
   360  	)
   361  	return
   362  }
   363  
   364  // UpZ returns the value of property "AudioListener.upZ".
   365  //
   366  // It returns ok=false if there is no such property.
   367  func (this AudioListener) UpZ() (ret AudioParam, ok bool) {
   368  	ok = js.True == bindings.GetAudioListenerUpZ(
   369  		this.ref, js.Pointer(&ret),
   370  	)
   371  	return
   372  }
   373  
   374  // HasFuncSetPosition returns true if the method "AudioListener.setPosition" exists.
   375  func (this AudioListener) HasFuncSetPosition() bool {
   376  	return js.True == bindings.HasFuncAudioListenerSetPosition(
   377  		this.ref,
   378  	)
   379  }
   380  
   381  // FuncSetPosition returns the method "AudioListener.setPosition".
   382  func (this AudioListener) FuncSetPosition() (fn js.Func[func(x float32, y float32, z float32)]) {
   383  	bindings.FuncAudioListenerSetPosition(
   384  		this.ref, js.Pointer(&fn),
   385  	)
   386  	return
   387  }
   388  
   389  // SetPosition calls the method "AudioListener.setPosition".
   390  func (this AudioListener) SetPosition(x float32, y float32, z float32) (ret js.Void) {
   391  	bindings.CallAudioListenerSetPosition(
   392  		this.ref, js.Pointer(&ret),
   393  		float32(x),
   394  		float32(y),
   395  		float32(z),
   396  	)
   397  
   398  	return
   399  }
   400  
   401  // TrySetPosition calls the method "AudioListener.setPosition"
   402  // in a try/catch block and returns (_, err, ok = false) when it went through
   403  // the catch clause.
   404  func (this AudioListener) TrySetPosition(x float32, y float32, z float32) (ret js.Void, exception js.Any, ok bool) {
   405  	ok = js.True == bindings.TryAudioListenerSetPosition(
   406  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   407  		float32(x),
   408  		float32(y),
   409  		float32(z),
   410  	)
   411  
   412  	return
   413  }
   414  
   415  // HasFuncSetOrientation returns true if the method "AudioListener.setOrientation" exists.
   416  func (this AudioListener) HasFuncSetOrientation() bool {
   417  	return js.True == bindings.HasFuncAudioListenerSetOrientation(
   418  		this.ref,
   419  	)
   420  }
   421  
   422  // FuncSetOrientation returns the method "AudioListener.setOrientation".
   423  func (this AudioListener) FuncSetOrientation() (fn js.Func[func(x float32, y float32, z float32, xUp float32, yUp float32, zUp float32)]) {
   424  	bindings.FuncAudioListenerSetOrientation(
   425  		this.ref, js.Pointer(&fn),
   426  	)
   427  	return
   428  }
   429  
   430  // SetOrientation calls the method "AudioListener.setOrientation".
   431  func (this AudioListener) SetOrientation(x float32, y float32, z float32, xUp float32, yUp float32, zUp float32) (ret js.Void) {
   432  	bindings.CallAudioListenerSetOrientation(
   433  		this.ref, js.Pointer(&ret),
   434  		float32(x),
   435  		float32(y),
   436  		float32(z),
   437  		float32(xUp),
   438  		float32(yUp),
   439  		float32(zUp),
   440  	)
   441  
   442  	return
   443  }
   444  
   445  // TrySetOrientation calls the method "AudioListener.setOrientation"
   446  // in a try/catch block and returns (_, err, ok = false) when it went through
   447  // the catch clause.
   448  func (this AudioListener) TrySetOrientation(x float32, y float32, z float32, xUp float32, yUp float32, zUp float32) (ret js.Void, exception js.Any, ok bool) {
   449  	ok = js.True == bindings.TryAudioListenerSetOrientation(
   450  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   451  		float32(x),
   452  		float32(y),
   453  		float32(z),
   454  		float32(xUp),
   455  		float32(yUp),
   456  		float32(zUp),
   457  	)
   458  
   459  	return
   460  }
   461  
   462  type AudioContextState uint32
   463  
   464  const (
   465  	_ AudioContextState = iota
   466  
   467  	AudioContextState_SUSPENDED
   468  	AudioContextState_RUNNING
   469  	AudioContextState_CLOSED
   470  )
   471  
   472  func (AudioContextState) FromRef(str js.Ref) AudioContextState {
   473  	return AudioContextState(bindings.ConstOfAudioContextState(str))
   474  }
   475  
   476  func (x AudioContextState) String() (string, bool) {
   477  	switch x {
   478  	case AudioContextState_SUSPENDED:
   479  		return "suspended", true
   480  	case AudioContextState_RUNNING:
   481  		return "running", true
   482  	case AudioContextState_CLOSED:
   483  		return "closed", true
   484  	default:
   485  		return "", false
   486  	}
   487  }
   488  
   489  type StructuredSerializeOptions struct {
   490  	// Transfer is "StructuredSerializeOptions.transfer"
   491  	//
   492  	// Optional, defaults to [].
   493  	Transfer js.Array[js.Object]
   494  
   495  	FFI_USE bool
   496  }
   497  
   498  // FromRef calls UpdateFrom and returns a StructuredSerializeOptions with all fields set.
   499  func (p StructuredSerializeOptions) FromRef(ref js.Ref) StructuredSerializeOptions {
   500  	p.UpdateFrom(ref)
   501  	return p
   502  }
   503  
   504  // New creates a new StructuredSerializeOptions in the application heap.
   505  func (p StructuredSerializeOptions) New() js.Ref {
   506  	return bindings.StructuredSerializeOptionsJSLoad(
   507  		js.Pointer(&p), js.True, 0,
   508  	)
   509  }
   510  
   511  // UpdateFrom copies value of all fields of the heap object to p.
   512  func (p *StructuredSerializeOptions) UpdateFrom(ref js.Ref) {
   513  	bindings.StructuredSerializeOptionsJSStore(
   514  		js.Pointer(p), ref,
   515  	)
   516  }
   517  
   518  // Update writes all fields of the p to the heap object referenced by ref.
   519  func (p *StructuredSerializeOptions) Update(ref js.Ref) {
   520  	bindings.StructuredSerializeOptionsJSLoad(
   521  		js.Pointer(p), js.False, ref,
   522  	)
   523  }
   524  
   525  // FreeMembers frees fields with heap reference, if recursive is true
   526  // free all heap references reachable from p.
   527  func (p *StructuredSerializeOptions) FreeMembers(recursive bool) {
   528  	js.Free(
   529  		p.Transfer.Ref(),
   530  	)
   531  	p.Transfer = p.Transfer.FromRef(js.Undefined)
   532  }
   533  
   534  type MessagePort struct {
   535  	EventTarget
   536  }
   537  
   538  func (this MessagePort) Once() MessagePort {
   539  	this.ref.Once()
   540  	return this
   541  }
   542  
   543  func (this MessagePort) Ref() js.Ref {
   544  	return this.EventTarget.Ref()
   545  }
   546  
   547  func (this MessagePort) FromRef(ref js.Ref) MessagePort {
   548  	this.EventTarget = this.EventTarget.FromRef(ref)
   549  	return this
   550  }
   551  
   552  func (this MessagePort) Free() {
   553  	this.ref.Free()
   554  }
   555  
   556  // HasFuncPostMessage returns true if the method "MessagePort.postMessage" exists.
   557  func (this MessagePort) HasFuncPostMessage() bool {
   558  	return js.True == bindings.HasFuncMessagePortPostMessage(
   559  		this.ref,
   560  	)
   561  }
   562  
   563  // FuncPostMessage returns the method "MessagePort.postMessage".
   564  func (this MessagePort) FuncPostMessage() (fn js.Func[func(message js.Any, transfer js.Array[js.Object])]) {
   565  	bindings.FuncMessagePortPostMessage(
   566  		this.ref, js.Pointer(&fn),
   567  	)
   568  	return
   569  }
   570  
   571  // PostMessage calls the method "MessagePort.postMessage".
   572  func (this MessagePort) PostMessage(message js.Any, transfer js.Array[js.Object]) (ret js.Void) {
   573  	bindings.CallMessagePortPostMessage(
   574  		this.ref, js.Pointer(&ret),
   575  		message.Ref(),
   576  		transfer.Ref(),
   577  	)
   578  
   579  	return
   580  }
   581  
   582  // TryPostMessage calls the method "MessagePort.postMessage"
   583  // in a try/catch block and returns (_, err, ok = false) when it went through
   584  // the catch clause.
   585  func (this MessagePort) TryPostMessage(message js.Any, transfer js.Array[js.Object]) (ret js.Void, exception js.Any, ok bool) {
   586  	ok = js.True == bindings.TryMessagePortPostMessage(
   587  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   588  		message.Ref(),
   589  		transfer.Ref(),
   590  	)
   591  
   592  	return
   593  }
   594  
   595  // HasFuncPostMessage1 returns true if the method "MessagePort.postMessage" exists.
   596  func (this MessagePort) HasFuncPostMessage1() bool {
   597  	return js.True == bindings.HasFuncMessagePortPostMessage1(
   598  		this.ref,
   599  	)
   600  }
   601  
   602  // FuncPostMessage1 returns the method "MessagePort.postMessage".
   603  func (this MessagePort) FuncPostMessage1() (fn js.Func[func(message js.Any, options StructuredSerializeOptions)]) {
   604  	bindings.FuncMessagePortPostMessage1(
   605  		this.ref, js.Pointer(&fn),
   606  	)
   607  	return
   608  }
   609  
   610  // PostMessage1 calls the method "MessagePort.postMessage".
   611  func (this MessagePort) PostMessage1(message js.Any, options StructuredSerializeOptions) (ret js.Void) {
   612  	bindings.CallMessagePortPostMessage1(
   613  		this.ref, js.Pointer(&ret),
   614  		message.Ref(),
   615  		js.Pointer(&options),
   616  	)
   617  
   618  	return
   619  }
   620  
   621  // TryPostMessage1 calls the method "MessagePort.postMessage"
   622  // in a try/catch block and returns (_, err, ok = false) when it went through
   623  // the catch clause.
   624  func (this MessagePort) TryPostMessage1(message js.Any, options StructuredSerializeOptions) (ret js.Void, exception js.Any, ok bool) {
   625  	ok = js.True == bindings.TryMessagePortPostMessage1(
   626  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   627  		message.Ref(),
   628  		js.Pointer(&options),
   629  	)
   630  
   631  	return
   632  }
   633  
   634  // HasFuncPostMessage2 returns true if the method "MessagePort.postMessage" exists.
   635  func (this MessagePort) HasFuncPostMessage2() bool {
   636  	return js.True == bindings.HasFuncMessagePortPostMessage2(
   637  		this.ref,
   638  	)
   639  }
   640  
   641  // FuncPostMessage2 returns the method "MessagePort.postMessage".
   642  func (this MessagePort) FuncPostMessage2() (fn js.Func[func(message js.Any)]) {
   643  	bindings.FuncMessagePortPostMessage2(
   644  		this.ref, js.Pointer(&fn),
   645  	)
   646  	return
   647  }
   648  
   649  // PostMessage2 calls the method "MessagePort.postMessage".
   650  func (this MessagePort) PostMessage2(message js.Any) (ret js.Void) {
   651  	bindings.CallMessagePortPostMessage2(
   652  		this.ref, js.Pointer(&ret),
   653  		message.Ref(),
   654  	)
   655  
   656  	return
   657  }
   658  
   659  // TryPostMessage2 calls the method "MessagePort.postMessage"
   660  // in a try/catch block and returns (_, err, ok = false) when it went through
   661  // the catch clause.
   662  func (this MessagePort) TryPostMessage2(message js.Any) (ret js.Void, exception js.Any, ok bool) {
   663  	ok = js.True == bindings.TryMessagePortPostMessage2(
   664  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   665  		message.Ref(),
   666  	)
   667  
   668  	return
   669  }
   670  
   671  // HasFuncStart returns true if the method "MessagePort.start" exists.
   672  func (this MessagePort) HasFuncStart() bool {
   673  	return js.True == bindings.HasFuncMessagePortStart(
   674  		this.ref,
   675  	)
   676  }
   677  
   678  // FuncStart returns the method "MessagePort.start".
   679  func (this MessagePort) FuncStart() (fn js.Func[func()]) {
   680  	bindings.FuncMessagePortStart(
   681  		this.ref, js.Pointer(&fn),
   682  	)
   683  	return
   684  }
   685  
   686  // Start calls the method "MessagePort.start".
   687  func (this MessagePort) Start() (ret js.Void) {
   688  	bindings.CallMessagePortStart(
   689  		this.ref, js.Pointer(&ret),
   690  	)
   691  
   692  	return
   693  }
   694  
   695  // TryStart calls the method "MessagePort.start"
   696  // in a try/catch block and returns (_, err, ok = false) when it went through
   697  // the catch clause.
   698  func (this MessagePort) TryStart() (ret js.Void, exception js.Any, ok bool) {
   699  	ok = js.True == bindings.TryMessagePortStart(
   700  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   701  	)
   702  
   703  	return
   704  }
   705  
   706  // HasFuncClose returns true if the method "MessagePort.close" exists.
   707  func (this MessagePort) HasFuncClose() bool {
   708  	return js.True == bindings.HasFuncMessagePortClose(
   709  		this.ref,
   710  	)
   711  }
   712  
   713  // FuncClose returns the method "MessagePort.close".
   714  func (this MessagePort) FuncClose() (fn js.Func[func()]) {
   715  	bindings.FuncMessagePortClose(
   716  		this.ref, js.Pointer(&fn),
   717  	)
   718  	return
   719  }
   720  
   721  // Close calls the method "MessagePort.close".
   722  func (this MessagePort) Close() (ret js.Void) {
   723  	bindings.CallMessagePortClose(
   724  		this.ref, js.Pointer(&ret),
   725  	)
   726  
   727  	return
   728  }
   729  
   730  // TryClose calls the method "MessagePort.close"
   731  // in a try/catch block and returns (_, err, ok = false) when it went through
   732  // the catch clause.
   733  func (this MessagePort) TryClose() (ret js.Void, exception js.Any, ok bool) {
   734  	ok = js.True == bindings.TryMessagePortClose(
   735  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   736  	)
   737  
   738  	return
   739  }
   740  
   741  type AudioWorklet struct {
   742  	Worklet
   743  }
   744  
   745  func (this AudioWorklet) Once() AudioWorklet {
   746  	this.ref.Once()
   747  	return this
   748  }
   749  
   750  func (this AudioWorklet) Ref() js.Ref {
   751  	return this.Worklet.Ref()
   752  }
   753  
   754  func (this AudioWorklet) FromRef(ref js.Ref) AudioWorklet {
   755  	this.Worklet = this.Worklet.FromRef(ref)
   756  	return this
   757  }
   758  
   759  func (this AudioWorklet) Free() {
   760  	this.ref.Free()
   761  }
   762  
   763  // Port returns the value of property "AudioWorklet.port".
   764  //
   765  // It returns ok=false if there is no such property.
   766  func (this AudioWorklet) Port() (ret MessagePort, ok bool) {
   767  	ok = js.True == bindings.GetAudioWorkletPort(
   768  		this.ref, js.Pointer(&ret),
   769  	)
   770  	return
   771  }
   772  
   773  type BaseAudioContext struct {
   774  	EventTarget
   775  }
   776  
   777  func (this BaseAudioContext) Once() BaseAudioContext {
   778  	this.ref.Once()
   779  	return this
   780  }
   781  
   782  func (this BaseAudioContext) Ref() js.Ref {
   783  	return this.EventTarget.Ref()
   784  }
   785  
   786  func (this BaseAudioContext) FromRef(ref js.Ref) BaseAudioContext {
   787  	this.EventTarget = this.EventTarget.FromRef(ref)
   788  	return this
   789  }
   790  
   791  func (this BaseAudioContext) Free() {
   792  	this.ref.Free()
   793  }
   794  
   795  // Destination returns the value of property "BaseAudioContext.destination".
   796  //
   797  // It returns ok=false if there is no such property.
   798  func (this BaseAudioContext) Destination() (ret AudioDestinationNode, ok bool) {
   799  	ok = js.True == bindings.GetBaseAudioContextDestination(
   800  		this.ref, js.Pointer(&ret),
   801  	)
   802  	return
   803  }
   804  
   805  // SampleRate returns the value of property "BaseAudioContext.sampleRate".
   806  //
   807  // It returns ok=false if there is no such property.
   808  func (this BaseAudioContext) SampleRate() (ret float32, ok bool) {
   809  	ok = js.True == bindings.GetBaseAudioContextSampleRate(
   810  		this.ref, js.Pointer(&ret),
   811  	)
   812  	return
   813  }
   814  
   815  // CurrentTime returns the value of property "BaseAudioContext.currentTime".
   816  //
   817  // It returns ok=false if there is no such property.
   818  func (this BaseAudioContext) CurrentTime() (ret float64, ok bool) {
   819  	ok = js.True == bindings.GetBaseAudioContextCurrentTime(
   820  		this.ref, js.Pointer(&ret),
   821  	)
   822  	return
   823  }
   824  
   825  // Listener returns the value of property "BaseAudioContext.listener".
   826  //
   827  // It returns ok=false if there is no such property.
   828  func (this BaseAudioContext) Listener() (ret AudioListener, ok bool) {
   829  	ok = js.True == bindings.GetBaseAudioContextListener(
   830  		this.ref, js.Pointer(&ret),
   831  	)
   832  	return
   833  }
   834  
   835  // State returns the value of property "BaseAudioContext.state".
   836  //
   837  // It returns ok=false if there is no such property.
   838  func (this BaseAudioContext) State() (ret AudioContextState, ok bool) {
   839  	ok = js.True == bindings.GetBaseAudioContextState(
   840  		this.ref, js.Pointer(&ret),
   841  	)
   842  	return
   843  }
   844  
   845  // AudioWorklet returns the value of property "BaseAudioContext.audioWorklet".
   846  //
   847  // It returns ok=false if there is no such property.
   848  func (this BaseAudioContext) AudioWorklet() (ret AudioWorklet, ok bool) {
   849  	ok = js.True == bindings.GetBaseAudioContextAudioWorklet(
   850  		this.ref, js.Pointer(&ret),
   851  	)
   852  	return
   853  }
   854  
   855  // HasFuncCreateAnalyser returns true if the method "BaseAudioContext.createAnalyser" exists.
   856  func (this BaseAudioContext) HasFuncCreateAnalyser() bool {
   857  	return js.True == bindings.HasFuncBaseAudioContextCreateAnalyser(
   858  		this.ref,
   859  	)
   860  }
   861  
   862  // FuncCreateAnalyser returns the method "BaseAudioContext.createAnalyser".
   863  func (this BaseAudioContext) FuncCreateAnalyser() (fn js.Func[func() AnalyserNode]) {
   864  	bindings.FuncBaseAudioContextCreateAnalyser(
   865  		this.ref, js.Pointer(&fn),
   866  	)
   867  	return
   868  }
   869  
   870  // CreateAnalyser calls the method "BaseAudioContext.createAnalyser".
   871  func (this BaseAudioContext) CreateAnalyser() (ret AnalyserNode) {
   872  	bindings.CallBaseAudioContextCreateAnalyser(
   873  		this.ref, js.Pointer(&ret),
   874  	)
   875  
   876  	return
   877  }
   878  
   879  // TryCreateAnalyser calls the method "BaseAudioContext.createAnalyser"
   880  // in a try/catch block and returns (_, err, ok = false) when it went through
   881  // the catch clause.
   882  func (this BaseAudioContext) TryCreateAnalyser() (ret AnalyserNode, exception js.Any, ok bool) {
   883  	ok = js.True == bindings.TryBaseAudioContextCreateAnalyser(
   884  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   885  	)
   886  
   887  	return
   888  }
   889  
   890  // HasFuncCreateBiquadFilter returns true if the method "BaseAudioContext.createBiquadFilter" exists.
   891  func (this BaseAudioContext) HasFuncCreateBiquadFilter() bool {
   892  	return js.True == bindings.HasFuncBaseAudioContextCreateBiquadFilter(
   893  		this.ref,
   894  	)
   895  }
   896  
   897  // FuncCreateBiquadFilter returns the method "BaseAudioContext.createBiquadFilter".
   898  func (this BaseAudioContext) FuncCreateBiquadFilter() (fn js.Func[func() BiquadFilterNode]) {
   899  	bindings.FuncBaseAudioContextCreateBiquadFilter(
   900  		this.ref, js.Pointer(&fn),
   901  	)
   902  	return
   903  }
   904  
   905  // CreateBiquadFilter calls the method "BaseAudioContext.createBiquadFilter".
   906  func (this BaseAudioContext) CreateBiquadFilter() (ret BiquadFilterNode) {
   907  	bindings.CallBaseAudioContextCreateBiquadFilter(
   908  		this.ref, js.Pointer(&ret),
   909  	)
   910  
   911  	return
   912  }
   913  
   914  // TryCreateBiquadFilter calls the method "BaseAudioContext.createBiquadFilter"
   915  // in a try/catch block and returns (_, err, ok = false) when it went through
   916  // the catch clause.
   917  func (this BaseAudioContext) TryCreateBiquadFilter() (ret BiquadFilterNode, exception js.Any, ok bool) {
   918  	ok = js.True == bindings.TryBaseAudioContextCreateBiquadFilter(
   919  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   920  	)
   921  
   922  	return
   923  }
   924  
   925  // HasFuncCreateBuffer returns true if the method "BaseAudioContext.createBuffer" exists.
   926  func (this BaseAudioContext) HasFuncCreateBuffer() bool {
   927  	return js.True == bindings.HasFuncBaseAudioContextCreateBuffer(
   928  		this.ref,
   929  	)
   930  }
   931  
   932  // FuncCreateBuffer returns the method "BaseAudioContext.createBuffer".
   933  func (this BaseAudioContext) FuncCreateBuffer() (fn js.Func[func(numberOfChannels uint32, length uint32, sampleRate float32) AudioBuffer]) {
   934  	bindings.FuncBaseAudioContextCreateBuffer(
   935  		this.ref, js.Pointer(&fn),
   936  	)
   937  	return
   938  }
   939  
   940  // CreateBuffer calls the method "BaseAudioContext.createBuffer".
   941  func (this BaseAudioContext) CreateBuffer(numberOfChannels uint32, length uint32, sampleRate float32) (ret AudioBuffer) {
   942  	bindings.CallBaseAudioContextCreateBuffer(
   943  		this.ref, js.Pointer(&ret),
   944  		uint32(numberOfChannels),
   945  		uint32(length),
   946  		float32(sampleRate),
   947  	)
   948  
   949  	return
   950  }
   951  
   952  // TryCreateBuffer calls the method "BaseAudioContext.createBuffer"
   953  // in a try/catch block and returns (_, err, ok = false) when it went through
   954  // the catch clause.
   955  func (this BaseAudioContext) TryCreateBuffer(numberOfChannels uint32, length uint32, sampleRate float32) (ret AudioBuffer, exception js.Any, ok bool) {
   956  	ok = js.True == bindings.TryBaseAudioContextCreateBuffer(
   957  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   958  		uint32(numberOfChannels),
   959  		uint32(length),
   960  		float32(sampleRate),
   961  	)
   962  
   963  	return
   964  }
   965  
   966  // HasFuncCreateBufferSource returns true if the method "BaseAudioContext.createBufferSource" exists.
   967  func (this BaseAudioContext) HasFuncCreateBufferSource() bool {
   968  	return js.True == bindings.HasFuncBaseAudioContextCreateBufferSource(
   969  		this.ref,
   970  	)
   971  }
   972  
   973  // FuncCreateBufferSource returns the method "BaseAudioContext.createBufferSource".
   974  func (this BaseAudioContext) FuncCreateBufferSource() (fn js.Func[func() AudioBufferSourceNode]) {
   975  	bindings.FuncBaseAudioContextCreateBufferSource(
   976  		this.ref, js.Pointer(&fn),
   977  	)
   978  	return
   979  }
   980  
   981  // CreateBufferSource calls the method "BaseAudioContext.createBufferSource".
   982  func (this BaseAudioContext) CreateBufferSource() (ret AudioBufferSourceNode) {
   983  	bindings.CallBaseAudioContextCreateBufferSource(
   984  		this.ref, js.Pointer(&ret),
   985  	)
   986  
   987  	return
   988  }
   989  
   990  // TryCreateBufferSource calls the method "BaseAudioContext.createBufferSource"
   991  // in a try/catch block and returns (_, err, ok = false) when it went through
   992  // the catch clause.
   993  func (this BaseAudioContext) TryCreateBufferSource() (ret AudioBufferSourceNode, exception js.Any, ok bool) {
   994  	ok = js.True == bindings.TryBaseAudioContextCreateBufferSource(
   995  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   996  	)
   997  
   998  	return
   999  }
  1000  
  1001  // HasFuncCreateChannelMerger returns true if the method "BaseAudioContext.createChannelMerger" exists.
  1002  func (this BaseAudioContext) HasFuncCreateChannelMerger() bool {
  1003  	return js.True == bindings.HasFuncBaseAudioContextCreateChannelMerger(
  1004  		this.ref,
  1005  	)
  1006  }
  1007  
  1008  // FuncCreateChannelMerger returns the method "BaseAudioContext.createChannelMerger".
  1009  func (this BaseAudioContext) FuncCreateChannelMerger() (fn js.Func[func(numberOfInputs uint32) ChannelMergerNode]) {
  1010  	bindings.FuncBaseAudioContextCreateChannelMerger(
  1011  		this.ref, js.Pointer(&fn),
  1012  	)
  1013  	return
  1014  }
  1015  
  1016  // CreateChannelMerger calls the method "BaseAudioContext.createChannelMerger".
  1017  func (this BaseAudioContext) CreateChannelMerger(numberOfInputs uint32) (ret ChannelMergerNode) {
  1018  	bindings.CallBaseAudioContextCreateChannelMerger(
  1019  		this.ref, js.Pointer(&ret),
  1020  		uint32(numberOfInputs),
  1021  	)
  1022  
  1023  	return
  1024  }
  1025  
  1026  // TryCreateChannelMerger calls the method "BaseAudioContext.createChannelMerger"
  1027  // in a try/catch block and returns (_, err, ok = false) when it went through
  1028  // the catch clause.
  1029  func (this BaseAudioContext) TryCreateChannelMerger(numberOfInputs uint32) (ret ChannelMergerNode, exception js.Any, ok bool) {
  1030  	ok = js.True == bindings.TryBaseAudioContextCreateChannelMerger(
  1031  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1032  		uint32(numberOfInputs),
  1033  	)
  1034  
  1035  	return
  1036  }
  1037  
  1038  // HasFuncCreateChannelMerger1 returns true if the method "BaseAudioContext.createChannelMerger" exists.
  1039  func (this BaseAudioContext) HasFuncCreateChannelMerger1() bool {
  1040  	return js.True == bindings.HasFuncBaseAudioContextCreateChannelMerger1(
  1041  		this.ref,
  1042  	)
  1043  }
  1044  
  1045  // FuncCreateChannelMerger1 returns the method "BaseAudioContext.createChannelMerger".
  1046  func (this BaseAudioContext) FuncCreateChannelMerger1() (fn js.Func[func() ChannelMergerNode]) {
  1047  	bindings.FuncBaseAudioContextCreateChannelMerger1(
  1048  		this.ref, js.Pointer(&fn),
  1049  	)
  1050  	return
  1051  }
  1052  
  1053  // CreateChannelMerger1 calls the method "BaseAudioContext.createChannelMerger".
  1054  func (this BaseAudioContext) CreateChannelMerger1() (ret ChannelMergerNode) {
  1055  	bindings.CallBaseAudioContextCreateChannelMerger1(
  1056  		this.ref, js.Pointer(&ret),
  1057  	)
  1058  
  1059  	return
  1060  }
  1061  
  1062  // TryCreateChannelMerger1 calls the method "BaseAudioContext.createChannelMerger"
  1063  // in a try/catch block and returns (_, err, ok = false) when it went through
  1064  // the catch clause.
  1065  func (this BaseAudioContext) TryCreateChannelMerger1() (ret ChannelMergerNode, exception js.Any, ok bool) {
  1066  	ok = js.True == bindings.TryBaseAudioContextCreateChannelMerger1(
  1067  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1068  	)
  1069  
  1070  	return
  1071  }
  1072  
  1073  // HasFuncCreateChannelSplitter returns true if the method "BaseAudioContext.createChannelSplitter" exists.
  1074  func (this BaseAudioContext) HasFuncCreateChannelSplitter() bool {
  1075  	return js.True == bindings.HasFuncBaseAudioContextCreateChannelSplitter(
  1076  		this.ref,
  1077  	)
  1078  }
  1079  
  1080  // FuncCreateChannelSplitter returns the method "BaseAudioContext.createChannelSplitter".
  1081  func (this BaseAudioContext) FuncCreateChannelSplitter() (fn js.Func[func(numberOfOutputs uint32) ChannelSplitterNode]) {
  1082  	bindings.FuncBaseAudioContextCreateChannelSplitter(
  1083  		this.ref, js.Pointer(&fn),
  1084  	)
  1085  	return
  1086  }
  1087  
  1088  // CreateChannelSplitter calls the method "BaseAudioContext.createChannelSplitter".
  1089  func (this BaseAudioContext) CreateChannelSplitter(numberOfOutputs uint32) (ret ChannelSplitterNode) {
  1090  	bindings.CallBaseAudioContextCreateChannelSplitter(
  1091  		this.ref, js.Pointer(&ret),
  1092  		uint32(numberOfOutputs),
  1093  	)
  1094  
  1095  	return
  1096  }
  1097  
  1098  // TryCreateChannelSplitter calls the method "BaseAudioContext.createChannelSplitter"
  1099  // in a try/catch block and returns (_, err, ok = false) when it went through
  1100  // the catch clause.
  1101  func (this BaseAudioContext) TryCreateChannelSplitter(numberOfOutputs uint32) (ret ChannelSplitterNode, exception js.Any, ok bool) {
  1102  	ok = js.True == bindings.TryBaseAudioContextCreateChannelSplitter(
  1103  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1104  		uint32(numberOfOutputs),
  1105  	)
  1106  
  1107  	return
  1108  }
  1109  
  1110  // HasFuncCreateChannelSplitter1 returns true if the method "BaseAudioContext.createChannelSplitter" exists.
  1111  func (this BaseAudioContext) HasFuncCreateChannelSplitter1() bool {
  1112  	return js.True == bindings.HasFuncBaseAudioContextCreateChannelSplitter1(
  1113  		this.ref,
  1114  	)
  1115  }
  1116  
  1117  // FuncCreateChannelSplitter1 returns the method "BaseAudioContext.createChannelSplitter".
  1118  func (this BaseAudioContext) FuncCreateChannelSplitter1() (fn js.Func[func() ChannelSplitterNode]) {
  1119  	bindings.FuncBaseAudioContextCreateChannelSplitter1(
  1120  		this.ref, js.Pointer(&fn),
  1121  	)
  1122  	return
  1123  }
  1124  
  1125  // CreateChannelSplitter1 calls the method "BaseAudioContext.createChannelSplitter".
  1126  func (this BaseAudioContext) CreateChannelSplitter1() (ret ChannelSplitterNode) {
  1127  	bindings.CallBaseAudioContextCreateChannelSplitter1(
  1128  		this.ref, js.Pointer(&ret),
  1129  	)
  1130  
  1131  	return
  1132  }
  1133  
  1134  // TryCreateChannelSplitter1 calls the method "BaseAudioContext.createChannelSplitter"
  1135  // in a try/catch block and returns (_, err, ok = false) when it went through
  1136  // the catch clause.
  1137  func (this BaseAudioContext) TryCreateChannelSplitter1() (ret ChannelSplitterNode, exception js.Any, ok bool) {
  1138  	ok = js.True == bindings.TryBaseAudioContextCreateChannelSplitter1(
  1139  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1140  	)
  1141  
  1142  	return
  1143  }
  1144  
  1145  // HasFuncCreateConstantSource returns true if the method "BaseAudioContext.createConstantSource" exists.
  1146  func (this BaseAudioContext) HasFuncCreateConstantSource() bool {
  1147  	return js.True == bindings.HasFuncBaseAudioContextCreateConstantSource(
  1148  		this.ref,
  1149  	)
  1150  }
  1151  
  1152  // FuncCreateConstantSource returns the method "BaseAudioContext.createConstantSource".
  1153  func (this BaseAudioContext) FuncCreateConstantSource() (fn js.Func[func() ConstantSourceNode]) {
  1154  	bindings.FuncBaseAudioContextCreateConstantSource(
  1155  		this.ref, js.Pointer(&fn),
  1156  	)
  1157  	return
  1158  }
  1159  
  1160  // CreateConstantSource calls the method "BaseAudioContext.createConstantSource".
  1161  func (this BaseAudioContext) CreateConstantSource() (ret ConstantSourceNode) {
  1162  	bindings.CallBaseAudioContextCreateConstantSource(
  1163  		this.ref, js.Pointer(&ret),
  1164  	)
  1165  
  1166  	return
  1167  }
  1168  
  1169  // TryCreateConstantSource calls the method "BaseAudioContext.createConstantSource"
  1170  // in a try/catch block and returns (_, err, ok = false) when it went through
  1171  // the catch clause.
  1172  func (this BaseAudioContext) TryCreateConstantSource() (ret ConstantSourceNode, exception js.Any, ok bool) {
  1173  	ok = js.True == bindings.TryBaseAudioContextCreateConstantSource(
  1174  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1175  	)
  1176  
  1177  	return
  1178  }
  1179  
  1180  // HasFuncCreateConvolver returns true if the method "BaseAudioContext.createConvolver" exists.
  1181  func (this BaseAudioContext) HasFuncCreateConvolver() bool {
  1182  	return js.True == bindings.HasFuncBaseAudioContextCreateConvolver(
  1183  		this.ref,
  1184  	)
  1185  }
  1186  
  1187  // FuncCreateConvolver returns the method "BaseAudioContext.createConvolver".
  1188  func (this BaseAudioContext) FuncCreateConvolver() (fn js.Func[func() ConvolverNode]) {
  1189  	bindings.FuncBaseAudioContextCreateConvolver(
  1190  		this.ref, js.Pointer(&fn),
  1191  	)
  1192  	return
  1193  }
  1194  
  1195  // CreateConvolver calls the method "BaseAudioContext.createConvolver".
  1196  func (this BaseAudioContext) CreateConvolver() (ret ConvolverNode) {
  1197  	bindings.CallBaseAudioContextCreateConvolver(
  1198  		this.ref, js.Pointer(&ret),
  1199  	)
  1200  
  1201  	return
  1202  }
  1203  
  1204  // TryCreateConvolver calls the method "BaseAudioContext.createConvolver"
  1205  // in a try/catch block and returns (_, err, ok = false) when it went through
  1206  // the catch clause.
  1207  func (this BaseAudioContext) TryCreateConvolver() (ret ConvolverNode, exception js.Any, ok bool) {
  1208  	ok = js.True == bindings.TryBaseAudioContextCreateConvolver(
  1209  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1210  	)
  1211  
  1212  	return
  1213  }
  1214  
  1215  // HasFuncCreateDelay returns true if the method "BaseAudioContext.createDelay" exists.
  1216  func (this BaseAudioContext) HasFuncCreateDelay() bool {
  1217  	return js.True == bindings.HasFuncBaseAudioContextCreateDelay(
  1218  		this.ref,
  1219  	)
  1220  }
  1221  
  1222  // FuncCreateDelay returns the method "BaseAudioContext.createDelay".
  1223  func (this BaseAudioContext) FuncCreateDelay() (fn js.Func[func(maxDelayTime float64) DelayNode]) {
  1224  	bindings.FuncBaseAudioContextCreateDelay(
  1225  		this.ref, js.Pointer(&fn),
  1226  	)
  1227  	return
  1228  }
  1229  
  1230  // CreateDelay calls the method "BaseAudioContext.createDelay".
  1231  func (this BaseAudioContext) CreateDelay(maxDelayTime float64) (ret DelayNode) {
  1232  	bindings.CallBaseAudioContextCreateDelay(
  1233  		this.ref, js.Pointer(&ret),
  1234  		float64(maxDelayTime),
  1235  	)
  1236  
  1237  	return
  1238  }
  1239  
  1240  // TryCreateDelay calls the method "BaseAudioContext.createDelay"
  1241  // in a try/catch block and returns (_, err, ok = false) when it went through
  1242  // the catch clause.
  1243  func (this BaseAudioContext) TryCreateDelay(maxDelayTime float64) (ret DelayNode, exception js.Any, ok bool) {
  1244  	ok = js.True == bindings.TryBaseAudioContextCreateDelay(
  1245  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1246  		float64(maxDelayTime),
  1247  	)
  1248  
  1249  	return
  1250  }
  1251  
  1252  // HasFuncCreateDelay1 returns true if the method "BaseAudioContext.createDelay" exists.
  1253  func (this BaseAudioContext) HasFuncCreateDelay1() bool {
  1254  	return js.True == bindings.HasFuncBaseAudioContextCreateDelay1(
  1255  		this.ref,
  1256  	)
  1257  }
  1258  
  1259  // FuncCreateDelay1 returns the method "BaseAudioContext.createDelay".
  1260  func (this BaseAudioContext) FuncCreateDelay1() (fn js.Func[func() DelayNode]) {
  1261  	bindings.FuncBaseAudioContextCreateDelay1(
  1262  		this.ref, js.Pointer(&fn),
  1263  	)
  1264  	return
  1265  }
  1266  
  1267  // CreateDelay1 calls the method "BaseAudioContext.createDelay".
  1268  func (this BaseAudioContext) CreateDelay1() (ret DelayNode) {
  1269  	bindings.CallBaseAudioContextCreateDelay1(
  1270  		this.ref, js.Pointer(&ret),
  1271  	)
  1272  
  1273  	return
  1274  }
  1275  
  1276  // TryCreateDelay1 calls the method "BaseAudioContext.createDelay"
  1277  // in a try/catch block and returns (_, err, ok = false) when it went through
  1278  // the catch clause.
  1279  func (this BaseAudioContext) TryCreateDelay1() (ret DelayNode, exception js.Any, ok bool) {
  1280  	ok = js.True == bindings.TryBaseAudioContextCreateDelay1(
  1281  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1282  	)
  1283  
  1284  	return
  1285  }
  1286  
  1287  // HasFuncCreateDynamicsCompressor returns true if the method "BaseAudioContext.createDynamicsCompressor" exists.
  1288  func (this BaseAudioContext) HasFuncCreateDynamicsCompressor() bool {
  1289  	return js.True == bindings.HasFuncBaseAudioContextCreateDynamicsCompressor(
  1290  		this.ref,
  1291  	)
  1292  }
  1293  
  1294  // FuncCreateDynamicsCompressor returns the method "BaseAudioContext.createDynamicsCompressor".
  1295  func (this BaseAudioContext) FuncCreateDynamicsCompressor() (fn js.Func[func() DynamicsCompressorNode]) {
  1296  	bindings.FuncBaseAudioContextCreateDynamicsCompressor(
  1297  		this.ref, js.Pointer(&fn),
  1298  	)
  1299  	return
  1300  }
  1301  
  1302  // CreateDynamicsCompressor calls the method "BaseAudioContext.createDynamicsCompressor".
  1303  func (this BaseAudioContext) CreateDynamicsCompressor() (ret DynamicsCompressorNode) {
  1304  	bindings.CallBaseAudioContextCreateDynamicsCompressor(
  1305  		this.ref, js.Pointer(&ret),
  1306  	)
  1307  
  1308  	return
  1309  }
  1310  
  1311  // TryCreateDynamicsCompressor calls the method "BaseAudioContext.createDynamicsCompressor"
  1312  // in a try/catch block and returns (_, err, ok = false) when it went through
  1313  // the catch clause.
  1314  func (this BaseAudioContext) TryCreateDynamicsCompressor() (ret DynamicsCompressorNode, exception js.Any, ok bool) {
  1315  	ok = js.True == bindings.TryBaseAudioContextCreateDynamicsCompressor(
  1316  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1317  	)
  1318  
  1319  	return
  1320  }
  1321  
  1322  // HasFuncCreateGain returns true if the method "BaseAudioContext.createGain" exists.
  1323  func (this BaseAudioContext) HasFuncCreateGain() bool {
  1324  	return js.True == bindings.HasFuncBaseAudioContextCreateGain(
  1325  		this.ref,
  1326  	)
  1327  }
  1328  
  1329  // FuncCreateGain returns the method "BaseAudioContext.createGain".
  1330  func (this BaseAudioContext) FuncCreateGain() (fn js.Func[func() GainNode]) {
  1331  	bindings.FuncBaseAudioContextCreateGain(
  1332  		this.ref, js.Pointer(&fn),
  1333  	)
  1334  	return
  1335  }
  1336  
  1337  // CreateGain calls the method "BaseAudioContext.createGain".
  1338  func (this BaseAudioContext) CreateGain() (ret GainNode) {
  1339  	bindings.CallBaseAudioContextCreateGain(
  1340  		this.ref, js.Pointer(&ret),
  1341  	)
  1342  
  1343  	return
  1344  }
  1345  
  1346  // TryCreateGain calls the method "BaseAudioContext.createGain"
  1347  // in a try/catch block and returns (_, err, ok = false) when it went through
  1348  // the catch clause.
  1349  func (this BaseAudioContext) TryCreateGain() (ret GainNode, exception js.Any, ok bool) {
  1350  	ok = js.True == bindings.TryBaseAudioContextCreateGain(
  1351  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1352  	)
  1353  
  1354  	return
  1355  }
  1356  
  1357  // HasFuncCreateIIRFilter returns true if the method "BaseAudioContext.createIIRFilter" exists.
  1358  func (this BaseAudioContext) HasFuncCreateIIRFilter() bool {
  1359  	return js.True == bindings.HasFuncBaseAudioContextCreateIIRFilter(
  1360  		this.ref,
  1361  	)
  1362  }
  1363  
  1364  // FuncCreateIIRFilter returns the method "BaseAudioContext.createIIRFilter".
  1365  func (this BaseAudioContext) FuncCreateIIRFilter() (fn js.Func[func(feedforward js.Array[float64], feedback js.Array[float64]) IIRFilterNode]) {
  1366  	bindings.FuncBaseAudioContextCreateIIRFilter(
  1367  		this.ref, js.Pointer(&fn),
  1368  	)
  1369  	return
  1370  }
  1371  
  1372  // CreateIIRFilter calls the method "BaseAudioContext.createIIRFilter".
  1373  func (this BaseAudioContext) CreateIIRFilter(feedforward js.Array[float64], feedback js.Array[float64]) (ret IIRFilterNode) {
  1374  	bindings.CallBaseAudioContextCreateIIRFilter(
  1375  		this.ref, js.Pointer(&ret),
  1376  		feedforward.Ref(),
  1377  		feedback.Ref(),
  1378  	)
  1379  
  1380  	return
  1381  }
  1382  
  1383  // TryCreateIIRFilter calls the method "BaseAudioContext.createIIRFilter"
  1384  // in a try/catch block and returns (_, err, ok = false) when it went through
  1385  // the catch clause.
  1386  func (this BaseAudioContext) TryCreateIIRFilter(feedforward js.Array[float64], feedback js.Array[float64]) (ret IIRFilterNode, exception js.Any, ok bool) {
  1387  	ok = js.True == bindings.TryBaseAudioContextCreateIIRFilter(
  1388  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1389  		feedforward.Ref(),
  1390  		feedback.Ref(),
  1391  	)
  1392  
  1393  	return
  1394  }
  1395  
  1396  // HasFuncCreateOscillator returns true if the method "BaseAudioContext.createOscillator" exists.
  1397  func (this BaseAudioContext) HasFuncCreateOscillator() bool {
  1398  	return js.True == bindings.HasFuncBaseAudioContextCreateOscillator(
  1399  		this.ref,
  1400  	)
  1401  }
  1402  
  1403  // FuncCreateOscillator returns the method "BaseAudioContext.createOscillator".
  1404  func (this BaseAudioContext) FuncCreateOscillator() (fn js.Func[func() OscillatorNode]) {
  1405  	bindings.FuncBaseAudioContextCreateOscillator(
  1406  		this.ref, js.Pointer(&fn),
  1407  	)
  1408  	return
  1409  }
  1410  
  1411  // CreateOscillator calls the method "BaseAudioContext.createOscillator".
  1412  func (this BaseAudioContext) CreateOscillator() (ret OscillatorNode) {
  1413  	bindings.CallBaseAudioContextCreateOscillator(
  1414  		this.ref, js.Pointer(&ret),
  1415  	)
  1416  
  1417  	return
  1418  }
  1419  
  1420  // TryCreateOscillator calls the method "BaseAudioContext.createOscillator"
  1421  // in a try/catch block and returns (_, err, ok = false) when it went through
  1422  // the catch clause.
  1423  func (this BaseAudioContext) TryCreateOscillator() (ret OscillatorNode, exception js.Any, ok bool) {
  1424  	ok = js.True == bindings.TryBaseAudioContextCreateOscillator(
  1425  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1426  	)
  1427  
  1428  	return
  1429  }
  1430  
  1431  // HasFuncCreatePanner returns true if the method "BaseAudioContext.createPanner" exists.
  1432  func (this BaseAudioContext) HasFuncCreatePanner() bool {
  1433  	return js.True == bindings.HasFuncBaseAudioContextCreatePanner(
  1434  		this.ref,
  1435  	)
  1436  }
  1437  
  1438  // FuncCreatePanner returns the method "BaseAudioContext.createPanner".
  1439  func (this BaseAudioContext) FuncCreatePanner() (fn js.Func[func() PannerNode]) {
  1440  	bindings.FuncBaseAudioContextCreatePanner(
  1441  		this.ref, js.Pointer(&fn),
  1442  	)
  1443  	return
  1444  }
  1445  
  1446  // CreatePanner calls the method "BaseAudioContext.createPanner".
  1447  func (this BaseAudioContext) CreatePanner() (ret PannerNode) {
  1448  	bindings.CallBaseAudioContextCreatePanner(
  1449  		this.ref, js.Pointer(&ret),
  1450  	)
  1451  
  1452  	return
  1453  }
  1454  
  1455  // TryCreatePanner calls the method "BaseAudioContext.createPanner"
  1456  // in a try/catch block and returns (_, err, ok = false) when it went through
  1457  // the catch clause.
  1458  func (this BaseAudioContext) TryCreatePanner() (ret PannerNode, exception js.Any, ok bool) {
  1459  	ok = js.True == bindings.TryBaseAudioContextCreatePanner(
  1460  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1461  	)
  1462  
  1463  	return
  1464  }
  1465  
  1466  // HasFuncCreatePeriodicWave returns true if the method "BaseAudioContext.createPeriodicWave" exists.
  1467  func (this BaseAudioContext) HasFuncCreatePeriodicWave() bool {
  1468  	return js.True == bindings.HasFuncBaseAudioContextCreatePeriodicWave(
  1469  		this.ref,
  1470  	)
  1471  }
  1472  
  1473  // FuncCreatePeriodicWave returns the method "BaseAudioContext.createPeriodicWave".
  1474  func (this BaseAudioContext) FuncCreatePeriodicWave() (fn js.Func[func(real js.Array[float32], imag js.Array[float32], constraints PeriodicWaveConstraints) PeriodicWave]) {
  1475  	bindings.FuncBaseAudioContextCreatePeriodicWave(
  1476  		this.ref, js.Pointer(&fn),
  1477  	)
  1478  	return
  1479  }
  1480  
  1481  // CreatePeriodicWave calls the method "BaseAudioContext.createPeriodicWave".
  1482  func (this BaseAudioContext) CreatePeriodicWave(real js.Array[float32], imag js.Array[float32], constraints PeriodicWaveConstraints) (ret PeriodicWave) {
  1483  	bindings.CallBaseAudioContextCreatePeriodicWave(
  1484  		this.ref, js.Pointer(&ret),
  1485  		real.Ref(),
  1486  		imag.Ref(),
  1487  		js.Pointer(&constraints),
  1488  	)
  1489  
  1490  	return
  1491  }
  1492  
  1493  // TryCreatePeriodicWave calls the method "BaseAudioContext.createPeriodicWave"
  1494  // in a try/catch block and returns (_, err, ok = false) when it went through
  1495  // the catch clause.
  1496  func (this BaseAudioContext) TryCreatePeriodicWave(real js.Array[float32], imag js.Array[float32], constraints PeriodicWaveConstraints) (ret PeriodicWave, exception js.Any, ok bool) {
  1497  	ok = js.True == bindings.TryBaseAudioContextCreatePeriodicWave(
  1498  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1499  		real.Ref(),
  1500  		imag.Ref(),
  1501  		js.Pointer(&constraints),
  1502  	)
  1503  
  1504  	return
  1505  }
  1506  
  1507  // HasFuncCreatePeriodicWave1 returns true if the method "BaseAudioContext.createPeriodicWave" exists.
  1508  func (this BaseAudioContext) HasFuncCreatePeriodicWave1() bool {
  1509  	return js.True == bindings.HasFuncBaseAudioContextCreatePeriodicWave1(
  1510  		this.ref,
  1511  	)
  1512  }
  1513  
  1514  // FuncCreatePeriodicWave1 returns the method "BaseAudioContext.createPeriodicWave".
  1515  func (this BaseAudioContext) FuncCreatePeriodicWave1() (fn js.Func[func(real js.Array[float32], imag js.Array[float32]) PeriodicWave]) {
  1516  	bindings.FuncBaseAudioContextCreatePeriodicWave1(
  1517  		this.ref, js.Pointer(&fn),
  1518  	)
  1519  	return
  1520  }
  1521  
  1522  // CreatePeriodicWave1 calls the method "BaseAudioContext.createPeriodicWave".
  1523  func (this BaseAudioContext) CreatePeriodicWave1(real js.Array[float32], imag js.Array[float32]) (ret PeriodicWave) {
  1524  	bindings.CallBaseAudioContextCreatePeriodicWave1(
  1525  		this.ref, js.Pointer(&ret),
  1526  		real.Ref(),
  1527  		imag.Ref(),
  1528  	)
  1529  
  1530  	return
  1531  }
  1532  
  1533  // TryCreatePeriodicWave1 calls the method "BaseAudioContext.createPeriodicWave"
  1534  // in a try/catch block and returns (_, err, ok = false) when it went through
  1535  // the catch clause.
  1536  func (this BaseAudioContext) TryCreatePeriodicWave1(real js.Array[float32], imag js.Array[float32]) (ret PeriodicWave, exception js.Any, ok bool) {
  1537  	ok = js.True == bindings.TryBaseAudioContextCreatePeriodicWave1(
  1538  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1539  		real.Ref(),
  1540  		imag.Ref(),
  1541  	)
  1542  
  1543  	return
  1544  }
  1545  
  1546  // HasFuncCreateScriptProcessor returns true if the method "BaseAudioContext.createScriptProcessor" exists.
  1547  func (this BaseAudioContext) HasFuncCreateScriptProcessor() bool {
  1548  	return js.True == bindings.HasFuncBaseAudioContextCreateScriptProcessor(
  1549  		this.ref,
  1550  	)
  1551  }
  1552  
  1553  // FuncCreateScriptProcessor returns the method "BaseAudioContext.createScriptProcessor".
  1554  func (this BaseAudioContext) FuncCreateScriptProcessor() (fn js.Func[func(bufferSize uint32, numberOfInputChannels uint32, numberOfOutputChannels uint32) ScriptProcessorNode]) {
  1555  	bindings.FuncBaseAudioContextCreateScriptProcessor(
  1556  		this.ref, js.Pointer(&fn),
  1557  	)
  1558  	return
  1559  }
  1560  
  1561  // CreateScriptProcessor calls the method "BaseAudioContext.createScriptProcessor".
  1562  func (this BaseAudioContext) CreateScriptProcessor(bufferSize uint32, numberOfInputChannels uint32, numberOfOutputChannels uint32) (ret ScriptProcessorNode) {
  1563  	bindings.CallBaseAudioContextCreateScriptProcessor(
  1564  		this.ref, js.Pointer(&ret),
  1565  		uint32(bufferSize),
  1566  		uint32(numberOfInputChannels),
  1567  		uint32(numberOfOutputChannels),
  1568  	)
  1569  
  1570  	return
  1571  }
  1572  
  1573  // TryCreateScriptProcessor calls the method "BaseAudioContext.createScriptProcessor"
  1574  // in a try/catch block and returns (_, err, ok = false) when it went through
  1575  // the catch clause.
  1576  func (this BaseAudioContext) TryCreateScriptProcessor(bufferSize uint32, numberOfInputChannels uint32, numberOfOutputChannels uint32) (ret ScriptProcessorNode, exception js.Any, ok bool) {
  1577  	ok = js.True == bindings.TryBaseAudioContextCreateScriptProcessor(
  1578  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1579  		uint32(bufferSize),
  1580  		uint32(numberOfInputChannels),
  1581  		uint32(numberOfOutputChannels),
  1582  	)
  1583  
  1584  	return
  1585  }
  1586  
  1587  // HasFuncCreateScriptProcessor1 returns true if the method "BaseAudioContext.createScriptProcessor" exists.
  1588  func (this BaseAudioContext) HasFuncCreateScriptProcessor1() bool {
  1589  	return js.True == bindings.HasFuncBaseAudioContextCreateScriptProcessor1(
  1590  		this.ref,
  1591  	)
  1592  }
  1593  
  1594  // FuncCreateScriptProcessor1 returns the method "BaseAudioContext.createScriptProcessor".
  1595  func (this BaseAudioContext) FuncCreateScriptProcessor1() (fn js.Func[func(bufferSize uint32, numberOfInputChannels uint32) ScriptProcessorNode]) {
  1596  	bindings.FuncBaseAudioContextCreateScriptProcessor1(
  1597  		this.ref, js.Pointer(&fn),
  1598  	)
  1599  	return
  1600  }
  1601  
  1602  // CreateScriptProcessor1 calls the method "BaseAudioContext.createScriptProcessor".
  1603  func (this BaseAudioContext) CreateScriptProcessor1(bufferSize uint32, numberOfInputChannels uint32) (ret ScriptProcessorNode) {
  1604  	bindings.CallBaseAudioContextCreateScriptProcessor1(
  1605  		this.ref, js.Pointer(&ret),
  1606  		uint32(bufferSize),
  1607  		uint32(numberOfInputChannels),
  1608  	)
  1609  
  1610  	return
  1611  }
  1612  
  1613  // TryCreateScriptProcessor1 calls the method "BaseAudioContext.createScriptProcessor"
  1614  // in a try/catch block and returns (_, err, ok = false) when it went through
  1615  // the catch clause.
  1616  func (this BaseAudioContext) TryCreateScriptProcessor1(bufferSize uint32, numberOfInputChannels uint32) (ret ScriptProcessorNode, exception js.Any, ok bool) {
  1617  	ok = js.True == bindings.TryBaseAudioContextCreateScriptProcessor1(
  1618  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1619  		uint32(bufferSize),
  1620  		uint32(numberOfInputChannels),
  1621  	)
  1622  
  1623  	return
  1624  }
  1625  
  1626  // HasFuncCreateScriptProcessor2 returns true if the method "BaseAudioContext.createScriptProcessor" exists.
  1627  func (this BaseAudioContext) HasFuncCreateScriptProcessor2() bool {
  1628  	return js.True == bindings.HasFuncBaseAudioContextCreateScriptProcessor2(
  1629  		this.ref,
  1630  	)
  1631  }
  1632  
  1633  // FuncCreateScriptProcessor2 returns the method "BaseAudioContext.createScriptProcessor".
  1634  func (this BaseAudioContext) FuncCreateScriptProcessor2() (fn js.Func[func(bufferSize uint32) ScriptProcessorNode]) {
  1635  	bindings.FuncBaseAudioContextCreateScriptProcessor2(
  1636  		this.ref, js.Pointer(&fn),
  1637  	)
  1638  	return
  1639  }
  1640  
  1641  // CreateScriptProcessor2 calls the method "BaseAudioContext.createScriptProcessor".
  1642  func (this BaseAudioContext) CreateScriptProcessor2(bufferSize uint32) (ret ScriptProcessorNode) {
  1643  	bindings.CallBaseAudioContextCreateScriptProcessor2(
  1644  		this.ref, js.Pointer(&ret),
  1645  		uint32(bufferSize),
  1646  	)
  1647  
  1648  	return
  1649  }
  1650  
  1651  // TryCreateScriptProcessor2 calls the method "BaseAudioContext.createScriptProcessor"
  1652  // in a try/catch block and returns (_, err, ok = false) when it went through
  1653  // the catch clause.
  1654  func (this BaseAudioContext) TryCreateScriptProcessor2(bufferSize uint32) (ret ScriptProcessorNode, exception js.Any, ok bool) {
  1655  	ok = js.True == bindings.TryBaseAudioContextCreateScriptProcessor2(
  1656  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1657  		uint32(bufferSize),
  1658  	)
  1659  
  1660  	return
  1661  }
  1662  
  1663  // HasFuncCreateScriptProcessor3 returns true if the method "BaseAudioContext.createScriptProcessor" exists.
  1664  func (this BaseAudioContext) HasFuncCreateScriptProcessor3() bool {
  1665  	return js.True == bindings.HasFuncBaseAudioContextCreateScriptProcessor3(
  1666  		this.ref,
  1667  	)
  1668  }
  1669  
  1670  // FuncCreateScriptProcessor3 returns the method "BaseAudioContext.createScriptProcessor".
  1671  func (this BaseAudioContext) FuncCreateScriptProcessor3() (fn js.Func[func() ScriptProcessorNode]) {
  1672  	bindings.FuncBaseAudioContextCreateScriptProcessor3(
  1673  		this.ref, js.Pointer(&fn),
  1674  	)
  1675  	return
  1676  }
  1677  
  1678  // CreateScriptProcessor3 calls the method "BaseAudioContext.createScriptProcessor".
  1679  func (this BaseAudioContext) CreateScriptProcessor3() (ret ScriptProcessorNode) {
  1680  	bindings.CallBaseAudioContextCreateScriptProcessor3(
  1681  		this.ref, js.Pointer(&ret),
  1682  	)
  1683  
  1684  	return
  1685  }
  1686  
  1687  // TryCreateScriptProcessor3 calls the method "BaseAudioContext.createScriptProcessor"
  1688  // in a try/catch block and returns (_, err, ok = false) when it went through
  1689  // the catch clause.
  1690  func (this BaseAudioContext) TryCreateScriptProcessor3() (ret ScriptProcessorNode, exception js.Any, ok bool) {
  1691  	ok = js.True == bindings.TryBaseAudioContextCreateScriptProcessor3(
  1692  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1693  	)
  1694  
  1695  	return
  1696  }
  1697  
  1698  // HasFuncCreateStereoPanner returns true if the method "BaseAudioContext.createStereoPanner" exists.
  1699  func (this BaseAudioContext) HasFuncCreateStereoPanner() bool {
  1700  	return js.True == bindings.HasFuncBaseAudioContextCreateStereoPanner(
  1701  		this.ref,
  1702  	)
  1703  }
  1704  
  1705  // FuncCreateStereoPanner returns the method "BaseAudioContext.createStereoPanner".
  1706  func (this BaseAudioContext) FuncCreateStereoPanner() (fn js.Func[func() StereoPannerNode]) {
  1707  	bindings.FuncBaseAudioContextCreateStereoPanner(
  1708  		this.ref, js.Pointer(&fn),
  1709  	)
  1710  	return
  1711  }
  1712  
  1713  // CreateStereoPanner calls the method "BaseAudioContext.createStereoPanner".
  1714  func (this BaseAudioContext) CreateStereoPanner() (ret StereoPannerNode) {
  1715  	bindings.CallBaseAudioContextCreateStereoPanner(
  1716  		this.ref, js.Pointer(&ret),
  1717  	)
  1718  
  1719  	return
  1720  }
  1721  
  1722  // TryCreateStereoPanner calls the method "BaseAudioContext.createStereoPanner"
  1723  // in a try/catch block and returns (_, err, ok = false) when it went through
  1724  // the catch clause.
  1725  func (this BaseAudioContext) TryCreateStereoPanner() (ret StereoPannerNode, exception js.Any, ok bool) {
  1726  	ok = js.True == bindings.TryBaseAudioContextCreateStereoPanner(
  1727  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1728  	)
  1729  
  1730  	return
  1731  }
  1732  
  1733  // HasFuncCreateWaveShaper returns true if the method "BaseAudioContext.createWaveShaper" exists.
  1734  func (this BaseAudioContext) HasFuncCreateWaveShaper() bool {
  1735  	return js.True == bindings.HasFuncBaseAudioContextCreateWaveShaper(
  1736  		this.ref,
  1737  	)
  1738  }
  1739  
  1740  // FuncCreateWaveShaper returns the method "BaseAudioContext.createWaveShaper".
  1741  func (this BaseAudioContext) FuncCreateWaveShaper() (fn js.Func[func() WaveShaperNode]) {
  1742  	bindings.FuncBaseAudioContextCreateWaveShaper(
  1743  		this.ref, js.Pointer(&fn),
  1744  	)
  1745  	return
  1746  }
  1747  
  1748  // CreateWaveShaper calls the method "BaseAudioContext.createWaveShaper".
  1749  func (this BaseAudioContext) CreateWaveShaper() (ret WaveShaperNode) {
  1750  	bindings.CallBaseAudioContextCreateWaveShaper(
  1751  		this.ref, js.Pointer(&ret),
  1752  	)
  1753  
  1754  	return
  1755  }
  1756  
  1757  // TryCreateWaveShaper calls the method "BaseAudioContext.createWaveShaper"
  1758  // in a try/catch block and returns (_, err, ok = false) when it went through
  1759  // the catch clause.
  1760  func (this BaseAudioContext) TryCreateWaveShaper() (ret WaveShaperNode, exception js.Any, ok bool) {
  1761  	ok = js.True == bindings.TryBaseAudioContextCreateWaveShaper(
  1762  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1763  	)
  1764  
  1765  	return
  1766  }
  1767  
  1768  // HasFuncDecodeAudioData returns true if the method "BaseAudioContext.decodeAudioData" exists.
  1769  func (this BaseAudioContext) HasFuncDecodeAudioData() bool {
  1770  	return js.True == bindings.HasFuncBaseAudioContextDecodeAudioData(
  1771  		this.ref,
  1772  	)
  1773  }
  1774  
  1775  // FuncDecodeAudioData returns the method "BaseAudioContext.decodeAudioData".
  1776  func (this BaseAudioContext) FuncDecodeAudioData() (fn js.Func[func(audioData js.ArrayBuffer, successCallback js.Func[func(decodedData AudioBuffer)], errorCallback js.Func[func(err DOMException)]) js.Promise[AudioBuffer]]) {
  1777  	bindings.FuncBaseAudioContextDecodeAudioData(
  1778  		this.ref, js.Pointer(&fn),
  1779  	)
  1780  	return
  1781  }
  1782  
  1783  // DecodeAudioData calls the method "BaseAudioContext.decodeAudioData".
  1784  func (this BaseAudioContext) DecodeAudioData(audioData js.ArrayBuffer, successCallback js.Func[func(decodedData AudioBuffer)], errorCallback js.Func[func(err DOMException)]) (ret js.Promise[AudioBuffer]) {
  1785  	bindings.CallBaseAudioContextDecodeAudioData(
  1786  		this.ref, js.Pointer(&ret),
  1787  		audioData.Ref(),
  1788  		successCallback.Ref(),
  1789  		errorCallback.Ref(),
  1790  	)
  1791  
  1792  	return
  1793  }
  1794  
  1795  // TryDecodeAudioData calls the method "BaseAudioContext.decodeAudioData"
  1796  // in a try/catch block and returns (_, err, ok = false) when it went through
  1797  // the catch clause.
  1798  func (this BaseAudioContext) TryDecodeAudioData(audioData js.ArrayBuffer, successCallback js.Func[func(decodedData AudioBuffer)], errorCallback js.Func[func(err DOMException)]) (ret js.Promise[AudioBuffer], exception js.Any, ok bool) {
  1799  	ok = js.True == bindings.TryBaseAudioContextDecodeAudioData(
  1800  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1801  		audioData.Ref(),
  1802  		successCallback.Ref(),
  1803  		errorCallback.Ref(),
  1804  	)
  1805  
  1806  	return
  1807  }
  1808  
  1809  // HasFuncDecodeAudioData1 returns true if the method "BaseAudioContext.decodeAudioData" exists.
  1810  func (this BaseAudioContext) HasFuncDecodeAudioData1() bool {
  1811  	return js.True == bindings.HasFuncBaseAudioContextDecodeAudioData1(
  1812  		this.ref,
  1813  	)
  1814  }
  1815  
  1816  // FuncDecodeAudioData1 returns the method "BaseAudioContext.decodeAudioData".
  1817  func (this BaseAudioContext) FuncDecodeAudioData1() (fn js.Func[func(audioData js.ArrayBuffer, successCallback js.Func[func(decodedData AudioBuffer)]) js.Promise[AudioBuffer]]) {
  1818  	bindings.FuncBaseAudioContextDecodeAudioData1(
  1819  		this.ref, js.Pointer(&fn),
  1820  	)
  1821  	return
  1822  }
  1823  
  1824  // DecodeAudioData1 calls the method "BaseAudioContext.decodeAudioData".
  1825  func (this BaseAudioContext) DecodeAudioData1(audioData js.ArrayBuffer, successCallback js.Func[func(decodedData AudioBuffer)]) (ret js.Promise[AudioBuffer]) {
  1826  	bindings.CallBaseAudioContextDecodeAudioData1(
  1827  		this.ref, js.Pointer(&ret),
  1828  		audioData.Ref(),
  1829  		successCallback.Ref(),
  1830  	)
  1831  
  1832  	return
  1833  }
  1834  
  1835  // TryDecodeAudioData1 calls the method "BaseAudioContext.decodeAudioData"
  1836  // in a try/catch block and returns (_, err, ok = false) when it went through
  1837  // the catch clause.
  1838  func (this BaseAudioContext) TryDecodeAudioData1(audioData js.ArrayBuffer, successCallback js.Func[func(decodedData AudioBuffer)]) (ret js.Promise[AudioBuffer], exception js.Any, ok bool) {
  1839  	ok = js.True == bindings.TryBaseAudioContextDecodeAudioData1(
  1840  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1841  		audioData.Ref(),
  1842  		successCallback.Ref(),
  1843  	)
  1844  
  1845  	return
  1846  }
  1847  
  1848  // HasFuncDecodeAudioData2 returns true if the method "BaseAudioContext.decodeAudioData" exists.
  1849  func (this BaseAudioContext) HasFuncDecodeAudioData2() bool {
  1850  	return js.True == bindings.HasFuncBaseAudioContextDecodeAudioData2(
  1851  		this.ref,
  1852  	)
  1853  }
  1854  
  1855  // FuncDecodeAudioData2 returns the method "BaseAudioContext.decodeAudioData".
  1856  func (this BaseAudioContext) FuncDecodeAudioData2() (fn js.Func[func(audioData js.ArrayBuffer) js.Promise[AudioBuffer]]) {
  1857  	bindings.FuncBaseAudioContextDecodeAudioData2(
  1858  		this.ref, js.Pointer(&fn),
  1859  	)
  1860  	return
  1861  }
  1862  
  1863  // DecodeAudioData2 calls the method "BaseAudioContext.decodeAudioData".
  1864  func (this BaseAudioContext) DecodeAudioData2(audioData js.ArrayBuffer) (ret js.Promise[AudioBuffer]) {
  1865  	bindings.CallBaseAudioContextDecodeAudioData2(
  1866  		this.ref, js.Pointer(&ret),
  1867  		audioData.Ref(),
  1868  	)
  1869  
  1870  	return
  1871  }
  1872  
  1873  // TryDecodeAudioData2 calls the method "BaseAudioContext.decodeAudioData"
  1874  // in a try/catch block and returns (_, err, ok = false) when it went through
  1875  // the catch clause.
  1876  func (this BaseAudioContext) TryDecodeAudioData2(audioData js.ArrayBuffer) (ret js.Promise[AudioBuffer], exception js.Any, ok bool) {
  1877  	ok = js.True == bindings.TryBaseAudioContextDecodeAudioData2(
  1878  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1879  		audioData.Ref(),
  1880  	)
  1881  
  1882  	return
  1883  }
  1884  
  1885  type AnalyserOptions struct {
  1886  	// FftSize is "AnalyserOptions.fftSize"
  1887  	//
  1888  	// Optional, defaults to 2048.
  1889  	//
  1890  	// NOTE: FFI_USE_FftSize MUST be set to true to make this field effective.
  1891  	FftSize uint32
  1892  	// MaxDecibels is "AnalyserOptions.maxDecibels"
  1893  	//
  1894  	// Optional, defaults to -30.
  1895  	//
  1896  	// NOTE: FFI_USE_MaxDecibels MUST be set to true to make this field effective.
  1897  	MaxDecibels float64
  1898  	// MinDecibels is "AnalyserOptions.minDecibels"
  1899  	//
  1900  	// Optional, defaults to -100.
  1901  	//
  1902  	// NOTE: FFI_USE_MinDecibels MUST be set to true to make this field effective.
  1903  	MinDecibels float64
  1904  	// SmoothingTimeConstant is "AnalyserOptions.smoothingTimeConstant"
  1905  	//
  1906  	// Optional, defaults to 0.8.
  1907  	//
  1908  	// NOTE: FFI_USE_SmoothingTimeConstant MUST be set to true to make this field effective.
  1909  	SmoothingTimeConstant float64
  1910  	// ChannelCount is "AnalyserOptions.channelCount"
  1911  	//
  1912  	// Optional
  1913  	//
  1914  	// NOTE: FFI_USE_ChannelCount MUST be set to true to make this field effective.
  1915  	ChannelCount uint32
  1916  	// ChannelCountMode is "AnalyserOptions.channelCountMode"
  1917  	//
  1918  	// Optional
  1919  	ChannelCountMode ChannelCountMode
  1920  	// ChannelInterpretation is "AnalyserOptions.channelInterpretation"
  1921  	//
  1922  	// Optional
  1923  	ChannelInterpretation ChannelInterpretation
  1924  
  1925  	FFI_USE_FftSize               bool // for FftSize.
  1926  	FFI_USE_MaxDecibels           bool // for MaxDecibels.
  1927  	FFI_USE_MinDecibels           bool // for MinDecibels.
  1928  	FFI_USE_SmoothingTimeConstant bool // for SmoothingTimeConstant.
  1929  	FFI_USE_ChannelCount          bool // for ChannelCount.
  1930  
  1931  	FFI_USE bool
  1932  }
  1933  
  1934  // FromRef calls UpdateFrom and returns a AnalyserOptions with all fields set.
  1935  func (p AnalyserOptions) FromRef(ref js.Ref) AnalyserOptions {
  1936  	p.UpdateFrom(ref)
  1937  	return p
  1938  }
  1939  
  1940  // New creates a new AnalyserOptions in the application heap.
  1941  func (p AnalyserOptions) New() js.Ref {
  1942  	return bindings.AnalyserOptionsJSLoad(
  1943  		js.Pointer(&p), js.True, 0,
  1944  	)
  1945  }
  1946  
  1947  // UpdateFrom copies value of all fields of the heap object to p.
  1948  func (p *AnalyserOptions) UpdateFrom(ref js.Ref) {
  1949  	bindings.AnalyserOptionsJSStore(
  1950  		js.Pointer(p), ref,
  1951  	)
  1952  }
  1953  
  1954  // Update writes all fields of the p to the heap object referenced by ref.
  1955  func (p *AnalyserOptions) Update(ref js.Ref) {
  1956  	bindings.AnalyserOptionsJSLoad(
  1957  		js.Pointer(p), js.False, ref,
  1958  	)
  1959  }
  1960  
  1961  // FreeMembers frees fields with heap reference, if recursive is true
  1962  // free all heap references reachable from p.
  1963  func (p *AnalyserOptions) FreeMembers(recursive bool) {
  1964  }
  1965  
  1966  func NewAnalyserNode(context BaseAudioContext, options AnalyserOptions) (ret AnalyserNode) {
  1967  	ret.ref = bindings.NewAnalyserNodeByAnalyserNode(
  1968  		context.Ref(),
  1969  		js.Pointer(&options))
  1970  	return
  1971  }
  1972  
  1973  func NewAnalyserNodeByAnalyserNode1(context BaseAudioContext) (ret AnalyserNode) {
  1974  	ret.ref = bindings.NewAnalyserNodeByAnalyserNode1(
  1975  		context.Ref())
  1976  	return
  1977  }
  1978  
  1979  type AnalyserNode struct {
  1980  	AudioNode
  1981  }
  1982  
  1983  func (this AnalyserNode) Once() AnalyserNode {
  1984  	this.ref.Once()
  1985  	return this
  1986  }
  1987  
  1988  func (this AnalyserNode) Ref() js.Ref {
  1989  	return this.AudioNode.Ref()
  1990  }
  1991  
  1992  func (this AnalyserNode) FromRef(ref js.Ref) AnalyserNode {
  1993  	this.AudioNode = this.AudioNode.FromRef(ref)
  1994  	return this
  1995  }
  1996  
  1997  func (this AnalyserNode) Free() {
  1998  	this.ref.Free()
  1999  }
  2000  
  2001  // FftSize returns the value of property "AnalyserNode.fftSize".
  2002  //
  2003  // It returns ok=false if there is no such property.
  2004  func (this AnalyserNode) FftSize() (ret uint32, ok bool) {
  2005  	ok = js.True == bindings.GetAnalyserNodeFftSize(
  2006  		this.ref, js.Pointer(&ret),
  2007  	)
  2008  	return
  2009  }
  2010  
  2011  // SetFftSize sets the value of property "AnalyserNode.fftSize" to val.
  2012  //
  2013  // It returns false if the property cannot be set.
  2014  func (this AnalyserNode) SetFftSize(val uint32) bool {
  2015  	return js.True == bindings.SetAnalyserNodeFftSize(
  2016  		this.ref,
  2017  		uint32(val),
  2018  	)
  2019  }
  2020  
  2021  // FrequencyBinCount returns the value of property "AnalyserNode.frequencyBinCount".
  2022  //
  2023  // It returns ok=false if there is no such property.
  2024  func (this AnalyserNode) FrequencyBinCount() (ret uint32, ok bool) {
  2025  	ok = js.True == bindings.GetAnalyserNodeFrequencyBinCount(
  2026  		this.ref, js.Pointer(&ret),
  2027  	)
  2028  	return
  2029  }
  2030  
  2031  // MinDecibels returns the value of property "AnalyserNode.minDecibels".
  2032  //
  2033  // It returns ok=false if there is no such property.
  2034  func (this AnalyserNode) MinDecibels() (ret float64, ok bool) {
  2035  	ok = js.True == bindings.GetAnalyserNodeMinDecibels(
  2036  		this.ref, js.Pointer(&ret),
  2037  	)
  2038  	return
  2039  }
  2040  
  2041  // SetMinDecibels sets the value of property "AnalyserNode.minDecibels" to val.
  2042  //
  2043  // It returns false if the property cannot be set.
  2044  func (this AnalyserNode) SetMinDecibels(val float64) bool {
  2045  	return js.True == bindings.SetAnalyserNodeMinDecibels(
  2046  		this.ref,
  2047  		float64(val),
  2048  	)
  2049  }
  2050  
  2051  // MaxDecibels returns the value of property "AnalyserNode.maxDecibels".
  2052  //
  2053  // It returns ok=false if there is no such property.
  2054  func (this AnalyserNode) MaxDecibels() (ret float64, ok bool) {
  2055  	ok = js.True == bindings.GetAnalyserNodeMaxDecibels(
  2056  		this.ref, js.Pointer(&ret),
  2057  	)
  2058  	return
  2059  }
  2060  
  2061  // SetMaxDecibels sets the value of property "AnalyserNode.maxDecibels" to val.
  2062  //
  2063  // It returns false if the property cannot be set.
  2064  func (this AnalyserNode) SetMaxDecibels(val float64) bool {
  2065  	return js.True == bindings.SetAnalyserNodeMaxDecibels(
  2066  		this.ref,
  2067  		float64(val),
  2068  	)
  2069  }
  2070  
  2071  // SmoothingTimeConstant returns the value of property "AnalyserNode.smoothingTimeConstant".
  2072  //
  2073  // It returns ok=false if there is no such property.
  2074  func (this AnalyserNode) SmoothingTimeConstant() (ret float64, ok bool) {
  2075  	ok = js.True == bindings.GetAnalyserNodeSmoothingTimeConstant(
  2076  		this.ref, js.Pointer(&ret),
  2077  	)
  2078  	return
  2079  }
  2080  
  2081  // SetSmoothingTimeConstant sets the value of property "AnalyserNode.smoothingTimeConstant" to val.
  2082  //
  2083  // It returns false if the property cannot be set.
  2084  func (this AnalyserNode) SetSmoothingTimeConstant(val float64) bool {
  2085  	return js.True == bindings.SetAnalyserNodeSmoothingTimeConstant(
  2086  		this.ref,
  2087  		float64(val),
  2088  	)
  2089  }
  2090  
  2091  // HasFuncGetFloatFrequencyData returns true if the method "AnalyserNode.getFloatFrequencyData" exists.
  2092  func (this AnalyserNode) HasFuncGetFloatFrequencyData() bool {
  2093  	return js.True == bindings.HasFuncAnalyserNodeGetFloatFrequencyData(
  2094  		this.ref,
  2095  	)
  2096  }
  2097  
  2098  // FuncGetFloatFrequencyData returns the method "AnalyserNode.getFloatFrequencyData".
  2099  func (this AnalyserNode) FuncGetFloatFrequencyData() (fn js.Func[func(array js.TypedArray[float32])]) {
  2100  	bindings.FuncAnalyserNodeGetFloatFrequencyData(
  2101  		this.ref, js.Pointer(&fn),
  2102  	)
  2103  	return
  2104  }
  2105  
  2106  // GetFloatFrequencyData calls the method "AnalyserNode.getFloatFrequencyData".
  2107  func (this AnalyserNode) GetFloatFrequencyData(array js.TypedArray[float32]) (ret js.Void) {
  2108  	bindings.CallAnalyserNodeGetFloatFrequencyData(
  2109  		this.ref, js.Pointer(&ret),
  2110  		array.Ref(),
  2111  	)
  2112  
  2113  	return
  2114  }
  2115  
  2116  // TryGetFloatFrequencyData calls the method "AnalyserNode.getFloatFrequencyData"
  2117  // in a try/catch block and returns (_, err, ok = false) when it went through
  2118  // the catch clause.
  2119  func (this AnalyserNode) TryGetFloatFrequencyData(array js.TypedArray[float32]) (ret js.Void, exception js.Any, ok bool) {
  2120  	ok = js.True == bindings.TryAnalyserNodeGetFloatFrequencyData(
  2121  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2122  		array.Ref(),
  2123  	)
  2124  
  2125  	return
  2126  }
  2127  
  2128  // HasFuncGetByteFrequencyData returns true if the method "AnalyserNode.getByteFrequencyData" exists.
  2129  func (this AnalyserNode) HasFuncGetByteFrequencyData() bool {
  2130  	return js.True == bindings.HasFuncAnalyserNodeGetByteFrequencyData(
  2131  		this.ref,
  2132  	)
  2133  }
  2134  
  2135  // FuncGetByteFrequencyData returns the method "AnalyserNode.getByteFrequencyData".
  2136  func (this AnalyserNode) FuncGetByteFrequencyData() (fn js.Func[func(array js.TypedArray[uint8])]) {
  2137  	bindings.FuncAnalyserNodeGetByteFrequencyData(
  2138  		this.ref, js.Pointer(&fn),
  2139  	)
  2140  	return
  2141  }
  2142  
  2143  // GetByteFrequencyData calls the method "AnalyserNode.getByteFrequencyData".
  2144  func (this AnalyserNode) GetByteFrequencyData(array js.TypedArray[uint8]) (ret js.Void) {
  2145  	bindings.CallAnalyserNodeGetByteFrequencyData(
  2146  		this.ref, js.Pointer(&ret),
  2147  		array.Ref(),
  2148  	)
  2149  
  2150  	return
  2151  }
  2152  
  2153  // TryGetByteFrequencyData calls the method "AnalyserNode.getByteFrequencyData"
  2154  // in a try/catch block and returns (_, err, ok = false) when it went through
  2155  // the catch clause.
  2156  func (this AnalyserNode) TryGetByteFrequencyData(array js.TypedArray[uint8]) (ret js.Void, exception js.Any, ok bool) {
  2157  	ok = js.True == bindings.TryAnalyserNodeGetByteFrequencyData(
  2158  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2159  		array.Ref(),
  2160  	)
  2161  
  2162  	return
  2163  }
  2164  
  2165  // HasFuncGetFloatTimeDomainData returns true if the method "AnalyserNode.getFloatTimeDomainData" exists.
  2166  func (this AnalyserNode) HasFuncGetFloatTimeDomainData() bool {
  2167  	return js.True == bindings.HasFuncAnalyserNodeGetFloatTimeDomainData(
  2168  		this.ref,
  2169  	)
  2170  }
  2171  
  2172  // FuncGetFloatTimeDomainData returns the method "AnalyserNode.getFloatTimeDomainData".
  2173  func (this AnalyserNode) FuncGetFloatTimeDomainData() (fn js.Func[func(array js.TypedArray[float32])]) {
  2174  	bindings.FuncAnalyserNodeGetFloatTimeDomainData(
  2175  		this.ref, js.Pointer(&fn),
  2176  	)
  2177  	return
  2178  }
  2179  
  2180  // GetFloatTimeDomainData calls the method "AnalyserNode.getFloatTimeDomainData".
  2181  func (this AnalyserNode) GetFloatTimeDomainData(array js.TypedArray[float32]) (ret js.Void) {
  2182  	bindings.CallAnalyserNodeGetFloatTimeDomainData(
  2183  		this.ref, js.Pointer(&ret),
  2184  		array.Ref(),
  2185  	)
  2186  
  2187  	return
  2188  }
  2189  
  2190  // TryGetFloatTimeDomainData calls the method "AnalyserNode.getFloatTimeDomainData"
  2191  // in a try/catch block and returns (_, err, ok = false) when it went through
  2192  // the catch clause.
  2193  func (this AnalyserNode) TryGetFloatTimeDomainData(array js.TypedArray[float32]) (ret js.Void, exception js.Any, ok bool) {
  2194  	ok = js.True == bindings.TryAnalyserNodeGetFloatTimeDomainData(
  2195  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2196  		array.Ref(),
  2197  	)
  2198  
  2199  	return
  2200  }
  2201  
  2202  // HasFuncGetByteTimeDomainData returns true if the method "AnalyserNode.getByteTimeDomainData" exists.
  2203  func (this AnalyserNode) HasFuncGetByteTimeDomainData() bool {
  2204  	return js.True == bindings.HasFuncAnalyserNodeGetByteTimeDomainData(
  2205  		this.ref,
  2206  	)
  2207  }
  2208  
  2209  // FuncGetByteTimeDomainData returns the method "AnalyserNode.getByteTimeDomainData".
  2210  func (this AnalyserNode) FuncGetByteTimeDomainData() (fn js.Func[func(array js.TypedArray[uint8])]) {
  2211  	bindings.FuncAnalyserNodeGetByteTimeDomainData(
  2212  		this.ref, js.Pointer(&fn),
  2213  	)
  2214  	return
  2215  }
  2216  
  2217  // GetByteTimeDomainData calls the method "AnalyserNode.getByteTimeDomainData".
  2218  func (this AnalyserNode) GetByteTimeDomainData(array js.TypedArray[uint8]) (ret js.Void) {
  2219  	bindings.CallAnalyserNodeGetByteTimeDomainData(
  2220  		this.ref, js.Pointer(&ret),
  2221  		array.Ref(),
  2222  	)
  2223  
  2224  	return
  2225  }
  2226  
  2227  // TryGetByteTimeDomainData calls the method "AnalyserNode.getByteTimeDomainData"
  2228  // in a try/catch block and returns (_, err, ok = false) when it went through
  2229  // the catch clause.
  2230  func (this AnalyserNode) TryGetByteTimeDomainData(array js.TypedArray[uint8]) (ret js.Void, exception js.Any, ok bool) {
  2231  	ok = js.True == bindings.TryAnalyserNodeGetByteTimeDomainData(
  2232  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2233  		array.Ref(),
  2234  	)
  2235  
  2236  	return
  2237  }
  2238  
  2239  type AnimationEventInit struct {
  2240  	// AnimationName is "AnimationEventInit.animationName"
  2241  	//
  2242  	// Optional, defaults to "".
  2243  	AnimationName js.String
  2244  	// ElapsedTime is "AnimationEventInit.elapsedTime"
  2245  	//
  2246  	// Optional, defaults to 0.0.
  2247  	//
  2248  	// NOTE: FFI_USE_ElapsedTime MUST be set to true to make this field effective.
  2249  	ElapsedTime float64
  2250  	// PseudoElement is "AnimationEventInit.pseudoElement"
  2251  	//
  2252  	// Optional, defaults to "".
  2253  	PseudoElement js.String
  2254  	// Bubbles is "AnimationEventInit.bubbles"
  2255  	//
  2256  	// Optional, defaults to false.
  2257  	//
  2258  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  2259  	Bubbles bool
  2260  	// Cancelable is "AnimationEventInit.cancelable"
  2261  	//
  2262  	// Optional, defaults to false.
  2263  	//
  2264  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  2265  	Cancelable bool
  2266  	// Composed is "AnimationEventInit.composed"
  2267  	//
  2268  	// Optional, defaults to false.
  2269  	//
  2270  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  2271  	Composed bool
  2272  
  2273  	FFI_USE_ElapsedTime bool // for ElapsedTime.
  2274  	FFI_USE_Bubbles     bool // for Bubbles.
  2275  	FFI_USE_Cancelable  bool // for Cancelable.
  2276  	FFI_USE_Composed    bool // for Composed.
  2277  
  2278  	FFI_USE bool
  2279  }
  2280  
  2281  // FromRef calls UpdateFrom and returns a AnimationEventInit with all fields set.
  2282  func (p AnimationEventInit) FromRef(ref js.Ref) AnimationEventInit {
  2283  	p.UpdateFrom(ref)
  2284  	return p
  2285  }
  2286  
  2287  // New creates a new AnimationEventInit in the application heap.
  2288  func (p AnimationEventInit) New() js.Ref {
  2289  	return bindings.AnimationEventInitJSLoad(
  2290  		js.Pointer(&p), js.True, 0,
  2291  	)
  2292  }
  2293  
  2294  // UpdateFrom copies value of all fields of the heap object to p.
  2295  func (p *AnimationEventInit) UpdateFrom(ref js.Ref) {
  2296  	bindings.AnimationEventInitJSStore(
  2297  		js.Pointer(p), ref,
  2298  	)
  2299  }
  2300  
  2301  // Update writes all fields of the p to the heap object referenced by ref.
  2302  func (p *AnimationEventInit) Update(ref js.Ref) {
  2303  	bindings.AnimationEventInitJSLoad(
  2304  		js.Pointer(p), js.False, ref,
  2305  	)
  2306  }
  2307  
  2308  // FreeMembers frees fields with heap reference, if recursive is true
  2309  // free all heap references reachable from p.
  2310  func (p *AnimationEventInit) FreeMembers(recursive bool) {
  2311  	js.Free(
  2312  		p.AnimationName.Ref(),
  2313  		p.PseudoElement.Ref(),
  2314  	)
  2315  	p.AnimationName = p.AnimationName.FromRef(js.Undefined)
  2316  	p.PseudoElement = p.PseudoElement.FromRef(js.Undefined)
  2317  }
  2318  
  2319  func NewAnimationEvent(typ js.String, animationEventInitDict AnimationEventInit) (ret AnimationEvent) {
  2320  	ret.ref = bindings.NewAnimationEventByAnimationEvent(
  2321  		typ.Ref(),
  2322  		js.Pointer(&animationEventInitDict))
  2323  	return
  2324  }
  2325  
  2326  func NewAnimationEventByAnimationEvent1(typ js.String) (ret AnimationEvent) {
  2327  	ret.ref = bindings.NewAnimationEventByAnimationEvent1(
  2328  		typ.Ref())
  2329  	return
  2330  }
  2331  
  2332  type AnimationEvent struct {
  2333  	Event
  2334  }
  2335  
  2336  func (this AnimationEvent) Once() AnimationEvent {
  2337  	this.ref.Once()
  2338  	return this
  2339  }
  2340  
  2341  func (this AnimationEvent) Ref() js.Ref {
  2342  	return this.Event.Ref()
  2343  }
  2344  
  2345  func (this AnimationEvent) FromRef(ref js.Ref) AnimationEvent {
  2346  	this.Event = this.Event.FromRef(ref)
  2347  	return this
  2348  }
  2349  
  2350  func (this AnimationEvent) Free() {
  2351  	this.ref.Free()
  2352  }
  2353  
  2354  // AnimationName returns the value of property "AnimationEvent.animationName".
  2355  //
  2356  // It returns ok=false if there is no such property.
  2357  func (this AnimationEvent) AnimationName() (ret js.String, ok bool) {
  2358  	ok = js.True == bindings.GetAnimationEventAnimationName(
  2359  		this.ref, js.Pointer(&ret),
  2360  	)
  2361  	return
  2362  }
  2363  
  2364  // ElapsedTime returns the value of property "AnimationEvent.elapsedTime".
  2365  //
  2366  // It returns ok=false if there is no such property.
  2367  func (this AnimationEvent) ElapsedTime() (ret float64, ok bool) {
  2368  	ok = js.True == bindings.GetAnimationEventElapsedTime(
  2369  		this.ref, js.Pointer(&ret),
  2370  	)
  2371  	return
  2372  }
  2373  
  2374  // PseudoElement returns the value of property "AnimationEvent.pseudoElement".
  2375  //
  2376  // It returns ok=false if there is no such property.
  2377  func (this AnimationEvent) PseudoElement() (ret js.String, ok bool) {
  2378  	ok = js.True == bindings.GetAnimationEventPseudoElement(
  2379  		this.ref, js.Pointer(&ret),
  2380  	)
  2381  	return
  2382  }
  2383  
  2384  type AnimationPlaybackEventInit struct {
  2385  	// CurrentTime is "AnimationPlaybackEventInit.currentTime"
  2386  	//
  2387  	// Optional, defaults to null.
  2388  	CurrentTime CSSNumberish
  2389  	// TimelineTime is "AnimationPlaybackEventInit.timelineTime"
  2390  	//
  2391  	// Optional, defaults to null.
  2392  	TimelineTime CSSNumberish
  2393  	// Bubbles is "AnimationPlaybackEventInit.bubbles"
  2394  	//
  2395  	// Optional, defaults to false.
  2396  	//
  2397  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  2398  	Bubbles bool
  2399  	// Cancelable is "AnimationPlaybackEventInit.cancelable"
  2400  	//
  2401  	// Optional, defaults to false.
  2402  	//
  2403  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  2404  	Cancelable bool
  2405  	// Composed is "AnimationPlaybackEventInit.composed"
  2406  	//
  2407  	// Optional, defaults to false.
  2408  	//
  2409  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  2410  	Composed bool
  2411  
  2412  	FFI_USE_Bubbles    bool // for Bubbles.
  2413  	FFI_USE_Cancelable bool // for Cancelable.
  2414  	FFI_USE_Composed   bool // for Composed.
  2415  
  2416  	FFI_USE bool
  2417  }
  2418  
  2419  // FromRef calls UpdateFrom and returns a AnimationPlaybackEventInit with all fields set.
  2420  func (p AnimationPlaybackEventInit) FromRef(ref js.Ref) AnimationPlaybackEventInit {
  2421  	p.UpdateFrom(ref)
  2422  	return p
  2423  }
  2424  
  2425  // New creates a new AnimationPlaybackEventInit in the application heap.
  2426  func (p AnimationPlaybackEventInit) New() js.Ref {
  2427  	return bindings.AnimationPlaybackEventInitJSLoad(
  2428  		js.Pointer(&p), js.True, 0,
  2429  	)
  2430  }
  2431  
  2432  // UpdateFrom copies value of all fields of the heap object to p.
  2433  func (p *AnimationPlaybackEventInit) UpdateFrom(ref js.Ref) {
  2434  	bindings.AnimationPlaybackEventInitJSStore(
  2435  		js.Pointer(p), ref,
  2436  	)
  2437  }
  2438  
  2439  // Update writes all fields of the p to the heap object referenced by ref.
  2440  func (p *AnimationPlaybackEventInit) Update(ref js.Ref) {
  2441  	bindings.AnimationPlaybackEventInitJSLoad(
  2442  		js.Pointer(p), js.False, ref,
  2443  	)
  2444  }
  2445  
  2446  // FreeMembers frees fields with heap reference, if recursive is true
  2447  // free all heap references reachable from p.
  2448  func (p *AnimationPlaybackEventInit) FreeMembers(recursive bool) {
  2449  	js.Free(
  2450  		p.CurrentTime.Ref(),
  2451  		p.TimelineTime.Ref(),
  2452  	)
  2453  	p.CurrentTime = p.CurrentTime.FromRef(js.Undefined)
  2454  	p.TimelineTime = p.TimelineTime.FromRef(js.Undefined)
  2455  }
  2456  
  2457  func NewAnimationPlaybackEvent(typ js.String, eventInitDict AnimationPlaybackEventInit) (ret AnimationPlaybackEvent) {
  2458  	ret.ref = bindings.NewAnimationPlaybackEventByAnimationPlaybackEvent(
  2459  		typ.Ref(),
  2460  		js.Pointer(&eventInitDict))
  2461  	return
  2462  }
  2463  
  2464  func NewAnimationPlaybackEventByAnimationPlaybackEvent1(typ js.String) (ret AnimationPlaybackEvent) {
  2465  	ret.ref = bindings.NewAnimationPlaybackEventByAnimationPlaybackEvent1(
  2466  		typ.Ref())
  2467  	return
  2468  }
  2469  
  2470  type AnimationPlaybackEvent struct {
  2471  	Event
  2472  }
  2473  
  2474  func (this AnimationPlaybackEvent) Once() AnimationPlaybackEvent {
  2475  	this.ref.Once()
  2476  	return this
  2477  }
  2478  
  2479  func (this AnimationPlaybackEvent) Ref() js.Ref {
  2480  	return this.Event.Ref()
  2481  }
  2482  
  2483  func (this AnimationPlaybackEvent) FromRef(ref js.Ref) AnimationPlaybackEvent {
  2484  	this.Event = this.Event.FromRef(ref)
  2485  	return this
  2486  }
  2487  
  2488  func (this AnimationPlaybackEvent) Free() {
  2489  	this.ref.Free()
  2490  }
  2491  
  2492  // CurrentTime returns the value of property "AnimationPlaybackEvent.currentTime".
  2493  //
  2494  // It returns ok=false if there is no such property.
  2495  func (this AnimationPlaybackEvent) CurrentTime() (ret CSSNumberish, ok bool) {
  2496  	ok = js.True == bindings.GetAnimationPlaybackEventCurrentTime(
  2497  		this.ref, js.Pointer(&ret),
  2498  	)
  2499  	return
  2500  }
  2501  
  2502  // TimelineTime returns the value of property "AnimationPlaybackEvent.timelineTime".
  2503  //
  2504  // It returns ok=false if there is no such property.
  2505  func (this AnimationPlaybackEvent) TimelineTime() (ret CSSNumberish, ok bool) {
  2506  	ok = js.True == bindings.GetAnimationPlaybackEventTimelineTime(
  2507  		this.ref, js.Pointer(&ret),
  2508  	)
  2509  	return
  2510  }
  2511  
  2512  type AnimatorInstanceConstructorFunc func(this js.Ref, options js.Any, state js.Any) js.Ref
  2513  
  2514  func (fn AnimatorInstanceConstructorFunc) Register() js.Func[func(options js.Any, state js.Any) js.Any] {
  2515  	return js.RegisterCallback[func(options js.Any, state js.Any) js.Any](
  2516  		fn, abi.FuncPCABIInternal(fn),
  2517  	)
  2518  }
  2519  
  2520  func (fn AnimatorInstanceConstructorFunc) DispatchCallback(
  2521  	targetPC uintptr, ctx *js.CallbackContext,
  2522  ) {
  2523  	args := ctx.Args()
  2524  	if len(args) != 2+1 /* js this */ ||
  2525  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  2526  		js.ThrowInvalidCallbackInvocation()
  2527  	}
  2528  
  2529  	if ctx.Return(fn(
  2530  		args[0],
  2531  
  2532  		js.Any{}.FromRef(args[0+1]),
  2533  		js.Any{}.FromRef(args[1+1]),
  2534  	)) {
  2535  		return
  2536  	}
  2537  
  2538  	js.ThrowCallbackValueNotReturned()
  2539  }
  2540  
  2541  type AnimatorInstanceConstructor[T any] struct {
  2542  	Fn  func(arg T, this js.Ref, options js.Any, state js.Any) js.Ref
  2543  	Arg T
  2544  }
  2545  
  2546  func (cb *AnimatorInstanceConstructor[T]) Register() js.Func[func(options js.Any, state js.Any) js.Any] {
  2547  	return js.RegisterCallback[func(options js.Any, state js.Any) js.Any](
  2548  		cb, abi.FuncPCABIInternal(cb.Fn),
  2549  	)
  2550  }
  2551  
  2552  func (cb *AnimatorInstanceConstructor[T]) DispatchCallback(
  2553  	targetPC uintptr, ctx *js.CallbackContext,
  2554  ) {
  2555  	args := ctx.Args()
  2556  	if len(args) != 2+1 /* js this */ ||
  2557  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2558  		js.ThrowInvalidCallbackInvocation()
  2559  	}
  2560  
  2561  	if ctx.Return(cb.Fn(
  2562  		cb.Arg,
  2563  		args[0],
  2564  
  2565  		js.Any{}.FromRef(args[0+1]),
  2566  		js.Any{}.FromRef(args[1+1]),
  2567  	)) {
  2568  		return
  2569  	}
  2570  
  2571  	js.ThrowCallbackValueNotReturned()
  2572  }
  2573  
  2574  type AnimationWorkletGlobalScope struct {
  2575  	WorkletGlobalScope
  2576  }
  2577  
  2578  func (this AnimationWorkletGlobalScope) Once() AnimationWorkletGlobalScope {
  2579  	this.ref.Once()
  2580  	return this
  2581  }
  2582  
  2583  func (this AnimationWorkletGlobalScope) Ref() js.Ref {
  2584  	return this.WorkletGlobalScope.Ref()
  2585  }
  2586  
  2587  func (this AnimationWorkletGlobalScope) FromRef(ref js.Ref) AnimationWorkletGlobalScope {
  2588  	this.WorkletGlobalScope = this.WorkletGlobalScope.FromRef(ref)
  2589  	return this
  2590  }
  2591  
  2592  func (this AnimationWorkletGlobalScope) Free() {
  2593  	this.ref.Free()
  2594  }
  2595  
  2596  // HasFuncRegisterAnimator returns true if the method "AnimationWorkletGlobalScope.registerAnimator" exists.
  2597  func (this AnimationWorkletGlobalScope) HasFuncRegisterAnimator() bool {
  2598  	return js.True == bindings.HasFuncAnimationWorkletGlobalScopeRegisterAnimator(
  2599  		this.ref,
  2600  	)
  2601  }
  2602  
  2603  // FuncRegisterAnimator returns the method "AnimationWorkletGlobalScope.registerAnimator".
  2604  func (this AnimationWorkletGlobalScope) FuncRegisterAnimator() (fn js.Func[func(name js.String, animatorCtor js.Func[func(options js.Any, state js.Any) js.Any])]) {
  2605  	bindings.FuncAnimationWorkletGlobalScopeRegisterAnimator(
  2606  		this.ref, js.Pointer(&fn),
  2607  	)
  2608  	return
  2609  }
  2610  
  2611  // RegisterAnimator calls the method "AnimationWorkletGlobalScope.registerAnimator".
  2612  func (this AnimationWorkletGlobalScope) RegisterAnimator(name js.String, animatorCtor js.Func[func(options js.Any, state js.Any) js.Any]) (ret js.Void) {
  2613  	bindings.CallAnimationWorkletGlobalScopeRegisterAnimator(
  2614  		this.ref, js.Pointer(&ret),
  2615  		name.Ref(),
  2616  		animatorCtor.Ref(),
  2617  	)
  2618  
  2619  	return
  2620  }
  2621  
  2622  // TryRegisterAnimator calls the method "AnimationWorkletGlobalScope.registerAnimator"
  2623  // in a try/catch block and returns (_, err, ok = false) when it went through
  2624  // the catch clause.
  2625  func (this AnimationWorkletGlobalScope) TryRegisterAnimator(name js.String, animatorCtor js.Func[func(options js.Any, state js.Any) js.Any]) (ret js.Void, exception js.Any, ok bool) {
  2626  	ok = js.True == bindings.TryAnimationWorkletGlobalScopeRegisterAnimator(
  2627  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2628  		name.Ref(),
  2629  		animatorCtor.Ref(),
  2630  	)
  2631  
  2632  	return
  2633  }
  2634  
  2635  type AppBannerPromptOutcome uint32
  2636  
  2637  const (
  2638  	_ AppBannerPromptOutcome = iota
  2639  
  2640  	AppBannerPromptOutcome_ACCEPTED
  2641  	AppBannerPromptOutcome_DISMISSED
  2642  )
  2643  
  2644  func (AppBannerPromptOutcome) FromRef(str js.Ref) AppBannerPromptOutcome {
  2645  	return AppBannerPromptOutcome(bindings.ConstOfAppBannerPromptOutcome(str))
  2646  }
  2647  
  2648  func (x AppBannerPromptOutcome) String() (string, bool) {
  2649  	switch x {
  2650  	case AppBannerPromptOutcome_ACCEPTED:
  2651  		return "accepted", true
  2652  	case AppBannerPromptOutcome_DISMISSED:
  2653  		return "dismissed", true
  2654  	default:
  2655  		return "", false
  2656  	}
  2657  }
  2658  
  2659  type AppendMode uint32
  2660  
  2661  const (
  2662  	_ AppendMode = iota
  2663  
  2664  	AppendMode_SEGMENTS
  2665  	AppendMode_SEQUENCE
  2666  )
  2667  
  2668  func (AppendMode) FromRef(str js.Ref) AppendMode {
  2669  	return AppendMode(bindings.ConstOfAppendMode(str))
  2670  }
  2671  
  2672  func (x AppendMode) String() (string, bool) {
  2673  	switch x {
  2674  	case AppendMode_SEGMENTS:
  2675  		return "segments", true
  2676  	case AppendMode_SEQUENCE:
  2677  		return "sequence", true
  2678  	default:
  2679  		return "", false
  2680  	}
  2681  }
  2682  
  2683  type OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView struct {
  2684  	ref js.Ref
  2685  }
  2686  
  2687  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) Ref() js.Ref {
  2688  	return x.ref
  2689  }
  2690  
  2691  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) Free() {
  2692  	x.ref.Free()
  2693  }
  2694  
  2695  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) FromRef(ref js.Ref) OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView {
  2696  	return OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView{
  2697  		ref: ref,
  2698  	}
  2699  }
  2700  
  2701  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayInt8() js.TypedArray[int8] {
  2702  	return js.TypedArray[int8]{}.FromRef(x.ref)
  2703  }
  2704  
  2705  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayInt16() js.TypedArray[int16] {
  2706  	return js.TypedArray[int16]{}.FromRef(x.ref)
  2707  }
  2708  
  2709  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayInt32() js.TypedArray[int32] {
  2710  	return js.TypedArray[int32]{}.FromRef(x.ref)
  2711  }
  2712  
  2713  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayUint8() js.TypedArray[uint8] {
  2714  	return js.TypedArray[uint8]{}.FromRef(x.ref)
  2715  }
  2716  
  2717  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayUint16() js.TypedArray[uint16] {
  2718  	return js.TypedArray[uint16]{}.FromRef(x.ref)
  2719  }
  2720  
  2721  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayUint32() js.TypedArray[uint32] {
  2722  	return js.TypedArray[uint32]{}.FromRef(x.ref)
  2723  }
  2724  
  2725  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayInt64() js.TypedArray[int64] {
  2726  	return js.TypedArray[int64]{}.FromRef(x.ref)
  2727  }
  2728  
  2729  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayUint64() js.TypedArray[uint64] {
  2730  	return js.TypedArray[uint64]{}.FromRef(x.ref)
  2731  }
  2732  
  2733  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayFloat32() js.TypedArray[float32] {
  2734  	return js.TypedArray[float32]{}.FromRef(x.ref)
  2735  }
  2736  
  2737  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) TypedArrayFloat64() js.TypedArray[float64] {
  2738  	return js.TypedArray[float64]{}.FromRef(x.ref)
  2739  }
  2740  
  2741  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView) DataView() js.DataView {
  2742  	return js.DataView{}.FromRef(x.ref)
  2743  }
  2744  
  2745  type ArrayBufferView = OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView
  2746  
  2747  type AttestationConveyancePreference uint32
  2748  
  2749  const (
  2750  	_ AttestationConveyancePreference = iota
  2751  
  2752  	AttestationConveyancePreference_NONE
  2753  	AttestationConveyancePreference_INDIRECT
  2754  	AttestationConveyancePreference_DIRECT
  2755  	AttestationConveyancePreference_ENTERPRISE
  2756  )
  2757  
  2758  func (AttestationConveyancePreference) FromRef(str js.Ref) AttestationConveyancePreference {
  2759  	return AttestationConveyancePreference(bindings.ConstOfAttestationConveyancePreference(str))
  2760  }
  2761  
  2762  func (x AttestationConveyancePreference) String() (string, bool) {
  2763  	switch x {
  2764  	case AttestationConveyancePreference_NONE:
  2765  		return "none", true
  2766  	case AttestationConveyancePreference_INDIRECT:
  2767  		return "indirect", true
  2768  	case AttestationConveyancePreference_DIRECT:
  2769  		return "direct", true
  2770  	case AttestationConveyancePreference_ENTERPRISE:
  2771  		return "enterprise", true
  2772  	default:
  2773  		return "", false
  2774  	}
  2775  }
  2776  
  2777  type AttributionReportingRequestOptions struct {
  2778  	// EventSourceEligible is "AttributionReportingRequestOptions.eventSourceEligible"
  2779  	//
  2780  	// Required
  2781  	EventSourceEligible bool
  2782  	// TriggerEligible is "AttributionReportingRequestOptions.triggerEligible"
  2783  	//
  2784  	// Required
  2785  	TriggerEligible bool
  2786  
  2787  	FFI_USE bool
  2788  }
  2789  
  2790  // FromRef calls UpdateFrom and returns a AttributionReportingRequestOptions with all fields set.
  2791  func (p AttributionReportingRequestOptions) FromRef(ref js.Ref) AttributionReportingRequestOptions {
  2792  	p.UpdateFrom(ref)
  2793  	return p
  2794  }
  2795  
  2796  // New creates a new AttributionReportingRequestOptions in the application heap.
  2797  func (p AttributionReportingRequestOptions) New() js.Ref {
  2798  	return bindings.AttributionReportingRequestOptionsJSLoad(
  2799  		js.Pointer(&p), js.True, 0,
  2800  	)
  2801  }
  2802  
  2803  // UpdateFrom copies value of all fields of the heap object to p.
  2804  func (p *AttributionReportingRequestOptions) UpdateFrom(ref js.Ref) {
  2805  	bindings.AttributionReportingRequestOptionsJSStore(
  2806  		js.Pointer(p), ref,
  2807  	)
  2808  }
  2809  
  2810  // Update writes all fields of the p to the heap object referenced by ref.
  2811  func (p *AttributionReportingRequestOptions) Update(ref js.Ref) {
  2812  	bindings.AttributionReportingRequestOptionsJSLoad(
  2813  		js.Pointer(p), js.False, ref,
  2814  	)
  2815  }
  2816  
  2817  // FreeMembers frees fields with heap reference, if recursive is true
  2818  // free all heap references reachable from p.
  2819  func (p *AttributionReportingRequestOptions) FreeMembers(recursive bool) {
  2820  }
  2821  
  2822  type AuctionAd struct {
  2823  	// RenderURL is "AuctionAd.renderURL"
  2824  	//
  2825  	// Required
  2826  	RenderURL js.String
  2827  	// Metadata is "AuctionAd.metadata"
  2828  	//
  2829  	// Optional
  2830  	Metadata js.Any
  2831  	// BuyerReportingId is "AuctionAd.buyerReportingId"
  2832  	//
  2833  	// Optional
  2834  	BuyerReportingId js.String
  2835  	// BuyerAndSellerReportingId is "AuctionAd.buyerAndSellerReportingId"
  2836  	//
  2837  	// Optional
  2838  	BuyerAndSellerReportingId js.String
  2839  
  2840  	FFI_USE bool
  2841  }
  2842  
  2843  // FromRef calls UpdateFrom and returns a AuctionAd with all fields set.
  2844  func (p AuctionAd) FromRef(ref js.Ref) AuctionAd {
  2845  	p.UpdateFrom(ref)
  2846  	return p
  2847  }
  2848  
  2849  // New creates a new AuctionAd in the application heap.
  2850  func (p AuctionAd) New() js.Ref {
  2851  	return bindings.AuctionAdJSLoad(
  2852  		js.Pointer(&p), js.True, 0,
  2853  	)
  2854  }
  2855  
  2856  // UpdateFrom copies value of all fields of the heap object to p.
  2857  func (p *AuctionAd) UpdateFrom(ref js.Ref) {
  2858  	bindings.AuctionAdJSStore(
  2859  		js.Pointer(p), ref,
  2860  	)
  2861  }
  2862  
  2863  // Update writes all fields of the p to the heap object referenced by ref.
  2864  func (p *AuctionAd) Update(ref js.Ref) {
  2865  	bindings.AuctionAdJSLoad(
  2866  		js.Pointer(p), js.False, ref,
  2867  	)
  2868  }
  2869  
  2870  // FreeMembers frees fields with heap reference, if recursive is true
  2871  // free all heap references reachable from p.
  2872  func (p *AuctionAd) FreeMembers(recursive bool) {
  2873  	js.Free(
  2874  		p.RenderURL.Ref(),
  2875  		p.Metadata.Ref(),
  2876  		p.BuyerReportingId.Ref(),
  2877  		p.BuyerAndSellerReportingId.Ref(),
  2878  	)
  2879  	p.RenderURL = p.RenderURL.FromRef(js.Undefined)
  2880  	p.Metadata = p.Metadata.FromRef(js.Undefined)
  2881  	p.BuyerReportingId = p.BuyerReportingId.FromRef(js.Undefined)
  2882  	p.BuyerAndSellerReportingId = p.BuyerAndSellerReportingId.FromRef(js.Undefined)
  2883  }
  2884  
  2885  type AuctionAdConfig struct {
  2886  	// Seller is "AuctionAdConfig.seller"
  2887  	//
  2888  	// Required
  2889  	Seller js.String
  2890  	// DecisionLogicURL is "AuctionAdConfig.decisionLogicURL"
  2891  	//
  2892  	// Required
  2893  	DecisionLogicURL js.String
  2894  	// TrustedScoringSignalsURL is "AuctionAdConfig.trustedScoringSignalsURL"
  2895  	//
  2896  	// Optional
  2897  	TrustedScoringSignalsURL js.String
  2898  	// InterestGroupBuyers is "AuctionAdConfig.interestGroupBuyers"
  2899  	//
  2900  	// Optional
  2901  	InterestGroupBuyers js.Array[js.String]
  2902  	// AuctionSignals is "AuctionAdConfig.auctionSignals"
  2903  	//
  2904  	// Optional
  2905  	AuctionSignals js.Promise[js.Any]
  2906  	// SellerSignals is "AuctionAdConfig.sellerSignals"
  2907  	//
  2908  	// Optional
  2909  	SellerSignals js.Promise[js.Any]
  2910  	// DirectFromSellerSignals is "AuctionAdConfig.directFromSellerSignals"
  2911  	//
  2912  	// Optional
  2913  	DirectFromSellerSignals js.Promise[js.String]
  2914  	// SellerTimeout is "AuctionAdConfig.sellerTimeout"
  2915  	//
  2916  	// Optional
  2917  	//
  2918  	// NOTE: FFI_USE_SellerTimeout MUST be set to true to make this field effective.
  2919  	SellerTimeout uint64
  2920  	// SellerExperimentGroupId is "AuctionAdConfig.sellerExperimentGroupId"
  2921  	//
  2922  	// Optional
  2923  	//
  2924  	// NOTE: FFI_USE_SellerExperimentGroupId MUST be set to true to make this field effective.
  2925  	SellerExperimentGroupId uint16
  2926  	// SellerCurrency is "AuctionAdConfig.sellerCurrency"
  2927  	//
  2928  	// Optional
  2929  	SellerCurrency js.String
  2930  	// PerBuyerSignals is "AuctionAdConfig.perBuyerSignals"
  2931  	//
  2932  	// Optional
  2933  	PerBuyerSignals js.Promise[js.Record[js.Any]]
  2934  	// PerBuyerTimeouts is "AuctionAdConfig.perBuyerTimeouts"
  2935  	//
  2936  	// Optional
  2937  	PerBuyerTimeouts js.Promise[js.Record[uint64]]
  2938  	// PerBuyerGroupLimits is "AuctionAdConfig.perBuyerGroupLimits"
  2939  	//
  2940  	// Optional
  2941  	PerBuyerGroupLimits js.Record[uint16]
  2942  	// PerBuyerExperimentGroupIds is "AuctionAdConfig.perBuyerExperimentGroupIds"
  2943  	//
  2944  	// Optional
  2945  	PerBuyerExperimentGroupIds js.Record[uint16]
  2946  	// PerBuyerPrioritySignals is "AuctionAdConfig.perBuyerPrioritySignals"
  2947  	//
  2948  	// Optional
  2949  	PerBuyerPrioritySignals js.Record[js.Record[float64]]
  2950  	// PerBuyerCurrencies is "AuctionAdConfig.perBuyerCurrencies"
  2951  	//
  2952  	// Optional
  2953  	PerBuyerCurrencies js.Promise[js.Record[js.String]]
  2954  	// ComponentAuctions is "AuctionAdConfig.componentAuctions"
  2955  	//
  2956  	// Optional, defaults to [].
  2957  	ComponentAuctions js.Array[AuctionAdConfig]
  2958  	// Signal is "AuctionAdConfig.signal"
  2959  	//
  2960  	// Optional
  2961  	Signal AbortSignal
  2962  	// ResolveToConfig is "AuctionAdConfig.resolveToConfig"
  2963  	//
  2964  	// Optional
  2965  	ResolveToConfig js.Promise[js.Boolean]
  2966  
  2967  	FFI_USE_SellerTimeout           bool // for SellerTimeout.
  2968  	FFI_USE_SellerExperimentGroupId bool // for SellerExperimentGroupId.
  2969  
  2970  	FFI_USE bool
  2971  }
  2972  
  2973  // FromRef calls UpdateFrom and returns a AuctionAdConfig with all fields set.
  2974  func (p AuctionAdConfig) FromRef(ref js.Ref) AuctionAdConfig {
  2975  	p.UpdateFrom(ref)
  2976  	return p
  2977  }
  2978  
  2979  // New creates a new AuctionAdConfig in the application heap.
  2980  func (p AuctionAdConfig) New() js.Ref {
  2981  	return bindings.AuctionAdConfigJSLoad(
  2982  		js.Pointer(&p), js.True, 0,
  2983  	)
  2984  }
  2985  
  2986  // UpdateFrom copies value of all fields of the heap object to p.
  2987  func (p *AuctionAdConfig) UpdateFrom(ref js.Ref) {
  2988  	bindings.AuctionAdConfigJSStore(
  2989  		js.Pointer(p), ref,
  2990  	)
  2991  }
  2992  
  2993  // Update writes all fields of the p to the heap object referenced by ref.
  2994  func (p *AuctionAdConfig) Update(ref js.Ref) {
  2995  	bindings.AuctionAdConfigJSLoad(
  2996  		js.Pointer(p), js.False, ref,
  2997  	)
  2998  }
  2999  
  3000  // FreeMembers frees fields with heap reference, if recursive is true
  3001  // free all heap references reachable from p.
  3002  func (p *AuctionAdConfig) FreeMembers(recursive bool) {
  3003  	js.Free(
  3004  		p.Seller.Ref(),
  3005  		p.DecisionLogicURL.Ref(),
  3006  		p.TrustedScoringSignalsURL.Ref(),
  3007  		p.InterestGroupBuyers.Ref(),
  3008  		p.AuctionSignals.Ref(),
  3009  		p.SellerSignals.Ref(),
  3010  		p.DirectFromSellerSignals.Ref(),
  3011  		p.SellerCurrency.Ref(),
  3012  		p.PerBuyerSignals.Ref(),
  3013  		p.PerBuyerTimeouts.Ref(),
  3014  		p.PerBuyerGroupLimits.Ref(),
  3015  		p.PerBuyerExperimentGroupIds.Ref(),
  3016  		p.PerBuyerPrioritySignals.Ref(),
  3017  		p.PerBuyerCurrencies.Ref(),
  3018  		p.ComponentAuctions.Ref(),
  3019  		p.Signal.Ref(),
  3020  		p.ResolveToConfig.Ref(),
  3021  	)
  3022  	p.Seller = p.Seller.FromRef(js.Undefined)
  3023  	p.DecisionLogicURL = p.DecisionLogicURL.FromRef(js.Undefined)
  3024  	p.TrustedScoringSignalsURL = p.TrustedScoringSignalsURL.FromRef(js.Undefined)
  3025  	p.InterestGroupBuyers = p.InterestGroupBuyers.FromRef(js.Undefined)
  3026  	p.AuctionSignals = p.AuctionSignals.FromRef(js.Undefined)
  3027  	p.SellerSignals = p.SellerSignals.FromRef(js.Undefined)
  3028  	p.DirectFromSellerSignals = p.DirectFromSellerSignals.FromRef(js.Undefined)
  3029  	p.SellerCurrency = p.SellerCurrency.FromRef(js.Undefined)
  3030  	p.PerBuyerSignals = p.PerBuyerSignals.FromRef(js.Undefined)
  3031  	p.PerBuyerTimeouts = p.PerBuyerTimeouts.FromRef(js.Undefined)
  3032  	p.PerBuyerGroupLimits = p.PerBuyerGroupLimits.FromRef(js.Undefined)
  3033  	p.PerBuyerExperimentGroupIds = p.PerBuyerExperimentGroupIds.FromRef(js.Undefined)
  3034  	p.PerBuyerPrioritySignals = p.PerBuyerPrioritySignals.FromRef(js.Undefined)
  3035  	p.PerBuyerCurrencies = p.PerBuyerCurrencies.FromRef(js.Undefined)
  3036  	p.ComponentAuctions = p.ComponentAuctions.FromRef(js.Undefined)
  3037  	p.Signal = p.Signal.FromRef(js.Undefined)
  3038  	p.ResolveToConfig = p.ResolveToConfig.FromRef(js.Undefined)
  3039  }
  3040  
  3041  type AuctionAdInterestGroup struct {
  3042  	// Priority is "AuctionAdInterestGroup.priority"
  3043  	//
  3044  	// Optional, defaults to 0.0.
  3045  	//
  3046  	// NOTE: FFI_USE_Priority MUST be set to true to make this field effective.
  3047  	Priority float64
  3048  	// PrioritySignalsOverrides is "AuctionAdInterestGroup.prioritySignalsOverrides"
  3049  	//
  3050  	// Optional
  3051  	PrioritySignalsOverrides js.Record[float64]
  3052  	// Owner is "AuctionAdInterestGroup.owner"
  3053  	//
  3054  	// Required
  3055  	Owner js.String
  3056  	// Name is "AuctionAdInterestGroup.name"
  3057  	//
  3058  	// Required
  3059  	Name js.String
  3060  	// LifetimeMs is "AuctionAdInterestGroup.lifetimeMs"
  3061  	//
  3062  	// Required
  3063  	LifetimeMs float64
  3064  	// EnableBiddingSignalsPrioritization is "AuctionAdInterestGroup.enableBiddingSignalsPrioritization"
  3065  	//
  3066  	// Optional, defaults to false.
  3067  	//
  3068  	// NOTE: FFI_USE_EnableBiddingSignalsPrioritization MUST be set to true to make this field effective.
  3069  	EnableBiddingSignalsPrioritization bool
  3070  	// PriorityVector is "AuctionAdInterestGroup.priorityVector"
  3071  	//
  3072  	// Optional
  3073  	PriorityVector js.Record[float64]
  3074  	// ExecutionMode is "AuctionAdInterestGroup.executionMode"
  3075  	//
  3076  	// Optional, defaults to "compatibility".
  3077  	ExecutionMode js.String
  3078  	// BiddingLogicURL is "AuctionAdInterestGroup.biddingLogicURL"
  3079  	//
  3080  	// Optional
  3081  	BiddingLogicURL js.String
  3082  	// BiddingWasmHelperURL is "AuctionAdInterestGroup.biddingWasmHelperURL"
  3083  	//
  3084  	// Optional
  3085  	BiddingWasmHelperURL js.String
  3086  	// UpdateURL is "AuctionAdInterestGroup.updateURL"
  3087  	//
  3088  	// Optional
  3089  	UpdateURL js.String
  3090  	// TrustedBiddingSignalsURL is "AuctionAdInterestGroup.trustedBiddingSignalsURL"
  3091  	//
  3092  	// Optional
  3093  	TrustedBiddingSignalsURL js.String
  3094  	// TrustedBiddingSignalsKeys is "AuctionAdInterestGroup.trustedBiddingSignalsKeys"
  3095  	//
  3096  	// Optional
  3097  	TrustedBiddingSignalsKeys js.Array[js.String]
  3098  	// UserBiddingSignals is "AuctionAdInterestGroup.userBiddingSignals"
  3099  	//
  3100  	// Optional
  3101  	UserBiddingSignals js.Any
  3102  	// Ads is "AuctionAdInterestGroup.ads"
  3103  	//
  3104  	// Optional
  3105  	Ads js.Array[AuctionAd]
  3106  	// AdComponents is "AuctionAdInterestGroup.adComponents"
  3107  	//
  3108  	// Optional
  3109  	AdComponents js.Array[AuctionAd]
  3110  
  3111  	FFI_USE_Priority                           bool // for Priority.
  3112  	FFI_USE_EnableBiddingSignalsPrioritization bool // for EnableBiddingSignalsPrioritization.
  3113  
  3114  	FFI_USE bool
  3115  }
  3116  
  3117  // FromRef calls UpdateFrom and returns a AuctionAdInterestGroup with all fields set.
  3118  func (p AuctionAdInterestGroup) FromRef(ref js.Ref) AuctionAdInterestGroup {
  3119  	p.UpdateFrom(ref)
  3120  	return p
  3121  }
  3122  
  3123  // New creates a new AuctionAdInterestGroup in the application heap.
  3124  func (p AuctionAdInterestGroup) New() js.Ref {
  3125  	return bindings.AuctionAdInterestGroupJSLoad(
  3126  		js.Pointer(&p), js.True, 0,
  3127  	)
  3128  }
  3129  
  3130  // UpdateFrom copies value of all fields of the heap object to p.
  3131  func (p *AuctionAdInterestGroup) UpdateFrom(ref js.Ref) {
  3132  	bindings.AuctionAdInterestGroupJSStore(
  3133  		js.Pointer(p), ref,
  3134  	)
  3135  }
  3136  
  3137  // Update writes all fields of the p to the heap object referenced by ref.
  3138  func (p *AuctionAdInterestGroup) Update(ref js.Ref) {
  3139  	bindings.AuctionAdInterestGroupJSLoad(
  3140  		js.Pointer(p), js.False, ref,
  3141  	)
  3142  }
  3143  
  3144  // FreeMembers frees fields with heap reference, if recursive is true
  3145  // free all heap references reachable from p.
  3146  func (p *AuctionAdInterestGroup) FreeMembers(recursive bool) {
  3147  	js.Free(
  3148  		p.PrioritySignalsOverrides.Ref(),
  3149  		p.Owner.Ref(),
  3150  		p.Name.Ref(),
  3151  		p.PriorityVector.Ref(),
  3152  		p.ExecutionMode.Ref(),
  3153  		p.BiddingLogicURL.Ref(),
  3154  		p.BiddingWasmHelperURL.Ref(),
  3155  		p.UpdateURL.Ref(),
  3156  		p.TrustedBiddingSignalsURL.Ref(),
  3157  		p.TrustedBiddingSignalsKeys.Ref(),
  3158  		p.UserBiddingSignals.Ref(),
  3159  		p.Ads.Ref(),
  3160  		p.AdComponents.Ref(),
  3161  	)
  3162  	p.PrioritySignalsOverrides = p.PrioritySignalsOverrides.FromRef(js.Undefined)
  3163  	p.Owner = p.Owner.FromRef(js.Undefined)
  3164  	p.Name = p.Name.FromRef(js.Undefined)
  3165  	p.PriorityVector = p.PriorityVector.FromRef(js.Undefined)
  3166  	p.ExecutionMode = p.ExecutionMode.FromRef(js.Undefined)
  3167  	p.BiddingLogicURL = p.BiddingLogicURL.FromRef(js.Undefined)
  3168  	p.BiddingWasmHelperURL = p.BiddingWasmHelperURL.FromRef(js.Undefined)
  3169  	p.UpdateURL = p.UpdateURL.FromRef(js.Undefined)
  3170  	p.TrustedBiddingSignalsURL = p.TrustedBiddingSignalsURL.FromRef(js.Undefined)
  3171  	p.TrustedBiddingSignalsKeys = p.TrustedBiddingSignalsKeys.FromRef(js.Undefined)
  3172  	p.UserBiddingSignals = p.UserBiddingSignals.FromRef(js.Undefined)
  3173  	p.Ads = p.Ads.FromRef(js.Undefined)
  3174  	p.AdComponents = p.AdComponents.FromRef(js.Undefined)
  3175  }
  3176  
  3177  type AuctionAdInterestGroupKey struct {
  3178  	// Owner is "AuctionAdInterestGroupKey.owner"
  3179  	//
  3180  	// Required
  3181  	Owner js.String
  3182  	// Name is "AuctionAdInterestGroupKey.name"
  3183  	//
  3184  	// Required
  3185  	Name js.String
  3186  
  3187  	FFI_USE bool
  3188  }
  3189  
  3190  // FromRef calls UpdateFrom and returns a AuctionAdInterestGroupKey with all fields set.
  3191  func (p AuctionAdInterestGroupKey) FromRef(ref js.Ref) AuctionAdInterestGroupKey {
  3192  	p.UpdateFrom(ref)
  3193  	return p
  3194  }
  3195  
  3196  // New creates a new AuctionAdInterestGroupKey in the application heap.
  3197  func (p AuctionAdInterestGroupKey) New() js.Ref {
  3198  	return bindings.AuctionAdInterestGroupKeyJSLoad(
  3199  		js.Pointer(&p), js.True, 0,
  3200  	)
  3201  }
  3202  
  3203  // UpdateFrom copies value of all fields of the heap object to p.
  3204  func (p *AuctionAdInterestGroupKey) UpdateFrom(ref js.Ref) {
  3205  	bindings.AuctionAdInterestGroupKeyJSStore(
  3206  		js.Pointer(p), ref,
  3207  	)
  3208  }
  3209  
  3210  // Update writes all fields of the p to the heap object referenced by ref.
  3211  func (p *AuctionAdInterestGroupKey) Update(ref js.Ref) {
  3212  	bindings.AuctionAdInterestGroupKeyJSLoad(
  3213  		js.Pointer(p), js.False, ref,
  3214  	)
  3215  }
  3216  
  3217  // FreeMembers frees fields with heap reference, if recursive is true
  3218  // free all heap references reachable from p.
  3219  func (p *AuctionAdInterestGroupKey) FreeMembers(recursive bool) {
  3220  	js.Free(
  3221  		p.Owner.Ref(),
  3222  		p.Name.Ref(),
  3223  	)
  3224  	p.Owner = p.Owner.FromRef(js.Undefined)
  3225  	p.Name = p.Name.FromRef(js.Undefined)
  3226  }
  3227  
  3228  type AudioConfiguration struct {
  3229  	// ContentType is "AudioConfiguration.contentType"
  3230  	//
  3231  	// Required
  3232  	ContentType js.String
  3233  	// Channels is "AudioConfiguration.channels"
  3234  	//
  3235  	// Optional
  3236  	Channels js.String
  3237  	// Bitrate is "AudioConfiguration.bitrate"
  3238  	//
  3239  	// Optional
  3240  	//
  3241  	// NOTE: FFI_USE_Bitrate MUST be set to true to make this field effective.
  3242  	Bitrate uint64
  3243  	// Samplerate is "AudioConfiguration.samplerate"
  3244  	//
  3245  	// Optional
  3246  	//
  3247  	// NOTE: FFI_USE_Samplerate MUST be set to true to make this field effective.
  3248  	Samplerate uint32
  3249  	// SpatialRendering is "AudioConfiguration.spatialRendering"
  3250  	//
  3251  	// Optional
  3252  	//
  3253  	// NOTE: FFI_USE_SpatialRendering MUST be set to true to make this field effective.
  3254  	SpatialRendering bool
  3255  
  3256  	FFI_USE_Bitrate          bool // for Bitrate.
  3257  	FFI_USE_Samplerate       bool // for Samplerate.
  3258  	FFI_USE_SpatialRendering bool // for SpatialRendering.
  3259  
  3260  	FFI_USE bool
  3261  }
  3262  
  3263  // FromRef calls UpdateFrom and returns a AudioConfiguration with all fields set.
  3264  func (p AudioConfiguration) FromRef(ref js.Ref) AudioConfiguration {
  3265  	p.UpdateFrom(ref)
  3266  	return p
  3267  }
  3268  
  3269  // New creates a new AudioConfiguration in the application heap.
  3270  func (p AudioConfiguration) New() js.Ref {
  3271  	return bindings.AudioConfigurationJSLoad(
  3272  		js.Pointer(&p), js.True, 0,
  3273  	)
  3274  }
  3275  
  3276  // UpdateFrom copies value of all fields of the heap object to p.
  3277  func (p *AudioConfiguration) UpdateFrom(ref js.Ref) {
  3278  	bindings.AudioConfigurationJSStore(
  3279  		js.Pointer(p), ref,
  3280  	)
  3281  }
  3282  
  3283  // Update writes all fields of the p to the heap object referenced by ref.
  3284  func (p *AudioConfiguration) Update(ref js.Ref) {
  3285  	bindings.AudioConfigurationJSLoad(
  3286  		js.Pointer(p), js.False, ref,
  3287  	)
  3288  }
  3289  
  3290  // FreeMembers frees fields with heap reference, if recursive is true
  3291  // free all heap references reachable from p.
  3292  func (p *AudioConfiguration) FreeMembers(recursive bool) {
  3293  	js.Free(
  3294  		p.ContentType.Ref(),
  3295  		p.Channels.Ref(),
  3296  	)
  3297  	p.ContentType = p.ContentType.FromRef(js.Undefined)
  3298  	p.Channels = p.Channels.FromRef(js.Undefined)
  3299  }
  3300  
  3301  type AudioContextLatencyCategory uint32
  3302  
  3303  const (
  3304  	_ AudioContextLatencyCategory = iota
  3305  
  3306  	AudioContextLatencyCategory_BALANCED
  3307  	AudioContextLatencyCategory_INTERACTIVE
  3308  	AudioContextLatencyCategory_PLAYBACK
  3309  )
  3310  
  3311  func (AudioContextLatencyCategory) FromRef(str js.Ref) AudioContextLatencyCategory {
  3312  	return AudioContextLatencyCategory(bindings.ConstOfAudioContextLatencyCategory(str))
  3313  }
  3314  
  3315  func (x AudioContextLatencyCategory) String() (string, bool) {
  3316  	switch x {
  3317  	case AudioContextLatencyCategory_BALANCED:
  3318  		return "balanced", true
  3319  	case AudioContextLatencyCategory_INTERACTIVE:
  3320  		return "interactive", true
  3321  	case AudioContextLatencyCategory_PLAYBACK:
  3322  		return "playback", true
  3323  	default:
  3324  		return "", false
  3325  	}
  3326  }
  3327  
  3328  type OneOf_AudioContextLatencyCategory_Float64 struct {
  3329  	ref js.Ref
  3330  }
  3331  
  3332  func (x OneOf_AudioContextLatencyCategory_Float64) Ref() js.Ref {
  3333  	return x.ref
  3334  }
  3335  
  3336  func (x OneOf_AudioContextLatencyCategory_Float64) Free() {
  3337  	x.ref.Free()
  3338  }
  3339  
  3340  func (x OneOf_AudioContextLatencyCategory_Float64) FromRef(ref js.Ref) OneOf_AudioContextLatencyCategory_Float64 {
  3341  	return OneOf_AudioContextLatencyCategory_Float64{
  3342  		ref: ref,
  3343  	}
  3344  }
  3345  
  3346  func (x OneOf_AudioContextLatencyCategory_Float64) AudioContextLatencyCategory() AudioContextLatencyCategory {
  3347  	return AudioContextLatencyCategory(0).FromRef(x.ref)
  3348  }
  3349  
  3350  func (x OneOf_AudioContextLatencyCategory_Float64) Float64() float64 {
  3351  	return js.Number[float64]{}.FromRef(x.ref).Get()
  3352  }
  3353  
  3354  type AudioSinkType uint32
  3355  
  3356  const (
  3357  	_ AudioSinkType = iota
  3358  
  3359  	AudioSinkType_NONE
  3360  )
  3361  
  3362  func (AudioSinkType) FromRef(str js.Ref) AudioSinkType {
  3363  	return AudioSinkType(bindings.ConstOfAudioSinkType(str))
  3364  }
  3365  
  3366  func (x AudioSinkType) String() (string, bool) {
  3367  	switch x {
  3368  	case AudioSinkType_NONE:
  3369  		return "none", true
  3370  	default:
  3371  		return "", false
  3372  	}
  3373  }
  3374  
  3375  type AudioSinkOptions struct {
  3376  	// Type is "AudioSinkOptions.type"
  3377  	//
  3378  	// Required
  3379  	Type AudioSinkType
  3380  
  3381  	FFI_USE bool
  3382  }
  3383  
  3384  // FromRef calls UpdateFrom and returns a AudioSinkOptions with all fields set.
  3385  func (p AudioSinkOptions) FromRef(ref js.Ref) AudioSinkOptions {
  3386  	p.UpdateFrom(ref)
  3387  	return p
  3388  }
  3389  
  3390  // New creates a new AudioSinkOptions in the application heap.
  3391  func (p AudioSinkOptions) New() js.Ref {
  3392  	return bindings.AudioSinkOptionsJSLoad(
  3393  		js.Pointer(&p), js.True, 0,
  3394  	)
  3395  }
  3396  
  3397  // UpdateFrom copies value of all fields of the heap object to p.
  3398  func (p *AudioSinkOptions) UpdateFrom(ref js.Ref) {
  3399  	bindings.AudioSinkOptionsJSStore(
  3400  		js.Pointer(p), ref,
  3401  	)
  3402  }
  3403  
  3404  // Update writes all fields of the p to the heap object referenced by ref.
  3405  func (p *AudioSinkOptions) Update(ref js.Ref) {
  3406  	bindings.AudioSinkOptionsJSLoad(
  3407  		js.Pointer(p), js.False, ref,
  3408  	)
  3409  }
  3410  
  3411  // FreeMembers frees fields with heap reference, if recursive is true
  3412  // free all heap references reachable from p.
  3413  func (p *AudioSinkOptions) FreeMembers(recursive bool) {
  3414  }
  3415  
  3416  type OneOf_String_AudioSinkOptions struct {
  3417  	ref js.Ref
  3418  }
  3419  
  3420  func (x OneOf_String_AudioSinkOptions) Ref() js.Ref {
  3421  	return x.ref
  3422  }
  3423  
  3424  func (x OneOf_String_AudioSinkOptions) Free() {
  3425  	x.ref.Free()
  3426  }
  3427  
  3428  func (x OneOf_String_AudioSinkOptions) FromRef(ref js.Ref) OneOf_String_AudioSinkOptions {
  3429  	return OneOf_String_AudioSinkOptions{
  3430  		ref: ref,
  3431  	}
  3432  }
  3433  
  3434  func (x OneOf_String_AudioSinkOptions) String() js.String {
  3435  	return js.String{}.FromRef(x.ref)
  3436  }
  3437  
  3438  func (x OneOf_String_AudioSinkOptions) AudioSinkOptions() AudioSinkOptions {
  3439  	var ret AudioSinkOptions
  3440  	ret.UpdateFrom(x.ref)
  3441  	return ret
  3442  }
  3443  
  3444  type AudioContextOptions struct {
  3445  	// LatencyHint is "AudioContextOptions.latencyHint"
  3446  	//
  3447  	// Optional, defaults to "interactive".
  3448  	LatencyHint OneOf_AudioContextLatencyCategory_Float64
  3449  	// SampleRate is "AudioContextOptions.sampleRate"
  3450  	//
  3451  	// Optional
  3452  	//
  3453  	// NOTE: FFI_USE_SampleRate MUST be set to true to make this field effective.
  3454  	SampleRate float32
  3455  	// SinkId is "AudioContextOptions.sinkId"
  3456  	//
  3457  	// Optional
  3458  	SinkId OneOf_String_AudioSinkOptions
  3459  
  3460  	FFI_USE_SampleRate bool // for SampleRate.
  3461  
  3462  	FFI_USE bool
  3463  }
  3464  
  3465  // FromRef calls UpdateFrom and returns a AudioContextOptions with all fields set.
  3466  func (p AudioContextOptions) FromRef(ref js.Ref) AudioContextOptions {
  3467  	p.UpdateFrom(ref)
  3468  	return p
  3469  }
  3470  
  3471  // New creates a new AudioContextOptions in the application heap.
  3472  func (p AudioContextOptions) New() js.Ref {
  3473  	return bindings.AudioContextOptionsJSLoad(
  3474  		js.Pointer(&p), js.True, 0,
  3475  	)
  3476  }
  3477  
  3478  // UpdateFrom copies value of all fields of the heap object to p.
  3479  func (p *AudioContextOptions) UpdateFrom(ref js.Ref) {
  3480  	bindings.AudioContextOptionsJSStore(
  3481  		js.Pointer(p), ref,
  3482  	)
  3483  }
  3484  
  3485  // Update writes all fields of the p to the heap object referenced by ref.
  3486  func (p *AudioContextOptions) Update(ref js.Ref) {
  3487  	bindings.AudioContextOptionsJSLoad(
  3488  		js.Pointer(p), js.False, ref,
  3489  	)
  3490  }
  3491  
  3492  // FreeMembers frees fields with heap reference, if recursive is true
  3493  // free all heap references reachable from p.
  3494  func (p *AudioContextOptions) FreeMembers(recursive bool) {
  3495  	js.Free(
  3496  		p.LatencyHint.Ref(),
  3497  		p.SinkId.Ref(),
  3498  	)
  3499  	p.LatencyHint = p.LatencyHint.FromRef(js.Undefined)
  3500  	p.SinkId = p.SinkId.FromRef(js.Undefined)
  3501  }
  3502  
  3503  type AudioTimestamp struct {
  3504  	// ContextTime is "AudioTimestamp.contextTime"
  3505  	//
  3506  	// Optional
  3507  	//
  3508  	// NOTE: FFI_USE_ContextTime MUST be set to true to make this field effective.
  3509  	ContextTime float64
  3510  	// PerformanceTime is "AudioTimestamp.performanceTime"
  3511  	//
  3512  	// Optional
  3513  	//
  3514  	// NOTE: FFI_USE_PerformanceTime MUST be set to true to make this field effective.
  3515  	PerformanceTime DOMHighResTimeStamp
  3516  
  3517  	FFI_USE_ContextTime     bool // for ContextTime.
  3518  	FFI_USE_PerformanceTime bool // for PerformanceTime.
  3519  
  3520  	FFI_USE bool
  3521  }
  3522  
  3523  // FromRef calls UpdateFrom and returns a AudioTimestamp with all fields set.
  3524  func (p AudioTimestamp) FromRef(ref js.Ref) AudioTimestamp {
  3525  	p.UpdateFrom(ref)
  3526  	return p
  3527  }
  3528  
  3529  // New creates a new AudioTimestamp in the application heap.
  3530  func (p AudioTimestamp) New() js.Ref {
  3531  	return bindings.AudioTimestampJSLoad(
  3532  		js.Pointer(&p), js.True, 0,
  3533  	)
  3534  }
  3535  
  3536  // UpdateFrom copies value of all fields of the heap object to p.
  3537  func (p *AudioTimestamp) UpdateFrom(ref js.Ref) {
  3538  	bindings.AudioTimestampJSStore(
  3539  		js.Pointer(p), ref,
  3540  	)
  3541  }
  3542  
  3543  // Update writes all fields of the p to the heap object referenced by ref.
  3544  func (p *AudioTimestamp) Update(ref js.Ref) {
  3545  	bindings.AudioTimestampJSLoad(
  3546  		js.Pointer(p), js.False, ref,
  3547  	)
  3548  }
  3549  
  3550  // FreeMembers frees fields with heap reference, if recursive is true
  3551  // free all heap references reachable from p.
  3552  func (p *AudioTimestamp) FreeMembers(recursive bool) {
  3553  }
  3554  
  3555  const (
  3556  	HTMLMediaElement_NETWORK_EMPTY     uint16 = 0
  3557  	HTMLMediaElement_NETWORK_IDLE      uint16 = 1
  3558  	HTMLMediaElement_NETWORK_LOADING   uint16 = 2
  3559  	HTMLMediaElement_NETWORK_NO_SOURCE uint16 = 3
  3560  	HTMLMediaElement_HAVE_NOTHING      uint16 = 0
  3561  	HTMLMediaElement_HAVE_METADATA     uint16 = 1
  3562  	HTMLMediaElement_HAVE_CURRENT_DATA uint16 = 2
  3563  	HTMLMediaElement_HAVE_FUTURE_DATA  uint16 = 3
  3564  	HTMLMediaElement_HAVE_ENOUGH_DATA  uint16 = 4
  3565  )
  3566  
  3567  type CanPlayTypeResult uint32
  3568  
  3569  const (
  3570  	_ CanPlayTypeResult = iota
  3571  
  3572  	CanPlayTypeResult_
  3573  	CanPlayTypeResult_MAYBE
  3574  	CanPlayTypeResult_PROBABLY
  3575  )
  3576  
  3577  func (CanPlayTypeResult) FromRef(str js.Ref) CanPlayTypeResult {
  3578  	return CanPlayTypeResult(bindings.ConstOfCanPlayTypeResult(str))
  3579  }
  3580  
  3581  func (x CanPlayTypeResult) String() (string, bool) {
  3582  	switch x {
  3583  	case CanPlayTypeResult_:
  3584  		return "", true
  3585  	case CanPlayTypeResult_MAYBE:
  3586  		return "maybe", true
  3587  	case CanPlayTypeResult_PROBABLY:
  3588  		return "probably", true
  3589  	default:
  3590  		return "", false
  3591  	}
  3592  }
  3593  
  3594  type TextTrackCue struct {
  3595  	EventTarget
  3596  }
  3597  
  3598  func (this TextTrackCue) Once() TextTrackCue {
  3599  	this.ref.Once()
  3600  	return this
  3601  }
  3602  
  3603  func (this TextTrackCue) Ref() js.Ref {
  3604  	return this.EventTarget.Ref()
  3605  }
  3606  
  3607  func (this TextTrackCue) FromRef(ref js.Ref) TextTrackCue {
  3608  	this.EventTarget = this.EventTarget.FromRef(ref)
  3609  	return this
  3610  }
  3611  
  3612  func (this TextTrackCue) Free() {
  3613  	this.ref.Free()
  3614  }
  3615  
  3616  // Track returns the value of property "TextTrackCue.track".
  3617  //
  3618  // It returns ok=false if there is no such property.
  3619  func (this TextTrackCue) Track() (ret TextTrack, ok bool) {
  3620  	ok = js.True == bindings.GetTextTrackCueTrack(
  3621  		this.ref, js.Pointer(&ret),
  3622  	)
  3623  	return
  3624  }
  3625  
  3626  // Id returns the value of property "TextTrackCue.id".
  3627  //
  3628  // It returns ok=false if there is no such property.
  3629  func (this TextTrackCue) Id() (ret js.String, ok bool) {
  3630  	ok = js.True == bindings.GetTextTrackCueId(
  3631  		this.ref, js.Pointer(&ret),
  3632  	)
  3633  	return
  3634  }
  3635  
  3636  // SetId sets the value of property "TextTrackCue.id" to val.
  3637  //
  3638  // It returns false if the property cannot be set.
  3639  func (this TextTrackCue) SetId(val js.String) bool {
  3640  	return js.True == bindings.SetTextTrackCueId(
  3641  		this.ref,
  3642  		val.Ref(),
  3643  	)
  3644  }
  3645  
  3646  // StartTime returns the value of property "TextTrackCue.startTime".
  3647  //
  3648  // It returns ok=false if there is no such property.
  3649  func (this TextTrackCue) StartTime() (ret float64, ok bool) {
  3650  	ok = js.True == bindings.GetTextTrackCueStartTime(
  3651  		this.ref, js.Pointer(&ret),
  3652  	)
  3653  	return
  3654  }
  3655  
  3656  // SetStartTime sets the value of property "TextTrackCue.startTime" to val.
  3657  //
  3658  // It returns false if the property cannot be set.
  3659  func (this TextTrackCue) SetStartTime(val float64) bool {
  3660  	return js.True == bindings.SetTextTrackCueStartTime(
  3661  		this.ref,
  3662  		float64(val),
  3663  	)
  3664  }
  3665  
  3666  // EndTime returns the value of property "TextTrackCue.endTime".
  3667  //
  3668  // It returns ok=false if there is no such property.
  3669  func (this TextTrackCue) EndTime() (ret float64, ok bool) {
  3670  	ok = js.True == bindings.GetTextTrackCueEndTime(
  3671  		this.ref, js.Pointer(&ret),
  3672  	)
  3673  	return
  3674  }
  3675  
  3676  // SetEndTime sets the value of property "TextTrackCue.endTime" to val.
  3677  //
  3678  // It returns false if the property cannot be set.
  3679  func (this TextTrackCue) SetEndTime(val float64) bool {
  3680  	return js.True == bindings.SetTextTrackCueEndTime(
  3681  		this.ref,
  3682  		float64(val),
  3683  	)
  3684  }
  3685  
  3686  // PauseOnExit returns the value of property "TextTrackCue.pauseOnExit".
  3687  //
  3688  // It returns ok=false if there is no such property.
  3689  func (this TextTrackCue) PauseOnExit() (ret bool, ok bool) {
  3690  	ok = js.True == bindings.GetTextTrackCuePauseOnExit(
  3691  		this.ref, js.Pointer(&ret),
  3692  	)
  3693  	return
  3694  }
  3695  
  3696  // SetPauseOnExit sets the value of property "TextTrackCue.pauseOnExit" to val.
  3697  //
  3698  // It returns false if the property cannot be set.
  3699  func (this TextTrackCue) SetPauseOnExit(val bool) bool {
  3700  	return js.True == bindings.SetTextTrackCuePauseOnExit(
  3701  		this.ref,
  3702  		js.Bool(bool(val)),
  3703  	)
  3704  }
  3705  
  3706  type TextTrackKind uint32
  3707  
  3708  const (
  3709  	_ TextTrackKind = iota
  3710  
  3711  	TextTrackKind_SUBTITLES
  3712  	TextTrackKind_CAPTIONS
  3713  	TextTrackKind_DESCRIPTIONS
  3714  	TextTrackKind_CHAPTERS
  3715  	TextTrackKind_METADATA
  3716  )
  3717  
  3718  func (TextTrackKind) FromRef(str js.Ref) TextTrackKind {
  3719  	return TextTrackKind(bindings.ConstOfTextTrackKind(str))
  3720  }
  3721  
  3722  func (x TextTrackKind) String() (string, bool) {
  3723  	switch x {
  3724  	case TextTrackKind_SUBTITLES:
  3725  		return "subtitles", true
  3726  	case TextTrackKind_CAPTIONS:
  3727  		return "captions", true
  3728  	case TextTrackKind_DESCRIPTIONS:
  3729  		return "descriptions", true
  3730  	case TextTrackKind_CHAPTERS:
  3731  		return "chapters", true
  3732  	case TextTrackKind_METADATA:
  3733  		return "metadata", true
  3734  	default:
  3735  		return "", false
  3736  	}
  3737  }
  3738  
  3739  type TextTrackMode uint32