github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis10_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 AudioEncoderInit struct {
    13  	// Output is "AudioEncoderInit.output"
    14  	//
    15  	// Required
    16  	Output js.Func[func(output EncodedAudioChunk, metadata *EncodedAudioChunkMetadata)]
    17  	// Error is "AudioEncoderInit.error"
    18  	//
    19  	// Required
    20  	Error js.Func[func(err DOMException)]
    21  
    22  	FFI_USE bool
    23  }
    24  
    25  // FromRef calls UpdateFrom and returns a AudioEncoderInit with all fields set.
    26  func (p AudioEncoderInit) FromRef(ref js.Ref) AudioEncoderInit {
    27  	p.UpdateFrom(ref)
    28  	return p
    29  }
    30  
    31  // New creates a new AudioEncoderInit in the application heap.
    32  func (p AudioEncoderInit) New() js.Ref {
    33  	return bindings.AudioEncoderInitJSLoad(
    34  		js.Pointer(&p), js.True, 0,
    35  	)
    36  }
    37  
    38  // UpdateFrom copies value of all fields of the heap object to p.
    39  func (p *AudioEncoderInit) UpdateFrom(ref js.Ref) {
    40  	bindings.AudioEncoderInitJSStore(
    41  		js.Pointer(p), ref,
    42  	)
    43  }
    44  
    45  // Update writes all fields of the p to the heap object referenced by ref.
    46  func (p *AudioEncoderInit) Update(ref js.Ref) {
    47  	bindings.AudioEncoderInitJSLoad(
    48  		js.Pointer(p), js.False, ref,
    49  	)
    50  }
    51  
    52  // FreeMembers frees fields with heap reference, if recursive is true
    53  // free all heap references reachable from p.
    54  func (p *AudioEncoderInit) FreeMembers(recursive bool) {
    55  	js.Free(
    56  		p.Output.Ref(),
    57  		p.Error.Ref(),
    58  	)
    59  	p.Output = p.Output.FromRef(js.Undefined)
    60  	p.Error = p.Error.FromRef(js.Undefined)
    61  }
    62  
    63  type BitrateMode uint32
    64  
    65  const (
    66  	_ BitrateMode = iota
    67  
    68  	BitrateMode_CONSTANT
    69  	BitrateMode_VARIABLE
    70  )
    71  
    72  func (BitrateMode) FromRef(str js.Ref) BitrateMode {
    73  	return BitrateMode(bindings.ConstOfBitrateMode(str))
    74  }
    75  
    76  func (x BitrateMode) String() (string, bool) {
    77  	switch x {
    78  	case BitrateMode_CONSTANT:
    79  		return "constant", true
    80  	case BitrateMode_VARIABLE:
    81  		return "variable", true
    82  	default:
    83  		return "", false
    84  	}
    85  }
    86  
    87  type FlacEncoderConfig struct {
    88  	// BlockSize is "FlacEncoderConfig.blockSize"
    89  	//
    90  	// Optional, defaults to 0.
    91  	//
    92  	// NOTE: FFI_USE_BlockSize MUST be set to true to make this field effective.
    93  	BlockSize uint32
    94  	// CompressLevel is "FlacEncoderConfig.compressLevel"
    95  	//
    96  	// Optional, defaults to 5.
    97  	//
    98  	// NOTE: FFI_USE_CompressLevel MUST be set to true to make this field effective.
    99  	CompressLevel uint32
   100  
   101  	FFI_USE_BlockSize     bool // for BlockSize.
   102  	FFI_USE_CompressLevel bool // for CompressLevel.
   103  
   104  	FFI_USE bool
   105  }
   106  
   107  // FromRef calls UpdateFrom and returns a FlacEncoderConfig with all fields set.
   108  func (p FlacEncoderConfig) FromRef(ref js.Ref) FlacEncoderConfig {
   109  	p.UpdateFrom(ref)
   110  	return p
   111  }
   112  
   113  // New creates a new FlacEncoderConfig in the application heap.
   114  func (p FlacEncoderConfig) New() js.Ref {
   115  	return bindings.FlacEncoderConfigJSLoad(
   116  		js.Pointer(&p), js.True, 0,
   117  	)
   118  }
   119  
   120  // UpdateFrom copies value of all fields of the heap object to p.
   121  func (p *FlacEncoderConfig) UpdateFrom(ref js.Ref) {
   122  	bindings.FlacEncoderConfigJSStore(
   123  		js.Pointer(p), ref,
   124  	)
   125  }
   126  
   127  // Update writes all fields of the p to the heap object referenced by ref.
   128  func (p *FlacEncoderConfig) Update(ref js.Ref) {
   129  	bindings.FlacEncoderConfigJSLoad(
   130  		js.Pointer(p), js.False, ref,
   131  	)
   132  }
   133  
   134  // FreeMembers frees fields with heap reference, if recursive is true
   135  // free all heap references reachable from p.
   136  func (p *FlacEncoderConfig) FreeMembers(recursive bool) {
   137  }
   138  
   139  type OpusBitstreamFormat uint32
   140  
   141  const (
   142  	_ OpusBitstreamFormat = iota
   143  
   144  	OpusBitstreamFormat_OPUS
   145  	OpusBitstreamFormat_OGG
   146  )
   147  
   148  func (OpusBitstreamFormat) FromRef(str js.Ref) OpusBitstreamFormat {
   149  	return OpusBitstreamFormat(bindings.ConstOfOpusBitstreamFormat(str))
   150  }
   151  
   152  func (x OpusBitstreamFormat) String() (string, bool) {
   153  	switch x {
   154  	case OpusBitstreamFormat_OPUS:
   155  		return "opus", true
   156  	case OpusBitstreamFormat_OGG:
   157  		return "ogg", true
   158  	default:
   159  		return "", false
   160  	}
   161  }
   162  
   163  type OpusEncoderConfig struct {
   164  	// Format is "OpusEncoderConfig.format"
   165  	//
   166  	// Optional, defaults to "opus".
   167  	Format OpusBitstreamFormat
   168  	// FrameDuration is "OpusEncoderConfig.frameDuration"
   169  	//
   170  	// Optional, defaults to 20000.
   171  	//
   172  	// NOTE: FFI_USE_FrameDuration MUST be set to true to make this field effective.
   173  	FrameDuration uint64
   174  	// Complexity is "OpusEncoderConfig.complexity"
   175  	//
   176  	// Optional
   177  	//
   178  	// NOTE: FFI_USE_Complexity MUST be set to true to make this field effective.
   179  	Complexity uint32
   180  	// Packetlossperc is "OpusEncoderConfig.packetlossperc"
   181  	//
   182  	// Optional, defaults to 0.
   183  	//
   184  	// NOTE: FFI_USE_Packetlossperc MUST be set to true to make this field effective.
   185  	Packetlossperc uint32
   186  	// Useinbandfec is "OpusEncoderConfig.useinbandfec"
   187  	//
   188  	// Optional, defaults to false.
   189  	//
   190  	// NOTE: FFI_USE_Useinbandfec MUST be set to true to make this field effective.
   191  	Useinbandfec bool
   192  	// Usedtx is "OpusEncoderConfig.usedtx"
   193  	//
   194  	// Optional, defaults to false.
   195  	//
   196  	// NOTE: FFI_USE_Usedtx MUST be set to true to make this field effective.
   197  	Usedtx bool
   198  
   199  	FFI_USE_FrameDuration  bool // for FrameDuration.
   200  	FFI_USE_Complexity     bool // for Complexity.
   201  	FFI_USE_Packetlossperc bool // for Packetlossperc.
   202  	FFI_USE_Useinbandfec   bool // for Useinbandfec.
   203  	FFI_USE_Usedtx         bool // for Usedtx.
   204  
   205  	FFI_USE bool
   206  }
   207  
   208  // FromRef calls UpdateFrom and returns a OpusEncoderConfig with all fields set.
   209  func (p OpusEncoderConfig) FromRef(ref js.Ref) OpusEncoderConfig {
   210  	p.UpdateFrom(ref)
   211  	return p
   212  }
   213  
   214  // New creates a new OpusEncoderConfig in the application heap.
   215  func (p OpusEncoderConfig) New() js.Ref {
   216  	return bindings.OpusEncoderConfigJSLoad(
   217  		js.Pointer(&p), js.True, 0,
   218  	)
   219  }
   220  
   221  // UpdateFrom copies value of all fields of the heap object to p.
   222  func (p *OpusEncoderConfig) UpdateFrom(ref js.Ref) {
   223  	bindings.OpusEncoderConfigJSStore(
   224  		js.Pointer(p), ref,
   225  	)
   226  }
   227  
   228  // Update writes all fields of the p to the heap object referenced by ref.
   229  func (p *OpusEncoderConfig) Update(ref js.Ref) {
   230  	bindings.OpusEncoderConfigJSLoad(
   231  		js.Pointer(p), js.False, ref,
   232  	)
   233  }
   234  
   235  // FreeMembers frees fields with heap reference, if recursive is true
   236  // free all heap references reachable from p.
   237  func (p *OpusEncoderConfig) FreeMembers(recursive bool) {
   238  }
   239  
   240  type AudioEncoderConfig struct {
   241  	// Codec is "AudioEncoderConfig.codec"
   242  	//
   243  	// Required
   244  	Codec js.String
   245  	// SampleRate is "AudioEncoderConfig.sampleRate"
   246  	//
   247  	// Optional
   248  	//
   249  	// NOTE: FFI_USE_SampleRate MUST be set to true to make this field effective.
   250  	SampleRate uint32
   251  	// NumberOfChannels is "AudioEncoderConfig.numberOfChannels"
   252  	//
   253  	// Optional
   254  	//
   255  	// NOTE: FFI_USE_NumberOfChannels MUST be set to true to make this field effective.
   256  	NumberOfChannels uint32
   257  	// Bitrate is "AudioEncoderConfig.bitrate"
   258  	//
   259  	// Optional
   260  	//
   261  	// NOTE: FFI_USE_Bitrate MUST be set to true to make this field effective.
   262  	Bitrate uint64
   263  	// BitrateMode is "AudioEncoderConfig.bitrateMode"
   264  	//
   265  	// Optional, defaults to "variable".
   266  	BitrateMode BitrateMode
   267  	// Flac is "AudioEncoderConfig.flac"
   268  	//
   269  	// Optional
   270  	//
   271  	// NOTE: Flac.FFI_USE MUST be set to true to get Flac used.
   272  	Flac FlacEncoderConfig
   273  	// Opus is "AudioEncoderConfig.opus"
   274  	//
   275  	// Optional
   276  	//
   277  	// NOTE: Opus.FFI_USE MUST be set to true to get Opus used.
   278  	Opus OpusEncoderConfig
   279  	// Aac is "AudioEncoderConfig.aac"
   280  	//
   281  	// Optional
   282  	//
   283  	// NOTE: Aac.FFI_USE MUST be set to true to get Aac used.
   284  	Aac AacEncoderConfig
   285  
   286  	FFI_USE_SampleRate       bool // for SampleRate.
   287  	FFI_USE_NumberOfChannels bool // for NumberOfChannels.
   288  	FFI_USE_Bitrate          bool // for Bitrate.
   289  
   290  	FFI_USE bool
   291  }
   292  
   293  // FromRef calls UpdateFrom and returns a AudioEncoderConfig with all fields set.
   294  func (p AudioEncoderConfig) FromRef(ref js.Ref) AudioEncoderConfig {
   295  	p.UpdateFrom(ref)
   296  	return p
   297  }
   298  
   299  // New creates a new AudioEncoderConfig in the application heap.
   300  func (p AudioEncoderConfig) New() js.Ref {
   301  	return bindings.AudioEncoderConfigJSLoad(
   302  		js.Pointer(&p), js.True, 0,
   303  	)
   304  }
   305  
   306  // UpdateFrom copies value of all fields of the heap object to p.
   307  func (p *AudioEncoderConfig) UpdateFrom(ref js.Ref) {
   308  	bindings.AudioEncoderConfigJSStore(
   309  		js.Pointer(p), ref,
   310  	)
   311  }
   312  
   313  // Update writes all fields of the p to the heap object referenced by ref.
   314  func (p *AudioEncoderConfig) Update(ref js.Ref) {
   315  	bindings.AudioEncoderConfigJSLoad(
   316  		js.Pointer(p), js.False, ref,
   317  	)
   318  }
   319  
   320  // FreeMembers frees fields with heap reference, if recursive is true
   321  // free all heap references reachable from p.
   322  func (p *AudioEncoderConfig) FreeMembers(recursive bool) {
   323  	js.Free(
   324  		p.Codec.Ref(),
   325  	)
   326  	p.Codec = p.Codec.FromRef(js.Undefined)
   327  	if recursive {
   328  		p.Flac.FreeMembers(true)
   329  		p.Opus.FreeMembers(true)
   330  		p.Aac.FreeMembers(true)
   331  	}
   332  }
   333  
   334  type AudioEncoderSupport struct {
   335  	// Supported is "AudioEncoderSupport.supported"
   336  	//
   337  	// Optional
   338  	//
   339  	// NOTE: FFI_USE_Supported MUST be set to true to make this field effective.
   340  	Supported bool
   341  	// Config is "AudioEncoderSupport.config"
   342  	//
   343  	// Optional
   344  	//
   345  	// NOTE: Config.FFI_USE MUST be set to true to get Config used.
   346  	Config AudioEncoderConfig
   347  
   348  	FFI_USE_Supported bool // for Supported.
   349  
   350  	FFI_USE bool
   351  }
   352  
   353  // FromRef calls UpdateFrom and returns a AudioEncoderSupport with all fields set.
   354  func (p AudioEncoderSupport) FromRef(ref js.Ref) AudioEncoderSupport {
   355  	p.UpdateFrom(ref)
   356  	return p
   357  }
   358  
   359  // New creates a new AudioEncoderSupport in the application heap.
   360  func (p AudioEncoderSupport) New() js.Ref {
   361  	return bindings.AudioEncoderSupportJSLoad(
   362  		js.Pointer(&p), js.True, 0,
   363  	)
   364  }
   365  
   366  // UpdateFrom copies value of all fields of the heap object to p.
   367  func (p *AudioEncoderSupport) UpdateFrom(ref js.Ref) {
   368  	bindings.AudioEncoderSupportJSStore(
   369  		js.Pointer(p), ref,
   370  	)
   371  }
   372  
   373  // Update writes all fields of the p to the heap object referenced by ref.
   374  func (p *AudioEncoderSupport) Update(ref js.Ref) {
   375  	bindings.AudioEncoderSupportJSLoad(
   376  		js.Pointer(p), js.False, ref,
   377  	)
   378  }
   379  
   380  // FreeMembers frees fields with heap reference, if recursive is true
   381  // free all heap references reachable from p.
   382  func (p *AudioEncoderSupport) FreeMembers(recursive bool) {
   383  	if recursive {
   384  		p.Config.FreeMembers(true)
   385  	}
   386  }
   387  
   388  func NewAudioEncoder(init AudioEncoderInit) (ret AudioEncoder) {
   389  	ret.ref = bindings.NewAudioEncoderByAudioEncoder(
   390  		js.Pointer(&init))
   391  	return
   392  }
   393  
   394  type AudioEncoder struct {
   395  	EventTarget
   396  }
   397  
   398  func (this AudioEncoder) Once() AudioEncoder {
   399  	this.ref.Once()
   400  	return this
   401  }
   402  
   403  func (this AudioEncoder) Ref() js.Ref {
   404  	return this.EventTarget.Ref()
   405  }
   406  
   407  func (this AudioEncoder) FromRef(ref js.Ref) AudioEncoder {
   408  	this.EventTarget = this.EventTarget.FromRef(ref)
   409  	return this
   410  }
   411  
   412  func (this AudioEncoder) Free() {
   413  	this.ref.Free()
   414  }
   415  
   416  // State returns the value of property "AudioEncoder.state".
   417  //
   418  // It returns ok=false if there is no such property.
   419  func (this AudioEncoder) State() (ret CodecState, ok bool) {
   420  	ok = js.True == bindings.GetAudioEncoderState(
   421  		this.ref, js.Pointer(&ret),
   422  	)
   423  	return
   424  }
   425  
   426  // EncodeQueueSize returns the value of property "AudioEncoder.encodeQueueSize".
   427  //
   428  // It returns ok=false if there is no such property.
   429  func (this AudioEncoder) EncodeQueueSize() (ret uint32, ok bool) {
   430  	ok = js.True == bindings.GetAudioEncoderEncodeQueueSize(
   431  		this.ref, js.Pointer(&ret),
   432  	)
   433  	return
   434  }
   435  
   436  // HasFuncConfigure returns true if the method "AudioEncoder.configure" exists.
   437  func (this AudioEncoder) HasFuncConfigure() bool {
   438  	return js.True == bindings.HasFuncAudioEncoderConfigure(
   439  		this.ref,
   440  	)
   441  }
   442  
   443  // FuncConfigure returns the method "AudioEncoder.configure".
   444  func (this AudioEncoder) FuncConfigure() (fn js.Func[func(config AudioEncoderConfig)]) {
   445  	bindings.FuncAudioEncoderConfigure(
   446  		this.ref, js.Pointer(&fn),
   447  	)
   448  	return
   449  }
   450  
   451  // Configure calls the method "AudioEncoder.configure".
   452  func (this AudioEncoder) Configure(config AudioEncoderConfig) (ret js.Void) {
   453  	bindings.CallAudioEncoderConfigure(
   454  		this.ref, js.Pointer(&ret),
   455  		js.Pointer(&config),
   456  	)
   457  
   458  	return
   459  }
   460  
   461  // TryConfigure calls the method "AudioEncoder.configure"
   462  // in a try/catch block and returns (_, err, ok = false) when it went through
   463  // the catch clause.
   464  func (this AudioEncoder) TryConfigure(config AudioEncoderConfig) (ret js.Void, exception js.Any, ok bool) {
   465  	ok = js.True == bindings.TryAudioEncoderConfigure(
   466  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   467  		js.Pointer(&config),
   468  	)
   469  
   470  	return
   471  }
   472  
   473  // HasFuncEncode returns true if the method "AudioEncoder.encode" exists.
   474  func (this AudioEncoder) HasFuncEncode() bool {
   475  	return js.True == bindings.HasFuncAudioEncoderEncode(
   476  		this.ref,
   477  	)
   478  }
   479  
   480  // FuncEncode returns the method "AudioEncoder.encode".
   481  func (this AudioEncoder) FuncEncode() (fn js.Func[func(data AudioData)]) {
   482  	bindings.FuncAudioEncoderEncode(
   483  		this.ref, js.Pointer(&fn),
   484  	)
   485  	return
   486  }
   487  
   488  // Encode calls the method "AudioEncoder.encode".
   489  func (this AudioEncoder) Encode(data AudioData) (ret js.Void) {
   490  	bindings.CallAudioEncoderEncode(
   491  		this.ref, js.Pointer(&ret),
   492  		data.Ref(),
   493  	)
   494  
   495  	return
   496  }
   497  
   498  // TryEncode calls the method "AudioEncoder.encode"
   499  // in a try/catch block and returns (_, err, ok = false) when it went through
   500  // the catch clause.
   501  func (this AudioEncoder) TryEncode(data AudioData) (ret js.Void, exception js.Any, ok bool) {
   502  	ok = js.True == bindings.TryAudioEncoderEncode(
   503  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   504  		data.Ref(),
   505  	)
   506  
   507  	return
   508  }
   509  
   510  // HasFuncFlush returns true if the method "AudioEncoder.flush" exists.
   511  func (this AudioEncoder) HasFuncFlush() bool {
   512  	return js.True == bindings.HasFuncAudioEncoderFlush(
   513  		this.ref,
   514  	)
   515  }
   516  
   517  // FuncFlush returns the method "AudioEncoder.flush".
   518  func (this AudioEncoder) FuncFlush() (fn js.Func[func() js.Promise[js.Void]]) {
   519  	bindings.FuncAudioEncoderFlush(
   520  		this.ref, js.Pointer(&fn),
   521  	)
   522  	return
   523  }
   524  
   525  // Flush calls the method "AudioEncoder.flush".
   526  func (this AudioEncoder) Flush() (ret js.Promise[js.Void]) {
   527  	bindings.CallAudioEncoderFlush(
   528  		this.ref, js.Pointer(&ret),
   529  	)
   530  
   531  	return
   532  }
   533  
   534  // TryFlush calls the method "AudioEncoder.flush"
   535  // in a try/catch block and returns (_, err, ok = false) when it went through
   536  // the catch clause.
   537  func (this AudioEncoder) TryFlush() (ret js.Promise[js.Void], exception js.Any, ok bool) {
   538  	ok = js.True == bindings.TryAudioEncoderFlush(
   539  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   540  	)
   541  
   542  	return
   543  }
   544  
   545  // HasFuncReset returns true if the method "AudioEncoder.reset" exists.
   546  func (this AudioEncoder) HasFuncReset() bool {
   547  	return js.True == bindings.HasFuncAudioEncoderReset(
   548  		this.ref,
   549  	)
   550  }
   551  
   552  // FuncReset returns the method "AudioEncoder.reset".
   553  func (this AudioEncoder) FuncReset() (fn js.Func[func()]) {
   554  	bindings.FuncAudioEncoderReset(
   555  		this.ref, js.Pointer(&fn),
   556  	)
   557  	return
   558  }
   559  
   560  // Reset calls the method "AudioEncoder.reset".
   561  func (this AudioEncoder) Reset() (ret js.Void) {
   562  	bindings.CallAudioEncoderReset(
   563  		this.ref, js.Pointer(&ret),
   564  	)
   565  
   566  	return
   567  }
   568  
   569  // TryReset calls the method "AudioEncoder.reset"
   570  // in a try/catch block and returns (_, err, ok = false) when it went through
   571  // the catch clause.
   572  func (this AudioEncoder) TryReset() (ret js.Void, exception js.Any, ok bool) {
   573  	ok = js.True == bindings.TryAudioEncoderReset(
   574  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   575  	)
   576  
   577  	return
   578  }
   579  
   580  // HasFuncClose returns true if the method "AudioEncoder.close" exists.
   581  func (this AudioEncoder) HasFuncClose() bool {
   582  	return js.True == bindings.HasFuncAudioEncoderClose(
   583  		this.ref,
   584  	)
   585  }
   586  
   587  // FuncClose returns the method "AudioEncoder.close".
   588  func (this AudioEncoder) FuncClose() (fn js.Func[func()]) {
   589  	bindings.FuncAudioEncoderClose(
   590  		this.ref, js.Pointer(&fn),
   591  	)
   592  	return
   593  }
   594  
   595  // Close calls the method "AudioEncoder.close".
   596  func (this AudioEncoder) Close() (ret js.Void) {
   597  	bindings.CallAudioEncoderClose(
   598  		this.ref, js.Pointer(&ret),
   599  	)
   600  
   601  	return
   602  }
   603  
   604  // TryClose calls the method "AudioEncoder.close"
   605  // in a try/catch block and returns (_, err, ok = false) when it went through
   606  // the catch clause.
   607  func (this AudioEncoder) TryClose() (ret js.Void, exception js.Any, ok bool) {
   608  	ok = js.True == bindings.TryAudioEncoderClose(
   609  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   610  	)
   611  
   612  	return
   613  }
   614  
   615  // HasFuncIsConfigSupported returns true if the static method "AudioEncoder.isConfigSupported" exists.
   616  func (this AudioEncoder) HasFuncIsConfigSupported() bool {
   617  	return js.True == bindings.HasFuncAudioEncoderIsConfigSupported(
   618  		this.ref,
   619  	)
   620  }
   621  
   622  // FuncIsConfigSupported returns the static method "AudioEncoder.isConfigSupported".
   623  func (this AudioEncoder) FuncIsConfigSupported() (fn js.Func[func(config AudioEncoderConfig) js.Promise[AudioEncoderSupport]]) {
   624  	bindings.FuncAudioEncoderIsConfigSupported(
   625  		this.ref, js.Pointer(&fn),
   626  	)
   627  	return
   628  }
   629  
   630  // IsConfigSupported calls the static method "AudioEncoder.isConfigSupported".
   631  func (this AudioEncoder) IsConfigSupported(config AudioEncoderConfig) (ret js.Promise[AudioEncoderSupport]) {
   632  	bindings.CallAudioEncoderIsConfigSupported(
   633  		this.ref, js.Pointer(&ret),
   634  		js.Pointer(&config),
   635  	)
   636  
   637  	return
   638  }
   639  
   640  // TryIsConfigSupported calls the static method "AudioEncoder.isConfigSupported"
   641  // in a try/catch block and returns (_, err, ok = false) when it went through
   642  // the catch clause.
   643  func (this AudioEncoder) TryIsConfigSupported(config AudioEncoderConfig) (ret js.Promise[AudioEncoderSupport], exception js.Any, ok bool) {
   644  	ok = js.True == bindings.TryAudioEncoderIsConfigSupported(
   645  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   646  		js.Pointer(&config),
   647  	)
   648  
   649  	return
   650  }
   651  
   652  type AudioNode struct {
   653  	EventTarget
   654  }
   655  
   656  func (this AudioNode) Once() AudioNode {
   657  	this.ref.Once()
   658  	return this
   659  }
   660  
   661  func (this AudioNode) Ref() js.Ref {
   662  	return this.EventTarget.Ref()
   663  }
   664  
   665  func (this AudioNode) FromRef(ref js.Ref) AudioNode {
   666  	this.EventTarget = this.EventTarget.FromRef(ref)
   667  	return this
   668  }
   669  
   670  func (this AudioNode) Free() {
   671  	this.ref.Free()
   672  }
   673  
   674  // Context returns the value of property "AudioNode.context".
   675  //
   676  // It returns ok=false if there is no such property.
   677  func (this AudioNode) Context() (ret BaseAudioContext, ok bool) {
   678  	ok = js.True == bindings.GetAudioNodeContext(
   679  		this.ref, js.Pointer(&ret),
   680  	)
   681  	return
   682  }
   683  
   684  // NumberOfInputs returns the value of property "AudioNode.numberOfInputs".
   685  //
   686  // It returns ok=false if there is no such property.
   687  func (this AudioNode) NumberOfInputs() (ret uint32, ok bool) {
   688  	ok = js.True == bindings.GetAudioNodeNumberOfInputs(
   689  		this.ref, js.Pointer(&ret),
   690  	)
   691  	return
   692  }
   693  
   694  // NumberOfOutputs returns the value of property "AudioNode.numberOfOutputs".
   695  //
   696  // It returns ok=false if there is no such property.
   697  func (this AudioNode) NumberOfOutputs() (ret uint32, ok bool) {
   698  	ok = js.True == bindings.GetAudioNodeNumberOfOutputs(
   699  		this.ref, js.Pointer(&ret),
   700  	)
   701  	return
   702  }
   703  
   704  // ChannelCount returns the value of property "AudioNode.channelCount".
   705  //
   706  // It returns ok=false if there is no such property.
   707  func (this AudioNode) ChannelCount() (ret uint32, ok bool) {
   708  	ok = js.True == bindings.GetAudioNodeChannelCount(
   709  		this.ref, js.Pointer(&ret),
   710  	)
   711  	return
   712  }
   713  
   714  // SetChannelCount sets the value of property "AudioNode.channelCount" to val.
   715  //
   716  // It returns false if the property cannot be set.
   717  func (this AudioNode) SetChannelCount(val uint32) bool {
   718  	return js.True == bindings.SetAudioNodeChannelCount(
   719  		this.ref,
   720  		uint32(val),
   721  	)
   722  }
   723  
   724  // ChannelCountMode returns the value of property "AudioNode.channelCountMode".
   725  //
   726  // It returns ok=false if there is no such property.
   727  func (this AudioNode) ChannelCountMode() (ret ChannelCountMode, ok bool) {
   728  	ok = js.True == bindings.GetAudioNodeChannelCountMode(
   729  		this.ref, js.Pointer(&ret),
   730  	)
   731  	return
   732  }
   733  
   734  // SetChannelCountMode sets the value of property "AudioNode.channelCountMode" to val.
   735  //
   736  // It returns false if the property cannot be set.
   737  func (this AudioNode) SetChannelCountMode(val ChannelCountMode) bool {
   738  	return js.True == bindings.SetAudioNodeChannelCountMode(
   739  		this.ref,
   740  		uint32(val),
   741  	)
   742  }
   743  
   744  // ChannelInterpretation returns the value of property "AudioNode.channelInterpretation".
   745  //
   746  // It returns ok=false if there is no such property.
   747  func (this AudioNode) ChannelInterpretation() (ret ChannelInterpretation, ok bool) {
   748  	ok = js.True == bindings.GetAudioNodeChannelInterpretation(
   749  		this.ref, js.Pointer(&ret),
   750  	)
   751  	return
   752  }
   753  
   754  // SetChannelInterpretation sets the value of property "AudioNode.channelInterpretation" to val.
   755  //
   756  // It returns false if the property cannot be set.
   757  func (this AudioNode) SetChannelInterpretation(val ChannelInterpretation) bool {
   758  	return js.True == bindings.SetAudioNodeChannelInterpretation(
   759  		this.ref,
   760  		uint32(val),
   761  	)
   762  }
   763  
   764  // HasFuncConnect returns true if the method "AudioNode.connect" exists.
   765  func (this AudioNode) HasFuncConnect() bool {
   766  	return js.True == bindings.HasFuncAudioNodeConnect(
   767  		this.ref,
   768  	)
   769  }
   770  
   771  // FuncConnect returns the method "AudioNode.connect".
   772  func (this AudioNode) FuncConnect() (fn js.Func[func(destinationNode AudioNode, output uint32, input uint32) AudioNode]) {
   773  	bindings.FuncAudioNodeConnect(
   774  		this.ref, js.Pointer(&fn),
   775  	)
   776  	return
   777  }
   778  
   779  // Connect calls the method "AudioNode.connect".
   780  func (this AudioNode) Connect(destinationNode AudioNode, output uint32, input uint32) (ret AudioNode) {
   781  	bindings.CallAudioNodeConnect(
   782  		this.ref, js.Pointer(&ret),
   783  		destinationNode.Ref(),
   784  		uint32(output),
   785  		uint32(input),
   786  	)
   787  
   788  	return
   789  }
   790  
   791  // TryConnect calls the method "AudioNode.connect"
   792  // in a try/catch block and returns (_, err, ok = false) when it went through
   793  // the catch clause.
   794  func (this AudioNode) TryConnect(destinationNode AudioNode, output uint32, input uint32) (ret AudioNode, exception js.Any, ok bool) {
   795  	ok = js.True == bindings.TryAudioNodeConnect(
   796  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   797  		destinationNode.Ref(),
   798  		uint32(output),
   799  		uint32(input),
   800  	)
   801  
   802  	return
   803  }
   804  
   805  // HasFuncConnect1 returns true if the method "AudioNode.connect" exists.
   806  func (this AudioNode) HasFuncConnect1() bool {
   807  	return js.True == bindings.HasFuncAudioNodeConnect1(
   808  		this.ref,
   809  	)
   810  }
   811  
   812  // FuncConnect1 returns the method "AudioNode.connect".
   813  func (this AudioNode) FuncConnect1() (fn js.Func[func(destinationNode AudioNode, output uint32) AudioNode]) {
   814  	bindings.FuncAudioNodeConnect1(
   815  		this.ref, js.Pointer(&fn),
   816  	)
   817  	return
   818  }
   819  
   820  // Connect1 calls the method "AudioNode.connect".
   821  func (this AudioNode) Connect1(destinationNode AudioNode, output uint32) (ret AudioNode) {
   822  	bindings.CallAudioNodeConnect1(
   823  		this.ref, js.Pointer(&ret),
   824  		destinationNode.Ref(),
   825  		uint32(output),
   826  	)
   827  
   828  	return
   829  }
   830  
   831  // TryConnect1 calls the method "AudioNode.connect"
   832  // in a try/catch block and returns (_, err, ok = false) when it went through
   833  // the catch clause.
   834  func (this AudioNode) TryConnect1(destinationNode AudioNode, output uint32) (ret AudioNode, exception js.Any, ok bool) {
   835  	ok = js.True == bindings.TryAudioNodeConnect1(
   836  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   837  		destinationNode.Ref(),
   838  		uint32(output),
   839  	)
   840  
   841  	return
   842  }
   843  
   844  // HasFuncConnect2 returns true if the method "AudioNode.connect" exists.
   845  func (this AudioNode) HasFuncConnect2() bool {
   846  	return js.True == bindings.HasFuncAudioNodeConnect2(
   847  		this.ref,
   848  	)
   849  }
   850  
   851  // FuncConnect2 returns the method "AudioNode.connect".
   852  func (this AudioNode) FuncConnect2() (fn js.Func[func(destinationNode AudioNode) AudioNode]) {
   853  	bindings.FuncAudioNodeConnect2(
   854  		this.ref, js.Pointer(&fn),
   855  	)
   856  	return
   857  }
   858  
   859  // Connect2 calls the method "AudioNode.connect".
   860  func (this AudioNode) Connect2(destinationNode AudioNode) (ret AudioNode) {
   861  	bindings.CallAudioNodeConnect2(
   862  		this.ref, js.Pointer(&ret),
   863  		destinationNode.Ref(),
   864  	)
   865  
   866  	return
   867  }
   868  
   869  // TryConnect2 calls the method "AudioNode.connect"
   870  // in a try/catch block and returns (_, err, ok = false) when it went through
   871  // the catch clause.
   872  func (this AudioNode) TryConnect2(destinationNode AudioNode) (ret AudioNode, exception js.Any, ok bool) {
   873  	ok = js.True == bindings.TryAudioNodeConnect2(
   874  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   875  		destinationNode.Ref(),
   876  	)
   877  
   878  	return
   879  }
   880  
   881  // HasFuncConnect3 returns true if the method "AudioNode.connect" exists.
   882  func (this AudioNode) HasFuncConnect3() bool {
   883  	return js.True == bindings.HasFuncAudioNodeConnect3(
   884  		this.ref,
   885  	)
   886  }
   887  
   888  // FuncConnect3 returns the method "AudioNode.connect".
   889  func (this AudioNode) FuncConnect3() (fn js.Func[func(destinationParam AudioParam, output uint32)]) {
   890  	bindings.FuncAudioNodeConnect3(
   891  		this.ref, js.Pointer(&fn),
   892  	)
   893  	return
   894  }
   895  
   896  // Connect3 calls the method "AudioNode.connect".
   897  func (this AudioNode) Connect3(destinationParam AudioParam, output uint32) (ret js.Void) {
   898  	bindings.CallAudioNodeConnect3(
   899  		this.ref, js.Pointer(&ret),
   900  		destinationParam.Ref(),
   901  		uint32(output),
   902  	)
   903  
   904  	return
   905  }
   906  
   907  // TryConnect3 calls the method "AudioNode.connect"
   908  // in a try/catch block and returns (_, err, ok = false) when it went through
   909  // the catch clause.
   910  func (this AudioNode) TryConnect3(destinationParam AudioParam, output uint32) (ret js.Void, exception js.Any, ok bool) {
   911  	ok = js.True == bindings.TryAudioNodeConnect3(
   912  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   913  		destinationParam.Ref(),
   914  		uint32(output),
   915  	)
   916  
   917  	return
   918  }
   919  
   920  // HasFuncConnect4 returns true if the method "AudioNode.connect" exists.
   921  func (this AudioNode) HasFuncConnect4() bool {
   922  	return js.True == bindings.HasFuncAudioNodeConnect4(
   923  		this.ref,
   924  	)
   925  }
   926  
   927  // FuncConnect4 returns the method "AudioNode.connect".
   928  func (this AudioNode) FuncConnect4() (fn js.Func[func(destinationParam AudioParam)]) {
   929  	bindings.FuncAudioNodeConnect4(
   930  		this.ref, js.Pointer(&fn),
   931  	)
   932  	return
   933  }
   934  
   935  // Connect4 calls the method "AudioNode.connect".
   936  func (this AudioNode) Connect4(destinationParam AudioParam) (ret js.Void) {
   937  	bindings.CallAudioNodeConnect4(
   938  		this.ref, js.Pointer(&ret),
   939  		destinationParam.Ref(),
   940  	)
   941  
   942  	return
   943  }
   944  
   945  // TryConnect4 calls the method "AudioNode.connect"
   946  // in a try/catch block and returns (_, err, ok = false) when it went through
   947  // the catch clause.
   948  func (this AudioNode) TryConnect4(destinationParam AudioParam) (ret js.Void, exception js.Any, ok bool) {
   949  	ok = js.True == bindings.TryAudioNodeConnect4(
   950  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   951  		destinationParam.Ref(),
   952  	)
   953  
   954  	return
   955  }
   956  
   957  // HasFuncDisconnect returns true if the method "AudioNode.disconnect" exists.
   958  func (this AudioNode) HasFuncDisconnect() bool {
   959  	return js.True == bindings.HasFuncAudioNodeDisconnect(
   960  		this.ref,
   961  	)
   962  }
   963  
   964  // FuncDisconnect returns the method "AudioNode.disconnect".
   965  func (this AudioNode) FuncDisconnect() (fn js.Func[func()]) {
   966  	bindings.FuncAudioNodeDisconnect(
   967  		this.ref, js.Pointer(&fn),
   968  	)
   969  	return
   970  }
   971  
   972  // Disconnect calls the method "AudioNode.disconnect".
   973  func (this AudioNode) Disconnect() (ret js.Void) {
   974  	bindings.CallAudioNodeDisconnect(
   975  		this.ref, js.Pointer(&ret),
   976  	)
   977  
   978  	return
   979  }
   980  
   981  // TryDisconnect calls the method "AudioNode.disconnect"
   982  // in a try/catch block and returns (_, err, ok = false) when it went through
   983  // the catch clause.
   984  func (this AudioNode) TryDisconnect() (ret js.Void, exception js.Any, ok bool) {
   985  	ok = js.True == bindings.TryAudioNodeDisconnect(
   986  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   987  	)
   988  
   989  	return
   990  }
   991  
   992  // HasFuncDisconnect1 returns true if the method "AudioNode.disconnect" exists.
   993  func (this AudioNode) HasFuncDisconnect1() bool {
   994  	return js.True == bindings.HasFuncAudioNodeDisconnect1(
   995  		this.ref,
   996  	)
   997  }
   998  
   999  // FuncDisconnect1 returns the method "AudioNode.disconnect".
  1000  func (this AudioNode) FuncDisconnect1() (fn js.Func[func(output uint32)]) {
  1001  	bindings.FuncAudioNodeDisconnect1(
  1002  		this.ref, js.Pointer(&fn),
  1003  	)
  1004  	return
  1005  }
  1006  
  1007  // Disconnect1 calls the method "AudioNode.disconnect".
  1008  func (this AudioNode) Disconnect1(output uint32) (ret js.Void) {
  1009  	bindings.CallAudioNodeDisconnect1(
  1010  		this.ref, js.Pointer(&ret),
  1011  		uint32(output),
  1012  	)
  1013  
  1014  	return
  1015  }
  1016  
  1017  // TryDisconnect1 calls the method "AudioNode.disconnect"
  1018  // in a try/catch block and returns (_, err, ok = false) when it went through
  1019  // the catch clause.
  1020  func (this AudioNode) TryDisconnect1(output uint32) (ret js.Void, exception js.Any, ok bool) {
  1021  	ok = js.True == bindings.TryAudioNodeDisconnect1(
  1022  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1023  		uint32(output),
  1024  	)
  1025  
  1026  	return
  1027  }
  1028  
  1029  // HasFuncDisconnect2 returns true if the method "AudioNode.disconnect" exists.
  1030  func (this AudioNode) HasFuncDisconnect2() bool {
  1031  	return js.True == bindings.HasFuncAudioNodeDisconnect2(
  1032  		this.ref,
  1033  	)
  1034  }
  1035  
  1036  // FuncDisconnect2 returns the method "AudioNode.disconnect".
  1037  func (this AudioNode) FuncDisconnect2() (fn js.Func[func(destinationNode AudioNode)]) {
  1038  	bindings.FuncAudioNodeDisconnect2(
  1039  		this.ref, js.Pointer(&fn),
  1040  	)
  1041  	return
  1042  }
  1043  
  1044  // Disconnect2 calls the method "AudioNode.disconnect".
  1045  func (this AudioNode) Disconnect2(destinationNode AudioNode) (ret js.Void) {
  1046  	bindings.CallAudioNodeDisconnect2(
  1047  		this.ref, js.Pointer(&ret),
  1048  		destinationNode.Ref(),
  1049  	)
  1050  
  1051  	return
  1052  }
  1053  
  1054  // TryDisconnect2 calls the method "AudioNode.disconnect"
  1055  // in a try/catch block and returns (_, err, ok = false) when it went through
  1056  // the catch clause.
  1057  func (this AudioNode) TryDisconnect2(destinationNode AudioNode) (ret js.Void, exception js.Any, ok bool) {
  1058  	ok = js.True == bindings.TryAudioNodeDisconnect2(
  1059  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1060  		destinationNode.Ref(),
  1061  	)
  1062  
  1063  	return
  1064  }
  1065  
  1066  // HasFuncDisconnect3 returns true if the method "AudioNode.disconnect" exists.
  1067  func (this AudioNode) HasFuncDisconnect3() bool {
  1068  	return js.True == bindings.HasFuncAudioNodeDisconnect3(
  1069  		this.ref,
  1070  	)
  1071  }
  1072  
  1073  // FuncDisconnect3 returns the method "AudioNode.disconnect".
  1074  func (this AudioNode) FuncDisconnect3() (fn js.Func[func(destinationNode AudioNode, output uint32)]) {
  1075  	bindings.FuncAudioNodeDisconnect3(
  1076  		this.ref, js.Pointer(&fn),
  1077  	)
  1078  	return
  1079  }
  1080  
  1081  // Disconnect3 calls the method "AudioNode.disconnect".
  1082  func (this AudioNode) Disconnect3(destinationNode AudioNode, output uint32) (ret js.Void) {
  1083  	bindings.CallAudioNodeDisconnect3(
  1084  		this.ref, js.Pointer(&ret),
  1085  		destinationNode.Ref(),
  1086  		uint32(output),
  1087  	)
  1088  
  1089  	return
  1090  }
  1091  
  1092  // TryDisconnect3 calls the method "AudioNode.disconnect"
  1093  // in a try/catch block and returns (_, err, ok = false) when it went through
  1094  // the catch clause.
  1095  func (this AudioNode) TryDisconnect3(destinationNode AudioNode, output uint32) (ret js.Void, exception js.Any, ok bool) {
  1096  	ok = js.True == bindings.TryAudioNodeDisconnect3(
  1097  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1098  		destinationNode.Ref(),
  1099  		uint32(output),
  1100  	)
  1101  
  1102  	return
  1103  }
  1104  
  1105  // HasFuncDisconnect4 returns true if the method "AudioNode.disconnect" exists.
  1106  func (this AudioNode) HasFuncDisconnect4() bool {
  1107  	return js.True == bindings.HasFuncAudioNodeDisconnect4(
  1108  		this.ref,
  1109  	)
  1110  }
  1111  
  1112  // FuncDisconnect4 returns the method "AudioNode.disconnect".
  1113  func (this AudioNode) FuncDisconnect4() (fn js.Func[func(destinationNode AudioNode, output uint32, input uint32)]) {
  1114  	bindings.FuncAudioNodeDisconnect4(
  1115  		this.ref, js.Pointer(&fn),
  1116  	)
  1117  	return
  1118  }
  1119  
  1120  // Disconnect4 calls the method "AudioNode.disconnect".
  1121  func (this AudioNode) Disconnect4(destinationNode AudioNode, output uint32, input uint32) (ret js.Void) {
  1122  	bindings.CallAudioNodeDisconnect4(
  1123  		this.ref, js.Pointer(&ret),
  1124  		destinationNode.Ref(),
  1125  		uint32(output),
  1126  		uint32(input),
  1127  	)
  1128  
  1129  	return
  1130  }
  1131  
  1132  // TryDisconnect4 calls the method "AudioNode.disconnect"
  1133  // in a try/catch block and returns (_, err, ok = false) when it went through
  1134  // the catch clause.
  1135  func (this AudioNode) TryDisconnect4(destinationNode AudioNode, output uint32, input uint32) (ret js.Void, exception js.Any, ok bool) {
  1136  	ok = js.True == bindings.TryAudioNodeDisconnect4(
  1137  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1138  		destinationNode.Ref(),
  1139  		uint32(output),
  1140  		uint32(input),
  1141  	)
  1142  
  1143  	return
  1144  }
  1145  
  1146  // HasFuncDisconnect5 returns true if the method "AudioNode.disconnect" exists.
  1147  func (this AudioNode) HasFuncDisconnect5() bool {
  1148  	return js.True == bindings.HasFuncAudioNodeDisconnect5(
  1149  		this.ref,
  1150  	)
  1151  }
  1152  
  1153  // FuncDisconnect5 returns the method "AudioNode.disconnect".
  1154  func (this AudioNode) FuncDisconnect5() (fn js.Func[func(destinationParam AudioParam)]) {
  1155  	bindings.FuncAudioNodeDisconnect5(
  1156  		this.ref, js.Pointer(&fn),
  1157  	)
  1158  	return
  1159  }
  1160  
  1161  // Disconnect5 calls the method "AudioNode.disconnect".
  1162  func (this AudioNode) Disconnect5(destinationParam AudioParam) (ret js.Void) {
  1163  	bindings.CallAudioNodeDisconnect5(
  1164  		this.ref, js.Pointer(&ret),
  1165  		destinationParam.Ref(),
  1166  	)
  1167  
  1168  	return
  1169  }
  1170  
  1171  // TryDisconnect5 calls the method "AudioNode.disconnect"
  1172  // in a try/catch block and returns (_, err, ok = false) when it went through
  1173  // the catch clause.
  1174  func (this AudioNode) TryDisconnect5(destinationParam AudioParam) (ret js.Void, exception js.Any, ok bool) {
  1175  	ok = js.True == bindings.TryAudioNodeDisconnect5(
  1176  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1177  		destinationParam.Ref(),
  1178  	)
  1179  
  1180  	return
  1181  }
  1182  
  1183  // HasFuncDisconnect6 returns true if the method "AudioNode.disconnect" exists.
  1184  func (this AudioNode) HasFuncDisconnect6() bool {
  1185  	return js.True == bindings.HasFuncAudioNodeDisconnect6(
  1186  		this.ref,
  1187  	)
  1188  }
  1189  
  1190  // FuncDisconnect6 returns the method "AudioNode.disconnect".
  1191  func (this AudioNode) FuncDisconnect6() (fn js.Func[func(destinationParam AudioParam, output uint32)]) {
  1192  	bindings.FuncAudioNodeDisconnect6(
  1193  		this.ref, js.Pointer(&fn),
  1194  	)
  1195  	return
  1196  }
  1197  
  1198  // Disconnect6 calls the method "AudioNode.disconnect".
  1199  func (this AudioNode) Disconnect6(destinationParam AudioParam, output uint32) (ret js.Void) {
  1200  	bindings.CallAudioNodeDisconnect6(
  1201  		this.ref, js.Pointer(&ret),
  1202  		destinationParam.Ref(),
  1203  		uint32(output),
  1204  	)
  1205  
  1206  	return
  1207  }
  1208  
  1209  // TryDisconnect6 calls the method "AudioNode.disconnect"
  1210  // in a try/catch block and returns (_, err, ok = false) when it went through
  1211  // the catch clause.
  1212  func (this AudioNode) TryDisconnect6(destinationParam AudioParam, output uint32) (ret js.Void, exception js.Any, ok bool) {
  1213  	ok = js.True == bindings.TryAudioNodeDisconnect6(
  1214  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1215  		destinationParam.Ref(),
  1216  		uint32(output),
  1217  	)
  1218  
  1219  	return
  1220  }
  1221  
  1222  type AudioOutputOptions struct {
  1223  	// DeviceId is "AudioOutputOptions.deviceId"
  1224  	//
  1225  	// Optional, defaults to "".
  1226  	DeviceId js.String
  1227  
  1228  	FFI_USE bool
  1229  }
  1230  
  1231  // FromRef calls UpdateFrom and returns a AudioOutputOptions with all fields set.
  1232  func (p AudioOutputOptions) FromRef(ref js.Ref) AudioOutputOptions {
  1233  	p.UpdateFrom(ref)
  1234  	return p
  1235  }
  1236  
  1237  // New creates a new AudioOutputOptions in the application heap.
  1238  func (p AudioOutputOptions) New() js.Ref {
  1239  	return bindings.AudioOutputOptionsJSLoad(
  1240  		js.Pointer(&p), js.True, 0,
  1241  	)
  1242  }
  1243  
  1244  // UpdateFrom copies value of all fields of the heap object to p.
  1245  func (p *AudioOutputOptions) UpdateFrom(ref js.Ref) {
  1246  	bindings.AudioOutputOptionsJSStore(
  1247  		js.Pointer(p), ref,
  1248  	)
  1249  }
  1250  
  1251  // Update writes all fields of the p to the heap object referenced by ref.
  1252  func (p *AudioOutputOptions) Update(ref js.Ref) {
  1253  	bindings.AudioOutputOptionsJSLoad(
  1254  		js.Pointer(p), js.False, ref,
  1255  	)
  1256  }
  1257  
  1258  // FreeMembers frees fields with heap reference, if recursive is true
  1259  // free all heap references reachable from p.
  1260  func (p *AudioOutputOptions) FreeMembers(recursive bool) {
  1261  	js.Free(
  1262  		p.DeviceId.Ref(),
  1263  	)
  1264  	p.DeviceId = p.DeviceId.FromRef(js.Undefined)
  1265  }
  1266  
  1267  type AudioParamDescriptor struct {
  1268  	// Name is "AudioParamDescriptor.name"
  1269  	//
  1270  	// Required
  1271  	Name js.String
  1272  	// DefaultValue is "AudioParamDescriptor.defaultValue"
  1273  	//
  1274  	// Optional, defaults to 0.
  1275  	//
  1276  	// NOTE: FFI_USE_DefaultValue MUST be set to true to make this field effective.
  1277  	DefaultValue float32
  1278  	// MinValue is "AudioParamDescriptor.minValue"
  1279  	//
  1280  	// Optional, defaults to -3.4028235e38.
  1281  	//
  1282  	// NOTE: FFI_USE_MinValue MUST be set to true to make this field effective.
  1283  	MinValue float32
  1284  	// MaxValue is "AudioParamDescriptor.maxValue"
  1285  	//
  1286  	// Optional, defaults to 3.4028235e38.
  1287  	//
  1288  	// NOTE: FFI_USE_MaxValue MUST be set to true to make this field effective.
  1289  	MaxValue float32
  1290  	// AutomationRate is "AudioParamDescriptor.automationRate"
  1291  	//
  1292  	// Optional, defaults to "a-rate".
  1293  	AutomationRate AutomationRate
  1294  
  1295  	FFI_USE_DefaultValue bool // for DefaultValue.
  1296  	FFI_USE_MinValue     bool // for MinValue.
  1297  	FFI_USE_MaxValue     bool // for MaxValue.
  1298  
  1299  	FFI_USE bool
  1300  }
  1301  
  1302  // FromRef calls UpdateFrom and returns a AudioParamDescriptor with all fields set.
  1303  func (p AudioParamDescriptor) FromRef(ref js.Ref) AudioParamDescriptor {
  1304  	p.UpdateFrom(ref)
  1305  	return p
  1306  }
  1307  
  1308  // New creates a new AudioParamDescriptor in the application heap.
  1309  func (p AudioParamDescriptor) New() js.Ref {
  1310  	return bindings.AudioParamDescriptorJSLoad(
  1311  		js.Pointer(&p), js.True, 0,
  1312  	)
  1313  }
  1314  
  1315  // UpdateFrom copies value of all fields of the heap object to p.
  1316  func (p *AudioParamDescriptor) UpdateFrom(ref js.Ref) {
  1317  	bindings.AudioParamDescriptorJSStore(
  1318  		js.Pointer(p), ref,
  1319  	)
  1320  }
  1321  
  1322  // Update writes all fields of the p to the heap object referenced by ref.
  1323  func (p *AudioParamDescriptor) Update(ref js.Ref) {
  1324  	bindings.AudioParamDescriptorJSLoad(
  1325  		js.Pointer(p), js.False, ref,
  1326  	)
  1327  }
  1328  
  1329  // FreeMembers frees fields with heap reference, if recursive is true
  1330  // free all heap references reachable from p.
  1331  func (p *AudioParamDescriptor) FreeMembers(recursive bool) {
  1332  	js.Free(
  1333  		p.Name.Ref(),
  1334  	)
  1335  	p.Name = p.Name.FromRef(js.Undefined)
  1336  }
  1337  
  1338  type AudioParamMap struct {
  1339  	ref js.Ref
  1340  }
  1341  
  1342  func (this AudioParamMap) Once() AudioParamMap {
  1343  	this.ref.Once()
  1344  	return this
  1345  }
  1346  
  1347  func (this AudioParamMap) Ref() js.Ref {
  1348  	return this.ref
  1349  }
  1350  
  1351  func (this AudioParamMap) FromRef(ref js.Ref) AudioParamMap {
  1352  	this.ref = ref
  1353  	return this
  1354  }
  1355  
  1356  func (this AudioParamMap) Free() {
  1357  	this.ref.Free()
  1358  }
  1359  
  1360  type AudioProcessingEventInit struct {
  1361  	// PlaybackTime is "AudioProcessingEventInit.playbackTime"
  1362  	//
  1363  	// Required
  1364  	PlaybackTime float64
  1365  	// InputBuffer is "AudioProcessingEventInit.inputBuffer"
  1366  	//
  1367  	// Required
  1368  	InputBuffer AudioBuffer
  1369  	// OutputBuffer is "AudioProcessingEventInit.outputBuffer"
  1370  	//
  1371  	// Required
  1372  	OutputBuffer AudioBuffer
  1373  	// Bubbles is "AudioProcessingEventInit.bubbles"
  1374  	//
  1375  	// Optional, defaults to false.
  1376  	//
  1377  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  1378  	Bubbles bool
  1379  	// Cancelable is "AudioProcessingEventInit.cancelable"
  1380  	//
  1381  	// Optional, defaults to false.
  1382  	//
  1383  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  1384  	Cancelable bool
  1385  	// Composed is "AudioProcessingEventInit.composed"
  1386  	//
  1387  	// Optional, defaults to false.
  1388  	//
  1389  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  1390  	Composed bool
  1391  
  1392  	FFI_USE_Bubbles    bool // for Bubbles.
  1393  	FFI_USE_Cancelable bool // for Cancelable.
  1394  	FFI_USE_Composed   bool // for Composed.
  1395  
  1396  	FFI_USE bool
  1397  }
  1398  
  1399  // FromRef calls UpdateFrom and returns a AudioProcessingEventInit with all fields set.
  1400  func (p AudioProcessingEventInit) FromRef(ref js.Ref) AudioProcessingEventInit {
  1401  	p.UpdateFrom(ref)
  1402  	return p
  1403  }
  1404  
  1405  // New creates a new AudioProcessingEventInit in the application heap.
  1406  func (p AudioProcessingEventInit) New() js.Ref {
  1407  	return bindings.AudioProcessingEventInitJSLoad(
  1408  		js.Pointer(&p), js.True, 0,
  1409  	)
  1410  }
  1411  
  1412  // UpdateFrom copies value of all fields of the heap object to p.
  1413  func (p *AudioProcessingEventInit) UpdateFrom(ref js.Ref) {
  1414  	bindings.AudioProcessingEventInitJSStore(
  1415  		js.Pointer(p), ref,
  1416  	)
  1417  }
  1418  
  1419  // Update writes all fields of the p to the heap object referenced by ref.
  1420  func (p *AudioProcessingEventInit) Update(ref js.Ref) {
  1421  	bindings.AudioProcessingEventInitJSLoad(
  1422  		js.Pointer(p), js.False, ref,
  1423  	)
  1424  }
  1425  
  1426  // FreeMembers frees fields with heap reference, if recursive is true
  1427  // free all heap references reachable from p.
  1428  func (p *AudioProcessingEventInit) FreeMembers(recursive bool) {
  1429  	js.Free(
  1430  		p.InputBuffer.Ref(),
  1431  		p.OutputBuffer.Ref(),
  1432  	)
  1433  	p.InputBuffer = p.InputBuffer.FromRef(js.Undefined)
  1434  	p.OutputBuffer = p.OutputBuffer.FromRef(js.Undefined)
  1435  }
  1436  
  1437  func NewAudioProcessingEvent(typ js.String, eventInitDict AudioProcessingEventInit) (ret AudioProcessingEvent) {
  1438  	ret.ref = bindings.NewAudioProcessingEventByAudioProcessingEvent(
  1439  		typ.Ref(),
  1440  		js.Pointer(&eventInitDict))
  1441  	return
  1442  }
  1443  
  1444  type AudioProcessingEvent struct {
  1445  	Event
  1446  }
  1447  
  1448  func (this AudioProcessingEvent) Once() AudioProcessingEvent {
  1449  	this.ref.Once()
  1450  	return this
  1451  }
  1452  
  1453  func (this AudioProcessingEvent) Ref() js.Ref {
  1454  	return this.Event.Ref()
  1455  }
  1456  
  1457  func (this AudioProcessingEvent) FromRef(ref js.Ref) AudioProcessingEvent {
  1458  	this.Event = this.Event.FromRef(ref)
  1459  	return this
  1460  }
  1461  
  1462  func (this AudioProcessingEvent) Free() {
  1463  	this.ref.Free()
  1464  }
  1465  
  1466  // PlaybackTime returns the value of property "AudioProcessingEvent.playbackTime".
  1467  //
  1468  // It returns ok=false if there is no such property.
  1469  func (this AudioProcessingEvent) PlaybackTime() (ret float64, ok bool) {
  1470  	ok = js.True == bindings.GetAudioProcessingEventPlaybackTime(
  1471  		this.ref, js.Pointer(&ret),
  1472  	)
  1473  	return
  1474  }
  1475  
  1476  // InputBuffer returns the value of property "AudioProcessingEvent.inputBuffer".
  1477  //
  1478  // It returns ok=false if there is no such property.
  1479  func (this AudioProcessingEvent) InputBuffer() (ret AudioBuffer, ok bool) {
  1480  	ok = js.True == bindings.GetAudioProcessingEventInputBuffer(
  1481  		this.ref, js.Pointer(&ret),
  1482  	)
  1483  	return
  1484  }
  1485  
  1486  // OutputBuffer returns the value of property "AudioProcessingEvent.outputBuffer".
  1487  //
  1488  // It returns ok=false if there is no such property.
  1489  func (this AudioProcessingEvent) OutputBuffer() (ret AudioBuffer, ok bool) {
  1490  	ok = js.True == bindings.GetAudioProcessingEventOutputBuffer(
  1491  		this.ref, js.Pointer(&ret),
  1492  	)
  1493  	return
  1494  }
  1495  
  1496  type AudioRenderCapacityEventInit struct {
  1497  	// Timestamp is "AudioRenderCapacityEventInit.timestamp"
  1498  	//
  1499  	// Optional, defaults to 0.
  1500  	//
  1501  	// NOTE: FFI_USE_Timestamp MUST be set to true to make this field effective.
  1502  	Timestamp float64
  1503  	// AverageLoad is "AudioRenderCapacityEventInit.averageLoad"
  1504  	//
  1505  	// Optional, defaults to 0.
  1506  	//
  1507  	// NOTE: FFI_USE_AverageLoad MUST be set to true to make this field effective.
  1508  	AverageLoad float64
  1509  	// PeakLoad is "AudioRenderCapacityEventInit.peakLoad"
  1510  	//
  1511  	// Optional, defaults to 0.
  1512  	//
  1513  	// NOTE: FFI_USE_PeakLoad MUST be set to true to make this field effective.
  1514  	PeakLoad float64
  1515  	// UnderrunRatio is "AudioRenderCapacityEventInit.underrunRatio"
  1516  	//
  1517  	// Optional, defaults to 0.
  1518  	//
  1519  	// NOTE: FFI_USE_UnderrunRatio MUST be set to true to make this field effective.
  1520  	UnderrunRatio float64
  1521  	// Bubbles is "AudioRenderCapacityEventInit.bubbles"
  1522  	//
  1523  	// Optional, defaults to false.
  1524  	//
  1525  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  1526  	Bubbles bool
  1527  	// Cancelable is "AudioRenderCapacityEventInit.cancelable"
  1528  	//
  1529  	// Optional, defaults to false.
  1530  	//
  1531  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  1532  	Cancelable bool
  1533  	// Composed is "AudioRenderCapacityEventInit.composed"
  1534  	//
  1535  	// Optional, defaults to false.
  1536  	//
  1537  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  1538  	Composed bool
  1539  
  1540  	FFI_USE_Timestamp     bool // for Timestamp.
  1541  	FFI_USE_AverageLoad   bool // for AverageLoad.
  1542  	FFI_USE_PeakLoad      bool // for PeakLoad.
  1543  	FFI_USE_UnderrunRatio bool // for UnderrunRatio.
  1544  	FFI_USE_Bubbles       bool // for Bubbles.
  1545  	FFI_USE_Cancelable    bool // for Cancelable.
  1546  	FFI_USE_Composed      bool // for Composed.
  1547  
  1548  	FFI_USE bool
  1549  }
  1550  
  1551  // FromRef calls UpdateFrom and returns a AudioRenderCapacityEventInit with all fields set.
  1552  func (p AudioRenderCapacityEventInit) FromRef(ref js.Ref) AudioRenderCapacityEventInit {
  1553  	p.UpdateFrom(ref)
  1554  	return p
  1555  }
  1556  
  1557  // New creates a new AudioRenderCapacityEventInit in the application heap.
  1558  func (p AudioRenderCapacityEventInit) New() js.Ref {
  1559  	return bindings.AudioRenderCapacityEventInitJSLoad(
  1560  		js.Pointer(&p), js.True, 0,
  1561  	)
  1562  }
  1563  
  1564  // UpdateFrom copies value of all fields of the heap object to p.
  1565  func (p *AudioRenderCapacityEventInit) UpdateFrom(ref js.Ref) {
  1566  	bindings.AudioRenderCapacityEventInitJSStore(
  1567  		js.Pointer(p), ref,
  1568  	)
  1569  }
  1570  
  1571  // Update writes all fields of the p to the heap object referenced by ref.
  1572  func (p *AudioRenderCapacityEventInit) Update(ref js.Ref) {
  1573  	bindings.AudioRenderCapacityEventInitJSLoad(
  1574  		js.Pointer(p), js.False, ref,
  1575  	)
  1576  }
  1577  
  1578  // FreeMembers frees fields with heap reference, if recursive is true
  1579  // free all heap references reachable from p.
  1580  func (p *AudioRenderCapacityEventInit) FreeMembers(recursive bool) {
  1581  }
  1582  
  1583  func NewAudioRenderCapacityEvent(typ js.String, eventInitDict AudioRenderCapacityEventInit) (ret AudioRenderCapacityEvent) {
  1584  	ret.ref = bindings.NewAudioRenderCapacityEventByAudioRenderCapacityEvent(
  1585  		typ.Ref(),
  1586  		js.Pointer(&eventInitDict))
  1587  	return
  1588  }
  1589  
  1590  func NewAudioRenderCapacityEventByAudioRenderCapacityEvent1(typ js.String) (ret AudioRenderCapacityEvent) {
  1591  	ret.ref = bindings.NewAudioRenderCapacityEventByAudioRenderCapacityEvent1(
  1592  		typ.Ref())
  1593  	return
  1594  }
  1595  
  1596  type AudioRenderCapacityEvent struct {
  1597  	Event
  1598  }
  1599  
  1600  func (this AudioRenderCapacityEvent) Once() AudioRenderCapacityEvent {
  1601  	this.ref.Once()
  1602  	return this
  1603  }
  1604  
  1605  func (this AudioRenderCapacityEvent) Ref() js.Ref {
  1606  	return this.Event.Ref()
  1607  }
  1608  
  1609  func (this AudioRenderCapacityEvent) FromRef(ref js.Ref) AudioRenderCapacityEvent {
  1610  	this.Event = this.Event.FromRef(ref)
  1611  	return this
  1612  }
  1613  
  1614  func (this AudioRenderCapacityEvent) Free() {
  1615  	this.ref.Free()
  1616  }
  1617  
  1618  // Timestamp returns the value of property "AudioRenderCapacityEvent.timestamp".
  1619  //
  1620  // It returns ok=false if there is no such property.
  1621  func (this AudioRenderCapacityEvent) Timestamp() (ret float64, ok bool) {
  1622  	ok = js.True == bindings.GetAudioRenderCapacityEventTimestamp(
  1623  		this.ref, js.Pointer(&ret),
  1624  	)
  1625  	return
  1626  }
  1627  
  1628  // AverageLoad returns the value of property "AudioRenderCapacityEvent.averageLoad".
  1629  //
  1630  // It returns ok=false if there is no such property.
  1631  func (this AudioRenderCapacityEvent) AverageLoad() (ret float64, ok bool) {
  1632  	ok = js.True == bindings.GetAudioRenderCapacityEventAverageLoad(
  1633  		this.ref, js.Pointer(&ret),
  1634  	)
  1635  	return
  1636  }
  1637  
  1638  // PeakLoad returns the value of property "AudioRenderCapacityEvent.peakLoad".
  1639  //
  1640  // It returns ok=false if there is no such property.
  1641  func (this AudioRenderCapacityEvent) PeakLoad() (ret float64, ok bool) {
  1642  	ok = js.True == bindings.GetAudioRenderCapacityEventPeakLoad(
  1643  		this.ref, js.Pointer(&ret),
  1644  	)
  1645  	return
  1646  }
  1647  
  1648  // UnderrunRatio returns the value of property "AudioRenderCapacityEvent.underrunRatio".
  1649  //
  1650  // It returns ok=false if there is no such property.
  1651  func (this AudioRenderCapacityEvent) UnderrunRatio() (ret float64, ok bool) {
  1652  	ok = js.True == bindings.GetAudioRenderCapacityEventUnderrunRatio(
  1653  		this.ref, js.Pointer(&ret),
  1654  	)
  1655  	return
  1656  }
  1657  
  1658  type AudioScheduledSourceNode struct {
  1659  	AudioNode
  1660  }
  1661  
  1662  func (this AudioScheduledSourceNode) Once() AudioScheduledSourceNode {
  1663  	this.ref.Once()
  1664  	return this
  1665  }
  1666  
  1667  func (this AudioScheduledSourceNode) Ref() js.Ref {
  1668  	return this.AudioNode.Ref()
  1669  }
  1670  
  1671  func (this AudioScheduledSourceNode) FromRef(ref js.Ref) AudioScheduledSourceNode {
  1672  	this.AudioNode = this.AudioNode.FromRef(ref)
  1673  	return this
  1674  }
  1675  
  1676  func (this AudioScheduledSourceNode) Free() {
  1677  	this.ref.Free()
  1678  }
  1679  
  1680  // HasFuncStart returns true if the method "AudioScheduledSourceNode.start" exists.
  1681  func (this AudioScheduledSourceNode) HasFuncStart() bool {
  1682  	return js.True == bindings.HasFuncAudioScheduledSourceNodeStart(
  1683  		this.ref,
  1684  	)
  1685  }
  1686  
  1687  // FuncStart returns the method "AudioScheduledSourceNode.start".
  1688  func (this AudioScheduledSourceNode) FuncStart() (fn js.Func[func(when float64)]) {
  1689  	bindings.FuncAudioScheduledSourceNodeStart(
  1690  		this.ref, js.Pointer(&fn),
  1691  	)
  1692  	return
  1693  }
  1694  
  1695  // Start calls the method "AudioScheduledSourceNode.start".
  1696  func (this AudioScheduledSourceNode) Start(when float64) (ret js.Void) {
  1697  	bindings.CallAudioScheduledSourceNodeStart(
  1698  		this.ref, js.Pointer(&ret),
  1699  		float64(when),
  1700  	)
  1701  
  1702  	return
  1703  }
  1704  
  1705  // TryStart calls the method "AudioScheduledSourceNode.start"
  1706  // in a try/catch block and returns (_, err, ok = false) when it went through
  1707  // the catch clause.
  1708  func (this AudioScheduledSourceNode) TryStart(when float64) (ret js.Void, exception js.Any, ok bool) {
  1709  	ok = js.True == bindings.TryAudioScheduledSourceNodeStart(
  1710  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1711  		float64(when),
  1712  	)
  1713  
  1714  	return
  1715  }
  1716  
  1717  // HasFuncStart1 returns true if the method "AudioScheduledSourceNode.start" exists.
  1718  func (this AudioScheduledSourceNode) HasFuncStart1() bool {
  1719  	return js.True == bindings.HasFuncAudioScheduledSourceNodeStart1(
  1720  		this.ref,
  1721  	)
  1722  }
  1723  
  1724  // FuncStart1 returns the method "AudioScheduledSourceNode.start".
  1725  func (this AudioScheduledSourceNode) FuncStart1() (fn js.Func[func()]) {
  1726  	bindings.FuncAudioScheduledSourceNodeStart1(
  1727  		this.ref, js.Pointer(&fn),
  1728  	)
  1729  	return
  1730  }
  1731  
  1732  // Start1 calls the method "AudioScheduledSourceNode.start".
  1733  func (this AudioScheduledSourceNode) Start1() (ret js.Void) {
  1734  	bindings.CallAudioScheduledSourceNodeStart1(
  1735  		this.ref, js.Pointer(&ret),
  1736  	)
  1737  
  1738  	return
  1739  }
  1740  
  1741  // TryStart1 calls the method "AudioScheduledSourceNode.start"
  1742  // in a try/catch block and returns (_, err, ok = false) when it went through
  1743  // the catch clause.
  1744  func (this AudioScheduledSourceNode) TryStart1() (ret js.Void, exception js.Any, ok bool) {
  1745  	ok = js.True == bindings.TryAudioScheduledSourceNodeStart1(
  1746  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1747  	)
  1748  
  1749  	return
  1750  }
  1751  
  1752  // HasFuncStop returns true if the method "AudioScheduledSourceNode.stop" exists.
  1753  func (this AudioScheduledSourceNode) HasFuncStop() bool {
  1754  	return js.True == bindings.HasFuncAudioScheduledSourceNodeStop(
  1755  		this.ref,
  1756  	)
  1757  }
  1758  
  1759  // FuncStop returns the method "AudioScheduledSourceNode.stop".
  1760  func (this AudioScheduledSourceNode) FuncStop() (fn js.Func[func(when float64)]) {
  1761  	bindings.FuncAudioScheduledSourceNodeStop(
  1762  		this.ref, js.Pointer(&fn),
  1763  	)
  1764  	return
  1765  }
  1766  
  1767  // Stop calls the method "AudioScheduledSourceNode.stop".
  1768  func (this AudioScheduledSourceNode) Stop(when float64) (ret js.Void) {
  1769  	bindings.CallAudioScheduledSourceNodeStop(
  1770  		this.ref, js.Pointer(&ret),
  1771  		float64(when),
  1772  	)
  1773  
  1774  	return
  1775  }
  1776  
  1777  // TryStop calls the method "AudioScheduledSourceNode.stop"
  1778  // in a try/catch block and returns (_, err, ok = false) when it went through
  1779  // the catch clause.
  1780  func (this AudioScheduledSourceNode) TryStop(when float64) (ret js.Void, exception js.Any, ok bool) {
  1781  	ok = js.True == bindings.TryAudioScheduledSourceNodeStop(
  1782  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1783  		float64(when),
  1784  	)
  1785  
  1786  	return
  1787  }
  1788  
  1789  // HasFuncStop1 returns true if the method "AudioScheduledSourceNode.stop" exists.
  1790  func (this AudioScheduledSourceNode) HasFuncStop1() bool {
  1791  	return js.True == bindings.HasFuncAudioScheduledSourceNodeStop1(
  1792  		this.ref,
  1793  	)
  1794  }
  1795  
  1796  // FuncStop1 returns the method "AudioScheduledSourceNode.stop".
  1797  func (this AudioScheduledSourceNode) FuncStop1() (fn js.Func[func()]) {
  1798  	bindings.FuncAudioScheduledSourceNodeStop1(
  1799  		this.ref, js.Pointer(&fn),
  1800  	)
  1801  	return
  1802  }
  1803  
  1804  // Stop1 calls the method "AudioScheduledSourceNode.stop".
  1805  func (this AudioScheduledSourceNode) Stop1() (ret js.Void) {
  1806  	bindings.CallAudioScheduledSourceNodeStop1(
  1807  		this.ref, js.Pointer(&ret),
  1808  	)
  1809  
  1810  	return
  1811  }
  1812  
  1813  // TryStop1 calls the method "AudioScheduledSourceNode.stop"
  1814  // in a try/catch block and returns (_, err, ok = false) when it went through
  1815  // the catch clause.
  1816  func (this AudioScheduledSourceNode) TryStop1() (ret js.Void, exception js.Any, ok bool) {
  1817  	ok = js.True == bindings.TryAudioScheduledSourceNodeStop1(
  1818  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1819  	)
  1820  
  1821  	return
  1822  }
  1823  
  1824  type AudioWorkletProcessorConstructorFunc func(this js.Ref, options js.Object) js.Ref
  1825  
  1826  func (fn AudioWorkletProcessorConstructorFunc) Register() js.Func[func(options js.Object) AudioWorkletProcessor] {
  1827  	return js.RegisterCallback[func(options js.Object) AudioWorkletProcessor](
  1828  		fn, abi.FuncPCABIInternal(fn),
  1829  	)
  1830  }
  1831  
  1832  func (fn AudioWorkletProcessorConstructorFunc) DispatchCallback(
  1833  	targetPC uintptr, ctx *js.CallbackContext,
  1834  ) {
  1835  	args := ctx.Args()
  1836  	if len(args) != 1+1 /* js this */ ||
  1837  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  1838  		js.ThrowInvalidCallbackInvocation()
  1839  	}
  1840  
  1841  	if ctx.Return(fn(
  1842  		args[0],
  1843  
  1844  		js.Object{}.FromRef(args[0+1]),
  1845  	)) {
  1846  		return
  1847  	}
  1848  
  1849  	js.ThrowCallbackValueNotReturned()
  1850  }
  1851  
  1852  type AudioWorkletProcessorConstructor[T any] struct {
  1853  	Fn  func(arg T, this js.Ref, options js.Object) js.Ref
  1854  	Arg T
  1855  }
  1856  
  1857  func (cb *AudioWorkletProcessorConstructor[T]) Register() js.Func[func(options js.Object) AudioWorkletProcessor] {
  1858  	return js.RegisterCallback[func(options js.Object) AudioWorkletProcessor](
  1859  		cb, abi.FuncPCABIInternal(cb.Fn),
  1860  	)
  1861  }
  1862  
  1863  func (cb *AudioWorkletProcessorConstructor[T]) DispatchCallback(
  1864  	targetPC uintptr, ctx *js.CallbackContext,
  1865  ) {
  1866  	args := ctx.Args()
  1867  	if len(args) != 1+1 /* js this */ ||
  1868  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  1869  		js.ThrowInvalidCallbackInvocation()
  1870  	}
  1871  
  1872  	if ctx.Return(cb.Fn(
  1873  		cb.Arg,
  1874  		args[0],
  1875  
  1876  		js.Object{}.FromRef(args[0+1]),
  1877  	)) {
  1878  		return
  1879  	}
  1880  
  1881  	js.ThrowCallbackValueNotReturned()
  1882  }
  1883  
  1884  type AudioWorkletProcessor struct {
  1885  	ref js.Ref
  1886  }
  1887  
  1888  func (this AudioWorkletProcessor) Once() AudioWorkletProcessor {
  1889  	this.ref.Once()
  1890  	return this
  1891  }
  1892  
  1893  func (this AudioWorkletProcessor) Ref() js.Ref {
  1894  	return this.ref
  1895  }
  1896  
  1897  func (this AudioWorkletProcessor) FromRef(ref js.Ref) AudioWorkletProcessor {
  1898  	this.ref = ref
  1899  	return this
  1900  }
  1901  
  1902  func (this AudioWorkletProcessor) Free() {
  1903  	this.ref.Free()
  1904  }
  1905  
  1906  // Port returns the value of property "AudioWorkletProcessor.port".
  1907  //
  1908  // It returns ok=false if there is no such property.
  1909  func (this AudioWorkletProcessor) Port() (ret MessagePort, ok bool) {
  1910  	ok = js.True == bindings.GetAudioWorkletProcessorPort(
  1911  		this.ref, js.Pointer(&ret),
  1912  	)
  1913  	return
  1914  }
  1915  
  1916  type AudioWorkletGlobalScope struct {
  1917  	WorkletGlobalScope
  1918  }
  1919  
  1920  func (this AudioWorkletGlobalScope) Once() AudioWorkletGlobalScope {
  1921  	this.ref.Once()
  1922  	return this
  1923  }
  1924  
  1925  func (this AudioWorkletGlobalScope) Ref() js.Ref {
  1926  	return this.WorkletGlobalScope.Ref()
  1927  }
  1928  
  1929  func (this AudioWorkletGlobalScope) FromRef(ref js.Ref) AudioWorkletGlobalScope {
  1930  	this.WorkletGlobalScope = this.WorkletGlobalScope.FromRef(ref)
  1931  	return this
  1932  }
  1933  
  1934  func (this AudioWorkletGlobalScope) Free() {
  1935  	this.ref.Free()
  1936  }
  1937  
  1938  // CurrentFrame returns the value of property "AudioWorkletGlobalScope.currentFrame".
  1939  //
  1940  // It returns ok=false if there is no such property.
  1941  func (this AudioWorkletGlobalScope) CurrentFrame() (ret uint64, ok bool) {
  1942  	ok = js.True == bindings.GetAudioWorkletGlobalScopeCurrentFrame(
  1943  		this.ref, js.Pointer(&ret),
  1944  	)
  1945  	return
  1946  }
  1947  
  1948  // CurrentTime returns the value of property "AudioWorkletGlobalScope.currentTime".
  1949  //
  1950  // It returns ok=false if there is no such property.
  1951  func (this AudioWorkletGlobalScope) CurrentTime() (ret float64, ok bool) {
  1952  	ok = js.True == bindings.GetAudioWorkletGlobalScopeCurrentTime(
  1953  		this.ref, js.Pointer(&ret),
  1954  	)
  1955  	return
  1956  }
  1957  
  1958  // SampleRate returns the value of property "AudioWorkletGlobalScope.sampleRate".
  1959  //
  1960  // It returns ok=false if there is no such property.
  1961  func (this AudioWorkletGlobalScope) SampleRate() (ret float32, ok bool) {
  1962  	ok = js.True == bindings.GetAudioWorkletGlobalScopeSampleRate(
  1963  		this.ref, js.Pointer(&ret),
  1964  	)
  1965  	return
  1966  }
  1967  
  1968  // Port returns the value of property "AudioWorkletGlobalScope.port".
  1969  //
  1970  // It returns ok=false if there is no such property.
  1971  func (this AudioWorkletGlobalScope) Port() (ret MessagePort, ok bool) {
  1972  	ok = js.True == bindings.GetAudioWorkletGlobalScopePort(
  1973  		this.ref, js.Pointer(&ret),
  1974  	)
  1975  	return
  1976  }
  1977  
  1978  // HasFuncRegisterProcessor returns true if the method "AudioWorkletGlobalScope.registerProcessor" exists.
  1979  func (this AudioWorkletGlobalScope) HasFuncRegisterProcessor() bool {
  1980  	return js.True == bindings.HasFuncAudioWorkletGlobalScopeRegisterProcessor(
  1981  		this.ref,
  1982  	)
  1983  }
  1984  
  1985  // FuncRegisterProcessor returns the method "AudioWorkletGlobalScope.registerProcessor".
  1986  func (this AudioWorkletGlobalScope) FuncRegisterProcessor() (fn js.Func[func(name js.String, processorCtor js.Func[func(options js.Object) AudioWorkletProcessor])]) {
  1987  	bindings.FuncAudioWorkletGlobalScopeRegisterProcessor(
  1988  		this.ref, js.Pointer(&fn),
  1989  	)
  1990  	return
  1991  }
  1992  
  1993  // RegisterProcessor calls the method "AudioWorkletGlobalScope.registerProcessor".
  1994  func (this AudioWorkletGlobalScope) RegisterProcessor(name js.String, processorCtor js.Func[func(options js.Object) AudioWorkletProcessor]) (ret js.Void) {
  1995  	bindings.CallAudioWorkletGlobalScopeRegisterProcessor(
  1996  		this.ref, js.Pointer(&ret),
  1997  		name.Ref(),
  1998  		processorCtor.Ref(),
  1999  	)
  2000  
  2001  	return
  2002  }
  2003  
  2004  // TryRegisterProcessor calls the method "AudioWorkletGlobalScope.registerProcessor"
  2005  // in a try/catch block and returns (_, err, ok = false) when it went through
  2006  // the catch clause.
  2007  func (this AudioWorkletGlobalScope) TryRegisterProcessor(name js.String, processorCtor js.Func[func(options js.Object) AudioWorkletProcessor]) (ret js.Void, exception js.Any, ok bool) {
  2008  	ok = js.True == bindings.TryAudioWorkletGlobalScopeRegisterProcessor(
  2009  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2010  		name.Ref(),
  2011  		processorCtor.Ref(),
  2012  	)
  2013  
  2014  	return
  2015  }
  2016  
  2017  type AudioWorkletNodeOptions struct {
  2018  	// NumberOfInputs is "AudioWorkletNodeOptions.numberOfInputs"
  2019  	//
  2020  	// Optional, defaults to 1.
  2021  	//
  2022  	// NOTE: FFI_USE_NumberOfInputs MUST be set to true to make this field effective.
  2023  	NumberOfInputs uint32
  2024  	// NumberOfOutputs is "AudioWorkletNodeOptions.numberOfOutputs"
  2025  	//
  2026  	// Optional, defaults to 1.
  2027  	//
  2028  	// NOTE: FFI_USE_NumberOfOutputs MUST be set to true to make this field effective.
  2029  	NumberOfOutputs uint32
  2030  	// OutputChannelCount is "AudioWorkletNodeOptions.outputChannelCount"
  2031  	//
  2032  	// Optional
  2033  	OutputChannelCount js.Array[uint32]
  2034  	// ParameterData is "AudioWorkletNodeOptions.parameterData"
  2035  	//
  2036  	// Optional
  2037  	ParameterData js.Record[float64]
  2038  	// ProcessorOptions is "AudioWorkletNodeOptions.processorOptions"
  2039  	//
  2040  	// Optional
  2041  	ProcessorOptions js.Object
  2042  	// ChannelCount is "AudioWorkletNodeOptions.channelCount"
  2043  	//
  2044  	// Optional
  2045  	//
  2046  	// NOTE: FFI_USE_ChannelCount MUST be set to true to make this field effective.
  2047  	ChannelCount uint32
  2048  	// ChannelCountMode is "AudioWorkletNodeOptions.channelCountMode"
  2049  	//
  2050  	// Optional
  2051  	ChannelCountMode ChannelCountMode
  2052  	// ChannelInterpretation is "AudioWorkletNodeOptions.channelInterpretation"
  2053  	//
  2054  	// Optional
  2055  	ChannelInterpretation ChannelInterpretation
  2056  
  2057  	FFI_USE_NumberOfInputs  bool // for NumberOfInputs.
  2058  	FFI_USE_NumberOfOutputs bool // for NumberOfOutputs.
  2059  	FFI_USE_ChannelCount    bool // for ChannelCount.
  2060  
  2061  	FFI_USE bool
  2062  }
  2063  
  2064  // FromRef calls UpdateFrom and returns a AudioWorkletNodeOptions with all fields set.
  2065  func (p AudioWorkletNodeOptions) FromRef(ref js.Ref) AudioWorkletNodeOptions {
  2066  	p.UpdateFrom(ref)
  2067  	return p
  2068  }
  2069  
  2070  // New creates a new AudioWorkletNodeOptions in the application heap.
  2071  func (p AudioWorkletNodeOptions) New() js.Ref {
  2072  	return bindings.AudioWorkletNodeOptionsJSLoad(
  2073  		js.Pointer(&p), js.True, 0,
  2074  	)
  2075  }
  2076  
  2077  // UpdateFrom copies value of all fields of the heap object to p.
  2078  func (p *AudioWorkletNodeOptions) UpdateFrom(ref js.Ref) {
  2079  	bindings.AudioWorkletNodeOptionsJSStore(
  2080  		js.Pointer(p), ref,
  2081  	)
  2082  }
  2083  
  2084  // Update writes all fields of the p to the heap object referenced by ref.
  2085  func (p *AudioWorkletNodeOptions) Update(ref js.Ref) {
  2086  	bindings.AudioWorkletNodeOptionsJSLoad(
  2087  		js.Pointer(p), js.False, ref,
  2088  	)
  2089  }
  2090  
  2091  // FreeMembers frees fields with heap reference, if recursive is true
  2092  // free all heap references reachable from p.
  2093  func (p *AudioWorkletNodeOptions) FreeMembers(recursive bool) {
  2094  	js.Free(
  2095  		p.OutputChannelCount.Ref(),
  2096  		p.ParameterData.Ref(),
  2097  		p.ProcessorOptions.Ref(),
  2098  	)
  2099  	p.OutputChannelCount = p.OutputChannelCount.FromRef(js.Undefined)
  2100  	p.ParameterData = p.ParameterData.FromRef(js.Undefined)
  2101  	p.ProcessorOptions = p.ProcessorOptions.FromRef(js.Undefined)
  2102  }
  2103  
  2104  func NewAudioWorkletNode(context BaseAudioContext, name js.String, options AudioWorkletNodeOptions) (ret AudioWorkletNode) {
  2105  	ret.ref = bindings.NewAudioWorkletNodeByAudioWorkletNode(
  2106  		context.Ref(),
  2107  		name.Ref(),
  2108  		js.Pointer(&options))
  2109  	return
  2110  }
  2111  
  2112  func NewAudioWorkletNodeByAudioWorkletNode1(context BaseAudioContext, name js.String) (ret AudioWorkletNode) {
  2113  	ret.ref = bindings.NewAudioWorkletNodeByAudioWorkletNode1(
  2114  		context.Ref(),
  2115  		name.Ref())
  2116  	return
  2117  }
  2118  
  2119  type AudioWorkletNode struct {
  2120  	AudioNode
  2121  }
  2122  
  2123  func (this AudioWorkletNode) Once() AudioWorkletNode {
  2124  	this.ref.Once()
  2125  	return this
  2126  }
  2127  
  2128  func (this AudioWorkletNode) Ref() js.Ref {
  2129  	return this.AudioNode.Ref()
  2130  }
  2131  
  2132  func (this AudioWorkletNode) FromRef(ref js.Ref) AudioWorkletNode {
  2133  	this.AudioNode = this.AudioNode.FromRef(ref)
  2134  	return this
  2135  }
  2136  
  2137  func (this AudioWorkletNode) Free() {
  2138  	this.ref.Free()
  2139  }
  2140  
  2141  // Parameters returns the value of property "AudioWorkletNode.parameters".
  2142  //
  2143  // It returns ok=false if there is no such property.
  2144  func (this AudioWorkletNode) Parameters() (ret AudioParamMap, ok bool) {
  2145  	ok = js.True == bindings.GetAudioWorkletNodeParameters(
  2146  		this.ref, js.Pointer(&ret),
  2147  	)
  2148  	return
  2149  }
  2150  
  2151  // Port returns the value of property "AudioWorkletNode.port".
  2152  //
  2153  // It returns ok=false if there is no such property.
  2154  func (this AudioWorkletNode) Port() (ret MessagePort, ok bool) {
  2155  	ok = js.True == bindings.GetAudioWorkletNodePort(
  2156  		this.ref, js.Pointer(&ret),
  2157  	)
  2158  	return
  2159  }
  2160  
  2161  type AudioWorkletProcessCallbackFunc func(this js.Ref, inputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], outputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], parameters js.Object) js.Ref
  2162  
  2163  func (fn AudioWorkletProcessCallbackFunc) Register() js.Func[func(inputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], outputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], parameters js.Object) bool] {
  2164  	return js.RegisterCallback[func(inputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], outputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], parameters js.Object) bool](
  2165  		fn, abi.FuncPCABIInternal(fn),
  2166  	)
  2167  }
  2168  
  2169  func (fn AudioWorkletProcessCallbackFunc) DispatchCallback(
  2170  	targetPC uintptr, ctx *js.CallbackContext,
  2171  ) {
  2172  	args := ctx.Args()
  2173  	if len(args) != 3+1 /* js this */ ||
  2174  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  2175  		js.ThrowInvalidCallbackInvocation()
  2176  	}
  2177  
  2178  	if ctx.Return(fn(
  2179  		args[0],
  2180  
  2181  		js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]]{}.FromRef(args[0+1]),
  2182  		js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]]{}.FromRef(args[1+1]),
  2183  		js.Object{}.FromRef(args[2+1]),
  2184  	)) {
  2185  		return
  2186  	}
  2187  
  2188  	js.ThrowCallbackValueNotReturned()
  2189  }
  2190  
  2191  type AudioWorkletProcessCallback[T any] struct {
  2192  	Fn  func(arg T, this js.Ref, inputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], outputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], parameters js.Object) js.Ref
  2193  	Arg T
  2194  }
  2195  
  2196  func (cb *AudioWorkletProcessCallback[T]) Register() js.Func[func(inputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], outputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], parameters js.Object) bool] {
  2197  	return js.RegisterCallback[func(inputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], outputs js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]], parameters js.Object) bool](
  2198  		cb, abi.FuncPCABIInternal(cb.Fn),
  2199  	)
  2200  }
  2201  
  2202  func (cb *AudioWorkletProcessCallback[T]) DispatchCallback(
  2203  	targetPC uintptr, ctx *js.CallbackContext,
  2204  ) {
  2205  	args := ctx.Args()
  2206  	if len(args) != 3+1 /* js this */ ||
  2207  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  2208  		js.ThrowInvalidCallbackInvocation()
  2209  	}
  2210  
  2211  	if ctx.Return(cb.Fn(
  2212  		cb.Arg,
  2213  		args[0],
  2214  
  2215  		js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]]{}.FromRef(args[0+1]),
  2216  		js.FrozenArray[js.FrozenArray[js.TypedArray[float32]]]{}.FromRef(args[1+1]),
  2217  		js.Object{}.FromRef(args[2+1]),
  2218  	)) {
  2219  		return
  2220  	}
  2221  
  2222  	js.ThrowCallbackValueNotReturned()
  2223  }
  2224  
  2225  type AuthenticationExtensionsPRFValues struct {
  2226  	// First is "AuthenticationExtensionsPRFValues.first"
  2227  	//
  2228  	// Required
  2229  	First BufferSource
  2230  	// Second is "AuthenticationExtensionsPRFValues.second"
  2231  	//
  2232  	// Optional
  2233  	Second BufferSource
  2234  
  2235  	FFI_USE bool
  2236  }
  2237  
  2238  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsPRFValues with all fields set.
  2239  func (p AuthenticationExtensionsPRFValues) FromRef(ref js.Ref) AuthenticationExtensionsPRFValues {
  2240  	p.UpdateFrom(ref)
  2241  	return p
  2242  }
  2243  
  2244  // New creates a new AuthenticationExtensionsPRFValues in the application heap.
  2245  func (p AuthenticationExtensionsPRFValues) New() js.Ref {
  2246  	return bindings.AuthenticationExtensionsPRFValuesJSLoad(
  2247  		js.Pointer(&p), js.True, 0,
  2248  	)
  2249  }
  2250  
  2251  // UpdateFrom copies value of all fields of the heap object to p.
  2252  func (p *AuthenticationExtensionsPRFValues) UpdateFrom(ref js.Ref) {
  2253  	bindings.AuthenticationExtensionsPRFValuesJSStore(
  2254  		js.Pointer(p), ref,
  2255  	)
  2256  }
  2257  
  2258  // Update writes all fields of the p to the heap object referenced by ref.
  2259  func (p *AuthenticationExtensionsPRFValues) Update(ref js.Ref) {
  2260  	bindings.AuthenticationExtensionsPRFValuesJSLoad(
  2261  		js.Pointer(p), js.False, ref,
  2262  	)
  2263  }
  2264  
  2265  // FreeMembers frees fields with heap reference, if recursive is true
  2266  // free all heap references reachable from p.
  2267  func (p *AuthenticationExtensionsPRFValues) FreeMembers(recursive bool) {
  2268  	js.Free(
  2269  		p.First.Ref(),
  2270  		p.Second.Ref(),
  2271  	)
  2272  	p.First = p.First.FromRef(js.Undefined)
  2273  	p.Second = p.Second.FromRef(js.Undefined)
  2274  }
  2275  
  2276  type AuthenticationExtensionsPRFInputs struct {
  2277  	// Eval is "AuthenticationExtensionsPRFInputs.eval"
  2278  	//
  2279  	// Optional
  2280  	//
  2281  	// NOTE: Eval.FFI_USE MUST be set to true to get Eval used.
  2282  	Eval AuthenticationExtensionsPRFValues
  2283  	// EvalByCredential is "AuthenticationExtensionsPRFInputs.evalByCredential"
  2284  	//
  2285  	// Optional
  2286  	EvalByCredential js.Record[AuthenticationExtensionsPRFValues]
  2287  
  2288  	FFI_USE bool
  2289  }
  2290  
  2291  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsPRFInputs with all fields set.
  2292  func (p AuthenticationExtensionsPRFInputs) FromRef(ref js.Ref) AuthenticationExtensionsPRFInputs {
  2293  	p.UpdateFrom(ref)
  2294  	return p
  2295  }
  2296  
  2297  // New creates a new AuthenticationExtensionsPRFInputs in the application heap.
  2298  func (p AuthenticationExtensionsPRFInputs) New() js.Ref {
  2299  	return bindings.AuthenticationExtensionsPRFInputsJSLoad(
  2300  		js.Pointer(&p), js.True, 0,
  2301  	)
  2302  }
  2303  
  2304  // UpdateFrom copies value of all fields of the heap object to p.
  2305  func (p *AuthenticationExtensionsPRFInputs) UpdateFrom(ref js.Ref) {
  2306  	bindings.AuthenticationExtensionsPRFInputsJSStore(
  2307  		js.Pointer(p), ref,
  2308  	)
  2309  }
  2310  
  2311  // Update writes all fields of the p to the heap object referenced by ref.
  2312  func (p *AuthenticationExtensionsPRFInputs) Update(ref js.Ref) {
  2313  	bindings.AuthenticationExtensionsPRFInputsJSLoad(
  2314  		js.Pointer(p), js.False, ref,
  2315  	)
  2316  }
  2317  
  2318  // FreeMembers frees fields with heap reference, if recursive is true
  2319  // free all heap references reachable from p.
  2320  func (p *AuthenticationExtensionsPRFInputs) FreeMembers(recursive bool) {
  2321  	js.Free(
  2322  		p.EvalByCredential.Ref(),
  2323  	)
  2324  	p.EvalByCredential = p.EvalByCredential.FromRef(js.Undefined)
  2325  	if recursive {
  2326  		p.Eval.FreeMembers(true)
  2327  	}
  2328  }
  2329  
  2330  type PaymentCurrencyAmount struct {
  2331  	// Currency is "PaymentCurrencyAmount.currency"
  2332  	//
  2333  	// Required
  2334  	Currency js.String
  2335  	// Value is "PaymentCurrencyAmount.value"
  2336  	//
  2337  	// Required
  2338  	Value js.String
  2339  
  2340  	FFI_USE bool
  2341  }
  2342  
  2343  // FromRef calls UpdateFrom and returns a PaymentCurrencyAmount with all fields set.
  2344  func (p PaymentCurrencyAmount) FromRef(ref js.Ref) PaymentCurrencyAmount {
  2345  	p.UpdateFrom(ref)
  2346  	return p
  2347  }
  2348  
  2349  // New creates a new PaymentCurrencyAmount in the application heap.
  2350  func (p PaymentCurrencyAmount) New() js.Ref {
  2351  	return bindings.PaymentCurrencyAmountJSLoad(
  2352  		js.Pointer(&p), js.True, 0,
  2353  	)
  2354  }
  2355  
  2356  // UpdateFrom copies value of all fields of the heap object to p.
  2357  func (p *PaymentCurrencyAmount) UpdateFrom(ref js.Ref) {
  2358  	bindings.PaymentCurrencyAmountJSStore(
  2359  		js.Pointer(p), ref,
  2360  	)
  2361  }
  2362  
  2363  // Update writes all fields of the p to the heap object referenced by ref.
  2364  func (p *PaymentCurrencyAmount) Update(ref js.Ref) {
  2365  	bindings.PaymentCurrencyAmountJSLoad(
  2366  		js.Pointer(p), js.False, ref,
  2367  	)
  2368  }
  2369  
  2370  // FreeMembers frees fields with heap reference, if recursive is true
  2371  // free all heap references reachable from p.
  2372  func (p *PaymentCurrencyAmount) FreeMembers(recursive bool) {
  2373  	js.Free(
  2374  		p.Currency.Ref(),
  2375  		p.Value.Ref(),
  2376  	)
  2377  	p.Currency = p.Currency.FromRef(js.Undefined)
  2378  	p.Value = p.Value.FromRef(js.Undefined)
  2379  }
  2380  
  2381  type PaymentCredentialInstrument struct {
  2382  	// DisplayName is "PaymentCredentialInstrument.displayName"
  2383  	//
  2384  	// Required
  2385  	DisplayName js.String
  2386  	// Icon is "PaymentCredentialInstrument.icon"
  2387  	//
  2388  	// Required
  2389  	Icon js.String
  2390  	// IconMustBeShown is "PaymentCredentialInstrument.iconMustBeShown"
  2391  	//
  2392  	// Optional, defaults to true.
  2393  	//
  2394  	// NOTE: FFI_USE_IconMustBeShown MUST be set to true to make this field effective.
  2395  	IconMustBeShown bool
  2396  
  2397  	FFI_USE_IconMustBeShown bool // for IconMustBeShown.
  2398  
  2399  	FFI_USE bool
  2400  }
  2401  
  2402  // FromRef calls UpdateFrom and returns a PaymentCredentialInstrument with all fields set.
  2403  func (p PaymentCredentialInstrument) FromRef(ref js.Ref) PaymentCredentialInstrument {
  2404  	p.UpdateFrom(ref)
  2405  	return p
  2406  }
  2407  
  2408  // New creates a new PaymentCredentialInstrument in the application heap.
  2409  func (p PaymentCredentialInstrument) New() js.Ref {
  2410  	return bindings.PaymentCredentialInstrumentJSLoad(
  2411  		js.Pointer(&p), js.True, 0,
  2412  	)
  2413  }
  2414  
  2415  // UpdateFrom copies value of all fields of the heap object to p.
  2416  func (p *PaymentCredentialInstrument) UpdateFrom(ref js.Ref) {
  2417  	bindings.PaymentCredentialInstrumentJSStore(
  2418  		js.Pointer(p), ref,
  2419  	)
  2420  }
  2421  
  2422  // Update writes all fields of the p to the heap object referenced by ref.
  2423  func (p *PaymentCredentialInstrument) Update(ref js.Ref) {
  2424  	bindings.PaymentCredentialInstrumentJSLoad(
  2425  		js.Pointer(p), js.False, ref,
  2426  	)
  2427  }
  2428  
  2429  // FreeMembers frees fields with heap reference, if recursive is true
  2430  // free all heap references reachable from p.
  2431  func (p *PaymentCredentialInstrument) FreeMembers(recursive bool) {
  2432  	js.Free(
  2433  		p.DisplayName.Ref(),
  2434  		p.Icon.Ref(),
  2435  	)
  2436  	p.DisplayName = p.DisplayName.FromRef(js.Undefined)
  2437  	p.Icon = p.Icon.FromRef(js.Undefined)
  2438  }
  2439  
  2440  type AuthenticationExtensionsPaymentInputs struct {
  2441  	// IsPayment is "AuthenticationExtensionsPaymentInputs.isPayment"
  2442  	//
  2443  	// Optional
  2444  	//
  2445  	// NOTE: FFI_USE_IsPayment MUST be set to true to make this field effective.
  2446  	IsPayment bool
  2447  	// RpId is "AuthenticationExtensionsPaymentInputs.rpId"
  2448  	//
  2449  	// Optional
  2450  	RpId js.String
  2451  	// TopOrigin is "AuthenticationExtensionsPaymentInputs.topOrigin"
  2452  	//
  2453  	// Optional
  2454  	TopOrigin js.String
  2455  	// PayeeName is "AuthenticationExtensionsPaymentInputs.payeeName"
  2456  	//
  2457  	// Optional
  2458  	PayeeName js.String
  2459  	// PayeeOrigin is "AuthenticationExtensionsPaymentInputs.payeeOrigin"
  2460  	//
  2461  	// Optional
  2462  	PayeeOrigin js.String
  2463  	// Total is "AuthenticationExtensionsPaymentInputs.total"
  2464  	//
  2465  	// Optional
  2466  	//
  2467  	// NOTE: Total.FFI_USE MUST be set to true to get Total used.
  2468  	Total PaymentCurrencyAmount
  2469  	// Instrument is "AuthenticationExtensionsPaymentInputs.instrument"
  2470  	//
  2471  	// Optional
  2472  	//
  2473  	// NOTE: Instrument.FFI_USE MUST be set to true to get Instrument used.
  2474  	Instrument PaymentCredentialInstrument
  2475  
  2476  	FFI_USE_IsPayment bool // for IsPayment.
  2477  
  2478  	FFI_USE bool
  2479  }
  2480  
  2481  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsPaymentInputs with all fields set.
  2482  func (p AuthenticationExtensionsPaymentInputs) FromRef(ref js.Ref) AuthenticationExtensionsPaymentInputs {
  2483  	p.UpdateFrom(ref)
  2484  	return p
  2485  }
  2486  
  2487  // New creates a new AuthenticationExtensionsPaymentInputs in the application heap.
  2488  func (p AuthenticationExtensionsPaymentInputs) New() js.Ref {
  2489  	return bindings.AuthenticationExtensionsPaymentInputsJSLoad(
  2490  		js.Pointer(&p), js.True, 0,
  2491  	)
  2492  }
  2493  
  2494  // UpdateFrom copies value of all fields of the heap object to p.
  2495  func (p *AuthenticationExtensionsPaymentInputs) UpdateFrom(ref js.Ref) {
  2496  	bindings.AuthenticationExtensionsPaymentInputsJSStore(
  2497  		js.Pointer(p), ref,
  2498  	)
  2499  }
  2500  
  2501  // Update writes all fields of the p to the heap object referenced by ref.
  2502  func (p *AuthenticationExtensionsPaymentInputs) Update(ref js.Ref) {
  2503  	bindings.AuthenticationExtensionsPaymentInputsJSLoad(
  2504  		js.Pointer(p), js.False, ref,
  2505  	)
  2506  }
  2507  
  2508  // FreeMembers frees fields with heap reference, if recursive is true
  2509  // free all heap references reachable from p.
  2510  func (p *AuthenticationExtensionsPaymentInputs) FreeMembers(recursive bool) {
  2511  	js.Free(
  2512  		p.RpId.Ref(),
  2513  		p.TopOrigin.Ref(),
  2514  		p.PayeeName.Ref(),
  2515  		p.PayeeOrigin.Ref(),
  2516  	)
  2517  	p.RpId = p.RpId.FromRef(js.Undefined)
  2518  	p.TopOrigin = p.TopOrigin.FromRef(js.Undefined)
  2519  	p.PayeeName = p.PayeeName.FromRef(js.Undefined)
  2520  	p.PayeeOrigin = p.PayeeOrigin.FromRef(js.Undefined)
  2521  	if recursive {
  2522  		p.Total.FreeMembers(true)
  2523  		p.Instrument.FreeMembers(true)
  2524  	}
  2525  }
  2526  
  2527  type HMACGetSecretInput struct {
  2528  	// Salt1 is "HMACGetSecretInput.salt1"
  2529  	//
  2530  	// Required
  2531  	Salt1 js.ArrayBuffer
  2532  	// Salt2 is "HMACGetSecretInput.salt2"
  2533  	//
  2534  	// Optional
  2535  	Salt2 js.ArrayBuffer
  2536  
  2537  	FFI_USE bool
  2538  }
  2539  
  2540  // FromRef calls UpdateFrom and returns a HMACGetSecretInput with all fields set.
  2541  func (p HMACGetSecretInput) FromRef(ref js.Ref) HMACGetSecretInput {
  2542  	p.UpdateFrom(ref)
  2543  	return p
  2544  }
  2545  
  2546  // New creates a new HMACGetSecretInput in the application heap.
  2547  func (p HMACGetSecretInput) New() js.Ref {
  2548  	return bindings.HMACGetSecretInputJSLoad(
  2549  		js.Pointer(&p), js.True, 0,
  2550  	)
  2551  }
  2552  
  2553  // UpdateFrom copies value of all fields of the heap object to p.
  2554  func (p *HMACGetSecretInput) UpdateFrom(ref js.Ref) {
  2555  	bindings.HMACGetSecretInputJSStore(
  2556  		js.Pointer(p), ref,
  2557  	)
  2558  }
  2559  
  2560  // Update writes all fields of the p to the heap object referenced by ref.
  2561  func (p *HMACGetSecretInput) Update(ref js.Ref) {
  2562  	bindings.HMACGetSecretInputJSLoad(
  2563  		js.Pointer(p), js.False, ref,
  2564  	)
  2565  }
  2566  
  2567  // FreeMembers frees fields with heap reference, if recursive is true
  2568  // free all heap references reachable from p.
  2569  func (p *HMACGetSecretInput) FreeMembers(recursive bool) {
  2570  	js.Free(
  2571  		p.Salt1.Ref(),
  2572  		p.Salt2.Ref(),
  2573  	)
  2574  	p.Salt1 = p.Salt1.FromRef(js.Undefined)
  2575  	p.Salt2 = p.Salt2.FromRef(js.Undefined)
  2576  }
  2577  
  2578  type AuthenticationExtensionsLargeBlobInputs struct {
  2579  	// Support is "AuthenticationExtensionsLargeBlobInputs.support"
  2580  	//
  2581  	// Optional
  2582  	Support js.String
  2583  	// Read is "AuthenticationExtensionsLargeBlobInputs.read"
  2584  	//
  2585  	// Optional
  2586  	//
  2587  	// NOTE: FFI_USE_Read MUST be set to true to make this field effective.
  2588  	Read bool
  2589  	// Write is "AuthenticationExtensionsLargeBlobInputs.write"
  2590  	//
  2591  	// Optional
  2592  	Write BufferSource
  2593  
  2594  	FFI_USE_Read bool // for Read.
  2595  
  2596  	FFI_USE bool
  2597  }
  2598  
  2599  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsLargeBlobInputs with all fields set.
  2600  func (p AuthenticationExtensionsLargeBlobInputs) FromRef(ref js.Ref) AuthenticationExtensionsLargeBlobInputs {
  2601  	p.UpdateFrom(ref)
  2602  	return p
  2603  }
  2604  
  2605  // New creates a new AuthenticationExtensionsLargeBlobInputs in the application heap.
  2606  func (p AuthenticationExtensionsLargeBlobInputs) New() js.Ref {
  2607  	return bindings.AuthenticationExtensionsLargeBlobInputsJSLoad(
  2608  		js.Pointer(&p), js.True, 0,
  2609  	)
  2610  }
  2611  
  2612  // UpdateFrom copies value of all fields of the heap object to p.
  2613  func (p *AuthenticationExtensionsLargeBlobInputs) UpdateFrom(ref js.Ref) {
  2614  	bindings.AuthenticationExtensionsLargeBlobInputsJSStore(
  2615  		js.Pointer(p), ref,
  2616  	)
  2617  }
  2618  
  2619  // Update writes all fields of the p to the heap object referenced by ref.
  2620  func (p *AuthenticationExtensionsLargeBlobInputs) Update(ref js.Ref) {
  2621  	bindings.AuthenticationExtensionsLargeBlobInputsJSLoad(
  2622  		js.Pointer(p), js.False, ref,
  2623  	)
  2624  }
  2625  
  2626  // FreeMembers frees fields with heap reference, if recursive is true
  2627  // free all heap references reachable from p.
  2628  func (p *AuthenticationExtensionsLargeBlobInputs) FreeMembers(recursive bool) {
  2629  	js.Free(
  2630  		p.Support.Ref(),
  2631  		p.Write.Ref(),
  2632  	)
  2633  	p.Support = p.Support.FromRef(js.Undefined)
  2634  	p.Write = p.Write.FromRef(js.Undefined)
  2635  }
  2636  
  2637  type AuthenticationExtensionsDevicePublicKeyInputs struct {
  2638  	// Attestation is "AuthenticationExtensionsDevicePublicKeyInputs.attestation"
  2639  	//
  2640  	// Optional, defaults to "none".
  2641  	Attestation js.String
  2642  	// AttestationFormats is "AuthenticationExtensionsDevicePublicKeyInputs.attestationFormats"
  2643  	//
  2644  	// Optional, defaults to [].
  2645  	AttestationFormats js.Array[js.String]
  2646  
  2647  	FFI_USE bool
  2648  }
  2649  
  2650  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsDevicePublicKeyInputs with all fields set.
  2651  func (p AuthenticationExtensionsDevicePublicKeyInputs) FromRef(ref js.Ref) AuthenticationExtensionsDevicePublicKeyInputs {
  2652  	p.UpdateFrom(ref)
  2653  	return p
  2654  }
  2655  
  2656  // New creates a new AuthenticationExtensionsDevicePublicKeyInputs in the application heap.
  2657  func (p AuthenticationExtensionsDevicePublicKeyInputs) New() js.Ref {
  2658  	return bindings.AuthenticationExtensionsDevicePublicKeyInputsJSLoad(
  2659  		js.Pointer(&p), js.True, 0,
  2660  	)
  2661  }
  2662  
  2663  // UpdateFrom copies value of all fields of the heap object to p.
  2664  func (p *AuthenticationExtensionsDevicePublicKeyInputs) UpdateFrom(ref js.Ref) {
  2665  	bindings.AuthenticationExtensionsDevicePublicKeyInputsJSStore(
  2666  		js.Pointer(p), ref,
  2667  	)
  2668  }
  2669  
  2670  // Update writes all fields of the p to the heap object referenced by ref.
  2671  func (p *AuthenticationExtensionsDevicePublicKeyInputs) Update(ref js.Ref) {
  2672  	bindings.AuthenticationExtensionsDevicePublicKeyInputsJSLoad(
  2673  		js.Pointer(p), js.False, ref,
  2674  	)
  2675  }
  2676  
  2677  // FreeMembers frees fields with heap reference, if recursive is true
  2678  // free all heap references reachable from p.
  2679  func (p *AuthenticationExtensionsDevicePublicKeyInputs) FreeMembers(recursive bool) {
  2680  	js.Free(
  2681  		p.Attestation.Ref(),
  2682  		p.AttestationFormats.Ref(),
  2683  	)
  2684  	p.Attestation = p.Attestation.FromRef(js.Undefined)
  2685  	p.AttestationFormats = p.AttestationFormats.FromRef(js.Undefined)
  2686  }
  2687  
  2688  type AuthenticationExtensionsClientInputs struct {
  2689  	// MinPinLength is "AuthenticationExtensionsClientInputs.minPinLength"
  2690  	//
  2691  	// Optional
  2692  	//
  2693  	// NOTE: FFI_USE_MinPinLength MUST be set to true to make this field effective.
  2694  	MinPinLength bool
  2695  	// Prf is "AuthenticationExtensionsClientInputs.prf"
  2696  	//
  2697  	// Optional
  2698  	//
  2699  	// NOTE: Prf.FFI_USE MUST be set to true to get Prf used.
  2700  	Prf AuthenticationExtensionsPRFInputs
  2701  	// Appid is "AuthenticationExtensionsClientInputs.appid"
  2702  	//
  2703  	// Optional
  2704  	Appid js.String
  2705  	// AppidExclude is "AuthenticationExtensionsClientInputs.appidExclude"
  2706  	//
  2707  	// Optional
  2708  	AppidExclude js.String
  2709  	// GetCredBlob is "AuthenticationExtensionsClientInputs.getCredBlob"
  2710  	//
  2711  	// Optional
  2712  	//
  2713  	// NOTE: FFI_USE_GetCredBlob MUST be set to true to make this field effective.
  2714  	GetCredBlob bool
  2715  	// HmacCreateSecret is "AuthenticationExtensionsClientInputs.hmacCreateSecret"
  2716  	//
  2717  	// Optional
  2718  	//
  2719  	// NOTE: FFI_USE_HmacCreateSecret MUST be set to true to make this field effective.
  2720  	HmacCreateSecret bool
  2721  	// CredProps is "AuthenticationExtensionsClientInputs.credProps"
  2722  	//
  2723  	// Optional
  2724  	//
  2725  	// NOTE: FFI_USE_CredProps MUST be set to true to make this field effective.
  2726  	CredProps bool
  2727  	// Payment is "AuthenticationExtensionsClientInputs.payment"
  2728  	//
  2729  	// Optional
  2730  	//
  2731  	// NOTE: Payment.FFI_USE MUST be set to true to get Payment used.
  2732  	Payment AuthenticationExtensionsPaymentInputs
  2733  	// HmacGetSecret is "AuthenticationExtensionsClientInputs.hmacGetSecret"
  2734  	//
  2735  	// Optional
  2736  	//
  2737  	// NOTE: HmacGetSecret.FFI_USE MUST be set to true to get HmacGetSecret used.
  2738  	HmacGetSecret HMACGetSecretInput
  2739  	// LargeBlob is "AuthenticationExtensionsClientInputs.largeBlob"
  2740  	//
  2741  	// Optional
  2742  	//
  2743  	// NOTE: LargeBlob.FFI_USE MUST be set to true to get LargeBlob used.
  2744  	LargeBlob AuthenticationExtensionsLargeBlobInputs
  2745  	// CredBlob is "AuthenticationExtensionsClientInputs.credBlob"
  2746  	//
  2747  	// Optional
  2748  	CredBlob js.ArrayBuffer
  2749  	// CredentialProtectionPolicy is "AuthenticationExtensionsClientInputs.credentialProtectionPolicy"
  2750  	//
  2751  	// Optional
  2752  	CredentialProtectionPolicy js.String
  2753  	// EnforceCredentialProtectionPolicy is "AuthenticationExtensionsClientInputs.enforceCredentialProtectionPolicy"
  2754  	//
  2755  	// Optional, defaults to false.
  2756  	//
  2757  	// NOTE: FFI_USE_EnforceCredentialProtectionPolicy MUST be set to true to make this field effective.
  2758  	EnforceCredentialProtectionPolicy bool
  2759  	// Uvm is "AuthenticationExtensionsClientInputs.uvm"
  2760  	//
  2761  	// Optional
  2762  	//
  2763  	// NOTE: FFI_USE_Uvm MUST be set to true to make this field effective.
  2764  	Uvm bool
  2765  	// DevicePubKey is "AuthenticationExtensionsClientInputs.devicePubKey"
  2766  	//
  2767  	// Optional
  2768  	//
  2769  	// NOTE: DevicePubKey.FFI_USE MUST be set to true to get DevicePubKey used.
  2770  	DevicePubKey AuthenticationExtensionsDevicePublicKeyInputs
  2771  
  2772  	FFI_USE_MinPinLength                      bool // for MinPinLength.
  2773  	FFI_USE_GetCredBlob                       bool // for GetCredBlob.
  2774  	FFI_USE_HmacCreateSecret                  bool // for HmacCreateSecret.
  2775  	FFI_USE_CredProps                         bool // for CredProps.
  2776  	FFI_USE_EnforceCredentialProtectionPolicy bool // for EnforceCredentialProtectionPolicy.
  2777  	FFI_USE_Uvm                               bool // for Uvm.
  2778  
  2779  	FFI_USE bool
  2780  }
  2781  
  2782  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsClientInputs with all fields set.
  2783  func (p AuthenticationExtensionsClientInputs) FromRef(ref js.Ref) AuthenticationExtensionsClientInputs {
  2784  	p.UpdateFrom(ref)
  2785  	return p
  2786  }
  2787  
  2788  // New creates a new AuthenticationExtensionsClientInputs in the application heap.
  2789  func (p AuthenticationExtensionsClientInputs) New() js.Ref {
  2790  	return bindings.AuthenticationExtensionsClientInputsJSLoad(
  2791  		js.Pointer(&p), js.True, 0,
  2792  	)
  2793  }
  2794  
  2795  // UpdateFrom copies value of all fields of the heap object to p.
  2796  func (p *AuthenticationExtensionsClientInputs) UpdateFrom(ref js.Ref) {
  2797  	bindings.AuthenticationExtensionsClientInputsJSStore(
  2798  		js.Pointer(p), ref,
  2799  	)
  2800  }
  2801  
  2802  // Update writes all fields of the p to the heap object referenced by ref.
  2803  func (p *AuthenticationExtensionsClientInputs) Update(ref js.Ref) {
  2804  	bindings.AuthenticationExtensionsClientInputsJSLoad(
  2805  		js.Pointer(p), js.False, ref,
  2806  	)
  2807  }
  2808  
  2809  // FreeMembers frees fields with heap reference, if recursive is true
  2810  // free all heap references reachable from p.
  2811  func (p *AuthenticationExtensionsClientInputs) FreeMembers(recursive bool) {
  2812  	js.Free(
  2813  		p.Appid.Ref(),
  2814  		p.AppidExclude.Ref(),
  2815  		p.CredBlob.Ref(),
  2816  		p.CredentialProtectionPolicy.Ref(),
  2817  	)
  2818  	p.Appid = p.Appid.FromRef(js.Undefined)
  2819  	p.AppidExclude = p.AppidExclude.FromRef(js.Undefined)
  2820  	p.CredBlob = p.CredBlob.FromRef(js.Undefined)
  2821  	p.CredentialProtectionPolicy = p.CredentialProtectionPolicy.FromRef(js.Undefined)
  2822  	if recursive {
  2823  		p.Prf.FreeMembers(true)
  2824  		p.Payment.FreeMembers(true)
  2825  		p.HmacGetSecret.FreeMembers(true)
  2826  		p.LargeBlob.FreeMembers(true)
  2827  		p.DevicePubKey.FreeMembers(true)
  2828  	}
  2829  }
  2830  
  2831  type AuthenticationExtensionsClientInputsJSON struct {
  2832  	FFI_USE bool
  2833  }
  2834  
  2835  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsClientInputsJSON with all fields set.
  2836  func (p AuthenticationExtensionsClientInputsJSON) FromRef(ref js.Ref) AuthenticationExtensionsClientInputsJSON {
  2837  	p.UpdateFrom(ref)
  2838  	return p
  2839  }
  2840  
  2841  // New creates a new AuthenticationExtensionsClientInputsJSON in the application heap.
  2842  func (p AuthenticationExtensionsClientInputsJSON) New() js.Ref {
  2843  	return bindings.AuthenticationExtensionsClientInputsJSONJSLoad(
  2844  		js.Pointer(&p), js.True, 0,
  2845  	)
  2846  }
  2847  
  2848  // UpdateFrom copies value of all fields of the heap object to p.
  2849  func (p *AuthenticationExtensionsClientInputsJSON) UpdateFrom(ref js.Ref) {
  2850  	bindings.AuthenticationExtensionsClientInputsJSONJSStore(
  2851  		js.Pointer(p), ref,
  2852  	)
  2853  }
  2854  
  2855  // Update writes all fields of the p to the heap object referenced by ref.
  2856  func (p *AuthenticationExtensionsClientInputsJSON) Update(ref js.Ref) {
  2857  	bindings.AuthenticationExtensionsClientInputsJSONJSLoad(
  2858  		js.Pointer(p), js.False, ref,
  2859  	)
  2860  }
  2861  
  2862  // FreeMembers frees fields with heap reference, if recursive is true
  2863  // free all heap references reachable from p.
  2864  func (p *AuthenticationExtensionsClientInputsJSON) FreeMembers(recursive bool) {
  2865  }
  2866  
  2867  type AuthenticationExtensionsDevicePublicKeyOutputs struct {
  2868  	// Signature is "AuthenticationExtensionsDevicePublicKeyOutputs.signature"
  2869  	//
  2870  	// Optional
  2871  	Signature js.ArrayBuffer
  2872  
  2873  	FFI_USE bool
  2874  }
  2875  
  2876  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsDevicePublicKeyOutputs with all fields set.
  2877  func (p AuthenticationExtensionsDevicePublicKeyOutputs) FromRef(ref js.Ref) AuthenticationExtensionsDevicePublicKeyOutputs {
  2878  	p.UpdateFrom(ref)
  2879  	return p
  2880  }
  2881  
  2882  // New creates a new AuthenticationExtensionsDevicePublicKeyOutputs in the application heap.
  2883  func (p AuthenticationExtensionsDevicePublicKeyOutputs) New() js.Ref {
  2884  	return bindings.AuthenticationExtensionsDevicePublicKeyOutputsJSLoad(
  2885  		js.Pointer(&p), js.True, 0,
  2886  	)
  2887  }
  2888  
  2889  // UpdateFrom copies value of all fields of the heap object to p.
  2890  func (p *AuthenticationExtensionsDevicePublicKeyOutputs) UpdateFrom(ref js.Ref) {
  2891  	bindings.AuthenticationExtensionsDevicePublicKeyOutputsJSStore(
  2892  		js.Pointer(p), ref,
  2893  	)
  2894  }
  2895  
  2896  // Update writes all fields of the p to the heap object referenced by ref.
  2897  func (p *AuthenticationExtensionsDevicePublicKeyOutputs) Update(ref js.Ref) {
  2898  	bindings.AuthenticationExtensionsDevicePublicKeyOutputsJSLoad(
  2899  		js.Pointer(p), js.False, ref,
  2900  	)
  2901  }
  2902  
  2903  // FreeMembers frees fields with heap reference, if recursive is true
  2904  // free all heap references reachable from p.
  2905  func (p *AuthenticationExtensionsDevicePublicKeyOutputs) FreeMembers(recursive bool) {
  2906  	js.Free(
  2907  		p.Signature.Ref(),
  2908  	)
  2909  	p.Signature = p.Signature.FromRef(js.Undefined)
  2910  }
  2911  
  2912  type UvmEntry = js.Array[uint32]
  2913  
  2914  type UvmEntries = js.Array[UvmEntry]
  2915  
  2916  type CredentialPropertiesOutput struct {
  2917  	// Rk is "CredentialPropertiesOutput.rk"
  2918  	//
  2919  	// Optional
  2920  	//
  2921  	// NOTE: FFI_USE_Rk MUST be set to true to make this field effective.
  2922  	Rk bool
  2923  
  2924  	FFI_USE_Rk bool // for Rk.
  2925  
  2926  	FFI_USE bool
  2927  }
  2928  
  2929  // FromRef calls UpdateFrom and returns a CredentialPropertiesOutput with all fields set.
  2930  func (p CredentialPropertiesOutput) FromRef(ref js.Ref) CredentialPropertiesOutput {
  2931  	p.UpdateFrom(ref)
  2932  	return p
  2933  }
  2934  
  2935  // New creates a new CredentialPropertiesOutput in the application heap.
  2936  func (p CredentialPropertiesOutput) New() js.Ref {
  2937  	return bindings.CredentialPropertiesOutputJSLoad(
  2938  		js.Pointer(&p), js.True, 0,
  2939  	)
  2940  }
  2941  
  2942  // UpdateFrom copies value of all fields of the heap object to p.
  2943  func (p *CredentialPropertiesOutput) UpdateFrom(ref js.Ref) {
  2944  	bindings.CredentialPropertiesOutputJSStore(
  2945  		js.Pointer(p), ref,
  2946  	)
  2947  }
  2948  
  2949  // Update writes all fields of the p to the heap object referenced by ref.
  2950  func (p *CredentialPropertiesOutput) Update(ref js.Ref) {
  2951  	bindings.CredentialPropertiesOutputJSLoad(
  2952  		js.Pointer(p), js.False, ref,
  2953  	)
  2954  }
  2955  
  2956  // FreeMembers frees fields with heap reference, if recursive is true
  2957  // free all heap references reachable from p.
  2958  func (p *CredentialPropertiesOutput) FreeMembers(recursive bool) {
  2959  }
  2960  
  2961  type AuthenticationExtensionsLargeBlobOutputs struct {
  2962  	// Supported is "AuthenticationExtensionsLargeBlobOutputs.supported"
  2963  	//
  2964  	// Optional
  2965  	//
  2966  	// NOTE: FFI_USE_Supported MUST be set to true to make this field effective.
  2967  	Supported bool
  2968  	// Blob is "AuthenticationExtensionsLargeBlobOutputs.blob"
  2969  	//
  2970  	// Optional
  2971  	Blob js.ArrayBuffer
  2972  	// Written is "AuthenticationExtensionsLargeBlobOutputs.written"
  2973  	//
  2974  	// Optional
  2975  	//
  2976  	// NOTE: FFI_USE_Written MUST be set to true to make this field effective.
  2977  	Written bool
  2978  
  2979  	FFI_USE_Supported bool // for Supported.
  2980  	FFI_USE_Written   bool // for Written.
  2981  
  2982  	FFI_USE bool
  2983  }
  2984  
  2985  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsLargeBlobOutputs with all fields set.
  2986  func (p AuthenticationExtensionsLargeBlobOutputs) FromRef(ref js.Ref) AuthenticationExtensionsLargeBlobOutputs {
  2987  	p.UpdateFrom(ref)
  2988  	return p
  2989  }
  2990  
  2991  // New creates a new AuthenticationExtensionsLargeBlobOutputs in the application heap.
  2992  func (p AuthenticationExtensionsLargeBlobOutputs) New() js.Ref {
  2993  	return bindings.AuthenticationExtensionsLargeBlobOutputsJSLoad(
  2994  		js.Pointer(&p), js.True, 0,
  2995  	)
  2996  }
  2997  
  2998  // UpdateFrom copies value of all fields of the heap object to p.
  2999  func (p *AuthenticationExtensionsLargeBlobOutputs) UpdateFrom(ref js.Ref) {
  3000  	bindings.AuthenticationExtensionsLargeBlobOutputsJSStore(
  3001  		js.Pointer(p), ref,
  3002  	)
  3003  }
  3004  
  3005  // Update writes all fields of the p to the heap object referenced by ref.
  3006  func (p *AuthenticationExtensionsLargeBlobOutputs) Update(ref js.Ref) {
  3007  	bindings.AuthenticationExtensionsLargeBlobOutputsJSLoad(
  3008  		js.Pointer(p), js.False, ref,
  3009  	)
  3010  }
  3011  
  3012  // FreeMembers frees fields with heap reference, if recursive is true
  3013  // free all heap references reachable from p.
  3014  func (p *AuthenticationExtensionsLargeBlobOutputs) FreeMembers(recursive bool) {
  3015  	js.Free(
  3016  		p.Blob.Ref(),
  3017  	)
  3018  	p.Blob = p.Blob.FromRef(js.Undefined)
  3019  }
  3020  
  3021  type HMACGetSecretOutput struct {
  3022  	// Output1 is "HMACGetSecretOutput.output1"
  3023  	//
  3024  	// Required
  3025  	Output1 js.ArrayBuffer
  3026  	// Output2 is "HMACGetSecretOutput.output2"
  3027  	//
  3028  	// Optional
  3029  	Output2 js.ArrayBuffer
  3030  
  3031  	FFI_USE bool
  3032  }
  3033  
  3034  // FromRef calls UpdateFrom and returns a HMACGetSecretOutput with all fields set.
  3035  func (p HMACGetSecretOutput) FromRef(ref js.Ref) HMACGetSecretOutput {
  3036  	p.UpdateFrom(ref)
  3037  	return p
  3038  }
  3039  
  3040  // New creates a new HMACGetSecretOutput in the application heap.
  3041  func (p HMACGetSecretOutput) New() js.Ref {
  3042  	return bindings.HMACGetSecretOutputJSLoad(
  3043  		js.Pointer(&p), js.True, 0,
  3044  	)
  3045  }
  3046  
  3047  // UpdateFrom copies value of all fields of the heap object to p.
  3048  func (p *HMACGetSecretOutput) UpdateFrom(ref js.Ref) {
  3049  	bindings.HMACGetSecretOutputJSStore(
  3050  		js.Pointer(p), ref,
  3051  	)
  3052  }
  3053  
  3054  // Update writes all fields of the p to the heap object referenced by ref.
  3055  func (p *HMACGetSecretOutput) Update(ref js.Ref) {
  3056  	bindings.HMACGetSecretOutputJSLoad(
  3057  		js.Pointer(p), js.False, ref,
  3058  	)
  3059  }
  3060  
  3061  // FreeMembers frees fields with heap reference, if recursive is true
  3062  // free all heap references reachable from p.
  3063  func (p *HMACGetSecretOutput) FreeMembers(recursive bool) {
  3064  	js.Free(
  3065  		p.Output1.Ref(),
  3066  		p.Output2.Ref(),
  3067  	)
  3068  	p.Output1 = p.Output1.FromRef(js.Undefined)
  3069  	p.Output2 = p.Output2.FromRef(js.Undefined)
  3070  }
  3071  
  3072  type AuthenticationExtensionsPRFOutputs struct {
  3073  	// Enabled is "AuthenticationExtensionsPRFOutputs.enabled"
  3074  	//
  3075  	// Optional
  3076  	//
  3077  	// NOTE: FFI_USE_Enabled MUST be set to true to make this field effective.
  3078  	Enabled bool
  3079  	// Results is "AuthenticationExtensionsPRFOutputs.results"
  3080  	//
  3081  	// Optional
  3082  	//
  3083  	// NOTE: Results.FFI_USE MUST be set to true to get Results used.
  3084  	Results AuthenticationExtensionsPRFValues
  3085  
  3086  	FFI_USE_Enabled bool // for Enabled.
  3087  
  3088  	FFI_USE bool
  3089  }
  3090  
  3091  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsPRFOutputs with all fields set.
  3092  func (p AuthenticationExtensionsPRFOutputs) FromRef(ref js.Ref) AuthenticationExtensionsPRFOutputs {
  3093  	p.UpdateFrom(ref)
  3094  	return p
  3095  }
  3096  
  3097  // New creates a new AuthenticationExtensionsPRFOutputs in the application heap.
  3098  func (p AuthenticationExtensionsPRFOutputs) New() js.Ref {
  3099  	return bindings.AuthenticationExtensionsPRFOutputsJSLoad(
  3100  		js.Pointer(&p), js.True, 0,
  3101  	)
  3102  }
  3103  
  3104  // UpdateFrom copies value of all fields of the heap object to p.
  3105  func (p *AuthenticationExtensionsPRFOutputs) UpdateFrom(ref js.Ref) {
  3106  	bindings.AuthenticationExtensionsPRFOutputsJSStore(
  3107  		js.Pointer(p), ref,
  3108  	)
  3109  }
  3110  
  3111  // Update writes all fields of the p to the heap object referenced by ref.
  3112  func (p *AuthenticationExtensionsPRFOutputs) Update(ref js.Ref) {
  3113  	bindings.AuthenticationExtensionsPRFOutputsJSLoad(
  3114  		js.Pointer(p), js.False, ref,
  3115  	)
  3116  }
  3117  
  3118  // FreeMembers frees fields with heap reference, if recursive is true
  3119  // free all heap references reachable from p.
  3120  func (p *AuthenticationExtensionsPRFOutputs) FreeMembers(recursive bool) {
  3121  	if recursive {
  3122  		p.Results.FreeMembers(true)
  3123  	}
  3124  }
  3125  
  3126  type AuthenticationExtensionsClientOutputs struct {
  3127  	// DevicePubKey is "AuthenticationExtensionsClientOutputs.devicePubKey"
  3128  	//
  3129  	// Optional
  3130  	//
  3131  	// NOTE: DevicePubKey.FFI_USE MUST be set to true to get DevicePubKey used.
  3132  	DevicePubKey AuthenticationExtensionsDevicePublicKeyOutputs
  3133  	// Appid is "AuthenticationExtensionsClientOutputs.appid"
  3134  	//
  3135  	// Optional
  3136  	//
  3137  	// NOTE: FFI_USE_Appid MUST be set to true to make this field effective.
  3138  	Appid bool
  3139  	// AppidExclude is "AuthenticationExtensionsClientOutputs.appidExclude"
  3140  	//
  3141  	// Optional
  3142  	//
  3143  	// NOTE: FFI_USE_AppidExclude MUST be set to true to make this field effective.
  3144  	AppidExclude bool
  3145  	// Uvm is "AuthenticationExtensionsClientOutputs.uvm"
  3146  	//
  3147  	// Optional
  3148  	Uvm UvmEntries
  3149  	// CredProps is "AuthenticationExtensionsClientOutputs.credProps"
  3150  	//
  3151  	// Optional
  3152  	//
  3153  	// NOTE: CredProps.FFI_USE MUST be set to true to get CredProps used.
  3154  	CredProps CredentialPropertiesOutput
  3155  	// LargeBlob is "AuthenticationExtensionsClientOutputs.largeBlob"
  3156  	//
  3157  	// Optional
  3158  	//
  3159  	// NOTE: LargeBlob.FFI_USE MUST be set to true to get LargeBlob used.
  3160  	LargeBlob AuthenticationExtensionsLargeBlobOutputs
  3161  	// HmacGetSecret is "AuthenticationExtensionsClientOutputs.hmacGetSecret"
  3162  	//
  3163  	// Optional
  3164  	//
  3165  	// NOTE: HmacGetSecret.FFI_USE MUST be set to true to get HmacGetSecret used.
  3166  	HmacGetSecret HMACGetSecretOutput
  3167  	// Prf is "AuthenticationExtensionsClientOutputs.prf"
  3168  	//
  3169  	// Optional
  3170  	//
  3171  	// NOTE: Prf.FFI_USE MUST be set to true to get Prf used.
  3172  	Prf AuthenticationExtensionsPRFOutputs
  3173  	// HmacCreateSecret is "AuthenticationExtensionsClientOutputs.hmacCreateSecret"
  3174  	//
  3175  	// Optional
  3176  	//
  3177  	// NOTE: FFI_USE_HmacCreateSecret MUST be set to true to make this field effective.
  3178  	HmacCreateSecret bool
  3179  
  3180  	FFI_USE_Appid            bool // for Appid.
  3181  	FFI_USE_AppidExclude     bool // for AppidExclude.
  3182  	FFI_USE_HmacCreateSecret bool // for HmacCreateSecret.
  3183  
  3184  	FFI_USE bool
  3185  }
  3186  
  3187  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsClientOutputs with all fields set.
  3188  func (p AuthenticationExtensionsClientOutputs) FromRef(ref js.Ref) AuthenticationExtensionsClientOutputs {
  3189  	p.UpdateFrom(ref)
  3190  	return p
  3191  }
  3192  
  3193  // New creates a new AuthenticationExtensionsClientOutputs in the application heap.
  3194  func (p AuthenticationExtensionsClientOutputs) New() js.Ref {
  3195  	return bindings.AuthenticationExtensionsClientOutputsJSLoad(
  3196  		js.Pointer(&p), js.True, 0,
  3197  	)
  3198  }
  3199  
  3200  // UpdateFrom copies value of all fields of the heap object to p.
  3201  func (p *AuthenticationExtensionsClientOutputs) UpdateFrom(ref js.Ref) {
  3202  	bindings.AuthenticationExtensionsClientOutputsJSStore(
  3203  		js.Pointer(p), ref,
  3204  	)
  3205  }
  3206  
  3207  // Update writes all fields of the p to the heap object referenced by ref.
  3208  func (p *AuthenticationExtensionsClientOutputs) Update(ref js.Ref) {
  3209  	bindings.AuthenticationExtensionsClientOutputsJSLoad(
  3210  		js.Pointer(p), js.False, ref,
  3211  	)
  3212  }
  3213  
  3214  // FreeMembers frees fields with heap reference, if recursive is true
  3215  // free all heap references reachable from p.
  3216  func (p *AuthenticationExtensionsClientOutputs) FreeMembers(recursive bool) {
  3217  	js.Free(
  3218  		p.Uvm.Ref(),
  3219  	)
  3220  	p.Uvm = p.Uvm.FromRef(js.Undefined)
  3221  	if recursive {
  3222  		p.DevicePubKey.FreeMembers(true)
  3223  		p.CredProps.FreeMembers(true)
  3224  		p.LargeBlob.FreeMembers(true)
  3225  		p.HmacGetSecret.FreeMembers(true)
  3226  		p.Prf.FreeMembers(true)
  3227  	}
  3228  }
  3229  
  3230  type AuthenticationExtensionsClientOutputsJSON struct {
  3231  	FFI_USE bool
  3232  }
  3233  
  3234  // FromRef calls UpdateFrom and returns a AuthenticationExtensionsClientOutputsJSON with all fields set.
  3235  func (p AuthenticationExtensionsClientOutputsJSON) FromRef(ref js.Ref) AuthenticationExtensionsClientOutputsJSON {
  3236  	p.UpdateFrom(ref)
  3237  	return p
  3238  }
  3239  
  3240  // New creates a new AuthenticationExtensionsClientOutputsJSON in the application heap.
  3241  func (p AuthenticationExtensionsClientOutputsJSON) New() js.Ref {
  3242  	return bindings.AuthenticationExtensionsClientOutputsJSONJSLoad(
  3243  		js.Pointer(&p), js.True, 0,
  3244  	)
  3245  }
  3246  
  3247  // UpdateFrom copies value of all fields of the heap object to p.
  3248  func (p *AuthenticationExtensionsClientOutputsJSON) UpdateFrom(ref js.Ref) {
  3249  	bindings.AuthenticationExtensionsClientOutputsJSONJSStore(
  3250  		js.Pointer(p), ref,
  3251  	)
  3252  }
  3253  
  3254  // Update writes all fields of the p to the heap object referenced by ref.
  3255  func (p *AuthenticationExtensionsClientOutputsJSON) Update(ref js.Ref) {
  3256  	bindings.AuthenticationExtensionsClientOutputsJSONJSLoad(
  3257  		js.Pointer(p), js.False, ref,
  3258  	)
  3259  }
  3260  
  3261  // FreeMembers frees fields with heap reference, if recursive is true
  3262  // free all heap references reachable from p.
  3263  func (p *AuthenticationExtensionsClientOutputsJSON) FreeMembers(recursive bool) {
  3264  }
  3265  
  3266  type Base64URLString = js.String
  3267  
  3268  type AuthenticatorAssertionResponseJSON struct {
  3269  	// ClientDataJSON is "AuthenticatorAssertionResponseJSON.clientDataJSON"
  3270  	//
  3271  	// Required
  3272  	ClientDataJSON Base64URLString
  3273  	// AuthenticatorData is "AuthenticatorAssertionResponseJSON.authenticatorData"
  3274  	//
  3275  	// Required
  3276  	AuthenticatorData Base64URLString
  3277  	// Signature is "AuthenticatorAssertionResponseJSON.signature"
  3278  	//
  3279  	// Required
  3280  	Signature Base64URLString
  3281  	// UserHandle is "AuthenticatorAssertionResponseJSON.userHandle"
  3282  	//
  3283  	// Optional
  3284  	UserHandle Base64URLString
  3285  	// AttestationObject is "AuthenticatorAssertionResponseJSON.attestationObject"
  3286  	//
  3287  	// Optional
  3288  	AttestationObject Base64URLString
  3289  
  3290  	FFI_USE bool
  3291  }
  3292  
  3293  // FromRef calls UpdateFrom and returns a AuthenticatorAssertionResponseJSON with all fields set.
  3294  func (p AuthenticatorAssertionResponseJSON) FromRef(ref js.Ref) AuthenticatorAssertionResponseJSON {
  3295  	p.UpdateFrom(ref)
  3296  	return p
  3297  }
  3298  
  3299  // New creates a new AuthenticatorAssertionResponseJSON in the application heap.
  3300  func (p AuthenticatorAssertionResponseJSON) New() js.Ref {
  3301  	return bindings.AuthenticatorAssertionResponseJSONJSLoad(
  3302  		js.Pointer(&p), js.True, 0,
  3303  	)
  3304  }
  3305  
  3306  // UpdateFrom copies value of all fields of the heap object to p.
  3307  func (p *AuthenticatorAssertionResponseJSON) UpdateFrom(ref js.Ref) {
  3308  	bindings.AuthenticatorAssertionResponseJSONJSStore(
  3309  		js.Pointer(p), ref,
  3310  	)
  3311  }
  3312  
  3313  // Update writes all fields of the p to the heap object referenced by ref.
  3314  func (p *AuthenticatorAssertionResponseJSON) Update(ref js.Ref) {
  3315  	bindings.AuthenticatorAssertionResponseJSONJSLoad(
  3316  		js.Pointer(p), js.False, ref,
  3317  	)
  3318  }
  3319  
  3320  // FreeMembers frees fields with heap reference, if recursive is true
  3321  // free all heap references reachable from p.
  3322  func (p *AuthenticatorAssertionResponseJSON) FreeMembers(recursive bool) {
  3323  	js.Free(
  3324  		p.ClientDataJSON.Ref(),
  3325  		p.AuthenticatorData.Ref(),
  3326  		p.Signature.Ref(),
  3327  		p.UserHandle.Ref(),
  3328  		p.AttestationObject.Ref(),
  3329  	)
  3330  	p.ClientDataJSON = p.ClientDataJSON.FromRef(js.Undefined)
  3331  	p.AuthenticatorData = p.AuthenticatorData.FromRef(js.Undefined)
  3332  	p.Signature = p.Signature.FromRef(js.Undefined)
  3333  	p.UserHandle = p.UserHandle.FromRef(js.Undefined)
  3334  	p.AttestationObject = p.AttestationObject.FromRef(js.Undefined)
  3335  }
  3336  
  3337  type AuthenticationResponseJSON struct {
  3338  	// Id is "AuthenticationResponseJSON.id"
  3339  	//
  3340  	// Required
  3341  	Id Base64URLString
  3342  	// RawId is "AuthenticationResponseJSON.rawId"
  3343  	//
  3344  	// Required
  3345  	RawId Base64URLString
  3346  	// Response is "AuthenticationResponseJSON.response"
  3347  	//
  3348  	// Required
  3349  	//
  3350  	// NOTE: Response.FFI_USE MUST be set to true to get Response used.
  3351  	Response AuthenticatorAssertionResponseJSON
  3352  	// AuthenticatorAttachment is "AuthenticationResponseJSON.authenticatorAttachment"
  3353  	//
  3354  	// Optional
  3355  	AuthenticatorAttachment js.String
  3356  	// ClientExtensionResults is "AuthenticationResponseJSON.clientExtensionResults"
  3357  	//
  3358  	// Required
  3359  	//
  3360  	// NOTE: ClientExtensionResults.FFI_USE MUST be set to true to get ClientExtensionResults used.
  3361  	ClientExtensionResults AuthenticationExtensionsClientOutputsJSON
  3362  	// Type is "AuthenticationResponseJSON.type"
  3363  	//
  3364  	// Required
  3365  	Type js.String
  3366  
  3367  	FFI_USE bool
  3368  }
  3369  
  3370  // FromRef calls UpdateFrom and returns a AuthenticationResponseJSON with all fields set.
  3371  func (p AuthenticationResponseJSON) FromRef(ref js.Ref) AuthenticationResponseJSON {
  3372  	p.UpdateFrom(ref)
  3373  	return p
  3374  }
  3375  
  3376  // New creates a new AuthenticationResponseJSON in the application heap.
  3377  func (p AuthenticationResponseJSON) New() js.Ref {
  3378  	return bindings.AuthenticationResponseJSONJSLoad(
  3379  		js.Pointer(&p), js.True, 0,
  3380  	)
  3381  }
  3382  
  3383  // UpdateFrom copies value of all fields of the heap object to p.
  3384  func (p *AuthenticationResponseJSON) UpdateFrom(ref js.Ref) {
  3385  	bindings.AuthenticationResponseJSONJSStore(
  3386  		js.Pointer(p), ref,
  3387  	)
  3388  }
  3389  
  3390  // Update writes all fields of the p to the heap object referenced by ref.
  3391  func (p *AuthenticationResponseJSON) Update(ref js.Ref) {
  3392  	bindings.AuthenticationResponseJSONJSLoad(
  3393  		js.Pointer(p), js.False, ref,
  3394  	)
  3395  }
  3396  
  3397  // FreeMembers frees fields with heap reference, if recursive is true
  3398  // free all heap references reachable from p.
  3399  func (p *AuthenticationResponseJSON) FreeMembers(recursive bool) {
  3400  	js.Free(
  3401  		p.Id.Ref(),
  3402  		p.RawId.Ref(),
  3403  		p.AuthenticatorAttachment.Ref(),
  3404  		p.Type.Ref(),
  3405  	)
  3406  	p.Id = p.Id.FromRef(js.Undefined)
  3407  	p.RawId = p.RawId.FromRef(js.Undefined)
  3408  	p.AuthenticatorAttachment = p.AuthenticatorAttachment.FromRef(js.Undefined)
  3409  	p.Type = p.Type.FromRef(js.Undefined)
  3410  	if recursive {
  3411  		p.Response.FreeMembers(true)
  3412  		p.ClientExtensionResults.FreeMembers(true)
  3413  	}
  3414  }
  3415  
  3416  type AuthenticatorAssertionResponse struct {
  3417  	AuthenticatorResponse
  3418  }
  3419  
  3420  func (this AuthenticatorAssertionResponse) Once() AuthenticatorAssertionResponse {
  3421  	this.ref.Once()
  3422  	return this
  3423  }
  3424  
  3425  func (this AuthenticatorAssertionResponse) Ref() js.Ref {
  3426  	return this.AuthenticatorResponse.Ref()
  3427  }
  3428  
  3429  func (this AuthenticatorAssertionResponse) FromRef(ref js.Ref) AuthenticatorAssertionResponse {
  3430  	this.AuthenticatorResponse = this.AuthenticatorResponse.FromRef(ref)
  3431  	return this
  3432  }
  3433  
  3434  func (this AuthenticatorAssertionResponse) Free() {
  3435  	this.ref.Free()
  3436  }
  3437  
  3438  // AuthenticatorData returns the value of property "AuthenticatorAssertionResponse.authenticatorData".
  3439  //
  3440  // It returns ok=false if there is no such property.
  3441  func (this AuthenticatorAssertionResponse) AuthenticatorData() (ret js.ArrayBuffer, ok bool) {
  3442  	ok = js.True == bindings.GetAuthenticatorAssertionResponseAuthenticatorData(
  3443  		this.ref, js.Pointer(&ret),
  3444  	)
  3445  	return
  3446  }
  3447  
  3448  // Signature returns the value of property "AuthenticatorAssertionResponse.signature".
  3449  //
  3450  // It returns ok=false if there is no such property.
  3451  func (this AuthenticatorAssertionResponse) Signature() (ret js.ArrayBuffer, ok bool) {
  3452  	ok = js.True == bindings.GetAuthenticatorAssertionResponseSignature(
  3453  		this.ref, js.Pointer(&ret),
  3454  	)
  3455  	return
  3456  }
  3457  
  3458  // UserHandle returns the value of property "AuthenticatorAssertionResponse.userHandle".
  3459  //
  3460  // It returns ok=false if there is no such property.
  3461  func (this AuthenticatorAssertionResponse) UserHandle() (ret js.ArrayBuffer, ok bool) {
  3462  	ok = js.True == bindings.GetAuthenticatorAssertionResponseUserHandle(
  3463  		this.ref, js.Pointer(&ret),
  3464  	)
  3465  	return
  3466  }
  3467  
  3468  // AttestationObject returns the value of property "AuthenticatorAssertionResponse.attestationObject".
  3469  //
  3470  // It returns ok=false if there is no such property.
  3471  func (this AuthenticatorAssertionResponse) AttestationObject() (ret js.ArrayBuffer, ok bool) {
  3472  	ok = js.True == bindings.GetAuthenticatorAssertionResponseAttestationObject(
  3473  		this.ref, js.Pointer(&ret),
  3474  	)
  3475  	return
  3476  }
  3477  
  3478  type AuthenticatorAttachment uint32
  3479  
  3480  const (
  3481  	_ AuthenticatorAttachment = iota
  3482  
  3483  	AuthenticatorAttachment_PLATFORM
  3484  	AuthenticatorAttachment_CROSS_PLATFORM
  3485  )
  3486  
  3487  func (AuthenticatorAttachment) FromRef(str js.Ref) AuthenticatorAttachment {
  3488  	return AuthenticatorAttachment(bindings.ConstOfAuthenticatorAttachment(str))
  3489  }
  3490  
  3491  func (x AuthenticatorAttachment) String() (string, bool) {
  3492  	switch x {
  3493  	case AuthenticatorAttachment_PLATFORM:
  3494  		return "platform", true
  3495  	case AuthenticatorAttachment_CROSS_PLATFORM:
  3496  		return "cross-platform", true
  3497  	default:
  3498  		return "", false
  3499  	}
  3500  }