github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis43_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  const (
    13  	_ RecordingState = iota
    14  
    15  	RecordingState_INACTIVE
    16  	RecordingState_RECORDING
    17  	RecordingState_PAUSED
    18  )
    19  
    20  func (RecordingState) FromRef(str js.Ref) RecordingState {
    21  	return RecordingState(bindings.ConstOfRecordingState(str))
    22  }
    23  
    24  func (x RecordingState) String() (string, bool) {
    25  	switch x {
    26  	case RecordingState_INACTIVE:
    27  		return "inactive", true
    28  	case RecordingState_RECORDING:
    29  		return "recording", true
    30  	case RecordingState_PAUSED:
    31  		return "paused", true
    32  	default:
    33  		return "", false
    34  	}
    35  }
    36  
    37  func NewMediaRecorder(stream MediaStream, options MediaRecorderOptions) (ret MediaRecorder) {
    38  	ret.ref = bindings.NewMediaRecorderByMediaRecorder(
    39  		stream.Ref(),
    40  		js.Pointer(&options))
    41  	return
    42  }
    43  
    44  func NewMediaRecorderByMediaRecorder1(stream MediaStream) (ret MediaRecorder) {
    45  	ret.ref = bindings.NewMediaRecorderByMediaRecorder1(
    46  		stream.Ref())
    47  	return
    48  }
    49  
    50  type MediaRecorder struct {
    51  	EventTarget
    52  }
    53  
    54  func (this MediaRecorder) Once() MediaRecorder {
    55  	this.ref.Once()
    56  	return this
    57  }
    58  
    59  func (this MediaRecorder) Ref() js.Ref {
    60  	return this.EventTarget.Ref()
    61  }
    62  
    63  func (this MediaRecorder) FromRef(ref js.Ref) MediaRecorder {
    64  	this.EventTarget = this.EventTarget.FromRef(ref)
    65  	return this
    66  }
    67  
    68  func (this MediaRecorder) Free() {
    69  	this.ref.Free()
    70  }
    71  
    72  // Stream returns the value of property "MediaRecorder.stream".
    73  //
    74  // It returns ok=false if there is no such property.
    75  func (this MediaRecorder) Stream() (ret MediaStream, ok bool) {
    76  	ok = js.True == bindings.GetMediaRecorderStream(
    77  		this.ref, js.Pointer(&ret),
    78  	)
    79  	return
    80  }
    81  
    82  // MimeType returns the value of property "MediaRecorder.mimeType".
    83  //
    84  // It returns ok=false if there is no such property.
    85  func (this MediaRecorder) MimeType() (ret js.String, ok bool) {
    86  	ok = js.True == bindings.GetMediaRecorderMimeType(
    87  		this.ref, js.Pointer(&ret),
    88  	)
    89  	return
    90  }
    91  
    92  // State returns the value of property "MediaRecorder.state".
    93  //
    94  // It returns ok=false if there is no such property.
    95  func (this MediaRecorder) State() (ret RecordingState, ok bool) {
    96  	ok = js.True == bindings.GetMediaRecorderState(
    97  		this.ref, js.Pointer(&ret),
    98  	)
    99  	return
   100  }
   101  
   102  // VideoBitsPerSecond returns the value of property "MediaRecorder.videoBitsPerSecond".
   103  //
   104  // It returns ok=false if there is no such property.
   105  func (this MediaRecorder) VideoBitsPerSecond() (ret uint32, ok bool) {
   106  	ok = js.True == bindings.GetMediaRecorderVideoBitsPerSecond(
   107  		this.ref, js.Pointer(&ret),
   108  	)
   109  	return
   110  }
   111  
   112  // AudioBitsPerSecond returns the value of property "MediaRecorder.audioBitsPerSecond".
   113  //
   114  // It returns ok=false if there is no such property.
   115  func (this MediaRecorder) AudioBitsPerSecond() (ret uint32, ok bool) {
   116  	ok = js.True == bindings.GetMediaRecorderAudioBitsPerSecond(
   117  		this.ref, js.Pointer(&ret),
   118  	)
   119  	return
   120  }
   121  
   122  // AudioBitrateMode returns the value of property "MediaRecorder.audioBitrateMode".
   123  //
   124  // It returns ok=false if there is no such property.
   125  func (this MediaRecorder) AudioBitrateMode() (ret BitrateMode, ok bool) {
   126  	ok = js.True == bindings.GetMediaRecorderAudioBitrateMode(
   127  		this.ref, js.Pointer(&ret),
   128  	)
   129  	return
   130  }
   131  
   132  // HasFuncStart returns true if the method "MediaRecorder.start" exists.
   133  func (this MediaRecorder) HasFuncStart() bool {
   134  	return js.True == bindings.HasFuncMediaRecorderStart(
   135  		this.ref,
   136  	)
   137  }
   138  
   139  // FuncStart returns the method "MediaRecorder.start".
   140  func (this MediaRecorder) FuncStart() (fn js.Func[func(timeslice uint32)]) {
   141  	bindings.FuncMediaRecorderStart(
   142  		this.ref, js.Pointer(&fn),
   143  	)
   144  	return
   145  }
   146  
   147  // Start calls the method "MediaRecorder.start".
   148  func (this MediaRecorder) Start(timeslice uint32) (ret js.Void) {
   149  	bindings.CallMediaRecorderStart(
   150  		this.ref, js.Pointer(&ret),
   151  		uint32(timeslice),
   152  	)
   153  
   154  	return
   155  }
   156  
   157  // TryStart calls the method "MediaRecorder.start"
   158  // in a try/catch block and returns (_, err, ok = false) when it went through
   159  // the catch clause.
   160  func (this MediaRecorder) TryStart(timeslice uint32) (ret js.Void, exception js.Any, ok bool) {
   161  	ok = js.True == bindings.TryMediaRecorderStart(
   162  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   163  		uint32(timeslice),
   164  	)
   165  
   166  	return
   167  }
   168  
   169  // HasFuncStart1 returns true if the method "MediaRecorder.start" exists.
   170  func (this MediaRecorder) HasFuncStart1() bool {
   171  	return js.True == bindings.HasFuncMediaRecorderStart1(
   172  		this.ref,
   173  	)
   174  }
   175  
   176  // FuncStart1 returns the method "MediaRecorder.start".
   177  func (this MediaRecorder) FuncStart1() (fn js.Func[func()]) {
   178  	bindings.FuncMediaRecorderStart1(
   179  		this.ref, js.Pointer(&fn),
   180  	)
   181  	return
   182  }
   183  
   184  // Start1 calls the method "MediaRecorder.start".
   185  func (this MediaRecorder) Start1() (ret js.Void) {
   186  	bindings.CallMediaRecorderStart1(
   187  		this.ref, js.Pointer(&ret),
   188  	)
   189  
   190  	return
   191  }
   192  
   193  // TryStart1 calls the method "MediaRecorder.start"
   194  // in a try/catch block and returns (_, err, ok = false) when it went through
   195  // the catch clause.
   196  func (this MediaRecorder) TryStart1() (ret js.Void, exception js.Any, ok bool) {
   197  	ok = js.True == bindings.TryMediaRecorderStart1(
   198  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   199  	)
   200  
   201  	return
   202  }
   203  
   204  // HasFuncStop returns true if the method "MediaRecorder.stop" exists.
   205  func (this MediaRecorder) HasFuncStop() bool {
   206  	return js.True == bindings.HasFuncMediaRecorderStop(
   207  		this.ref,
   208  	)
   209  }
   210  
   211  // FuncStop returns the method "MediaRecorder.stop".
   212  func (this MediaRecorder) FuncStop() (fn js.Func[func()]) {
   213  	bindings.FuncMediaRecorderStop(
   214  		this.ref, js.Pointer(&fn),
   215  	)
   216  	return
   217  }
   218  
   219  // Stop calls the method "MediaRecorder.stop".
   220  func (this MediaRecorder) Stop() (ret js.Void) {
   221  	bindings.CallMediaRecorderStop(
   222  		this.ref, js.Pointer(&ret),
   223  	)
   224  
   225  	return
   226  }
   227  
   228  // TryStop calls the method "MediaRecorder.stop"
   229  // in a try/catch block and returns (_, err, ok = false) when it went through
   230  // the catch clause.
   231  func (this MediaRecorder) TryStop() (ret js.Void, exception js.Any, ok bool) {
   232  	ok = js.True == bindings.TryMediaRecorderStop(
   233  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   234  	)
   235  
   236  	return
   237  }
   238  
   239  // HasFuncPause returns true if the method "MediaRecorder.pause" exists.
   240  func (this MediaRecorder) HasFuncPause() bool {
   241  	return js.True == bindings.HasFuncMediaRecorderPause(
   242  		this.ref,
   243  	)
   244  }
   245  
   246  // FuncPause returns the method "MediaRecorder.pause".
   247  func (this MediaRecorder) FuncPause() (fn js.Func[func()]) {
   248  	bindings.FuncMediaRecorderPause(
   249  		this.ref, js.Pointer(&fn),
   250  	)
   251  	return
   252  }
   253  
   254  // Pause calls the method "MediaRecorder.pause".
   255  func (this MediaRecorder) Pause() (ret js.Void) {
   256  	bindings.CallMediaRecorderPause(
   257  		this.ref, js.Pointer(&ret),
   258  	)
   259  
   260  	return
   261  }
   262  
   263  // TryPause calls the method "MediaRecorder.pause"
   264  // in a try/catch block and returns (_, err, ok = false) when it went through
   265  // the catch clause.
   266  func (this MediaRecorder) TryPause() (ret js.Void, exception js.Any, ok bool) {
   267  	ok = js.True == bindings.TryMediaRecorderPause(
   268  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   269  	)
   270  
   271  	return
   272  }
   273  
   274  // HasFuncResume returns true if the method "MediaRecorder.resume" exists.
   275  func (this MediaRecorder) HasFuncResume() bool {
   276  	return js.True == bindings.HasFuncMediaRecorderResume(
   277  		this.ref,
   278  	)
   279  }
   280  
   281  // FuncResume returns the method "MediaRecorder.resume".
   282  func (this MediaRecorder) FuncResume() (fn js.Func[func()]) {
   283  	bindings.FuncMediaRecorderResume(
   284  		this.ref, js.Pointer(&fn),
   285  	)
   286  	return
   287  }
   288  
   289  // Resume calls the method "MediaRecorder.resume".
   290  func (this MediaRecorder) Resume() (ret js.Void) {
   291  	bindings.CallMediaRecorderResume(
   292  		this.ref, js.Pointer(&ret),
   293  	)
   294  
   295  	return
   296  }
   297  
   298  // TryResume calls the method "MediaRecorder.resume"
   299  // in a try/catch block and returns (_, err, ok = false) when it went through
   300  // the catch clause.
   301  func (this MediaRecorder) TryResume() (ret js.Void, exception js.Any, ok bool) {
   302  	ok = js.True == bindings.TryMediaRecorderResume(
   303  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   304  	)
   305  
   306  	return
   307  }
   308  
   309  // HasFuncRequestData returns true if the method "MediaRecorder.requestData" exists.
   310  func (this MediaRecorder) HasFuncRequestData() bool {
   311  	return js.True == bindings.HasFuncMediaRecorderRequestData(
   312  		this.ref,
   313  	)
   314  }
   315  
   316  // FuncRequestData returns the method "MediaRecorder.requestData".
   317  func (this MediaRecorder) FuncRequestData() (fn js.Func[func()]) {
   318  	bindings.FuncMediaRecorderRequestData(
   319  		this.ref, js.Pointer(&fn),
   320  	)
   321  	return
   322  }
   323  
   324  // RequestData calls the method "MediaRecorder.requestData".
   325  func (this MediaRecorder) RequestData() (ret js.Void) {
   326  	bindings.CallMediaRecorderRequestData(
   327  		this.ref, js.Pointer(&ret),
   328  	)
   329  
   330  	return
   331  }
   332  
   333  // TryRequestData calls the method "MediaRecorder.requestData"
   334  // in a try/catch block and returns (_, err, ok = false) when it went through
   335  // the catch clause.
   336  func (this MediaRecorder) TryRequestData() (ret js.Void, exception js.Any, ok bool) {
   337  	ok = js.True == bindings.TryMediaRecorderRequestData(
   338  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   339  	)
   340  
   341  	return
   342  }
   343  
   344  // HasFuncIsTypeSupported returns true if the static method "MediaRecorder.isTypeSupported" exists.
   345  func (this MediaRecorder) HasFuncIsTypeSupported() bool {
   346  	return js.True == bindings.HasFuncMediaRecorderIsTypeSupported(
   347  		this.ref,
   348  	)
   349  }
   350  
   351  // FuncIsTypeSupported returns the static method "MediaRecorder.isTypeSupported".
   352  func (this MediaRecorder) FuncIsTypeSupported() (fn js.Func[func(typ js.String) bool]) {
   353  	bindings.FuncMediaRecorderIsTypeSupported(
   354  		this.ref, js.Pointer(&fn),
   355  	)
   356  	return
   357  }
   358  
   359  // IsTypeSupported calls the static method "MediaRecorder.isTypeSupported".
   360  func (this MediaRecorder) IsTypeSupported(typ js.String) (ret bool) {
   361  	bindings.CallMediaRecorderIsTypeSupported(
   362  		this.ref, js.Pointer(&ret),
   363  		typ.Ref(),
   364  	)
   365  
   366  	return
   367  }
   368  
   369  // TryIsTypeSupported calls the static method "MediaRecorder.isTypeSupported"
   370  // in a try/catch block and returns (_, err, ok = false) when it went through
   371  // the catch clause.
   372  func (this MediaRecorder) TryIsTypeSupported(typ js.String) (ret bool, exception js.Any, ok bool) {
   373  	ok = js.True == bindings.TryMediaRecorderIsTypeSupported(
   374  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   375  		typ.Ref(),
   376  	)
   377  
   378  	return
   379  }
   380  
   381  type MediaStreamTrackEventInit struct {
   382  	// Track is "MediaStreamTrackEventInit.track"
   383  	//
   384  	// Required
   385  	Track MediaStreamTrack
   386  	// Bubbles is "MediaStreamTrackEventInit.bubbles"
   387  	//
   388  	// Optional, defaults to false.
   389  	//
   390  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
   391  	Bubbles bool
   392  	// Cancelable is "MediaStreamTrackEventInit.cancelable"
   393  	//
   394  	// Optional, defaults to false.
   395  	//
   396  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
   397  	Cancelable bool
   398  	// Composed is "MediaStreamTrackEventInit.composed"
   399  	//
   400  	// Optional, defaults to false.
   401  	//
   402  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
   403  	Composed bool
   404  
   405  	FFI_USE_Bubbles    bool // for Bubbles.
   406  	FFI_USE_Cancelable bool // for Cancelable.
   407  	FFI_USE_Composed   bool // for Composed.
   408  
   409  	FFI_USE bool
   410  }
   411  
   412  // FromRef calls UpdateFrom and returns a MediaStreamTrackEventInit with all fields set.
   413  func (p MediaStreamTrackEventInit) FromRef(ref js.Ref) MediaStreamTrackEventInit {
   414  	p.UpdateFrom(ref)
   415  	return p
   416  }
   417  
   418  // New creates a new MediaStreamTrackEventInit in the application heap.
   419  func (p MediaStreamTrackEventInit) New() js.Ref {
   420  	return bindings.MediaStreamTrackEventInitJSLoad(
   421  		js.Pointer(&p), js.True, 0,
   422  	)
   423  }
   424  
   425  // UpdateFrom copies value of all fields of the heap object to p.
   426  func (p *MediaStreamTrackEventInit) UpdateFrom(ref js.Ref) {
   427  	bindings.MediaStreamTrackEventInitJSStore(
   428  		js.Pointer(p), ref,
   429  	)
   430  }
   431  
   432  // Update writes all fields of the p to the heap object referenced by ref.
   433  func (p *MediaStreamTrackEventInit) Update(ref js.Ref) {
   434  	bindings.MediaStreamTrackEventInitJSLoad(
   435  		js.Pointer(p), js.False, ref,
   436  	)
   437  }
   438  
   439  // FreeMembers frees fields with heap reference, if recursive is true
   440  // free all heap references reachable from p.
   441  func (p *MediaStreamTrackEventInit) FreeMembers(recursive bool) {
   442  	js.Free(
   443  		p.Track.Ref(),
   444  	)
   445  	p.Track = p.Track.FromRef(js.Undefined)
   446  }
   447  
   448  func NewMediaStreamTrackEvent(typ js.String, eventInitDict MediaStreamTrackEventInit) (ret MediaStreamTrackEvent) {
   449  	ret.ref = bindings.NewMediaStreamTrackEventByMediaStreamTrackEvent(
   450  		typ.Ref(),
   451  		js.Pointer(&eventInitDict))
   452  	return
   453  }
   454  
   455  type MediaStreamTrackEvent struct {
   456  	Event
   457  }
   458  
   459  func (this MediaStreamTrackEvent) Once() MediaStreamTrackEvent {
   460  	this.ref.Once()
   461  	return this
   462  }
   463  
   464  func (this MediaStreamTrackEvent) Ref() js.Ref {
   465  	return this.Event.Ref()
   466  }
   467  
   468  func (this MediaStreamTrackEvent) FromRef(ref js.Ref) MediaStreamTrackEvent {
   469  	this.Event = this.Event.FromRef(ref)
   470  	return this
   471  }
   472  
   473  func (this MediaStreamTrackEvent) Free() {
   474  	this.ref.Free()
   475  }
   476  
   477  // Track returns the value of property "MediaStreamTrackEvent.track".
   478  //
   479  // It returns ok=false if there is no such property.
   480  func (this MediaStreamTrackEvent) Track() (ret MediaStreamTrack, ok bool) {
   481  	ok = js.True == bindings.GetMediaStreamTrackEventTrack(
   482  		this.ref, js.Pointer(&ret),
   483  	)
   484  	return
   485  }
   486  
   487  type MediaStreamTrackProcessorInit struct {
   488  	// Track is "MediaStreamTrackProcessorInit.track"
   489  	//
   490  	// Required
   491  	Track MediaStreamTrack
   492  	// MaxBufferSize is "MediaStreamTrackProcessorInit.maxBufferSize"
   493  	//
   494  	// Optional
   495  	//
   496  	// NOTE: FFI_USE_MaxBufferSize MUST be set to true to make this field effective.
   497  	MaxBufferSize uint16
   498  
   499  	FFI_USE_MaxBufferSize bool // for MaxBufferSize.
   500  
   501  	FFI_USE bool
   502  }
   503  
   504  // FromRef calls UpdateFrom and returns a MediaStreamTrackProcessorInit with all fields set.
   505  func (p MediaStreamTrackProcessorInit) FromRef(ref js.Ref) MediaStreamTrackProcessorInit {
   506  	p.UpdateFrom(ref)
   507  	return p
   508  }
   509  
   510  // New creates a new MediaStreamTrackProcessorInit in the application heap.
   511  func (p MediaStreamTrackProcessorInit) New() js.Ref {
   512  	return bindings.MediaStreamTrackProcessorInitJSLoad(
   513  		js.Pointer(&p), js.True, 0,
   514  	)
   515  }
   516  
   517  // UpdateFrom copies value of all fields of the heap object to p.
   518  func (p *MediaStreamTrackProcessorInit) UpdateFrom(ref js.Ref) {
   519  	bindings.MediaStreamTrackProcessorInitJSStore(
   520  		js.Pointer(p), ref,
   521  	)
   522  }
   523  
   524  // Update writes all fields of the p to the heap object referenced by ref.
   525  func (p *MediaStreamTrackProcessorInit) Update(ref js.Ref) {
   526  	bindings.MediaStreamTrackProcessorInitJSLoad(
   527  		js.Pointer(p), js.False, ref,
   528  	)
   529  }
   530  
   531  // FreeMembers frees fields with heap reference, if recursive is true
   532  // free all heap references reachable from p.
   533  func (p *MediaStreamTrackProcessorInit) FreeMembers(recursive bool) {
   534  	js.Free(
   535  		p.Track.Ref(),
   536  	)
   537  	p.Track = p.Track.FromRef(js.Undefined)
   538  }
   539  
   540  func NewMediaStreamTrackProcessor(init MediaStreamTrackProcessorInit) (ret MediaStreamTrackProcessor) {
   541  	ret.ref = bindings.NewMediaStreamTrackProcessorByMediaStreamTrackProcessor(
   542  		js.Pointer(&init))
   543  	return
   544  }
   545  
   546  type MediaStreamTrackProcessor struct {
   547  	ref js.Ref
   548  }
   549  
   550  func (this MediaStreamTrackProcessor) Once() MediaStreamTrackProcessor {
   551  	this.ref.Once()
   552  	return this
   553  }
   554  
   555  func (this MediaStreamTrackProcessor) Ref() js.Ref {
   556  	return this.ref
   557  }
   558  
   559  func (this MediaStreamTrackProcessor) FromRef(ref js.Ref) MediaStreamTrackProcessor {
   560  	this.ref = ref
   561  	return this
   562  }
   563  
   564  func (this MediaStreamTrackProcessor) Free() {
   565  	this.ref.Free()
   566  }
   567  
   568  // Readable returns the value of property "MediaStreamTrackProcessor.readable".
   569  //
   570  // It returns ok=false if there is no such property.
   571  func (this MediaStreamTrackProcessor) Readable() (ret ReadableStream, ok bool) {
   572  	ok = js.True == bindings.GetMediaStreamTrackProcessorReadable(
   573  		this.ref, js.Pointer(&ret),
   574  	)
   575  	return
   576  }
   577  
   578  // SetReadable sets the value of property "MediaStreamTrackProcessor.readable" to val.
   579  //
   580  // It returns false if the property cannot be set.
   581  func (this MediaStreamTrackProcessor) SetReadable(val ReadableStream) bool {
   582  	return js.True == bindings.SetMediaStreamTrackProcessorReadable(
   583  		this.ref,
   584  		val.Ref(),
   585  	)
   586  }
   587  
   588  type MemoryDescriptor struct {
   589  	// Initial is "MemoryDescriptor.initial"
   590  	//
   591  	// Required
   592  	Initial uint32
   593  	// Maximum is "MemoryDescriptor.maximum"
   594  	//
   595  	// Optional
   596  	//
   597  	// NOTE: FFI_USE_Maximum MUST be set to true to make this field effective.
   598  	Maximum uint32
   599  
   600  	FFI_USE_Maximum bool // for Maximum.
   601  
   602  	FFI_USE bool
   603  }
   604  
   605  // FromRef calls UpdateFrom and returns a MemoryDescriptor with all fields set.
   606  func (p MemoryDescriptor) FromRef(ref js.Ref) MemoryDescriptor {
   607  	p.UpdateFrom(ref)
   608  	return p
   609  }
   610  
   611  // New creates a new MemoryDescriptor in the application heap.
   612  func (p MemoryDescriptor) New() js.Ref {
   613  	return bindings.MemoryDescriptorJSLoad(
   614  		js.Pointer(&p), js.True, 0,
   615  	)
   616  }
   617  
   618  // UpdateFrom copies value of all fields of the heap object to p.
   619  func (p *MemoryDescriptor) UpdateFrom(ref js.Ref) {
   620  	bindings.MemoryDescriptorJSStore(
   621  		js.Pointer(p), ref,
   622  	)
   623  }
   624  
   625  // Update writes all fields of the p to the heap object referenced by ref.
   626  func (p *MemoryDescriptor) Update(ref js.Ref) {
   627  	bindings.MemoryDescriptorJSLoad(
   628  		js.Pointer(p), js.False, ref,
   629  	)
   630  }
   631  
   632  // FreeMembers frees fields with heap reference, if recursive is true
   633  // free all heap references reachable from p.
   634  func (p *MemoryDescriptor) FreeMembers(recursive bool) {
   635  }
   636  
   637  func NewMemory(descriptor MemoryDescriptor) (ret Memory) {
   638  	ret.ref = bindings.NewMemoryByMemory(
   639  		js.Pointer(&descriptor))
   640  	return
   641  }
   642  
   643  type Memory struct {
   644  	ref js.Ref
   645  }
   646  
   647  func (this Memory) Once() Memory {
   648  	this.ref.Once()
   649  	return this
   650  }
   651  
   652  func (this Memory) Ref() js.Ref {
   653  	return this.ref
   654  }
   655  
   656  func (this Memory) FromRef(ref js.Ref) Memory {
   657  	this.ref = ref
   658  	return this
   659  }
   660  
   661  func (this Memory) Free() {
   662  	this.ref.Free()
   663  }
   664  
   665  // Buffer returns the value of property "Memory.buffer".
   666  //
   667  // It returns ok=false if there is no such property.
   668  func (this Memory) Buffer() (ret js.ArrayBuffer, ok bool) {
   669  	ok = js.True == bindings.GetMemoryBuffer(
   670  		this.ref, js.Pointer(&ret),
   671  	)
   672  	return
   673  }
   674  
   675  // HasFuncGrow returns true if the method "Memory.grow" exists.
   676  func (this Memory) HasFuncGrow() bool {
   677  	return js.True == bindings.HasFuncMemoryGrow(
   678  		this.ref,
   679  	)
   680  }
   681  
   682  // FuncGrow returns the method "Memory.grow".
   683  func (this Memory) FuncGrow() (fn js.Func[func(delta uint32) uint32]) {
   684  	bindings.FuncMemoryGrow(
   685  		this.ref, js.Pointer(&fn),
   686  	)
   687  	return
   688  }
   689  
   690  // Grow calls the method "Memory.grow".
   691  func (this Memory) Grow(delta uint32) (ret uint32) {
   692  	bindings.CallMemoryGrow(
   693  		this.ref, js.Pointer(&ret),
   694  		uint32(delta),
   695  	)
   696  
   697  	return
   698  }
   699  
   700  // TryGrow calls the method "Memory.grow"
   701  // in a try/catch block and returns (_, err, ok = false) when it went through
   702  // the catch clause.
   703  func (this Memory) TryGrow(delta uint32) (ret uint32, exception js.Any, ok bool) {
   704  	ok = js.True == bindings.TryMemoryGrow(
   705  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   706  		uint32(delta),
   707  	)
   708  
   709  	return
   710  }
   711  
   712  type MessageChannel struct {
   713  	ref js.Ref
   714  }
   715  
   716  func (this MessageChannel) Once() MessageChannel {
   717  	this.ref.Once()
   718  	return this
   719  }
   720  
   721  func (this MessageChannel) Ref() js.Ref {
   722  	return this.ref
   723  }
   724  
   725  func (this MessageChannel) FromRef(ref js.Ref) MessageChannel {
   726  	this.ref = ref
   727  	return this
   728  }
   729  
   730  func (this MessageChannel) Free() {
   731  	this.ref.Free()
   732  }
   733  
   734  // Port1 returns the value of property "MessageChannel.port1".
   735  //
   736  // It returns ok=false if there is no such property.
   737  func (this MessageChannel) Port1() (ret MessagePort, ok bool) {
   738  	ok = js.True == bindings.GetMessageChannelPort1(
   739  		this.ref, js.Pointer(&ret),
   740  	)
   741  	return
   742  }
   743  
   744  // Port2 returns the value of property "MessageChannel.port2".
   745  //
   746  // It returns ok=false if there is no such property.
   747  func (this MessageChannel) Port2() (ret MessagePort, ok bool) {
   748  	ok = js.True == bindings.GetMessageChannelPort2(
   749  		this.ref, js.Pointer(&ret),
   750  	)
   751  	return
   752  }
   753  
   754  type OneOf_Object_MessagePort_ServiceWorker struct {
   755  	ref js.Ref
   756  }
   757  
   758  func (x OneOf_Object_MessagePort_ServiceWorker) Ref() js.Ref {
   759  	return x.ref
   760  }
   761  
   762  func (x OneOf_Object_MessagePort_ServiceWorker) Free() {
   763  	x.ref.Free()
   764  }
   765  
   766  func (x OneOf_Object_MessagePort_ServiceWorker) FromRef(ref js.Ref) OneOf_Object_MessagePort_ServiceWorker {
   767  	return OneOf_Object_MessagePort_ServiceWorker{
   768  		ref: ref,
   769  	}
   770  }
   771  
   772  func (x OneOf_Object_MessagePort_ServiceWorker) Object() js.Object {
   773  	return js.Object{}.FromRef(x.ref)
   774  }
   775  
   776  func (x OneOf_Object_MessagePort_ServiceWorker) MessagePort() MessagePort {
   777  	return MessagePort{}.FromRef(x.ref)
   778  }
   779  
   780  func (x OneOf_Object_MessagePort_ServiceWorker) ServiceWorker() ServiceWorker {
   781  	return ServiceWorker{}.FromRef(x.ref)
   782  }
   783  
   784  type MessageEventSource = OneOf_Object_MessagePort_ServiceWorker
   785  
   786  type MessageEventInit struct {
   787  	// Data is "MessageEventInit.data"
   788  	//
   789  	// Optional, defaults to null.
   790  	Data js.Any
   791  	// Origin is "MessageEventInit.origin"
   792  	//
   793  	// Optional, defaults to "".
   794  	Origin js.String
   795  	// LastEventId is "MessageEventInit.lastEventId"
   796  	//
   797  	// Optional, defaults to "".
   798  	LastEventId js.String
   799  	// Source is "MessageEventInit.source"
   800  	//
   801  	// Optional, defaults to null.
   802  	Source MessageEventSource
   803  	// Ports is "MessageEventInit.ports"
   804  	//
   805  	// Optional, defaults to [].
   806  	Ports js.Array[MessagePort]
   807  	// Bubbles is "MessageEventInit.bubbles"
   808  	//
   809  	// Optional, defaults to false.
   810  	//
   811  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
   812  	Bubbles bool
   813  	// Cancelable is "MessageEventInit.cancelable"
   814  	//
   815  	// Optional, defaults to false.
   816  	//
   817  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
   818  	Cancelable bool
   819  	// Composed is "MessageEventInit.composed"
   820  	//
   821  	// Optional, defaults to false.
   822  	//
   823  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
   824  	Composed bool
   825  
   826  	FFI_USE_Bubbles    bool // for Bubbles.
   827  	FFI_USE_Cancelable bool // for Cancelable.
   828  	FFI_USE_Composed   bool // for Composed.
   829  
   830  	FFI_USE bool
   831  }
   832  
   833  // FromRef calls UpdateFrom and returns a MessageEventInit with all fields set.
   834  func (p MessageEventInit) FromRef(ref js.Ref) MessageEventInit {
   835  	p.UpdateFrom(ref)
   836  	return p
   837  }
   838  
   839  // New creates a new MessageEventInit in the application heap.
   840  func (p MessageEventInit) New() js.Ref {
   841  	return bindings.MessageEventInitJSLoad(
   842  		js.Pointer(&p), js.True, 0,
   843  	)
   844  }
   845  
   846  // UpdateFrom copies value of all fields of the heap object to p.
   847  func (p *MessageEventInit) UpdateFrom(ref js.Ref) {
   848  	bindings.MessageEventInitJSStore(
   849  		js.Pointer(p), ref,
   850  	)
   851  }
   852  
   853  // Update writes all fields of the p to the heap object referenced by ref.
   854  func (p *MessageEventInit) Update(ref js.Ref) {
   855  	bindings.MessageEventInitJSLoad(
   856  		js.Pointer(p), js.False, ref,
   857  	)
   858  }
   859  
   860  // FreeMembers frees fields with heap reference, if recursive is true
   861  // free all heap references reachable from p.
   862  func (p *MessageEventInit) FreeMembers(recursive bool) {
   863  	js.Free(
   864  		p.Data.Ref(),
   865  		p.Origin.Ref(),
   866  		p.LastEventId.Ref(),
   867  		p.Source.Ref(),
   868  		p.Ports.Ref(),
   869  	)
   870  	p.Data = p.Data.FromRef(js.Undefined)
   871  	p.Origin = p.Origin.FromRef(js.Undefined)
   872  	p.LastEventId = p.LastEventId.FromRef(js.Undefined)
   873  	p.Source = p.Source.FromRef(js.Undefined)
   874  	p.Ports = p.Ports.FromRef(js.Undefined)
   875  }
   876  
   877  func NewMessageEvent(typ js.String, eventInitDict MessageEventInit) (ret MessageEvent) {
   878  	ret.ref = bindings.NewMessageEventByMessageEvent(
   879  		typ.Ref(),
   880  		js.Pointer(&eventInitDict))
   881  	return
   882  }
   883  
   884  func NewMessageEventByMessageEvent1(typ js.String) (ret MessageEvent) {
   885  	ret.ref = bindings.NewMessageEventByMessageEvent1(
   886  		typ.Ref())
   887  	return
   888  }
   889  
   890  type MessageEvent struct {
   891  	Event
   892  }
   893  
   894  func (this MessageEvent) Once() MessageEvent {
   895  	this.ref.Once()
   896  	return this
   897  }
   898  
   899  func (this MessageEvent) Ref() js.Ref {
   900  	return this.Event.Ref()
   901  }
   902  
   903  func (this MessageEvent) FromRef(ref js.Ref) MessageEvent {
   904  	this.Event = this.Event.FromRef(ref)
   905  	return this
   906  }
   907  
   908  func (this MessageEvent) Free() {
   909  	this.ref.Free()
   910  }
   911  
   912  // Data returns the value of property "MessageEvent.data".
   913  //
   914  // It returns ok=false if there is no such property.
   915  func (this MessageEvent) Data() (ret js.Any, ok bool) {
   916  	ok = js.True == bindings.GetMessageEventData(
   917  		this.ref, js.Pointer(&ret),
   918  	)
   919  	return
   920  }
   921  
   922  // Origin returns the value of property "MessageEvent.origin".
   923  //
   924  // It returns ok=false if there is no such property.
   925  func (this MessageEvent) Origin() (ret js.String, ok bool) {
   926  	ok = js.True == bindings.GetMessageEventOrigin(
   927  		this.ref, js.Pointer(&ret),
   928  	)
   929  	return
   930  }
   931  
   932  // LastEventId returns the value of property "MessageEvent.lastEventId".
   933  //
   934  // It returns ok=false if there is no such property.
   935  func (this MessageEvent) LastEventId() (ret js.String, ok bool) {
   936  	ok = js.True == bindings.GetMessageEventLastEventId(
   937  		this.ref, js.Pointer(&ret),
   938  	)
   939  	return
   940  }
   941  
   942  // Source returns the value of property "MessageEvent.source".
   943  //
   944  // It returns ok=false if there is no such property.
   945  func (this MessageEvent) Source() (ret MessageEventSource, ok bool) {
   946  	ok = js.True == bindings.GetMessageEventSource(
   947  		this.ref, js.Pointer(&ret),
   948  	)
   949  	return
   950  }
   951  
   952  // Ports returns the value of property "MessageEvent.ports".
   953  //
   954  // It returns ok=false if there is no such property.
   955  func (this MessageEvent) Ports() (ret js.FrozenArray[MessagePort], ok bool) {
   956  	ok = js.True == bindings.GetMessageEventPorts(
   957  		this.ref, js.Pointer(&ret),
   958  	)
   959  	return
   960  }
   961  
   962  // HasFuncInitMessageEvent returns true if the method "MessageEvent.initMessageEvent" exists.
   963  func (this MessageEvent) HasFuncInitMessageEvent() bool {
   964  	return js.True == bindings.HasFuncMessageEventInitMessageEvent(
   965  		this.ref,
   966  	)
   967  }
   968  
   969  // FuncInitMessageEvent returns the method "MessageEvent.initMessageEvent".
   970  func (this MessageEvent) FuncInitMessageEvent() (fn js.Func[func(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String, source MessageEventSource, ports js.Array[MessagePort])]) {
   971  	bindings.FuncMessageEventInitMessageEvent(
   972  		this.ref, js.Pointer(&fn),
   973  	)
   974  	return
   975  }
   976  
   977  // InitMessageEvent calls the method "MessageEvent.initMessageEvent".
   978  func (this MessageEvent) InitMessageEvent(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String, source MessageEventSource, ports js.Array[MessagePort]) (ret js.Void) {
   979  	bindings.CallMessageEventInitMessageEvent(
   980  		this.ref, js.Pointer(&ret),
   981  		typ.Ref(),
   982  		js.Bool(bool(bubbles)),
   983  		js.Bool(bool(cancelable)),
   984  		data.Ref(),
   985  		origin.Ref(),
   986  		lastEventId.Ref(),
   987  		source.Ref(),
   988  		ports.Ref(),
   989  	)
   990  
   991  	return
   992  }
   993  
   994  // TryInitMessageEvent calls the method "MessageEvent.initMessageEvent"
   995  // in a try/catch block and returns (_, err, ok = false) when it went through
   996  // the catch clause.
   997  func (this MessageEvent) TryInitMessageEvent(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String, source MessageEventSource, ports js.Array[MessagePort]) (ret js.Void, exception js.Any, ok bool) {
   998  	ok = js.True == bindings.TryMessageEventInitMessageEvent(
   999  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1000  		typ.Ref(),
  1001  		js.Bool(bool(bubbles)),
  1002  		js.Bool(bool(cancelable)),
  1003  		data.Ref(),
  1004  		origin.Ref(),
  1005  		lastEventId.Ref(),
  1006  		source.Ref(),
  1007  		ports.Ref(),
  1008  	)
  1009  
  1010  	return
  1011  }
  1012  
  1013  // HasFuncInitMessageEvent1 returns true if the method "MessageEvent.initMessageEvent" exists.
  1014  func (this MessageEvent) HasFuncInitMessageEvent1() bool {
  1015  	return js.True == bindings.HasFuncMessageEventInitMessageEvent1(
  1016  		this.ref,
  1017  	)
  1018  }
  1019  
  1020  // FuncInitMessageEvent1 returns the method "MessageEvent.initMessageEvent".
  1021  func (this MessageEvent) FuncInitMessageEvent1() (fn js.Func[func(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String, source MessageEventSource)]) {
  1022  	bindings.FuncMessageEventInitMessageEvent1(
  1023  		this.ref, js.Pointer(&fn),
  1024  	)
  1025  	return
  1026  }
  1027  
  1028  // InitMessageEvent1 calls the method "MessageEvent.initMessageEvent".
  1029  func (this MessageEvent) InitMessageEvent1(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String, source MessageEventSource) (ret js.Void) {
  1030  	bindings.CallMessageEventInitMessageEvent1(
  1031  		this.ref, js.Pointer(&ret),
  1032  		typ.Ref(),
  1033  		js.Bool(bool(bubbles)),
  1034  		js.Bool(bool(cancelable)),
  1035  		data.Ref(),
  1036  		origin.Ref(),
  1037  		lastEventId.Ref(),
  1038  		source.Ref(),
  1039  	)
  1040  
  1041  	return
  1042  }
  1043  
  1044  // TryInitMessageEvent1 calls the method "MessageEvent.initMessageEvent"
  1045  // in a try/catch block and returns (_, err, ok = false) when it went through
  1046  // the catch clause.
  1047  func (this MessageEvent) TryInitMessageEvent1(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String, source MessageEventSource) (ret js.Void, exception js.Any, ok bool) {
  1048  	ok = js.True == bindings.TryMessageEventInitMessageEvent1(
  1049  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1050  		typ.Ref(),
  1051  		js.Bool(bool(bubbles)),
  1052  		js.Bool(bool(cancelable)),
  1053  		data.Ref(),
  1054  		origin.Ref(),
  1055  		lastEventId.Ref(),
  1056  		source.Ref(),
  1057  	)
  1058  
  1059  	return
  1060  }
  1061  
  1062  // HasFuncInitMessageEvent2 returns true if the method "MessageEvent.initMessageEvent" exists.
  1063  func (this MessageEvent) HasFuncInitMessageEvent2() bool {
  1064  	return js.True == bindings.HasFuncMessageEventInitMessageEvent2(
  1065  		this.ref,
  1066  	)
  1067  }
  1068  
  1069  // FuncInitMessageEvent2 returns the method "MessageEvent.initMessageEvent".
  1070  func (this MessageEvent) FuncInitMessageEvent2() (fn js.Func[func(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String)]) {
  1071  	bindings.FuncMessageEventInitMessageEvent2(
  1072  		this.ref, js.Pointer(&fn),
  1073  	)
  1074  	return
  1075  }
  1076  
  1077  // InitMessageEvent2 calls the method "MessageEvent.initMessageEvent".
  1078  func (this MessageEvent) InitMessageEvent2(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String) (ret js.Void) {
  1079  	bindings.CallMessageEventInitMessageEvent2(
  1080  		this.ref, js.Pointer(&ret),
  1081  		typ.Ref(),
  1082  		js.Bool(bool(bubbles)),
  1083  		js.Bool(bool(cancelable)),
  1084  		data.Ref(),
  1085  		origin.Ref(),
  1086  		lastEventId.Ref(),
  1087  	)
  1088  
  1089  	return
  1090  }
  1091  
  1092  // TryInitMessageEvent2 calls the method "MessageEvent.initMessageEvent"
  1093  // in a try/catch block and returns (_, err, ok = false) when it went through
  1094  // the catch clause.
  1095  func (this MessageEvent) TryInitMessageEvent2(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String, lastEventId js.String) (ret js.Void, exception js.Any, ok bool) {
  1096  	ok = js.True == bindings.TryMessageEventInitMessageEvent2(
  1097  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1098  		typ.Ref(),
  1099  		js.Bool(bool(bubbles)),
  1100  		js.Bool(bool(cancelable)),
  1101  		data.Ref(),
  1102  		origin.Ref(),
  1103  		lastEventId.Ref(),
  1104  	)
  1105  
  1106  	return
  1107  }
  1108  
  1109  // HasFuncInitMessageEvent3 returns true if the method "MessageEvent.initMessageEvent" exists.
  1110  func (this MessageEvent) HasFuncInitMessageEvent3() bool {
  1111  	return js.True == bindings.HasFuncMessageEventInitMessageEvent3(
  1112  		this.ref,
  1113  	)
  1114  }
  1115  
  1116  // FuncInitMessageEvent3 returns the method "MessageEvent.initMessageEvent".
  1117  func (this MessageEvent) FuncInitMessageEvent3() (fn js.Func[func(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String)]) {
  1118  	bindings.FuncMessageEventInitMessageEvent3(
  1119  		this.ref, js.Pointer(&fn),
  1120  	)
  1121  	return
  1122  }
  1123  
  1124  // InitMessageEvent3 calls the method "MessageEvent.initMessageEvent".
  1125  func (this MessageEvent) InitMessageEvent3(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String) (ret js.Void) {
  1126  	bindings.CallMessageEventInitMessageEvent3(
  1127  		this.ref, js.Pointer(&ret),
  1128  		typ.Ref(),
  1129  		js.Bool(bool(bubbles)),
  1130  		js.Bool(bool(cancelable)),
  1131  		data.Ref(),
  1132  		origin.Ref(),
  1133  	)
  1134  
  1135  	return
  1136  }
  1137  
  1138  // TryInitMessageEvent3 calls the method "MessageEvent.initMessageEvent"
  1139  // in a try/catch block and returns (_, err, ok = false) when it went through
  1140  // the catch clause.
  1141  func (this MessageEvent) TryInitMessageEvent3(typ js.String, bubbles bool, cancelable bool, data js.Any, origin js.String) (ret js.Void, exception js.Any, ok bool) {
  1142  	ok = js.True == bindings.TryMessageEventInitMessageEvent3(
  1143  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1144  		typ.Ref(),
  1145  		js.Bool(bool(bubbles)),
  1146  		js.Bool(bool(cancelable)),
  1147  		data.Ref(),
  1148  		origin.Ref(),
  1149  	)
  1150  
  1151  	return
  1152  }
  1153  
  1154  // HasFuncInitMessageEvent4 returns true if the method "MessageEvent.initMessageEvent" exists.
  1155  func (this MessageEvent) HasFuncInitMessageEvent4() bool {
  1156  	return js.True == bindings.HasFuncMessageEventInitMessageEvent4(
  1157  		this.ref,
  1158  	)
  1159  }
  1160  
  1161  // FuncInitMessageEvent4 returns the method "MessageEvent.initMessageEvent".
  1162  func (this MessageEvent) FuncInitMessageEvent4() (fn js.Func[func(typ js.String, bubbles bool, cancelable bool, data js.Any)]) {
  1163  	bindings.FuncMessageEventInitMessageEvent4(
  1164  		this.ref, js.Pointer(&fn),
  1165  	)
  1166  	return
  1167  }
  1168  
  1169  // InitMessageEvent4 calls the method "MessageEvent.initMessageEvent".
  1170  func (this MessageEvent) InitMessageEvent4(typ js.String, bubbles bool, cancelable bool, data js.Any) (ret js.Void) {
  1171  	bindings.CallMessageEventInitMessageEvent4(
  1172  		this.ref, js.Pointer(&ret),
  1173  		typ.Ref(),
  1174  		js.Bool(bool(bubbles)),
  1175  		js.Bool(bool(cancelable)),
  1176  		data.Ref(),
  1177  	)
  1178  
  1179  	return
  1180  }
  1181  
  1182  // TryInitMessageEvent4 calls the method "MessageEvent.initMessageEvent"
  1183  // in a try/catch block and returns (_, err, ok = false) when it went through
  1184  // the catch clause.
  1185  func (this MessageEvent) TryInitMessageEvent4(typ js.String, bubbles bool, cancelable bool, data js.Any) (ret js.Void, exception js.Any, ok bool) {
  1186  	ok = js.True == bindings.TryMessageEventInitMessageEvent4(
  1187  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1188  		typ.Ref(),
  1189  		js.Bool(bool(bubbles)),
  1190  		js.Bool(bool(cancelable)),
  1191  		data.Ref(),
  1192  	)
  1193  
  1194  	return
  1195  }
  1196  
  1197  // HasFuncInitMessageEvent5 returns true if the method "MessageEvent.initMessageEvent" exists.
  1198  func (this MessageEvent) HasFuncInitMessageEvent5() bool {
  1199  	return js.True == bindings.HasFuncMessageEventInitMessageEvent5(
  1200  		this.ref,
  1201  	)
  1202  }
  1203  
  1204  // FuncInitMessageEvent5 returns the method "MessageEvent.initMessageEvent".
  1205  func (this MessageEvent) FuncInitMessageEvent5() (fn js.Func[func(typ js.String, bubbles bool, cancelable bool)]) {
  1206  	bindings.FuncMessageEventInitMessageEvent5(
  1207  		this.ref, js.Pointer(&fn),
  1208  	)
  1209  	return
  1210  }
  1211  
  1212  // InitMessageEvent5 calls the method "MessageEvent.initMessageEvent".
  1213  func (this MessageEvent) InitMessageEvent5(typ js.String, bubbles bool, cancelable bool) (ret js.Void) {
  1214  	bindings.CallMessageEventInitMessageEvent5(
  1215  		this.ref, js.Pointer(&ret),
  1216  		typ.Ref(),
  1217  		js.Bool(bool(bubbles)),
  1218  		js.Bool(bool(cancelable)),
  1219  	)
  1220  
  1221  	return
  1222  }
  1223  
  1224  // TryInitMessageEvent5 calls the method "MessageEvent.initMessageEvent"
  1225  // in a try/catch block and returns (_, err, ok = false) when it went through
  1226  // the catch clause.
  1227  func (this MessageEvent) TryInitMessageEvent5(typ js.String, bubbles bool, cancelable bool) (ret js.Void, exception js.Any, ok bool) {
  1228  	ok = js.True == bindings.TryMessageEventInitMessageEvent5(
  1229  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1230  		typ.Ref(),
  1231  		js.Bool(bool(bubbles)),
  1232  		js.Bool(bool(cancelable)),
  1233  	)
  1234  
  1235  	return
  1236  }
  1237  
  1238  // HasFuncInitMessageEvent6 returns true if the method "MessageEvent.initMessageEvent" exists.
  1239  func (this MessageEvent) HasFuncInitMessageEvent6() bool {
  1240  	return js.True == bindings.HasFuncMessageEventInitMessageEvent6(
  1241  		this.ref,
  1242  	)
  1243  }
  1244  
  1245  // FuncInitMessageEvent6 returns the method "MessageEvent.initMessageEvent".
  1246  func (this MessageEvent) FuncInitMessageEvent6() (fn js.Func[func(typ js.String, bubbles bool)]) {
  1247  	bindings.FuncMessageEventInitMessageEvent6(
  1248  		this.ref, js.Pointer(&fn),
  1249  	)
  1250  	return
  1251  }
  1252  
  1253  // InitMessageEvent6 calls the method "MessageEvent.initMessageEvent".
  1254  func (this MessageEvent) InitMessageEvent6(typ js.String, bubbles bool) (ret js.Void) {
  1255  	bindings.CallMessageEventInitMessageEvent6(
  1256  		this.ref, js.Pointer(&ret),
  1257  		typ.Ref(),
  1258  		js.Bool(bool(bubbles)),
  1259  	)
  1260  
  1261  	return
  1262  }
  1263  
  1264  // TryInitMessageEvent6 calls the method "MessageEvent.initMessageEvent"
  1265  // in a try/catch block and returns (_, err, ok = false) when it went through
  1266  // the catch clause.
  1267  func (this MessageEvent) TryInitMessageEvent6(typ js.String, bubbles bool) (ret js.Void, exception js.Any, ok bool) {
  1268  	ok = js.True == bindings.TryMessageEventInitMessageEvent6(
  1269  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1270  		typ.Ref(),
  1271  		js.Bool(bool(bubbles)),
  1272  	)
  1273  
  1274  	return
  1275  }
  1276  
  1277  // HasFuncInitMessageEvent7 returns true if the method "MessageEvent.initMessageEvent" exists.
  1278  func (this MessageEvent) HasFuncInitMessageEvent7() bool {
  1279  	return js.True == bindings.HasFuncMessageEventInitMessageEvent7(
  1280  		this.ref,
  1281  	)
  1282  }
  1283  
  1284  // FuncInitMessageEvent7 returns the method "MessageEvent.initMessageEvent".
  1285  func (this MessageEvent) FuncInitMessageEvent7() (fn js.Func[func(typ js.String)]) {
  1286  	bindings.FuncMessageEventInitMessageEvent7(
  1287  		this.ref, js.Pointer(&fn),
  1288  	)
  1289  	return
  1290  }
  1291  
  1292  // InitMessageEvent7 calls the method "MessageEvent.initMessageEvent".
  1293  func (this MessageEvent) InitMessageEvent7(typ js.String) (ret js.Void) {
  1294  	bindings.CallMessageEventInitMessageEvent7(
  1295  		this.ref, js.Pointer(&ret),
  1296  		typ.Ref(),
  1297  	)
  1298  
  1299  	return
  1300  }
  1301  
  1302  // TryInitMessageEvent7 calls the method "MessageEvent.initMessageEvent"
  1303  // in a try/catch block and returns (_, err, ok = false) when it went through
  1304  // the catch clause.
  1305  func (this MessageEvent) TryInitMessageEvent7(typ js.String) (ret js.Void, exception js.Any, ok bool) {
  1306  	ok = js.True == bindings.TryMessageEventInitMessageEvent7(
  1307  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1308  		typ.Ref(),
  1309  	)
  1310  
  1311  	return
  1312  }
  1313  
  1314  type MeteringMode uint32
  1315  
  1316  const (
  1317  	_ MeteringMode = iota
  1318  
  1319  	MeteringMode_NONE
  1320  	MeteringMode_MANUAL
  1321  	MeteringMode_SINGLE_SHOT
  1322  	MeteringMode_CONTINUOUS
  1323  )
  1324  
  1325  func (MeteringMode) FromRef(str js.Ref) MeteringMode {
  1326  	return MeteringMode(bindings.ConstOfMeteringMode(str))
  1327  }
  1328  
  1329  func (x MeteringMode) String() (string, bool) {
  1330  	switch x {
  1331  	case MeteringMode_NONE:
  1332  		return "none", true
  1333  	case MeteringMode_MANUAL:
  1334  		return "manual", true
  1335  	case MeteringMode_SINGLE_SHOT:
  1336  		return "single-shot", true
  1337  	case MeteringMode_CONTINUOUS:
  1338  		return "continuous", true
  1339  	default:
  1340  		return "", false
  1341  	}
  1342  }
  1343  
  1344  type MidiPermissionDescriptor struct {
  1345  	// Sysex is "MidiPermissionDescriptor.sysex"
  1346  	//
  1347  	// Optional, defaults to false.
  1348  	//
  1349  	// NOTE: FFI_USE_Sysex MUST be set to true to make this field effective.
  1350  	Sysex bool
  1351  	// Name is "MidiPermissionDescriptor.name"
  1352  	//
  1353  	// Required
  1354  	Name js.String
  1355  
  1356  	FFI_USE_Sysex bool // for Sysex.
  1357  
  1358  	FFI_USE bool
  1359  }
  1360  
  1361  // FromRef calls UpdateFrom and returns a MidiPermissionDescriptor with all fields set.
  1362  func (p MidiPermissionDescriptor) FromRef(ref js.Ref) MidiPermissionDescriptor {
  1363  	p.UpdateFrom(ref)
  1364  	return p
  1365  }
  1366  
  1367  // New creates a new MidiPermissionDescriptor in the application heap.
  1368  func (p MidiPermissionDescriptor) New() js.Ref {
  1369  	return bindings.MidiPermissionDescriptorJSLoad(
  1370  		js.Pointer(&p), js.True, 0,
  1371  	)
  1372  }
  1373  
  1374  // UpdateFrom copies value of all fields of the heap object to p.
  1375  func (p *MidiPermissionDescriptor) UpdateFrom(ref js.Ref) {
  1376  	bindings.MidiPermissionDescriptorJSStore(
  1377  		js.Pointer(p), ref,
  1378  	)
  1379  }
  1380  
  1381  // Update writes all fields of the p to the heap object referenced by ref.
  1382  func (p *MidiPermissionDescriptor) Update(ref js.Ref) {
  1383  	bindings.MidiPermissionDescriptorJSLoad(
  1384  		js.Pointer(p), js.False, ref,
  1385  	)
  1386  }
  1387  
  1388  // FreeMembers frees fields with heap reference, if recursive is true
  1389  // free all heap references reachable from p.
  1390  func (p *MidiPermissionDescriptor) FreeMembers(recursive bool) {
  1391  	js.Free(
  1392  		p.Name.Ref(),
  1393  	)
  1394  	p.Name = p.Name.FromRef(js.Undefined)
  1395  }
  1396  
  1397  type MockCameraConfiguration struct {
  1398  	// DefaultFrameRate is "MockCameraConfiguration.defaultFrameRate"
  1399  	//
  1400  	// Optional, defaults to 30.
  1401  	//
  1402  	// NOTE: FFI_USE_DefaultFrameRate MUST be set to true to make this field effective.
  1403  	DefaultFrameRate float64
  1404  	// FacingMode is "MockCameraConfiguration.facingMode"
  1405  	//
  1406  	// Optional, defaults to "user".
  1407  	FacingMode js.String
  1408  	// Label is "MockCameraConfiguration.label"
  1409  	//
  1410  	// Optional
  1411  	Label js.String
  1412  	// DeviceId is "MockCameraConfiguration.deviceId"
  1413  	//
  1414  	// Optional
  1415  	DeviceId js.String
  1416  	// GroupId is "MockCameraConfiguration.groupId"
  1417  	//
  1418  	// Optional
  1419  	GroupId js.String
  1420  
  1421  	FFI_USE_DefaultFrameRate bool // for DefaultFrameRate.
  1422  
  1423  	FFI_USE bool
  1424  }
  1425  
  1426  // FromRef calls UpdateFrom and returns a MockCameraConfiguration with all fields set.
  1427  func (p MockCameraConfiguration) FromRef(ref js.Ref) MockCameraConfiguration {
  1428  	p.UpdateFrom(ref)
  1429  	return p
  1430  }
  1431  
  1432  // New creates a new MockCameraConfiguration in the application heap.
  1433  func (p MockCameraConfiguration) New() js.Ref {
  1434  	return bindings.MockCameraConfigurationJSLoad(
  1435  		js.Pointer(&p), js.True, 0,
  1436  	)
  1437  }
  1438  
  1439  // UpdateFrom copies value of all fields of the heap object to p.
  1440  func (p *MockCameraConfiguration) UpdateFrom(ref js.Ref) {
  1441  	bindings.MockCameraConfigurationJSStore(
  1442  		js.Pointer(p), ref,
  1443  	)
  1444  }
  1445  
  1446  // Update writes all fields of the p to the heap object referenced by ref.
  1447  func (p *MockCameraConfiguration) Update(ref js.Ref) {
  1448  	bindings.MockCameraConfigurationJSLoad(
  1449  		js.Pointer(p), js.False, ref,
  1450  	)
  1451  }
  1452  
  1453  // FreeMembers frees fields with heap reference, if recursive is true
  1454  // free all heap references reachable from p.
  1455  func (p *MockCameraConfiguration) FreeMembers(recursive bool) {
  1456  	js.Free(
  1457  		p.FacingMode.Ref(),
  1458  		p.Label.Ref(),
  1459  		p.DeviceId.Ref(),
  1460  		p.GroupId.Ref(),
  1461  	)
  1462  	p.FacingMode = p.FacingMode.FromRef(js.Undefined)
  1463  	p.Label = p.Label.FromRef(js.Undefined)
  1464  	p.DeviceId = p.DeviceId.FromRef(js.Undefined)
  1465  	p.GroupId = p.GroupId.FromRef(js.Undefined)
  1466  }
  1467  
  1468  type MockCaptureDeviceConfiguration struct {
  1469  	// Label is "MockCaptureDeviceConfiguration.label"
  1470  	//
  1471  	// Optional
  1472  	Label js.String
  1473  	// DeviceId is "MockCaptureDeviceConfiguration.deviceId"
  1474  	//
  1475  	// Optional
  1476  	DeviceId js.String
  1477  	// GroupId is "MockCaptureDeviceConfiguration.groupId"
  1478  	//
  1479  	// Optional
  1480  	GroupId js.String
  1481  
  1482  	FFI_USE bool
  1483  }
  1484  
  1485  // FromRef calls UpdateFrom and returns a MockCaptureDeviceConfiguration with all fields set.
  1486  func (p MockCaptureDeviceConfiguration) FromRef(ref js.Ref) MockCaptureDeviceConfiguration {
  1487  	p.UpdateFrom(ref)
  1488  	return p
  1489  }
  1490  
  1491  // New creates a new MockCaptureDeviceConfiguration in the application heap.
  1492  func (p MockCaptureDeviceConfiguration) New() js.Ref {
  1493  	return bindings.MockCaptureDeviceConfigurationJSLoad(
  1494  		js.Pointer(&p), js.True, 0,
  1495  	)
  1496  }
  1497  
  1498  // UpdateFrom copies value of all fields of the heap object to p.
  1499  func (p *MockCaptureDeviceConfiguration) UpdateFrom(ref js.Ref) {
  1500  	bindings.MockCaptureDeviceConfigurationJSStore(
  1501  		js.Pointer(p), ref,
  1502  	)
  1503  }
  1504  
  1505  // Update writes all fields of the p to the heap object referenced by ref.
  1506  func (p *MockCaptureDeviceConfiguration) Update(ref js.Ref) {
  1507  	bindings.MockCaptureDeviceConfigurationJSLoad(
  1508  		js.Pointer(p), js.False, ref,
  1509  	)
  1510  }
  1511  
  1512  // FreeMembers frees fields with heap reference, if recursive is true
  1513  // free all heap references reachable from p.
  1514  func (p *MockCaptureDeviceConfiguration) FreeMembers(recursive bool) {
  1515  	js.Free(
  1516  		p.Label.Ref(),
  1517  		p.DeviceId.Ref(),
  1518  		p.GroupId.Ref(),
  1519  	)
  1520  	p.Label = p.Label.FromRef(js.Undefined)
  1521  	p.DeviceId = p.DeviceId.FromRef(js.Undefined)
  1522  	p.GroupId = p.GroupId.FromRef(js.Undefined)
  1523  }
  1524  
  1525  type MockCapturePromptResult uint32
  1526  
  1527  const (
  1528  	_ MockCapturePromptResult = iota
  1529  
  1530  	MockCapturePromptResult_GRANTED
  1531  	MockCapturePromptResult_DENIED
  1532  )
  1533  
  1534  func (MockCapturePromptResult) FromRef(str js.Ref) MockCapturePromptResult {
  1535  	return MockCapturePromptResult(bindings.ConstOfMockCapturePromptResult(str))
  1536  }
  1537  
  1538  func (x MockCapturePromptResult) String() (string, bool) {
  1539  	switch x {
  1540  	case MockCapturePromptResult_GRANTED:
  1541  		return "granted", true
  1542  	case MockCapturePromptResult_DENIED:
  1543  		return "denied", true
  1544  	default:
  1545  		return "", false
  1546  	}
  1547  }
  1548  
  1549  type MockCapturePromptResultConfiguration struct {
  1550  	// GetUserMedia is "MockCapturePromptResultConfiguration.getUserMedia"
  1551  	//
  1552  	// Optional
  1553  	GetUserMedia MockCapturePromptResult
  1554  	// GetDisplayMedia is "MockCapturePromptResultConfiguration.getDisplayMedia"
  1555  	//
  1556  	// Optional
  1557  	GetDisplayMedia MockCapturePromptResult
  1558  
  1559  	FFI_USE bool
  1560  }
  1561  
  1562  // FromRef calls UpdateFrom and returns a MockCapturePromptResultConfiguration with all fields set.
  1563  func (p MockCapturePromptResultConfiguration) FromRef(ref js.Ref) MockCapturePromptResultConfiguration {
  1564  	p.UpdateFrom(ref)
  1565  	return p
  1566  }
  1567  
  1568  // New creates a new MockCapturePromptResultConfiguration in the application heap.
  1569  func (p MockCapturePromptResultConfiguration) New() js.Ref {
  1570  	return bindings.MockCapturePromptResultConfigurationJSLoad(
  1571  		js.Pointer(&p), js.True, 0,
  1572  	)
  1573  }
  1574  
  1575  // UpdateFrom copies value of all fields of the heap object to p.
  1576  func (p *MockCapturePromptResultConfiguration) UpdateFrom(ref js.Ref) {
  1577  	bindings.MockCapturePromptResultConfigurationJSStore(
  1578  		js.Pointer(p), ref,
  1579  	)
  1580  }
  1581  
  1582  // Update writes all fields of the p to the heap object referenced by ref.
  1583  func (p *MockCapturePromptResultConfiguration) Update(ref js.Ref) {
  1584  	bindings.MockCapturePromptResultConfigurationJSLoad(
  1585  		js.Pointer(p), js.False, ref,
  1586  	)
  1587  }
  1588  
  1589  // FreeMembers frees fields with heap reference, if recursive is true
  1590  // free all heap references reachable from p.
  1591  func (p *MockCapturePromptResultConfiguration) FreeMembers(recursive bool) {
  1592  }
  1593  
  1594  type MockMicrophoneConfiguration struct {
  1595  	// DefaultSampleRate is "MockMicrophoneConfiguration.defaultSampleRate"
  1596  	//
  1597  	// Optional, defaults to 44100.
  1598  	//
  1599  	// NOTE: FFI_USE_DefaultSampleRate MUST be set to true to make this field effective.
  1600  	DefaultSampleRate uint32
  1601  	// Label is "MockMicrophoneConfiguration.label"
  1602  	//
  1603  	// Optional
  1604  	Label js.String
  1605  	// DeviceId is "MockMicrophoneConfiguration.deviceId"
  1606  	//
  1607  	// Optional
  1608  	DeviceId js.String
  1609  	// GroupId is "MockMicrophoneConfiguration.groupId"
  1610  	//
  1611  	// Optional
  1612  	GroupId js.String
  1613  
  1614  	FFI_USE_DefaultSampleRate bool // for DefaultSampleRate.
  1615  
  1616  	FFI_USE bool
  1617  }
  1618  
  1619  // FromRef calls UpdateFrom and returns a MockMicrophoneConfiguration with all fields set.
  1620  func (p MockMicrophoneConfiguration) FromRef(ref js.Ref) MockMicrophoneConfiguration {
  1621  	p.UpdateFrom(ref)
  1622  	return p
  1623  }
  1624  
  1625  // New creates a new MockMicrophoneConfiguration in the application heap.
  1626  func (p MockMicrophoneConfiguration) New() js.Ref {
  1627  	return bindings.MockMicrophoneConfigurationJSLoad(
  1628  		js.Pointer(&p), js.True, 0,
  1629  	)
  1630  }
  1631  
  1632  // UpdateFrom copies value of all fields of the heap object to p.
  1633  func (p *MockMicrophoneConfiguration) UpdateFrom(ref js.Ref) {
  1634  	bindings.MockMicrophoneConfigurationJSStore(
  1635  		js.Pointer(p), ref,
  1636  	)
  1637  }
  1638  
  1639  // Update writes all fields of the p to the heap object referenced by ref.
  1640  func (p *MockMicrophoneConfiguration) Update(ref js.Ref) {
  1641  	bindings.MockMicrophoneConfigurationJSLoad(
  1642  		js.Pointer(p), js.False, ref,
  1643  	)
  1644  }
  1645  
  1646  // FreeMembers frees fields with heap reference, if recursive is true
  1647  // free all heap references reachable from p.
  1648  func (p *MockMicrophoneConfiguration) FreeMembers(recursive bool) {
  1649  	js.Free(
  1650  		p.Label.Ref(),
  1651  		p.DeviceId.Ref(),
  1652  		p.GroupId.Ref(),
  1653  	)
  1654  	p.Label = p.Label.FromRef(js.Undefined)
  1655  	p.DeviceId = p.DeviceId.FromRef(js.Undefined)
  1656  	p.GroupId = p.GroupId.FromRef(js.Undefined)
  1657  }
  1658  
  1659  type MockSensor struct {
  1660  	// MaxSamplingFrequency is "MockSensor.maxSamplingFrequency"
  1661  	//
  1662  	// Optional
  1663  	//
  1664  	// NOTE: FFI_USE_MaxSamplingFrequency MUST be set to true to make this field effective.
  1665  	MaxSamplingFrequency float64
  1666  	// MinSamplingFrequency is "MockSensor.minSamplingFrequency"
  1667  	//
  1668  	// Optional
  1669  	//
  1670  	// NOTE: FFI_USE_MinSamplingFrequency MUST be set to true to make this field effective.
  1671  	MinSamplingFrequency float64
  1672  	// RequestedSamplingFrequency is "MockSensor.requestedSamplingFrequency"
  1673  	//
  1674  	// Optional
  1675  	//
  1676  	// NOTE: FFI_USE_RequestedSamplingFrequency MUST be set to true to make this field effective.
  1677  	RequestedSamplingFrequency float64
  1678  
  1679  	FFI_USE_MaxSamplingFrequency       bool // for MaxSamplingFrequency.
  1680  	FFI_USE_MinSamplingFrequency       bool // for MinSamplingFrequency.
  1681  	FFI_USE_RequestedSamplingFrequency bool // for RequestedSamplingFrequency.
  1682  
  1683  	FFI_USE bool
  1684  }
  1685  
  1686  // FromRef calls UpdateFrom and returns a MockSensor with all fields set.
  1687  func (p MockSensor) FromRef(ref js.Ref) MockSensor {
  1688  	p.UpdateFrom(ref)
  1689  	return p
  1690  }
  1691  
  1692  // New creates a new MockSensor in the application heap.
  1693  func (p MockSensor) New() js.Ref {
  1694  	return bindings.MockSensorJSLoad(
  1695  		js.Pointer(&p), js.True, 0,
  1696  	)
  1697  }
  1698  
  1699  // UpdateFrom copies value of all fields of the heap object to p.
  1700  func (p *MockSensor) UpdateFrom(ref js.Ref) {
  1701  	bindings.MockSensorJSStore(
  1702  		js.Pointer(p), ref,
  1703  	)
  1704  }
  1705  
  1706  // Update writes all fields of the p to the heap object referenced by ref.
  1707  func (p *MockSensor) Update(ref js.Ref) {
  1708  	bindings.MockSensorJSLoad(
  1709  		js.Pointer(p), js.False, ref,
  1710  	)
  1711  }
  1712  
  1713  // FreeMembers frees fields with heap reference, if recursive is true
  1714  // free all heap references reachable from p.
  1715  func (p *MockSensor) FreeMembers(recursive bool) {
  1716  }
  1717  
  1718  type MockSensorType uint32
  1719  
  1720  const (
  1721  	_ MockSensorType = iota
  1722  
  1723  	MockSensorType_AMBIENT_LIGHT
  1724  	MockSensorType_ACCELEROMETER
  1725  	MockSensorType_LINEAR_ACCELERATION
  1726  	MockSensorType_GRAVITY
  1727  	MockSensorType_GYROSCOPE
  1728  	MockSensorType_MAGNETOMETER
  1729  	MockSensorType_UNCALIBRATED_MAGNETOMETER
  1730  	MockSensorType_ABSOLUTE_ORIENTATION
  1731  	MockSensorType_RELATIVE_ORIENTATION
  1732  	MockSensorType_GEOLOCATION
  1733  	MockSensorType_PROXIMITY
  1734  )
  1735  
  1736  func (MockSensorType) FromRef(str js.Ref) MockSensorType {
  1737  	return MockSensorType(bindings.ConstOfMockSensorType(str))
  1738  }
  1739  
  1740  func (x MockSensorType) String() (string, bool) {
  1741  	switch x {
  1742  	case MockSensorType_AMBIENT_LIGHT:
  1743  		return "ambient-light", true
  1744  	case MockSensorType_ACCELEROMETER:
  1745  		return "accelerometer", true
  1746  	case MockSensorType_LINEAR_ACCELERATION:
  1747  		return "linear-acceleration", true
  1748  	case MockSensorType_GRAVITY:
  1749  		return "gravity", true
  1750  	case MockSensorType_GYROSCOPE:
  1751  		return "gyroscope", true
  1752  	case MockSensorType_MAGNETOMETER:
  1753  		return "magnetometer", true
  1754  	case MockSensorType_UNCALIBRATED_MAGNETOMETER:
  1755  		return "uncalibrated-magnetometer", true
  1756  	case MockSensorType_ABSOLUTE_ORIENTATION:
  1757  		return "absolute-orientation", true
  1758  	case MockSensorType_RELATIVE_ORIENTATION:
  1759  		return "relative-orientation", true
  1760  	case MockSensorType_GEOLOCATION:
  1761  		return "geolocation", true
  1762  	case MockSensorType_PROXIMITY:
  1763  		return "proximity", true
  1764  	default:
  1765  		return "", false
  1766  	}
  1767  }
  1768  
  1769  type MockSensorConfiguration struct {
  1770  	// MockSensorType is "MockSensorConfiguration.mockSensorType"
  1771  	//
  1772  	// Required
  1773  	MockSensorType MockSensorType
  1774  	// Connected is "MockSensorConfiguration.connected"
  1775  	//
  1776  	// Optional, defaults to true.
  1777  	//
  1778  	// NOTE: FFI_USE_Connected MUST be set to true to make this field effective.
  1779  	Connected bool
  1780  	// MaxSamplingFrequency is "MockSensorConfiguration.maxSamplingFrequency"
  1781  	//
  1782  	// Optional
  1783  	//
  1784  	// NOTE: FFI_USE_MaxSamplingFrequency MUST be set to true to make this field effective.
  1785  	MaxSamplingFrequency float64
  1786  	// MinSamplingFrequency is "MockSensorConfiguration.minSamplingFrequency"
  1787  	//
  1788  	// Optional
  1789  	//
  1790  	// NOTE: FFI_USE_MinSamplingFrequency MUST be set to true to make this field effective.
  1791  	MinSamplingFrequency float64
  1792  
  1793  	FFI_USE_Connected            bool // for Connected.
  1794  	FFI_USE_MaxSamplingFrequency bool // for MaxSamplingFrequency.
  1795  	FFI_USE_MinSamplingFrequency bool // for MinSamplingFrequency.
  1796  
  1797  	FFI_USE bool
  1798  }
  1799  
  1800  // FromRef calls UpdateFrom and returns a MockSensorConfiguration with all fields set.
  1801  func (p MockSensorConfiguration) FromRef(ref js.Ref) MockSensorConfiguration {
  1802  	p.UpdateFrom(ref)
  1803  	return p
  1804  }
  1805  
  1806  // New creates a new MockSensorConfiguration in the application heap.
  1807  func (p MockSensorConfiguration) New() js.Ref {
  1808  	return bindings.MockSensorConfigurationJSLoad(
  1809  		js.Pointer(&p), js.True, 0,
  1810  	)
  1811  }
  1812  
  1813  // UpdateFrom copies value of all fields of the heap object to p.
  1814  func (p *MockSensorConfiguration) UpdateFrom(ref js.Ref) {
  1815  	bindings.MockSensorConfigurationJSStore(
  1816  		js.Pointer(p), ref,
  1817  	)
  1818  }
  1819  
  1820  // Update writes all fields of the p to the heap object referenced by ref.
  1821  func (p *MockSensorConfiguration) Update(ref js.Ref) {
  1822  	bindings.MockSensorConfigurationJSLoad(
  1823  		js.Pointer(p), js.False, ref,
  1824  	)
  1825  }
  1826  
  1827  // FreeMembers frees fields with heap reference, if recursive is true
  1828  // free all heap references reachable from p.
  1829  func (p *MockSensorConfiguration) FreeMembers(recursive bool) {
  1830  }
  1831  
  1832  type MockSensorReadingValues struct {
  1833  	FFI_USE bool
  1834  }
  1835  
  1836  // FromRef calls UpdateFrom and returns a MockSensorReadingValues with all fields set.
  1837  func (p MockSensorReadingValues) FromRef(ref js.Ref) MockSensorReadingValues {
  1838  	p.UpdateFrom(ref)
  1839  	return p
  1840  }
  1841  
  1842  // New creates a new MockSensorReadingValues in the application heap.
  1843  func (p MockSensorReadingValues) New() js.Ref {
  1844  	return bindings.MockSensorReadingValuesJSLoad(
  1845  		js.Pointer(&p), js.True, 0,
  1846  	)
  1847  }
  1848  
  1849  // UpdateFrom copies value of all fields of the heap object to p.
  1850  func (p *MockSensorReadingValues) UpdateFrom(ref js.Ref) {
  1851  	bindings.MockSensorReadingValuesJSStore(
  1852  		js.Pointer(p), ref,
  1853  	)
  1854  }
  1855  
  1856  // Update writes all fields of the p to the heap object referenced by ref.
  1857  func (p *MockSensorReadingValues) Update(ref js.Ref) {
  1858  	bindings.MockSensorReadingValuesJSLoad(
  1859  		js.Pointer(p), js.False, ref,
  1860  	)
  1861  }
  1862  
  1863  // FreeMembers frees fields with heap reference, if recursive is true
  1864  // free all heap references reachable from p.
  1865  func (p *MockSensorReadingValues) FreeMembers(recursive bool) {
  1866  }
  1867  
  1868  type MouseEventInit struct {
  1869  	// ScreenX is "MouseEventInit.screenX"
  1870  	//
  1871  	// Optional, defaults to 0.
  1872  	//
  1873  	// NOTE: FFI_USE_ScreenX MUST be set to true to make this field effective.
  1874  	ScreenX int32
  1875  	// ScreenY is "MouseEventInit.screenY"
  1876  	//
  1877  	// Optional, defaults to 0.
  1878  	//
  1879  	// NOTE: FFI_USE_ScreenY MUST be set to true to make this field effective.
  1880  	ScreenY int32
  1881  	// ClientX is "MouseEventInit.clientX"
  1882  	//
  1883  	// Optional, defaults to 0.
  1884  	//
  1885  	// NOTE: FFI_USE_ClientX MUST be set to true to make this field effective.
  1886  	ClientX int32
  1887  	// ClientY is "MouseEventInit.clientY"
  1888  	//
  1889  	// Optional, defaults to 0.
  1890  	//
  1891  	// NOTE: FFI_USE_ClientY MUST be set to true to make this field effective.
  1892  	ClientY int32
  1893  	// Button is "MouseEventInit.button"
  1894  	//
  1895  	// Optional, defaults to 0.
  1896  	//
  1897  	// NOTE: FFI_USE_Button MUST be set to true to make this field effective.
  1898  	Button int16
  1899  	// Buttons is "MouseEventInit.buttons"
  1900  	//
  1901  	// Optional, defaults to 0.
  1902  	//
  1903  	// NOTE: FFI_USE_Buttons MUST be set to true to make this field effective.
  1904  	Buttons uint16
  1905  	// RelatedTarget is "MouseEventInit.relatedTarget"
  1906  	//
  1907  	// Optional, defaults to null.
  1908  	RelatedTarget EventTarget
  1909  	// CtrlKey is "MouseEventInit.ctrlKey"
  1910  	//
  1911  	// Optional, defaults to false.
  1912  	//
  1913  	// NOTE: FFI_USE_CtrlKey MUST be set to true to make this field effective.
  1914  	CtrlKey bool
  1915  	// ShiftKey is "MouseEventInit.shiftKey"
  1916  	//
  1917  	// Optional, defaults to false.
  1918  	//
  1919  	// NOTE: FFI_USE_ShiftKey MUST be set to true to make this field effective.
  1920  	ShiftKey bool
  1921  	// AltKey is "MouseEventInit.altKey"
  1922  	//
  1923  	// Optional, defaults to false.
  1924  	//
  1925  	// NOTE: FFI_USE_AltKey MUST be set to true to make this field effective.
  1926  	AltKey bool
  1927  	// MetaKey is "MouseEventInit.metaKey"
  1928  	//
  1929  	// Optional, defaults to false.
  1930  	//
  1931  	// NOTE: FFI_USE_MetaKey MUST be set to true to make this field effective.
  1932  	MetaKey bool
  1933  	// ModifierAltGraph is "MouseEventInit.modifierAltGraph"
  1934  	//
  1935  	// Optional, defaults to false.
  1936  	//
  1937  	// NOTE: FFI_USE_ModifierAltGraph MUST be set to true to make this field effective.
  1938  	ModifierAltGraph bool
  1939  	// ModifierCapsLock is "MouseEventInit.modifierCapsLock"
  1940  	//
  1941  	// Optional, defaults to false.
  1942  	//
  1943  	// NOTE: FFI_USE_ModifierCapsLock MUST be set to true to make this field effective.
  1944  	ModifierCapsLock bool
  1945  	// ModifierFn is "MouseEventInit.modifierFn"
  1946  	//
  1947  	// Optional, defaults to false.
  1948  	//
  1949  	// NOTE: FFI_USE_ModifierFn MUST be set to true to make this field effective.
  1950  	ModifierFn bool
  1951  	// ModifierFnLock is "MouseEventInit.modifierFnLock"
  1952  	//
  1953  	// Optional, defaults to false.
  1954  	//
  1955  	// NOTE: FFI_USE_ModifierFnLock MUST be set to true to make this field effective.
  1956  	ModifierFnLock bool
  1957  	// ModifierHyper is "MouseEventInit.modifierHyper"
  1958  	//
  1959  	// Optional, defaults to false.
  1960  	//
  1961  	// NOTE: FFI_USE_ModifierHyper MUST be set to true to make this field effective.
  1962  	ModifierHyper bool
  1963  	// ModifierNumLock is "MouseEventInit.modifierNumLock"
  1964  	//
  1965  	// Optional, defaults to false.
  1966  	//
  1967  	// NOTE: FFI_USE_ModifierNumLock MUST be set to true to make this field effective.
  1968  	ModifierNumLock bool
  1969  	// ModifierScrollLock is "MouseEventInit.modifierScrollLock"
  1970  	//
  1971  	// Optional, defaults to false.
  1972  	//
  1973  	// NOTE: FFI_USE_ModifierScrollLock MUST be set to true to make this field effective.
  1974  	ModifierScrollLock bool
  1975  	// ModifierSuper is "MouseEventInit.modifierSuper"
  1976  	//
  1977  	// Optional, defaults to false.
  1978  	//
  1979  	// NOTE: FFI_USE_ModifierSuper MUST be set to true to make this field effective.
  1980  	ModifierSuper bool
  1981  	// ModifierSymbol is "MouseEventInit.modifierSymbol"
  1982  	//
  1983  	// Optional, defaults to false.
  1984  	//
  1985  	// NOTE: FFI_USE_ModifierSymbol MUST be set to true to make this field effective.
  1986  	ModifierSymbol bool
  1987  	// ModifierSymbolLock is "MouseEventInit.modifierSymbolLock"
  1988  	//
  1989  	// Optional, defaults to false.
  1990  	//
  1991  	// NOTE: FFI_USE_ModifierSymbolLock MUST be set to true to make this field effective.
  1992  	ModifierSymbolLock bool
  1993  	// View is "MouseEventInit.view"
  1994  	//
  1995  	// Optional, defaults to null.
  1996  	View Window
  1997  	// Detail is "MouseEventInit.detail"
  1998  	//
  1999  	// Optional, defaults to 0.
  2000  	//
  2001  	// NOTE: FFI_USE_Detail MUST be set to true to make this field effective.
  2002  	Detail int32
  2003  	// Bubbles is "MouseEventInit.bubbles"
  2004  	//
  2005  	// Optional, defaults to false.
  2006  	//
  2007  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  2008  	Bubbles bool
  2009  	// Cancelable is "MouseEventInit.cancelable"
  2010  	//
  2011  	// Optional, defaults to false.
  2012  	//
  2013  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  2014  	Cancelable bool
  2015  	// Composed is "MouseEventInit.composed"
  2016  	//
  2017  	// Optional, defaults to false.
  2018  	//
  2019  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  2020  	Composed bool
  2021  	// MovementX is "MouseEventInit.movementX"
  2022  	//
  2023  	// Optional, defaults to 0.
  2024  	//
  2025  	// NOTE: FFI_USE_MovementX MUST be set to true to make this field effective.
  2026  	MovementX float64
  2027  	// MovementY is "MouseEventInit.movementY"
  2028  	//
  2029  	// Optional, defaults to 0.
  2030  	//
  2031  	// NOTE: FFI_USE_MovementY MUST be set to true to make this field effective.
  2032  	MovementY float64
  2033  
  2034  	FFI_USE_ScreenX            bool // for ScreenX.
  2035  	FFI_USE_ScreenY            bool // for ScreenY.
  2036  	FFI_USE_ClientX            bool // for ClientX.
  2037  	FFI_USE_ClientY            bool // for ClientY.
  2038  	FFI_USE_Button             bool // for Button.
  2039  	FFI_USE_Buttons            bool // for Buttons.
  2040  	FFI_USE_CtrlKey            bool // for CtrlKey.
  2041  	FFI_USE_ShiftKey           bool // for ShiftKey.
  2042  	FFI_USE_AltKey             bool // for AltKey.
  2043  	FFI_USE_MetaKey            bool // for MetaKey.
  2044  	FFI_USE_ModifierAltGraph   bool // for ModifierAltGraph.
  2045  	FFI_USE_ModifierCapsLock   bool // for ModifierCapsLock.
  2046  	FFI_USE_ModifierFn         bool // for ModifierFn.
  2047  	FFI_USE_ModifierFnLock     bool // for ModifierFnLock.
  2048  	FFI_USE_ModifierHyper      bool // for ModifierHyper.
  2049  	FFI_USE_ModifierNumLock    bool // for ModifierNumLock.
  2050  	FFI_USE_ModifierScrollLock bool // for ModifierScrollLock.
  2051  	FFI_USE_ModifierSuper      bool // for ModifierSuper.
  2052  	FFI_USE_ModifierSymbol     bool // for ModifierSymbol.
  2053  	FFI_USE_ModifierSymbolLock bool // for ModifierSymbolLock.
  2054  	FFI_USE_Detail             bool // for Detail.
  2055  	FFI_USE_Bubbles            bool // for Bubbles.
  2056  	FFI_USE_Cancelable         bool // for Cancelable.
  2057  	FFI_USE_Composed           bool // for Composed.
  2058  	FFI_USE_MovementX          bool // for MovementX.
  2059  	FFI_USE_MovementY          bool // for MovementY.
  2060  
  2061  	FFI_USE bool
  2062  }
  2063  
  2064  // FromRef calls UpdateFrom and returns a MouseEventInit with all fields set.
  2065  func (p MouseEventInit) FromRef(ref js.Ref) MouseEventInit {
  2066  	p.UpdateFrom(ref)
  2067  	return p
  2068  }
  2069  
  2070  // New creates a new MouseEventInit in the application heap.
  2071  func (p MouseEventInit) New() js.Ref {
  2072  	return bindings.MouseEventInitJSLoad(
  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 *MouseEventInit) UpdateFrom(ref js.Ref) {
  2079  	bindings.MouseEventInitJSStore(
  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 *MouseEventInit) Update(ref js.Ref) {
  2086  	bindings.MouseEventInitJSLoad(
  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 *MouseEventInit) FreeMembers(recursive bool) {
  2094  	js.Free(
  2095  		p.RelatedTarget.Ref(),
  2096  		p.View.Ref(),
  2097  	)
  2098  	p.RelatedTarget = p.RelatedTarget.FromRef(js.Undefined)
  2099  	p.View = p.View.FromRef(js.Undefined)
  2100  }
  2101  
  2102  func NewMouseEvent(typ js.String, eventInitDict MouseEventInit) (ret MouseEvent) {
  2103  	ret.ref = bindings.NewMouseEventByMouseEvent(
  2104  		typ.Ref(),
  2105  		js.Pointer(&eventInitDict))
  2106  	return
  2107  }
  2108  
  2109  func NewMouseEventByMouseEvent1(typ js.String) (ret MouseEvent) {
  2110  	ret.ref = bindings.NewMouseEventByMouseEvent1(
  2111  		typ.Ref())
  2112  	return
  2113  }
  2114  
  2115  type MouseEvent struct {
  2116  	UIEvent
  2117  }
  2118  
  2119  func (this MouseEvent) Once() MouseEvent {
  2120  	this.ref.Once()
  2121  	return this
  2122  }
  2123  
  2124  func (this MouseEvent) Ref() js.Ref {
  2125  	return this.UIEvent.Ref()
  2126  }
  2127  
  2128  func (this MouseEvent) FromRef(ref js.Ref) MouseEvent {
  2129  	this.UIEvent = this.UIEvent.FromRef(ref)
  2130  	return this
  2131  }
  2132  
  2133  func (this MouseEvent) Free() {
  2134  	this.ref.Free()
  2135  }
  2136  
  2137  // ScreenX returns the value of property "MouseEvent.screenX".
  2138  //
  2139  // It returns ok=false if there is no such property.
  2140  func (this MouseEvent) ScreenX() (ret int32, ok bool) {
  2141  	ok = js.True == bindings.GetMouseEventScreenX(
  2142  		this.ref, js.Pointer(&ret),
  2143  	)
  2144  	return
  2145  }
  2146  
  2147  // ScreenY returns the value of property "MouseEvent.screenY".
  2148  //
  2149  // It returns ok=false if there is no such property.
  2150  func (this MouseEvent) ScreenY() (ret int32, ok bool) {
  2151  	ok = js.True == bindings.GetMouseEventScreenY(
  2152  		this.ref, js.Pointer(&ret),
  2153  	)
  2154  	return
  2155  }
  2156  
  2157  // ClientX returns the value of property "MouseEvent.clientX".
  2158  //
  2159  // It returns ok=false if there is no such property.
  2160  func (this MouseEvent) ClientX() (ret int32, ok bool) {
  2161  	ok = js.True == bindings.GetMouseEventClientX(
  2162  		this.ref, js.Pointer(&ret),
  2163  	)
  2164  	return
  2165  }
  2166  
  2167  // ClientY returns the value of property "MouseEvent.clientY".
  2168  //
  2169  // It returns ok=false if there is no such property.
  2170  func (this MouseEvent) ClientY() (ret int32, ok bool) {
  2171  	ok = js.True == bindings.GetMouseEventClientY(
  2172  		this.ref, js.Pointer(&ret),
  2173  	)
  2174  	return
  2175  }
  2176  
  2177  // CtrlKey returns the value of property "MouseEvent.ctrlKey".
  2178  //
  2179  // It returns ok=false if there is no such property.
  2180  func (this MouseEvent) CtrlKey() (ret bool, ok bool) {
  2181  	ok = js.True == bindings.GetMouseEventCtrlKey(
  2182  		this.ref, js.Pointer(&ret),
  2183  	)
  2184  	return
  2185  }
  2186  
  2187  // ShiftKey returns the value of property "MouseEvent.shiftKey".
  2188  //
  2189  // It returns ok=false if there is no such property.
  2190  func (this MouseEvent) ShiftKey() (ret bool, ok bool) {
  2191  	ok = js.True == bindings.GetMouseEventShiftKey(
  2192  		this.ref, js.Pointer(&ret),
  2193  	)
  2194  	return
  2195  }
  2196  
  2197  // AltKey returns the value of property "MouseEvent.altKey".
  2198  //
  2199  // It returns ok=false if there is no such property.
  2200  func (this MouseEvent) AltKey() (ret bool, ok bool) {
  2201  	ok = js.True == bindings.GetMouseEventAltKey(
  2202  		this.ref, js.Pointer(&ret),
  2203  	)
  2204  	return
  2205  }
  2206  
  2207  // MetaKey returns the value of property "MouseEvent.metaKey".
  2208  //
  2209  // It returns ok=false if there is no such property.
  2210  func (this MouseEvent) MetaKey() (ret bool, ok bool) {
  2211  	ok = js.True == bindings.GetMouseEventMetaKey(
  2212  		this.ref, js.Pointer(&ret),
  2213  	)
  2214  	return
  2215  }
  2216  
  2217  // Button returns the value of property "MouseEvent.button".
  2218  //
  2219  // It returns ok=false if there is no such property.
  2220  func (this MouseEvent) Button() (ret int16, ok bool) {
  2221  	ok = js.True == bindings.GetMouseEventButton(
  2222  		this.ref, js.Pointer(&ret),
  2223  	)
  2224  	return
  2225  }
  2226  
  2227  // Buttons returns the value of property "MouseEvent.buttons".
  2228  //
  2229  // It returns ok=false if there is no such property.
  2230  func (this MouseEvent) Buttons() (ret uint16, ok bool) {
  2231  	ok = js.True == bindings.GetMouseEventButtons(
  2232  		this.ref, js.Pointer(&ret),
  2233  	)
  2234  	return
  2235  }
  2236  
  2237  // RelatedTarget returns the value of property "MouseEvent.relatedTarget".
  2238  //
  2239  // It returns ok=false if there is no such property.
  2240  func (this MouseEvent) RelatedTarget() (ret EventTarget, ok bool) {
  2241  	ok = js.True == bindings.GetMouseEventRelatedTarget(
  2242  		this.ref, js.Pointer(&ret),
  2243  	)
  2244  	return
  2245  }
  2246  
  2247  // MovementX returns the value of property "MouseEvent.movementX".
  2248  //
  2249  // It returns ok=false if there is no such property.
  2250  func (this MouseEvent) MovementX() (ret float64, ok bool) {
  2251  	ok = js.True == bindings.GetMouseEventMovementX(
  2252  		this.ref, js.Pointer(&ret),
  2253  	)
  2254  	return
  2255  }
  2256  
  2257  // MovementY returns the value of property "MouseEvent.movementY".
  2258  //
  2259  // It returns ok=false if there is no such property.
  2260  func (this MouseEvent) MovementY() (ret float64, ok bool) {
  2261  	ok = js.True == bindings.GetMouseEventMovementY(
  2262  		this.ref, js.Pointer(&ret),
  2263  	)
  2264  	return
  2265  }
  2266  
  2267  // PageX returns the value of property "MouseEvent.pageX".
  2268  //
  2269  // It returns ok=false if there is no such property.
  2270  func (this MouseEvent) PageX() (ret float64, ok bool) {
  2271  	ok = js.True == bindings.GetMouseEventPageX(
  2272  		this.ref, js.Pointer(&ret),
  2273  	)
  2274  	return
  2275  }
  2276  
  2277  // PageY returns the value of property "MouseEvent.pageY".
  2278  //
  2279  // It returns ok=false if there is no such property.
  2280  func (this MouseEvent) PageY() (ret float64, ok bool) {
  2281  	ok = js.True == bindings.GetMouseEventPageY(
  2282  		this.ref, js.Pointer(&ret),
  2283  	)
  2284  	return
  2285  }
  2286  
  2287  // X returns the value of property "MouseEvent.x".
  2288  //
  2289  // It returns ok=false if there is no such property.
  2290  func (this MouseEvent) X() (ret float64, ok bool) {
  2291  	ok = js.True == bindings.GetMouseEventX(
  2292  		this.ref, js.Pointer(&ret),
  2293  	)
  2294  	return
  2295  }
  2296  
  2297  // Y returns the value of property "MouseEvent.y".
  2298  //
  2299  // It returns ok=false if there is no such property.
  2300  func (this MouseEvent) Y() (ret float64, ok bool) {
  2301  	ok = js.True == bindings.GetMouseEventY(
  2302  		this.ref, js.Pointer(&ret),
  2303  	)
  2304  	return
  2305  }
  2306  
  2307  // OffsetX returns the value of property "MouseEvent.offsetX".
  2308  //
  2309  // It returns ok=false if there is no such property.
  2310  func (this MouseEvent) OffsetX() (ret float64, ok bool) {
  2311  	ok = js.True == bindings.GetMouseEventOffsetX(
  2312  		this.ref, js.Pointer(&ret),
  2313  	)
  2314  	return
  2315  }
  2316  
  2317  // OffsetY returns the value of property "MouseEvent.offsetY".
  2318  //
  2319  // It returns ok=false if there is no such property.
  2320  func (this MouseEvent) OffsetY() (ret float64, ok bool) {
  2321  	ok = js.True == bindings.GetMouseEventOffsetY(
  2322  		this.ref, js.Pointer(&ret),
  2323  	)
  2324  	return
  2325  }
  2326  
  2327  // HasFuncGetModifierState returns true if the method "MouseEvent.getModifierState" exists.
  2328  func (this MouseEvent) HasFuncGetModifierState() bool {
  2329  	return js.True == bindings.HasFuncMouseEventGetModifierState(
  2330  		this.ref,
  2331  	)
  2332  }
  2333  
  2334  // FuncGetModifierState returns the method "MouseEvent.getModifierState".
  2335  func (this MouseEvent) FuncGetModifierState() (fn js.Func[func(keyArg js.String) bool]) {
  2336  	bindings.FuncMouseEventGetModifierState(
  2337  		this.ref, js.Pointer(&fn),
  2338  	)
  2339  	return
  2340  }
  2341  
  2342  // GetModifierState calls the method "MouseEvent.getModifierState".
  2343  func (this MouseEvent) GetModifierState(keyArg js.String) (ret bool) {
  2344  	bindings.CallMouseEventGetModifierState(
  2345  		this.ref, js.Pointer(&ret),
  2346  		keyArg.Ref(),
  2347  	)
  2348  
  2349  	return
  2350  }
  2351  
  2352  // TryGetModifierState calls the method "MouseEvent.getModifierState"
  2353  // in a try/catch block and returns (_, err, ok = false) when it went through
  2354  // the catch clause.
  2355  func (this MouseEvent) TryGetModifierState(keyArg js.String) (ret bool, exception js.Any, ok bool) {
  2356  	ok = js.True == bindings.TryMouseEventGetModifierState(
  2357  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2358  		keyArg.Ref(),
  2359  	)
  2360  
  2361  	return
  2362  }
  2363  
  2364  // HasFuncInitMouseEvent returns true if the method "MouseEvent.initMouseEvent" exists.
  2365  func (this MouseEvent) HasFuncInitMouseEvent() bool {
  2366  	return js.True == bindings.HasFuncMouseEventInitMouseEvent(
  2367  		this.ref,
  2368  	)
  2369  }
  2370  
  2371  // FuncInitMouseEvent returns the method "MouseEvent.initMouseEvent".
  2372  func (this MouseEvent) FuncInitMouseEvent() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool, buttonArg int16, relatedTargetArg EventTarget)]) {
  2373  	bindings.FuncMouseEventInitMouseEvent(
  2374  		this.ref, js.Pointer(&fn),
  2375  	)
  2376  	return
  2377  }
  2378  
  2379  // InitMouseEvent calls the method "MouseEvent.initMouseEvent".
  2380  func (this MouseEvent) InitMouseEvent(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool, buttonArg int16, relatedTargetArg EventTarget) (ret js.Void) {
  2381  	bindings.CallMouseEventInitMouseEvent(
  2382  		this.ref, js.Pointer(&ret),
  2383  		typeArg.Ref(),
  2384  		js.Bool(bool(bubblesArg)),
  2385  		js.Bool(bool(cancelableArg)),
  2386  		viewArg.Ref(),
  2387  		int32(detailArg),
  2388  		int32(screenXArg),
  2389  		int32(screenYArg),
  2390  		int32(clientXArg),
  2391  		int32(clientYArg),
  2392  		js.Bool(bool(ctrlKeyArg)),
  2393  		js.Bool(bool(altKeyArg)),
  2394  		js.Bool(bool(shiftKeyArg)),
  2395  		js.Bool(bool(metaKeyArg)),
  2396  		int32(buttonArg),
  2397  		relatedTargetArg.Ref(),
  2398  	)
  2399  
  2400  	return
  2401  }
  2402  
  2403  // TryInitMouseEvent calls the method "MouseEvent.initMouseEvent"
  2404  // in a try/catch block and returns (_, err, ok = false) when it went through
  2405  // the catch clause.
  2406  func (this MouseEvent) TryInitMouseEvent(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool, buttonArg int16, relatedTargetArg EventTarget) (ret js.Void, exception js.Any, ok bool) {
  2407  	ok = js.True == bindings.TryMouseEventInitMouseEvent(
  2408  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2409  		typeArg.Ref(),
  2410  		js.Bool(bool(bubblesArg)),
  2411  		js.Bool(bool(cancelableArg)),
  2412  		viewArg.Ref(),
  2413  		int32(detailArg),
  2414  		int32(screenXArg),
  2415  		int32(screenYArg),
  2416  		int32(clientXArg),
  2417  		int32(clientYArg),
  2418  		js.Bool(bool(ctrlKeyArg)),
  2419  		js.Bool(bool(altKeyArg)),
  2420  		js.Bool(bool(shiftKeyArg)),
  2421  		js.Bool(bool(metaKeyArg)),
  2422  		int32(buttonArg),
  2423  		relatedTargetArg.Ref(),
  2424  	)
  2425  
  2426  	return
  2427  }
  2428  
  2429  // HasFuncInitMouseEvent1 returns true if the method "MouseEvent.initMouseEvent" exists.
  2430  func (this MouseEvent) HasFuncInitMouseEvent1() bool {
  2431  	return js.True == bindings.HasFuncMouseEventInitMouseEvent1(
  2432  		this.ref,
  2433  	)
  2434  }
  2435  
  2436  // FuncInitMouseEvent1 returns the method "MouseEvent.initMouseEvent".
  2437  func (this MouseEvent) FuncInitMouseEvent1() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool, buttonArg int16)]) {
  2438  	bindings.FuncMouseEventInitMouseEvent1(
  2439  		this.ref, js.Pointer(&fn),
  2440  	)
  2441  	return
  2442  }
  2443  
  2444  // InitMouseEvent1 calls the method "MouseEvent.initMouseEvent".
  2445  func (this MouseEvent) InitMouseEvent1(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool, buttonArg int16) (ret js.Void) {
  2446  	bindings.CallMouseEventInitMouseEvent1(
  2447  		this.ref, js.Pointer(&ret),
  2448  		typeArg.Ref(),
  2449  		js.Bool(bool(bubblesArg)),
  2450  		js.Bool(bool(cancelableArg)),
  2451  		viewArg.Ref(),
  2452  		int32(detailArg),
  2453  		int32(screenXArg),
  2454  		int32(screenYArg),
  2455  		int32(clientXArg),
  2456  		int32(clientYArg),
  2457  		js.Bool(bool(ctrlKeyArg)),
  2458  		js.Bool(bool(altKeyArg)),
  2459  		js.Bool(bool(shiftKeyArg)),
  2460  		js.Bool(bool(metaKeyArg)),
  2461  		int32(buttonArg),
  2462  	)
  2463  
  2464  	return
  2465  }
  2466  
  2467  // TryInitMouseEvent1 calls the method "MouseEvent.initMouseEvent"
  2468  // in a try/catch block and returns (_, err, ok = false) when it went through
  2469  // the catch clause.
  2470  func (this MouseEvent) TryInitMouseEvent1(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool, buttonArg int16) (ret js.Void, exception js.Any, ok bool) {
  2471  	ok = js.True == bindings.TryMouseEventInitMouseEvent1(
  2472  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2473  		typeArg.Ref(),
  2474  		js.Bool(bool(bubblesArg)),
  2475  		js.Bool(bool(cancelableArg)),
  2476  		viewArg.Ref(),
  2477  		int32(detailArg),
  2478  		int32(screenXArg),
  2479  		int32(screenYArg),
  2480  		int32(clientXArg),
  2481  		int32(clientYArg),
  2482  		js.Bool(bool(ctrlKeyArg)),
  2483  		js.Bool(bool(altKeyArg)),
  2484  		js.Bool(bool(shiftKeyArg)),
  2485  		js.Bool(bool(metaKeyArg)),
  2486  		int32(buttonArg),
  2487  	)
  2488  
  2489  	return
  2490  }
  2491  
  2492  // HasFuncInitMouseEvent2 returns true if the method "MouseEvent.initMouseEvent" exists.
  2493  func (this MouseEvent) HasFuncInitMouseEvent2() bool {
  2494  	return js.True == bindings.HasFuncMouseEventInitMouseEvent2(
  2495  		this.ref,
  2496  	)
  2497  }
  2498  
  2499  // FuncInitMouseEvent2 returns the method "MouseEvent.initMouseEvent".
  2500  func (this MouseEvent) FuncInitMouseEvent2() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool)]) {
  2501  	bindings.FuncMouseEventInitMouseEvent2(
  2502  		this.ref, js.Pointer(&fn),
  2503  	)
  2504  	return
  2505  }
  2506  
  2507  // InitMouseEvent2 calls the method "MouseEvent.initMouseEvent".
  2508  func (this MouseEvent) InitMouseEvent2(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool) (ret js.Void) {
  2509  	bindings.CallMouseEventInitMouseEvent2(
  2510  		this.ref, js.Pointer(&ret),
  2511  		typeArg.Ref(),
  2512  		js.Bool(bool(bubblesArg)),
  2513  		js.Bool(bool(cancelableArg)),
  2514  		viewArg.Ref(),
  2515  		int32(detailArg),
  2516  		int32(screenXArg),
  2517  		int32(screenYArg),
  2518  		int32(clientXArg),
  2519  		int32(clientYArg),
  2520  		js.Bool(bool(ctrlKeyArg)),
  2521  		js.Bool(bool(altKeyArg)),
  2522  		js.Bool(bool(shiftKeyArg)),
  2523  		js.Bool(bool(metaKeyArg)),
  2524  	)
  2525  
  2526  	return
  2527  }
  2528  
  2529  // TryInitMouseEvent2 calls the method "MouseEvent.initMouseEvent"
  2530  // in a try/catch block and returns (_, err, ok = false) when it went through
  2531  // the catch clause.
  2532  func (this MouseEvent) TryInitMouseEvent2(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool, metaKeyArg bool) (ret js.Void, exception js.Any, ok bool) {
  2533  	ok = js.True == bindings.TryMouseEventInitMouseEvent2(
  2534  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2535  		typeArg.Ref(),
  2536  		js.Bool(bool(bubblesArg)),
  2537  		js.Bool(bool(cancelableArg)),
  2538  		viewArg.Ref(),
  2539  		int32(detailArg),
  2540  		int32(screenXArg),
  2541  		int32(screenYArg),
  2542  		int32(clientXArg),
  2543  		int32(clientYArg),
  2544  		js.Bool(bool(ctrlKeyArg)),
  2545  		js.Bool(bool(altKeyArg)),
  2546  		js.Bool(bool(shiftKeyArg)),
  2547  		js.Bool(bool(metaKeyArg)),
  2548  	)
  2549  
  2550  	return
  2551  }
  2552  
  2553  // HasFuncInitMouseEvent3 returns true if the method "MouseEvent.initMouseEvent" exists.
  2554  func (this MouseEvent) HasFuncInitMouseEvent3() bool {
  2555  	return js.True == bindings.HasFuncMouseEventInitMouseEvent3(
  2556  		this.ref,
  2557  	)
  2558  }
  2559  
  2560  // FuncInitMouseEvent3 returns the method "MouseEvent.initMouseEvent".
  2561  func (this MouseEvent) FuncInitMouseEvent3() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool)]) {
  2562  	bindings.FuncMouseEventInitMouseEvent3(
  2563  		this.ref, js.Pointer(&fn),
  2564  	)
  2565  	return
  2566  }
  2567  
  2568  // InitMouseEvent3 calls the method "MouseEvent.initMouseEvent".
  2569  func (this MouseEvent) InitMouseEvent3(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool) (ret js.Void) {
  2570  	bindings.CallMouseEventInitMouseEvent3(
  2571  		this.ref, js.Pointer(&ret),
  2572  		typeArg.Ref(),
  2573  		js.Bool(bool(bubblesArg)),
  2574  		js.Bool(bool(cancelableArg)),
  2575  		viewArg.Ref(),
  2576  		int32(detailArg),
  2577  		int32(screenXArg),
  2578  		int32(screenYArg),
  2579  		int32(clientXArg),
  2580  		int32(clientYArg),
  2581  		js.Bool(bool(ctrlKeyArg)),
  2582  		js.Bool(bool(altKeyArg)),
  2583  		js.Bool(bool(shiftKeyArg)),
  2584  	)
  2585  
  2586  	return
  2587  }
  2588  
  2589  // TryInitMouseEvent3 calls the method "MouseEvent.initMouseEvent"
  2590  // in a try/catch block and returns (_, err, ok = false) when it went through
  2591  // the catch clause.
  2592  func (this MouseEvent) TryInitMouseEvent3(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool, shiftKeyArg bool) (ret js.Void, exception js.Any, ok bool) {
  2593  	ok = js.True == bindings.TryMouseEventInitMouseEvent3(
  2594  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2595  		typeArg.Ref(),
  2596  		js.Bool(bool(bubblesArg)),
  2597  		js.Bool(bool(cancelableArg)),
  2598  		viewArg.Ref(),
  2599  		int32(detailArg),
  2600  		int32(screenXArg),
  2601  		int32(screenYArg),
  2602  		int32(clientXArg),
  2603  		int32(clientYArg),
  2604  		js.Bool(bool(ctrlKeyArg)),
  2605  		js.Bool(bool(altKeyArg)),
  2606  		js.Bool(bool(shiftKeyArg)),
  2607  	)
  2608  
  2609  	return
  2610  }
  2611  
  2612  // HasFuncInitMouseEvent4 returns true if the method "MouseEvent.initMouseEvent" exists.
  2613  func (this MouseEvent) HasFuncInitMouseEvent4() bool {
  2614  	return js.True == bindings.HasFuncMouseEventInitMouseEvent4(
  2615  		this.ref,
  2616  	)
  2617  }
  2618  
  2619  // FuncInitMouseEvent4 returns the method "MouseEvent.initMouseEvent".
  2620  func (this MouseEvent) FuncInitMouseEvent4() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool)]) {
  2621  	bindings.FuncMouseEventInitMouseEvent4(
  2622  		this.ref, js.Pointer(&fn),
  2623  	)
  2624  	return
  2625  }
  2626  
  2627  // InitMouseEvent4 calls the method "MouseEvent.initMouseEvent".
  2628  func (this MouseEvent) InitMouseEvent4(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool) (ret js.Void) {
  2629  	bindings.CallMouseEventInitMouseEvent4(
  2630  		this.ref, js.Pointer(&ret),
  2631  		typeArg.Ref(),
  2632  		js.Bool(bool(bubblesArg)),
  2633  		js.Bool(bool(cancelableArg)),
  2634  		viewArg.Ref(),
  2635  		int32(detailArg),
  2636  		int32(screenXArg),
  2637  		int32(screenYArg),
  2638  		int32(clientXArg),
  2639  		int32(clientYArg),
  2640  		js.Bool(bool(ctrlKeyArg)),
  2641  		js.Bool(bool(altKeyArg)),
  2642  	)
  2643  
  2644  	return
  2645  }
  2646  
  2647  // TryInitMouseEvent4 calls the method "MouseEvent.initMouseEvent"
  2648  // in a try/catch block and returns (_, err, ok = false) when it went through
  2649  // the catch clause.
  2650  func (this MouseEvent) TryInitMouseEvent4(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool, altKeyArg bool) (ret js.Void, exception js.Any, ok bool) {
  2651  	ok = js.True == bindings.TryMouseEventInitMouseEvent4(
  2652  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2653  		typeArg.Ref(),
  2654  		js.Bool(bool(bubblesArg)),
  2655  		js.Bool(bool(cancelableArg)),
  2656  		viewArg.Ref(),
  2657  		int32(detailArg),
  2658  		int32(screenXArg),
  2659  		int32(screenYArg),
  2660  		int32(clientXArg),
  2661  		int32(clientYArg),
  2662  		js.Bool(bool(ctrlKeyArg)),
  2663  		js.Bool(bool(altKeyArg)),
  2664  	)
  2665  
  2666  	return
  2667  }
  2668  
  2669  // HasFuncInitMouseEvent5 returns true if the method "MouseEvent.initMouseEvent" exists.
  2670  func (this MouseEvent) HasFuncInitMouseEvent5() bool {
  2671  	return js.True == bindings.HasFuncMouseEventInitMouseEvent5(
  2672  		this.ref,
  2673  	)
  2674  }
  2675  
  2676  // FuncInitMouseEvent5 returns the method "MouseEvent.initMouseEvent".
  2677  func (this MouseEvent) FuncInitMouseEvent5() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool)]) {
  2678  	bindings.FuncMouseEventInitMouseEvent5(
  2679  		this.ref, js.Pointer(&fn),
  2680  	)
  2681  	return
  2682  }
  2683  
  2684  // InitMouseEvent5 calls the method "MouseEvent.initMouseEvent".
  2685  func (this MouseEvent) InitMouseEvent5(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool) (ret js.Void) {
  2686  	bindings.CallMouseEventInitMouseEvent5(
  2687  		this.ref, js.Pointer(&ret),
  2688  		typeArg.Ref(),
  2689  		js.Bool(bool(bubblesArg)),
  2690  		js.Bool(bool(cancelableArg)),
  2691  		viewArg.Ref(),
  2692  		int32(detailArg),
  2693  		int32(screenXArg),
  2694  		int32(screenYArg),
  2695  		int32(clientXArg),
  2696  		int32(clientYArg),
  2697  		js.Bool(bool(ctrlKeyArg)),
  2698  	)
  2699  
  2700  	return
  2701  }
  2702  
  2703  // TryInitMouseEvent5 calls the method "MouseEvent.initMouseEvent"
  2704  // in a try/catch block and returns (_, err, ok = false) when it went through
  2705  // the catch clause.
  2706  func (this MouseEvent) TryInitMouseEvent5(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32, ctrlKeyArg bool) (ret js.Void, exception js.Any, ok bool) {
  2707  	ok = js.True == bindings.TryMouseEventInitMouseEvent5(
  2708  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2709  		typeArg.Ref(),
  2710  		js.Bool(bool(bubblesArg)),
  2711  		js.Bool(bool(cancelableArg)),
  2712  		viewArg.Ref(),
  2713  		int32(detailArg),
  2714  		int32(screenXArg),
  2715  		int32(screenYArg),
  2716  		int32(clientXArg),
  2717  		int32(clientYArg),
  2718  		js.Bool(bool(ctrlKeyArg)),
  2719  	)
  2720  
  2721  	return
  2722  }
  2723  
  2724  // HasFuncInitMouseEvent6 returns true if the method "MouseEvent.initMouseEvent" exists.
  2725  func (this MouseEvent) HasFuncInitMouseEvent6() bool {
  2726  	return js.True == bindings.HasFuncMouseEventInitMouseEvent6(
  2727  		this.ref,
  2728  	)
  2729  }
  2730  
  2731  // FuncInitMouseEvent6 returns the method "MouseEvent.initMouseEvent".
  2732  func (this MouseEvent) FuncInitMouseEvent6() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32)]) {
  2733  	bindings.FuncMouseEventInitMouseEvent6(
  2734  		this.ref, js.Pointer(&fn),
  2735  	)
  2736  	return
  2737  }
  2738  
  2739  // InitMouseEvent6 calls the method "MouseEvent.initMouseEvent".
  2740  func (this MouseEvent) InitMouseEvent6(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32) (ret js.Void) {
  2741  	bindings.CallMouseEventInitMouseEvent6(
  2742  		this.ref, js.Pointer(&ret),
  2743  		typeArg.Ref(),
  2744  		js.Bool(bool(bubblesArg)),
  2745  		js.Bool(bool(cancelableArg)),
  2746  		viewArg.Ref(),
  2747  		int32(detailArg),
  2748  		int32(screenXArg),
  2749  		int32(screenYArg),
  2750  		int32(clientXArg),
  2751  		int32(clientYArg),
  2752  	)
  2753  
  2754  	return
  2755  }
  2756  
  2757  // TryInitMouseEvent6 calls the method "MouseEvent.initMouseEvent"
  2758  // in a try/catch block and returns (_, err, ok = false) when it went through
  2759  // the catch clause.
  2760  func (this MouseEvent) TryInitMouseEvent6(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32, clientYArg int32) (ret js.Void, exception js.Any, ok bool) {
  2761  	ok = js.True == bindings.TryMouseEventInitMouseEvent6(
  2762  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2763  		typeArg.Ref(),
  2764  		js.Bool(bool(bubblesArg)),
  2765  		js.Bool(bool(cancelableArg)),
  2766  		viewArg.Ref(),
  2767  		int32(detailArg),
  2768  		int32(screenXArg),
  2769  		int32(screenYArg),
  2770  		int32(clientXArg),
  2771  		int32(clientYArg),
  2772  	)
  2773  
  2774  	return
  2775  }
  2776  
  2777  // HasFuncInitMouseEvent7 returns true if the method "MouseEvent.initMouseEvent" exists.
  2778  func (this MouseEvent) HasFuncInitMouseEvent7() bool {
  2779  	return js.True == bindings.HasFuncMouseEventInitMouseEvent7(
  2780  		this.ref,
  2781  	)
  2782  }
  2783  
  2784  // FuncInitMouseEvent7 returns the method "MouseEvent.initMouseEvent".
  2785  func (this MouseEvent) FuncInitMouseEvent7() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32)]) {
  2786  	bindings.FuncMouseEventInitMouseEvent7(
  2787  		this.ref, js.Pointer(&fn),
  2788  	)
  2789  	return
  2790  }
  2791  
  2792  // InitMouseEvent7 calls the method "MouseEvent.initMouseEvent".
  2793  func (this MouseEvent) InitMouseEvent7(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32) (ret js.Void) {
  2794  	bindings.CallMouseEventInitMouseEvent7(
  2795  		this.ref, js.Pointer(&ret),
  2796  		typeArg.Ref(),
  2797  		js.Bool(bool(bubblesArg)),
  2798  		js.Bool(bool(cancelableArg)),
  2799  		viewArg.Ref(),
  2800  		int32(detailArg),
  2801  		int32(screenXArg),
  2802  		int32(screenYArg),
  2803  		int32(clientXArg),
  2804  	)
  2805  
  2806  	return
  2807  }
  2808  
  2809  // TryInitMouseEvent7 calls the method "MouseEvent.initMouseEvent"
  2810  // in a try/catch block and returns (_, err, ok = false) when it went through
  2811  // the catch clause.
  2812  func (this MouseEvent) TryInitMouseEvent7(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32, clientXArg int32) (ret js.Void, exception js.Any, ok bool) {
  2813  	ok = js.True == bindings.TryMouseEventInitMouseEvent7(
  2814  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2815  		typeArg.Ref(),
  2816  		js.Bool(bool(bubblesArg)),
  2817  		js.Bool(bool(cancelableArg)),
  2818  		viewArg.Ref(),
  2819  		int32(detailArg),
  2820  		int32(screenXArg),
  2821  		int32(screenYArg),
  2822  		int32(clientXArg),
  2823  	)
  2824  
  2825  	return
  2826  }
  2827  
  2828  // HasFuncInitMouseEvent8 returns true if the method "MouseEvent.initMouseEvent" exists.
  2829  func (this MouseEvent) HasFuncInitMouseEvent8() bool {
  2830  	return js.True == bindings.HasFuncMouseEventInitMouseEvent8(
  2831  		this.ref,
  2832  	)
  2833  }
  2834  
  2835  // FuncInitMouseEvent8 returns the method "MouseEvent.initMouseEvent".
  2836  func (this MouseEvent) FuncInitMouseEvent8() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32)]) {
  2837  	bindings.FuncMouseEventInitMouseEvent8(
  2838  		this.ref, js.Pointer(&fn),
  2839  	)
  2840  	return
  2841  }
  2842  
  2843  // InitMouseEvent8 calls the method "MouseEvent.initMouseEvent".
  2844  func (this MouseEvent) InitMouseEvent8(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32) (ret js.Void) {
  2845  	bindings.CallMouseEventInitMouseEvent8(
  2846  		this.ref, js.Pointer(&ret),
  2847  		typeArg.Ref(),
  2848  		js.Bool(bool(bubblesArg)),
  2849  		js.Bool(bool(cancelableArg)),
  2850  		viewArg.Ref(),
  2851  		int32(detailArg),
  2852  		int32(screenXArg),
  2853  		int32(screenYArg),
  2854  	)
  2855  
  2856  	return
  2857  }
  2858  
  2859  // TryInitMouseEvent8 calls the method "MouseEvent.initMouseEvent"
  2860  // in a try/catch block and returns (_, err, ok = false) when it went through
  2861  // the catch clause.
  2862  func (this MouseEvent) TryInitMouseEvent8(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32, screenYArg int32) (ret js.Void, exception js.Any, ok bool) {
  2863  	ok = js.True == bindings.TryMouseEventInitMouseEvent8(
  2864  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2865  		typeArg.Ref(),
  2866  		js.Bool(bool(bubblesArg)),
  2867  		js.Bool(bool(cancelableArg)),
  2868  		viewArg.Ref(),
  2869  		int32(detailArg),
  2870  		int32(screenXArg),
  2871  		int32(screenYArg),
  2872  	)
  2873  
  2874  	return
  2875  }
  2876  
  2877  // HasFuncInitMouseEvent9 returns true if the method "MouseEvent.initMouseEvent" exists.
  2878  func (this MouseEvent) HasFuncInitMouseEvent9() bool {
  2879  	return js.True == bindings.HasFuncMouseEventInitMouseEvent9(
  2880  		this.ref,
  2881  	)
  2882  }
  2883  
  2884  // FuncInitMouseEvent9 returns the method "MouseEvent.initMouseEvent".
  2885  func (this MouseEvent) FuncInitMouseEvent9() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32)]) {
  2886  	bindings.FuncMouseEventInitMouseEvent9(
  2887  		this.ref, js.Pointer(&fn),
  2888  	)
  2889  	return
  2890  }
  2891  
  2892  // InitMouseEvent9 calls the method "MouseEvent.initMouseEvent".
  2893  func (this MouseEvent) InitMouseEvent9(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32) (ret js.Void) {
  2894  	bindings.CallMouseEventInitMouseEvent9(
  2895  		this.ref, js.Pointer(&ret),
  2896  		typeArg.Ref(),
  2897  		js.Bool(bool(bubblesArg)),
  2898  		js.Bool(bool(cancelableArg)),
  2899  		viewArg.Ref(),
  2900  		int32(detailArg),
  2901  		int32(screenXArg),
  2902  	)
  2903  
  2904  	return
  2905  }
  2906  
  2907  // TryInitMouseEvent9 calls the method "MouseEvent.initMouseEvent"
  2908  // in a try/catch block and returns (_, err, ok = false) when it went through
  2909  // the catch clause.
  2910  func (this MouseEvent) TryInitMouseEvent9(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32, screenXArg int32) (ret js.Void, exception js.Any, ok bool) {
  2911  	ok = js.True == bindings.TryMouseEventInitMouseEvent9(
  2912  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2913  		typeArg.Ref(),
  2914  		js.Bool(bool(bubblesArg)),
  2915  		js.Bool(bool(cancelableArg)),
  2916  		viewArg.Ref(),
  2917  		int32(detailArg),
  2918  		int32(screenXArg),
  2919  	)
  2920  
  2921  	return
  2922  }
  2923  
  2924  // HasFuncInitMouseEvent10 returns true if the method "MouseEvent.initMouseEvent" exists.
  2925  func (this MouseEvent) HasFuncInitMouseEvent10() bool {
  2926  	return js.True == bindings.HasFuncMouseEventInitMouseEvent10(
  2927  		this.ref,
  2928  	)
  2929  }
  2930  
  2931  // FuncInitMouseEvent10 returns the method "MouseEvent.initMouseEvent".
  2932  func (this MouseEvent) FuncInitMouseEvent10() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32)]) {
  2933  	bindings.FuncMouseEventInitMouseEvent10(
  2934  		this.ref, js.Pointer(&fn),
  2935  	)
  2936  	return
  2937  }
  2938  
  2939  // InitMouseEvent10 calls the method "MouseEvent.initMouseEvent".
  2940  func (this MouseEvent) InitMouseEvent10(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32) (ret js.Void) {
  2941  	bindings.CallMouseEventInitMouseEvent10(
  2942  		this.ref, js.Pointer(&ret),
  2943  		typeArg.Ref(),
  2944  		js.Bool(bool(bubblesArg)),
  2945  		js.Bool(bool(cancelableArg)),
  2946  		viewArg.Ref(),
  2947  		int32(detailArg),
  2948  	)
  2949  
  2950  	return
  2951  }
  2952  
  2953  // TryInitMouseEvent10 calls the method "MouseEvent.initMouseEvent"
  2954  // in a try/catch block and returns (_, err, ok = false) when it went through
  2955  // the catch clause.
  2956  func (this MouseEvent) TryInitMouseEvent10(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window, detailArg int32) (ret js.Void, exception js.Any, ok bool) {
  2957  	ok = js.True == bindings.TryMouseEventInitMouseEvent10(
  2958  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  2959  		typeArg.Ref(),
  2960  		js.Bool(bool(bubblesArg)),
  2961  		js.Bool(bool(cancelableArg)),
  2962  		viewArg.Ref(),
  2963  		int32(detailArg),
  2964  	)
  2965  
  2966  	return
  2967  }
  2968  
  2969  // HasFuncInitMouseEvent11 returns true if the method "MouseEvent.initMouseEvent" exists.
  2970  func (this MouseEvent) HasFuncInitMouseEvent11() bool {
  2971  	return js.True == bindings.HasFuncMouseEventInitMouseEvent11(
  2972  		this.ref,
  2973  	)
  2974  }
  2975  
  2976  // FuncInitMouseEvent11 returns the method "MouseEvent.initMouseEvent".
  2977  func (this MouseEvent) FuncInitMouseEvent11() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window)]) {
  2978  	bindings.FuncMouseEventInitMouseEvent11(
  2979  		this.ref, js.Pointer(&fn),
  2980  	)
  2981  	return
  2982  }
  2983  
  2984  // InitMouseEvent11 calls the method "MouseEvent.initMouseEvent".
  2985  func (this MouseEvent) InitMouseEvent11(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window) (ret js.Void) {
  2986  	bindings.CallMouseEventInitMouseEvent11(
  2987  		this.ref, js.Pointer(&ret),
  2988  		typeArg.Ref(),
  2989  		js.Bool(bool(bubblesArg)),
  2990  		js.Bool(bool(cancelableArg)),
  2991  		viewArg.Ref(),
  2992  	)
  2993  
  2994  	return
  2995  }
  2996  
  2997  // TryInitMouseEvent11 calls the method "MouseEvent.initMouseEvent"
  2998  // in a try/catch block and returns (_, err, ok = false) when it went through
  2999  // the catch clause.
  3000  func (this MouseEvent) TryInitMouseEvent11(typeArg js.String, bubblesArg bool, cancelableArg bool, viewArg Window) (ret js.Void, exception js.Any, ok bool) {
  3001  	ok = js.True == bindings.TryMouseEventInitMouseEvent11(
  3002  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3003  		typeArg.Ref(),
  3004  		js.Bool(bool(bubblesArg)),
  3005  		js.Bool(bool(cancelableArg)),
  3006  		viewArg.Ref(),
  3007  	)
  3008  
  3009  	return
  3010  }
  3011  
  3012  // HasFuncInitMouseEvent12 returns true if the method "MouseEvent.initMouseEvent" exists.
  3013  func (this MouseEvent) HasFuncInitMouseEvent12() bool {
  3014  	return js.True == bindings.HasFuncMouseEventInitMouseEvent12(
  3015  		this.ref,
  3016  	)
  3017  }
  3018  
  3019  // FuncInitMouseEvent12 returns the method "MouseEvent.initMouseEvent".
  3020  func (this MouseEvent) FuncInitMouseEvent12() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool)]) {
  3021  	bindings.FuncMouseEventInitMouseEvent12(
  3022  		this.ref, js.Pointer(&fn),
  3023  	)
  3024  	return
  3025  }
  3026  
  3027  // InitMouseEvent12 calls the method "MouseEvent.initMouseEvent".
  3028  func (this MouseEvent) InitMouseEvent12(typeArg js.String, bubblesArg bool, cancelableArg bool) (ret js.Void) {
  3029  	bindings.CallMouseEventInitMouseEvent12(
  3030  		this.ref, js.Pointer(&ret),
  3031  		typeArg.Ref(),
  3032  		js.Bool(bool(bubblesArg)),
  3033  		js.Bool(bool(cancelableArg)),
  3034  	)
  3035  
  3036  	return
  3037  }
  3038  
  3039  // TryInitMouseEvent12 calls the method "MouseEvent.initMouseEvent"
  3040  // in a try/catch block and returns (_, err, ok = false) when it went through
  3041  // the catch clause.
  3042  func (this MouseEvent) TryInitMouseEvent12(typeArg js.String, bubblesArg bool, cancelableArg bool) (ret js.Void, exception js.Any, ok bool) {
  3043  	ok = js.True == bindings.TryMouseEventInitMouseEvent12(
  3044  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3045  		typeArg.Ref(),
  3046  		js.Bool(bool(bubblesArg)),
  3047  		js.Bool(bool(cancelableArg)),
  3048  	)
  3049  
  3050  	return
  3051  }
  3052  
  3053  // HasFuncInitMouseEvent13 returns true if the method "MouseEvent.initMouseEvent" exists.
  3054  func (this MouseEvent) HasFuncInitMouseEvent13() bool {
  3055  	return js.True == bindings.HasFuncMouseEventInitMouseEvent13(
  3056  		this.ref,
  3057  	)
  3058  }
  3059  
  3060  // FuncInitMouseEvent13 returns the method "MouseEvent.initMouseEvent".
  3061  func (this MouseEvent) FuncInitMouseEvent13() (fn js.Func[func(typeArg js.String, bubblesArg bool)]) {
  3062  	bindings.FuncMouseEventInitMouseEvent13(
  3063  		this.ref, js.Pointer(&fn),
  3064  	)
  3065  	return
  3066  }
  3067  
  3068  // InitMouseEvent13 calls the method "MouseEvent.initMouseEvent".
  3069  func (this MouseEvent) InitMouseEvent13(typeArg js.String, bubblesArg bool) (ret js.Void) {
  3070  	bindings.CallMouseEventInitMouseEvent13(
  3071  		this.ref, js.Pointer(&ret),
  3072  		typeArg.Ref(),
  3073  		js.Bool(bool(bubblesArg)),
  3074  	)
  3075  
  3076  	return
  3077  }
  3078  
  3079  // TryInitMouseEvent13 calls the method "MouseEvent.initMouseEvent"
  3080  // in a try/catch block and returns (_, err, ok = false) when it went through
  3081  // the catch clause.
  3082  func (this MouseEvent) TryInitMouseEvent13(typeArg js.String, bubblesArg bool) (ret js.Void, exception js.Any, ok bool) {
  3083  	ok = js.True == bindings.TryMouseEventInitMouseEvent13(
  3084  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3085  		typeArg.Ref(),
  3086  		js.Bool(bool(bubblesArg)),
  3087  	)
  3088  
  3089  	return
  3090  }
  3091  
  3092  // HasFuncInitMouseEvent14 returns true if the method "MouseEvent.initMouseEvent" exists.
  3093  func (this MouseEvent) HasFuncInitMouseEvent14() bool {
  3094  	return js.True == bindings.HasFuncMouseEventInitMouseEvent14(
  3095  		this.ref,
  3096  	)
  3097  }
  3098  
  3099  // FuncInitMouseEvent14 returns the method "MouseEvent.initMouseEvent".
  3100  func (this MouseEvent) FuncInitMouseEvent14() (fn js.Func[func(typeArg js.String)]) {
  3101  	bindings.FuncMouseEventInitMouseEvent14(
  3102  		this.ref, js.Pointer(&fn),
  3103  	)
  3104  	return
  3105  }
  3106  
  3107  // InitMouseEvent14 calls the method "MouseEvent.initMouseEvent".
  3108  func (this MouseEvent) InitMouseEvent14(typeArg js.String) (ret js.Void) {
  3109  	bindings.CallMouseEventInitMouseEvent14(
  3110  		this.ref, js.Pointer(&ret),
  3111  		typeArg.Ref(),
  3112  	)
  3113  
  3114  	return
  3115  }
  3116  
  3117  // TryInitMouseEvent14 calls the method "MouseEvent.initMouseEvent"
  3118  // in a try/catch block and returns (_, err, ok = false) when it went through
  3119  // the catch clause.
  3120  func (this MouseEvent) TryInitMouseEvent14(typeArg js.String) (ret js.Void, exception js.Any, ok bool) {
  3121  	ok = js.True == bindings.TryMouseEventInitMouseEvent14(
  3122  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3123  		typeArg.Ref(),
  3124  	)
  3125  
  3126  	return
  3127  }
  3128  
  3129  type MutationCallbackFunc func(this js.Ref, mutations js.Array[MutationRecord], observer MutationObserver) js.Ref
  3130  
  3131  func (fn MutationCallbackFunc) Register() js.Func[func(mutations js.Array[MutationRecord], observer MutationObserver)] {
  3132  	return js.RegisterCallback[func(mutations js.Array[MutationRecord], observer MutationObserver)](
  3133  		fn, abi.FuncPCABIInternal(fn),
  3134  	)
  3135  }
  3136  
  3137  func (fn MutationCallbackFunc) DispatchCallback(
  3138  	targetPC uintptr, ctx *js.CallbackContext,
  3139  ) {
  3140  	args := ctx.Args()
  3141  	if len(args) != 2+1 /* js this */ ||
  3142  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
  3143  		js.ThrowInvalidCallbackInvocation()
  3144  	}
  3145  
  3146  	if ctx.Return(fn(
  3147  		args[0],
  3148  
  3149  		js.Array[MutationRecord]{}.FromRef(args[0+1]),
  3150  		MutationObserver{}.FromRef(args[1+1]),
  3151  	)) {
  3152  		return
  3153  	}
  3154  
  3155  	js.ThrowCallbackValueNotReturned()
  3156  }
  3157  
  3158  type MutationCallback[T any] struct {
  3159  	Fn  func(arg T, this js.Ref, mutations js.Array[MutationRecord], observer MutationObserver) js.Ref
  3160  	Arg T
  3161  }
  3162  
  3163  func (cb *MutationCallback[T]) Register() js.Func[func(mutations js.Array[MutationRecord], observer MutationObserver)] {
  3164  	return js.RegisterCallback[func(mutations js.Array[MutationRecord], observer MutationObserver)](
  3165  		cb, abi.FuncPCABIInternal(cb.Fn),
  3166  	)
  3167  }
  3168  
  3169  func (cb *MutationCallback[T]) DispatchCallback(
  3170  	targetPC uintptr, ctx *js.CallbackContext,
  3171  ) {
  3172  	args := ctx.Args()
  3173  	if len(args) != 2+1 /* js this */ ||
  3174  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
  3175  		js.ThrowInvalidCallbackInvocation()
  3176  	}
  3177  
  3178  	if ctx.Return(cb.Fn(
  3179  		cb.Arg,
  3180  		args[0],
  3181  
  3182  		js.Array[MutationRecord]{}.FromRef(args[0+1]),
  3183  		MutationObserver{}.FromRef(args[1+1]),
  3184  	)) {
  3185  		return
  3186  	}
  3187  
  3188  	js.ThrowCallbackValueNotReturned()
  3189  }
  3190  
  3191  type MutationRecord struct {
  3192  	ref js.Ref
  3193  }
  3194  
  3195  func (this MutationRecord) Once() MutationRecord {
  3196  	this.ref.Once()
  3197  	return this
  3198  }
  3199  
  3200  func (this MutationRecord) Ref() js.Ref {
  3201  	return this.ref
  3202  }
  3203  
  3204  func (this MutationRecord) FromRef(ref js.Ref) MutationRecord {
  3205  	this.ref = ref
  3206  	return this
  3207  }
  3208  
  3209  func (this MutationRecord) Free() {
  3210  	this.ref.Free()
  3211  }
  3212  
  3213  // Type returns the value of property "MutationRecord.type".
  3214  //
  3215  // It returns ok=false if there is no such property.
  3216  func (this MutationRecord) Type() (ret js.String, ok bool) {
  3217  	ok = js.True == bindings.GetMutationRecordType(
  3218  		this.ref, js.Pointer(&ret),
  3219  	)
  3220  	return
  3221  }
  3222  
  3223  // Target returns the value of property "MutationRecord.target".
  3224  //
  3225  // It returns ok=false if there is no such property.
  3226  func (this MutationRecord) Target() (ret Node, ok bool) {
  3227  	ok = js.True == bindings.GetMutationRecordTarget(
  3228  		this.ref, js.Pointer(&ret),
  3229  	)
  3230  	return
  3231  }
  3232  
  3233  // AddedNodes returns the value of property "MutationRecord.addedNodes".
  3234  //
  3235  // It returns ok=false if there is no such property.
  3236  func (this MutationRecord) AddedNodes() (ret NodeList, ok bool) {
  3237  	ok = js.True == bindings.GetMutationRecordAddedNodes(
  3238  		this.ref, js.Pointer(&ret),
  3239  	)
  3240  	return
  3241  }
  3242  
  3243  // RemovedNodes returns the value of property "MutationRecord.removedNodes".
  3244  //
  3245  // It returns ok=false if there is no such property.
  3246  func (this MutationRecord) RemovedNodes() (ret NodeList, ok bool) {
  3247  	ok = js.True == bindings.GetMutationRecordRemovedNodes(
  3248  		this.ref, js.Pointer(&ret),
  3249  	)
  3250  	return
  3251  }
  3252  
  3253  // PreviousSibling returns the value of property "MutationRecord.previousSibling".
  3254  //
  3255  // It returns ok=false if there is no such property.
  3256  func (this MutationRecord) PreviousSibling() (ret Node, ok bool) {
  3257  	ok = js.True == bindings.GetMutationRecordPreviousSibling(
  3258  		this.ref, js.Pointer(&ret),
  3259  	)
  3260  	return
  3261  }
  3262  
  3263  // NextSibling returns the value of property "MutationRecord.nextSibling".
  3264  //
  3265  // It returns ok=false if there is no such property.
  3266  func (this MutationRecord) NextSibling() (ret Node, ok bool) {
  3267  	ok = js.True == bindings.GetMutationRecordNextSibling(
  3268  		this.ref, js.Pointer(&ret),
  3269  	)
  3270  	return
  3271  }
  3272  
  3273  // AttributeName returns the value of property "MutationRecord.attributeName".
  3274  //
  3275  // It returns ok=false if there is no such property.
  3276  func (this MutationRecord) AttributeName() (ret js.String, ok bool) {
  3277  	ok = js.True == bindings.GetMutationRecordAttributeName(
  3278  		this.ref, js.Pointer(&ret),
  3279  	)
  3280  	return
  3281  }
  3282  
  3283  // AttributeNamespace returns the value of property "MutationRecord.attributeNamespace".
  3284  //
  3285  // It returns ok=false if there is no such property.
  3286  func (this MutationRecord) AttributeNamespace() (ret js.String, ok bool) {
  3287  	ok = js.True == bindings.GetMutationRecordAttributeNamespace(
  3288  		this.ref, js.Pointer(&ret),
  3289  	)
  3290  	return
  3291  }
  3292  
  3293  // OldValue returns the value of property "MutationRecord.oldValue".
  3294  //
  3295  // It returns ok=false if there is no such property.
  3296  func (this MutationRecord) OldValue() (ret js.String, ok bool) {
  3297  	ok = js.True == bindings.GetMutationRecordOldValue(
  3298  		this.ref, js.Pointer(&ret),
  3299  	)
  3300  	return
  3301  }
  3302  
  3303  type MutationObserverInit struct {
  3304  	// ChildList is "MutationObserverInit.childList"
  3305  	//
  3306  	// Optional, defaults to false.
  3307  	//
  3308  	// NOTE: FFI_USE_ChildList MUST be set to true to make this field effective.
  3309  	ChildList bool
  3310  	// Attributes is "MutationObserverInit.attributes"
  3311  	//
  3312  	// Optional
  3313  	//
  3314  	// NOTE: FFI_USE_Attributes MUST be set to true to make this field effective.
  3315  	Attributes bool
  3316  	// CharacterData is "MutationObserverInit.characterData"
  3317  	//
  3318  	// Optional
  3319  	//
  3320  	// NOTE: FFI_USE_CharacterData MUST be set to true to make this field effective.
  3321  	CharacterData bool
  3322  	// Subtree is "MutationObserverInit.subtree"
  3323  	//
  3324  	// Optional, defaults to false.
  3325  	//
  3326  	// NOTE: FFI_USE_Subtree MUST be set to true to make this field effective.
  3327  	Subtree bool
  3328  	// AttributeOldValue is "MutationObserverInit.attributeOldValue"
  3329  	//
  3330  	// Optional
  3331  	//
  3332  	// NOTE: FFI_USE_AttributeOldValue MUST be set to true to make this field effective.
  3333  	AttributeOldValue bool
  3334  	// CharacterDataOldValue is "MutationObserverInit.characterDataOldValue"
  3335  	//
  3336  	// Optional
  3337  	//
  3338  	// NOTE: FFI_USE_CharacterDataOldValue MUST be set to true to make this field effective.
  3339  	CharacterDataOldValue bool
  3340  	// AttributeFilter is "MutationObserverInit.attributeFilter"
  3341  	//
  3342  	// Optional
  3343  	AttributeFilter js.Array[js.String]
  3344  
  3345  	FFI_USE_ChildList             bool // for ChildList.
  3346  	FFI_USE_Attributes            bool // for Attributes.
  3347  	FFI_USE_CharacterData         bool // for CharacterData.
  3348  	FFI_USE_Subtree               bool // for Subtree.
  3349  	FFI_USE_AttributeOldValue     bool // for AttributeOldValue.
  3350  	FFI_USE_CharacterDataOldValue bool // for CharacterDataOldValue.
  3351  
  3352  	FFI_USE bool
  3353  }
  3354  
  3355  // FromRef calls UpdateFrom and returns a MutationObserverInit with all fields set.
  3356  func (p MutationObserverInit) FromRef(ref js.Ref) MutationObserverInit {
  3357  	p.UpdateFrom(ref)
  3358  	return p
  3359  }
  3360  
  3361  // New creates a new MutationObserverInit in the application heap.
  3362  func (p MutationObserverInit) New() js.Ref {
  3363  	return bindings.MutationObserverInitJSLoad(
  3364  		js.Pointer(&p), js.True, 0,
  3365  	)
  3366  }
  3367  
  3368  // UpdateFrom copies value of all fields of the heap object to p.
  3369  func (p *MutationObserverInit) UpdateFrom(ref js.Ref) {
  3370  	bindings.MutationObserverInitJSStore(
  3371  		js.Pointer(p), ref,
  3372  	)
  3373  }
  3374  
  3375  // Update writes all fields of the p to the heap object referenced by ref.
  3376  func (p *MutationObserverInit) Update(ref js.Ref) {
  3377  	bindings.MutationObserverInitJSLoad(
  3378  		js.Pointer(p), js.False, ref,
  3379  	)
  3380  }
  3381  
  3382  // FreeMembers frees fields with heap reference, if recursive is true
  3383  // free all heap references reachable from p.
  3384  func (p *MutationObserverInit) FreeMembers(recursive bool) {
  3385  	js.Free(
  3386  		p.AttributeFilter.Ref(),
  3387  	)
  3388  	p.AttributeFilter = p.AttributeFilter.FromRef(js.Undefined)
  3389  }
  3390  
  3391  func NewMutationObserver(callback js.Func[func(mutations js.Array[MutationRecord], observer MutationObserver)]) (ret MutationObserver) {
  3392  	ret.ref = bindings.NewMutationObserverByMutationObserver(
  3393  		callback.Ref())
  3394  	return
  3395  }
  3396  
  3397  type MutationObserver struct {
  3398  	ref js.Ref
  3399  }
  3400  
  3401  func (this MutationObserver) Once() MutationObserver {
  3402  	this.ref.Once()
  3403  	return this
  3404  }
  3405  
  3406  func (this MutationObserver) Ref() js.Ref {
  3407  	return this.ref
  3408  }
  3409  
  3410  func (this MutationObserver) FromRef(ref js.Ref) MutationObserver {
  3411  	this.ref = ref
  3412  	return this
  3413  }
  3414  
  3415  func (this MutationObserver) Free() {
  3416  	this.ref.Free()
  3417  }
  3418  
  3419  // HasFuncObserve returns true if the method "MutationObserver.observe" exists.
  3420  func (this MutationObserver) HasFuncObserve() bool {
  3421  	return js.True == bindings.HasFuncMutationObserverObserve(
  3422  		this.ref,
  3423  	)
  3424  }
  3425  
  3426  // FuncObserve returns the method "MutationObserver.observe".
  3427  func (this MutationObserver) FuncObserve() (fn js.Func[func(target Node, options MutationObserverInit)]) {
  3428  	bindings.FuncMutationObserverObserve(
  3429  		this.ref, js.Pointer(&fn),
  3430  	)
  3431  	return
  3432  }
  3433  
  3434  // Observe calls the method "MutationObserver.observe".
  3435  func (this MutationObserver) Observe(target Node, options MutationObserverInit) (ret js.Void) {
  3436  	bindings.CallMutationObserverObserve(
  3437  		this.ref, js.Pointer(&ret),
  3438  		target.Ref(),
  3439  		js.Pointer(&options),
  3440  	)
  3441  
  3442  	return
  3443  }
  3444  
  3445  // TryObserve calls the method "MutationObserver.observe"
  3446  // in a try/catch block and returns (_, err, ok = false) when it went through
  3447  // the catch clause.
  3448  func (this MutationObserver) TryObserve(target Node, options MutationObserverInit) (ret js.Void, exception js.Any, ok bool) {
  3449  	ok = js.True == bindings.TryMutationObserverObserve(
  3450  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3451  		target.Ref(),
  3452  		js.Pointer(&options),
  3453  	)
  3454  
  3455  	return
  3456  }
  3457  
  3458  // HasFuncObserve1 returns true if the method "MutationObserver.observe" exists.
  3459  func (this MutationObserver) HasFuncObserve1() bool {
  3460  	return js.True == bindings.HasFuncMutationObserverObserve1(
  3461  		this.ref,
  3462  	)
  3463  }
  3464  
  3465  // FuncObserve1 returns the method "MutationObserver.observe".
  3466  func (this MutationObserver) FuncObserve1() (fn js.Func[func(target Node)]) {
  3467  	bindings.FuncMutationObserverObserve1(
  3468  		this.ref, js.Pointer(&fn),
  3469  	)
  3470  	return
  3471  }
  3472  
  3473  // Observe1 calls the method "MutationObserver.observe".
  3474  func (this MutationObserver) Observe1(target Node) (ret js.Void) {
  3475  	bindings.CallMutationObserverObserve1(
  3476  		this.ref, js.Pointer(&ret),
  3477  		target.Ref(),
  3478  	)
  3479  
  3480  	return
  3481  }
  3482  
  3483  // TryObserve1 calls the method "MutationObserver.observe"
  3484  // in a try/catch block and returns (_, err, ok = false) when it went through
  3485  // the catch clause.
  3486  func (this MutationObserver) TryObserve1(target Node) (ret js.Void, exception js.Any, ok bool) {
  3487  	ok = js.True == bindings.TryMutationObserverObserve1(
  3488  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3489  		target.Ref(),
  3490  	)
  3491  
  3492  	return
  3493  }
  3494  
  3495  // HasFuncDisconnect returns true if the method "MutationObserver.disconnect" exists.
  3496  func (this MutationObserver) HasFuncDisconnect() bool {
  3497  	return js.True == bindings.HasFuncMutationObserverDisconnect(
  3498  		this.ref,
  3499  	)
  3500  }
  3501  
  3502  // FuncDisconnect returns the method "MutationObserver.disconnect".
  3503  func (this MutationObserver) FuncDisconnect() (fn js.Func[func()]) {
  3504  	bindings.FuncMutationObserverDisconnect(
  3505  		this.ref, js.Pointer(&fn),
  3506  	)
  3507  	return
  3508  }
  3509  
  3510  // Disconnect calls the method "MutationObserver.disconnect".
  3511  func (this MutationObserver) Disconnect() (ret js.Void) {
  3512  	bindings.CallMutationObserverDisconnect(
  3513  		this.ref, js.Pointer(&ret),
  3514  	)
  3515  
  3516  	return
  3517  }
  3518  
  3519  // TryDisconnect calls the method "MutationObserver.disconnect"
  3520  // in a try/catch block and returns (_, err, ok = false) when it went through
  3521  // the catch clause.
  3522  func (this MutationObserver) TryDisconnect() (ret js.Void, exception js.Any, ok bool) {
  3523  	ok = js.True == bindings.TryMutationObserverDisconnect(
  3524  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3525  	)
  3526  
  3527  	return
  3528  }
  3529  
  3530  // HasFuncTakeRecords returns true if the method "MutationObserver.takeRecords" exists.
  3531  func (this MutationObserver) HasFuncTakeRecords() bool {
  3532  	return js.True == bindings.HasFuncMutationObserverTakeRecords(
  3533  		this.ref,
  3534  	)
  3535  }
  3536  
  3537  // FuncTakeRecords returns the method "MutationObserver.takeRecords".
  3538  func (this MutationObserver) FuncTakeRecords() (fn js.Func[func() js.Array[MutationRecord]]) {
  3539  	bindings.FuncMutationObserverTakeRecords(
  3540  		this.ref, js.Pointer(&fn),
  3541  	)
  3542  	return
  3543  }
  3544  
  3545  // TakeRecords calls the method "MutationObserver.takeRecords".
  3546  func (this MutationObserver) TakeRecords() (ret js.Array[MutationRecord]) {
  3547  	bindings.CallMutationObserverTakeRecords(
  3548  		this.ref, js.Pointer(&ret),
  3549  	)
  3550  
  3551  	return
  3552  }
  3553  
  3554  // TryTakeRecords calls the method "MutationObserver.takeRecords"
  3555  // in a try/catch block and returns (_, err, ok = false) when it went through
  3556  // the catch clause.
  3557  func (this MutationObserver) TryTakeRecords() (ret js.Array[MutationRecord], exception js.Any, ok bool) {
  3558  	ok = js.True == bindings.TryMutationObserverTakeRecords(
  3559  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3560  	)
  3561  
  3562  	return
  3563  }
  3564  
  3565  const (
  3566  	MutationEvent_MODIFICATION uint16 = 1
  3567  	MutationEvent_ADDITION     uint16 = 2
  3568  	MutationEvent_REMOVAL      uint16 = 3
  3569  )
  3570  
  3571  func NewMutationEvent(typ js.String, eventInitDict EventInit) (ret MutationEvent) {
  3572  	ret.ref = bindings.NewMutationEventByMutationEvent(
  3573  		typ.Ref(),
  3574  		js.Pointer(&eventInitDict))
  3575  	return
  3576  }
  3577  
  3578  func NewMutationEventByMutationEvent1(typ js.String) (ret MutationEvent) {
  3579  	ret.ref = bindings.NewMutationEventByMutationEvent1(
  3580  		typ.Ref())
  3581  	return
  3582  }
  3583  
  3584  type MutationEvent struct {
  3585  	Event
  3586  }
  3587  
  3588  func (this MutationEvent) Once() MutationEvent {
  3589  	this.ref.Once()
  3590  	return this
  3591  }
  3592  
  3593  func (this MutationEvent) Ref() js.Ref {
  3594  	return this.Event.Ref()
  3595  }
  3596  
  3597  func (this MutationEvent) FromRef(ref js.Ref) MutationEvent {
  3598  	this.Event = this.Event.FromRef(ref)
  3599  	return this
  3600  }
  3601  
  3602  func (this MutationEvent) Free() {
  3603  	this.ref.Free()
  3604  }
  3605  
  3606  // RelatedNode returns the value of property "MutationEvent.relatedNode".
  3607  //
  3608  // It returns ok=false if there is no such property.
  3609  func (this MutationEvent) RelatedNode() (ret Node, ok bool) {
  3610  	ok = js.True == bindings.GetMutationEventRelatedNode(
  3611  		this.ref, js.Pointer(&ret),
  3612  	)
  3613  	return
  3614  }
  3615  
  3616  // PrevValue returns the value of property "MutationEvent.prevValue".
  3617  //
  3618  // It returns ok=false if there is no such property.
  3619  func (this MutationEvent) PrevValue() (ret js.String, ok bool) {
  3620  	ok = js.True == bindings.GetMutationEventPrevValue(
  3621  		this.ref, js.Pointer(&ret),
  3622  	)
  3623  	return
  3624  }
  3625  
  3626  // NewValue returns the value of property "MutationEvent.newValue".
  3627  //
  3628  // It returns ok=false if there is no such property.
  3629  func (this MutationEvent) NewValue() (ret js.String, ok bool) {
  3630  	ok = js.True == bindings.GetMutationEventNewValue(
  3631  		this.ref, js.Pointer(&ret),
  3632  	)
  3633  	return
  3634  }
  3635  
  3636  // AttrName returns the value of property "MutationEvent.attrName".
  3637  //
  3638  // It returns ok=false if there is no such property.
  3639  func (this MutationEvent) AttrName() (ret js.String, ok bool) {
  3640  	ok = js.True == bindings.GetMutationEventAttrName(
  3641  		this.ref, js.Pointer(&ret),
  3642  	)
  3643  	return
  3644  }
  3645  
  3646  // AttrChange returns the value of property "MutationEvent.attrChange".
  3647  //
  3648  // It returns ok=false if there is no such property.
  3649  func (this MutationEvent) AttrChange() (ret uint16, ok bool) {
  3650  	ok = js.True == bindings.GetMutationEventAttrChange(
  3651  		this.ref, js.Pointer(&ret),
  3652  	)
  3653  	return
  3654  }
  3655  
  3656  // HasFuncInitMutationEvent returns true if the method "MutationEvent.initMutationEvent" exists.
  3657  func (this MutationEvent) HasFuncInitMutationEvent() bool {
  3658  	return js.True == bindings.HasFuncMutationEventInitMutationEvent(
  3659  		this.ref,
  3660  	)
  3661  }
  3662  
  3663  // FuncInitMutationEvent returns the method "MutationEvent.initMutationEvent".
  3664  func (this MutationEvent) FuncInitMutationEvent() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String, attrNameArg js.String, attrChangeArg uint16)]) {
  3665  	bindings.FuncMutationEventInitMutationEvent(
  3666  		this.ref, js.Pointer(&fn),
  3667  	)
  3668  	return
  3669  }
  3670  
  3671  // InitMutationEvent calls the method "MutationEvent.initMutationEvent".
  3672  func (this MutationEvent) InitMutationEvent(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String, attrNameArg js.String, attrChangeArg uint16) (ret js.Void) {
  3673  	bindings.CallMutationEventInitMutationEvent(
  3674  		this.ref, js.Pointer(&ret),
  3675  		typeArg.Ref(),
  3676  		js.Bool(bool(bubblesArg)),
  3677  		js.Bool(bool(cancelableArg)),
  3678  		relatedNodeArg.Ref(),
  3679  		prevValueArg.Ref(),
  3680  		newValueArg.Ref(),
  3681  		attrNameArg.Ref(),
  3682  		uint32(attrChangeArg),
  3683  	)
  3684  
  3685  	return
  3686  }
  3687  
  3688  // TryInitMutationEvent calls the method "MutationEvent.initMutationEvent"
  3689  // in a try/catch block and returns (_, err, ok = false) when it went through
  3690  // the catch clause.
  3691  func (this MutationEvent) TryInitMutationEvent(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String, attrNameArg js.String, attrChangeArg uint16) (ret js.Void, exception js.Any, ok bool) {
  3692  	ok = js.True == bindings.TryMutationEventInitMutationEvent(
  3693  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3694  		typeArg.Ref(),
  3695  		js.Bool(bool(bubblesArg)),
  3696  		js.Bool(bool(cancelableArg)),
  3697  		relatedNodeArg.Ref(),
  3698  		prevValueArg.Ref(),
  3699  		newValueArg.Ref(),
  3700  		attrNameArg.Ref(),
  3701  		uint32(attrChangeArg),
  3702  	)
  3703  
  3704  	return
  3705  }
  3706  
  3707  // HasFuncInitMutationEvent1 returns true if the method "MutationEvent.initMutationEvent" exists.
  3708  func (this MutationEvent) HasFuncInitMutationEvent1() bool {
  3709  	return js.True == bindings.HasFuncMutationEventInitMutationEvent1(
  3710  		this.ref,
  3711  	)
  3712  }
  3713  
  3714  // FuncInitMutationEvent1 returns the method "MutationEvent.initMutationEvent".
  3715  func (this MutationEvent) FuncInitMutationEvent1() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String, attrNameArg js.String)]) {
  3716  	bindings.FuncMutationEventInitMutationEvent1(
  3717  		this.ref, js.Pointer(&fn),
  3718  	)
  3719  	return
  3720  }
  3721  
  3722  // InitMutationEvent1 calls the method "MutationEvent.initMutationEvent".
  3723  func (this MutationEvent) InitMutationEvent1(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String, attrNameArg js.String) (ret js.Void) {
  3724  	bindings.CallMutationEventInitMutationEvent1(
  3725  		this.ref, js.Pointer(&ret),
  3726  		typeArg.Ref(),
  3727  		js.Bool(bool(bubblesArg)),
  3728  		js.Bool(bool(cancelableArg)),
  3729  		relatedNodeArg.Ref(),
  3730  		prevValueArg.Ref(),
  3731  		newValueArg.Ref(),
  3732  		attrNameArg.Ref(),
  3733  	)
  3734  
  3735  	return
  3736  }
  3737  
  3738  // TryInitMutationEvent1 calls the method "MutationEvent.initMutationEvent"
  3739  // in a try/catch block and returns (_, err, ok = false) when it went through
  3740  // the catch clause.
  3741  func (this MutationEvent) TryInitMutationEvent1(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String, attrNameArg js.String) (ret js.Void, exception js.Any, ok bool) {
  3742  	ok = js.True == bindings.TryMutationEventInitMutationEvent1(
  3743  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3744  		typeArg.Ref(),
  3745  		js.Bool(bool(bubblesArg)),
  3746  		js.Bool(bool(cancelableArg)),
  3747  		relatedNodeArg.Ref(),
  3748  		prevValueArg.Ref(),
  3749  		newValueArg.Ref(),
  3750  		attrNameArg.Ref(),
  3751  	)
  3752  
  3753  	return
  3754  }
  3755  
  3756  // HasFuncInitMutationEvent2 returns true if the method "MutationEvent.initMutationEvent" exists.
  3757  func (this MutationEvent) HasFuncInitMutationEvent2() bool {
  3758  	return js.True == bindings.HasFuncMutationEventInitMutationEvent2(
  3759  		this.ref,
  3760  	)
  3761  }
  3762  
  3763  // FuncInitMutationEvent2 returns the method "MutationEvent.initMutationEvent".
  3764  func (this MutationEvent) FuncInitMutationEvent2() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String)]) {
  3765  	bindings.FuncMutationEventInitMutationEvent2(
  3766  		this.ref, js.Pointer(&fn),
  3767  	)
  3768  	return
  3769  }
  3770  
  3771  // InitMutationEvent2 calls the method "MutationEvent.initMutationEvent".
  3772  func (this MutationEvent) InitMutationEvent2(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String) (ret js.Void) {
  3773  	bindings.CallMutationEventInitMutationEvent2(
  3774  		this.ref, js.Pointer(&ret),
  3775  		typeArg.Ref(),
  3776  		js.Bool(bool(bubblesArg)),
  3777  		js.Bool(bool(cancelableArg)),
  3778  		relatedNodeArg.Ref(),
  3779  		prevValueArg.Ref(),
  3780  		newValueArg.Ref(),
  3781  	)
  3782  
  3783  	return
  3784  }
  3785  
  3786  // TryInitMutationEvent2 calls the method "MutationEvent.initMutationEvent"
  3787  // in a try/catch block and returns (_, err, ok = false) when it went through
  3788  // the catch clause.
  3789  func (this MutationEvent) TryInitMutationEvent2(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String, newValueArg js.String) (ret js.Void, exception js.Any, ok bool) {
  3790  	ok = js.True == bindings.TryMutationEventInitMutationEvent2(
  3791  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3792  		typeArg.Ref(),
  3793  		js.Bool(bool(bubblesArg)),
  3794  		js.Bool(bool(cancelableArg)),
  3795  		relatedNodeArg.Ref(),
  3796  		prevValueArg.Ref(),
  3797  		newValueArg.Ref(),
  3798  	)
  3799  
  3800  	return
  3801  }
  3802  
  3803  // HasFuncInitMutationEvent3 returns true if the method "MutationEvent.initMutationEvent" exists.
  3804  func (this MutationEvent) HasFuncInitMutationEvent3() bool {
  3805  	return js.True == bindings.HasFuncMutationEventInitMutationEvent3(
  3806  		this.ref,
  3807  	)
  3808  }
  3809  
  3810  // FuncInitMutationEvent3 returns the method "MutationEvent.initMutationEvent".
  3811  func (this MutationEvent) FuncInitMutationEvent3() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String)]) {
  3812  	bindings.FuncMutationEventInitMutationEvent3(
  3813  		this.ref, js.Pointer(&fn),
  3814  	)
  3815  	return
  3816  }
  3817  
  3818  // InitMutationEvent3 calls the method "MutationEvent.initMutationEvent".
  3819  func (this MutationEvent) InitMutationEvent3(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String) (ret js.Void) {
  3820  	bindings.CallMutationEventInitMutationEvent3(
  3821  		this.ref, js.Pointer(&ret),
  3822  		typeArg.Ref(),
  3823  		js.Bool(bool(bubblesArg)),
  3824  		js.Bool(bool(cancelableArg)),
  3825  		relatedNodeArg.Ref(),
  3826  		prevValueArg.Ref(),
  3827  	)
  3828  
  3829  	return
  3830  }
  3831  
  3832  // TryInitMutationEvent3 calls the method "MutationEvent.initMutationEvent"
  3833  // in a try/catch block and returns (_, err, ok = false) when it went through
  3834  // the catch clause.
  3835  func (this MutationEvent) TryInitMutationEvent3(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node, prevValueArg js.String) (ret js.Void, exception js.Any, ok bool) {
  3836  	ok = js.True == bindings.TryMutationEventInitMutationEvent3(
  3837  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3838  		typeArg.Ref(),
  3839  		js.Bool(bool(bubblesArg)),
  3840  		js.Bool(bool(cancelableArg)),
  3841  		relatedNodeArg.Ref(),
  3842  		prevValueArg.Ref(),
  3843  	)
  3844  
  3845  	return
  3846  }
  3847  
  3848  // HasFuncInitMutationEvent4 returns true if the method "MutationEvent.initMutationEvent" exists.
  3849  func (this MutationEvent) HasFuncInitMutationEvent4() bool {
  3850  	return js.True == bindings.HasFuncMutationEventInitMutationEvent4(
  3851  		this.ref,
  3852  	)
  3853  }
  3854  
  3855  // FuncInitMutationEvent4 returns the method "MutationEvent.initMutationEvent".
  3856  func (this MutationEvent) FuncInitMutationEvent4() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node)]) {
  3857  	bindings.FuncMutationEventInitMutationEvent4(
  3858  		this.ref, js.Pointer(&fn),
  3859  	)
  3860  	return
  3861  }
  3862  
  3863  // InitMutationEvent4 calls the method "MutationEvent.initMutationEvent".
  3864  func (this MutationEvent) InitMutationEvent4(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node) (ret js.Void) {
  3865  	bindings.CallMutationEventInitMutationEvent4(
  3866  		this.ref, js.Pointer(&ret),
  3867  		typeArg.Ref(),
  3868  		js.Bool(bool(bubblesArg)),
  3869  		js.Bool(bool(cancelableArg)),
  3870  		relatedNodeArg.Ref(),
  3871  	)
  3872  
  3873  	return
  3874  }
  3875  
  3876  // TryInitMutationEvent4 calls the method "MutationEvent.initMutationEvent"
  3877  // in a try/catch block and returns (_, err, ok = false) when it went through
  3878  // the catch clause.
  3879  func (this MutationEvent) TryInitMutationEvent4(typeArg js.String, bubblesArg bool, cancelableArg bool, relatedNodeArg Node) (ret js.Void, exception js.Any, ok bool) {
  3880  	ok = js.True == bindings.TryMutationEventInitMutationEvent4(
  3881  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3882  		typeArg.Ref(),
  3883  		js.Bool(bool(bubblesArg)),
  3884  		js.Bool(bool(cancelableArg)),
  3885  		relatedNodeArg.Ref(),
  3886  	)
  3887  
  3888  	return
  3889  }
  3890  
  3891  // HasFuncInitMutationEvent5 returns true if the method "MutationEvent.initMutationEvent" exists.
  3892  func (this MutationEvent) HasFuncInitMutationEvent5() bool {
  3893  	return js.True == bindings.HasFuncMutationEventInitMutationEvent5(
  3894  		this.ref,
  3895  	)
  3896  }
  3897  
  3898  // FuncInitMutationEvent5 returns the method "MutationEvent.initMutationEvent".
  3899  func (this MutationEvent) FuncInitMutationEvent5() (fn js.Func[func(typeArg js.String, bubblesArg bool, cancelableArg bool)]) {
  3900  	bindings.FuncMutationEventInitMutationEvent5(
  3901  		this.ref, js.Pointer(&fn),
  3902  	)
  3903  	return
  3904  }
  3905  
  3906  // InitMutationEvent5 calls the method "MutationEvent.initMutationEvent".
  3907  func (this MutationEvent) InitMutationEvent5(typeArg js.String, bubblesArg bool, cancelableArg bool) (ret js.Void) {
  3908  	bindings.CallMutationEventInitMutationEvent5(
  3909  		this.ref, js.Pointer(&ret),
  3910  		typeArg.Ref(),
  3911  		js.Bool(bool(bubblesArg)),
  3912  		js.Bool(bool(cancelableArg)),
  3913  	)
  3914  
  3915  	return
  3916  }
  3917  
  3918  // TryInitMutationEvent5 calls the method "MutationEvent.initMutationEvent"
  3919  // in a try/catch block and returns (_, err, ok = false) when it went through
  3920  // the catch clause.
  3921  func (this MutationEvent) TryInitMutationEvent5(typeArg js.String, bubblesArg bool, cancelableArg bool) (ret js.Void, exception js.Any, ok bool) {
  3922  	ok = js.True == bindings.TryMutationEventInitMutationEvent5(
  3923  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3924  		typeArg.Ref(),
  3925  		js.Bool(bool(bubblesArg)),
  3926  		js.Bool(bool(cancelableArg)),
  3927  	)
  3928  
  3929  	return
  3930  }
  3931  
  3932  // HasFuncInitMutationEvent6 returns true if the method "MutationEvent.initMutationEvent" exists.
  3933  func (this MutationEvent) HasFuncInitMutationEvent6() bool {
  3934  	return js.True == bindings.HasFuncMutationEventInitMutationEvent6(
  3935  		this.ref,
  3936  	)
  3937  }
  3938  
  3939  // FuncInitMutationEvent6 returns the method "MutationEvent.initMutationEvent".
  3940  func (this MutationEvent) FuncInitMutationEvent6() (fn js.Func[func(typeArg js.String, bubblesArg bool)]) {
  3941  	bindings.FuncMutationEventInitMutationEvent6(
  3942  		this.ref, js.Pointer(&fn),
  3943  	)
  3944  	return
  3945  }
  3946  
  3947  // InitMutationEvent6 calls the method "MutationEvent.initMutationEvent".
  3948  func (this MutationEvent) InitMutationEvent6(typeArg js.String, bubblesArg bool) (ret js.Void) {
  3949  	bindings.CallMutationEventInitMutationEvent6(
  3950  		this.ref, js.Pointer(&ret),
  3951  		typeArg.Ref(),
  3952  		js.Bool(bool(bubblesArg)),
  3953  	)
  3954  
  3955  	return
  3956  }
  3957  
  3958  // TryInitMutationEvent6 calls the method "MutationEvent.initMutationEvent"
  3959  // in a try/catch block and returns (_, err, ok = false) when it went through
  3960  // the catch clause.
  3961  func (this MutationEvent) TryInitMutationEvent6(typeArg js.String, bubblesArg bool) (ret js.Void, exception js.Any, ok bool) {
  3962  	ok = js.True == bindings.TryMutationEventInitMutationEvent6(
  3963  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  3964  		typeArg.Ref(),
  3965  		js.Bool(bool(bubblesArg)),
  3966  	)
  3967  
  3968  	return
  3969  }
  3970  
  3971  // HasFuncInitMutationEvent7 returns true if the method "MutationEvent.initMutationEvent" exists.
  3972  func (this MutationEvent) HasFuncInitMutationEvent7() bool {
  3973  	return js.True == bindings.HasFuncMutationEventInitMutationEvent7(
  3974  		this.ref,
  3975  	)
  3976  }
  3977  
  3978  // FuncInitMutationEvent7 returns the method "MutationEvent.initMutationEvent".
  3979  func (this MutationEvent) FuncInitMutationEvent7() (fn js.Func[func(typeArg js.String)]) {
  3980  	bindings.FuncMutationEventInitMutationEvent7(
  3981  		this.ref, js.Pointer(&fn),
  3982  	)
  3983  	return
  3984  }
  3985  
  3986  // InitMutationEvent7 calls the method "MutationEvent.initMutationEvent".
  3987  func (this MutationEvent) InitMutationEvent7(typeArg js.String) (ret js.Void) {
  3988  	bindings.CallMutationEventInitMutationEvent7(
  3989  		this.ref, js.Pointer(&ret),
  3990  		typeArg.Ref(),
  3991  	)
  3992  
  3993  	return
  3994  }
  3995  
  3996  // TryInitMutationEvent7 calls the method "MutationEvent.initMutationEvent"
  3997  // in a try/catch block and returns (_, err, ok = false) when it went through
  3998  // the catch clause.
  3999  func (this MutationEvent) TryInitMutationEvent7(typeArg js.String) (ret js.Void, exception js.Any, ok bool) {
  4000  	ok = js.True == bindings.TryMutationEventInitMutationEvent7(
  4001  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4002  		typeArg.Ref(),
  4003  	)
  4004  
  4005  	return
  4006  }
  4007  
  4008  type NDEFMakeReadOnlyOptions struct {
  4009  	// Signal is "NDEFMakeReadOnlyOptions.signal"
  4010  	//
  4011  	// Optional
  4012  	Signal AbortSignal
  4013  
  4014  	FFI_USE bool
  4015  }
  4016  
  4017  // FromRef calls UpdateFrom and returns a NDEFMakeReadOnlyOptions with all fields set.
  4018  func (p NDEFMakeReadOnlyOptions) FromRef(ref js.Ref) NDEFMakeReadOnlyOptions {
  4019  	p.UpdateFrom(ref)
  4020  	return p
  4021  }
  4022  
  4023  // New creates a new NDEFMakeReadOnlyOptions in the application heap.
  4024  func (p NDEFMakeReadOnlyOptions) New() js.Ref {
  4025  	return bindings.NDEFMakeReadOnlyOptionsJSLoad(
  4026  		js.Pointer(&p), js.True, 0,
  4027  	)
  4028  }
  4029  
  4030  // UpdateFrom copies value of all fields of the heap object to p.
  4031  func (p *NDEFMakeReadOnlyOptions) UpdateFrom(ref js.Ref) {
  4032  	bindings.NDEFMakeReadOnlyOptionsJSStore(
  4033  		js.Pointer(p), ref,
  4034  	)
  4035  }
  4036  
  4037  // Update writes all fields of the p to the heap object referenced by ref.
  4038  func (p *NDEFMakeReadOnlyOptions) Update(ref js.Ref) {
  4039  	bindings.NDEFMakeReadOnlyOptionsJSLoad(
  4040  		js.Pointer(p), js.False, ref,
  4041  	)
  4042  }
  4043  
  4044  // FreeMembers frees fields with heap reference, if recursive is true
  4045  // free all heap references reachable from p.
  4046  func (p *NDEFMakeReadOnlyOptions) FreeMembers(recursive bool) {
  4047  	js.Free(
  4048  		p.Signal.Ref(),
  4049  	)
  4050  	p.Signal = p.Signal.FromRef(js.Undefined)
  4051  }
  4052  
  4053  type NDEFRecordInit struct {
  4054  	// RecordType is "NDEFRecordInit.recordType"
  4055  	//
  4056  	// Required
  4057  	RecordType js.String
  4058  	// MediaType is "NDEFRecordInit.mediaType"
  4059  	//
  4060  	// Optional
  4061  	MediaType js.String
  4062  	// Id is "NDEFRecordInit.id"
  4063  	//
  4064  	// Optional
  4065  	Id js.String
  4066  	// Encoding is "NDEFRecordInit.encoding"
  4067  	//
  4068  	// Optional
  4069  	Encoding js.String
  4070  	// Lang is "NDEFRecordInit.lang"
  4071  	//
  4072  	// Optional
  4073  	Lang js.String
  4074  	// Data is "NDEFRecordInit.data"
  4075  	//
  4076  	// Optional
  4077  	Data js.Any
  4078  
  4079  	FFI_USE bool
  4080  }
  4081  
  4082  // FromRef calls UpdateFrom and returns a NDEFRecordInit with all fields set.
  4083  func (p NDEFRecordInit) FromRef(ref js.Ref) NDEFRecordInit {
  4084  	p.UpdateFrom(ref)
  4085  	return p
  4086  }
  4087  
  4088  // New creates a new NDEFRecordInit in the application heap.
  4089  func (p NDEFRecordInit) New() js.Ref {
  4090  	return bindings.NDEFRecordInitJSLoad(
  4091  		js.Pointer(&p), js.True, 0,
  4092  	)
  4093  }
  4094  
  4095  // UpdateFrom copies value of all fields of the heap object to p.
  4096  func (p *NDEFRecordInit) UpdateFrom(ref js.Ref) {
  4097  	bindings.NDEFRecordInitJSStore(
  4098  		js.Pointer(p), ref,
  4099  	)
  4100  }
  4101  
  4102  // Update writes all fields of the p to the heap object referenced by ref.
  4103  func (p *NDEFRecordInit) Update(ref js.Ref) {
  4104  	bindings.NDEFRecordInitJSLoad(
  4105  		js.Pointer(p), js.False, ref,
  4106  	)
  4107  }
  4108  
  4109  // FreeMembers frees fields with heap reference, if recursive is true
  4110  // free all heap references reachable from p.
  4111  func (p *NDEFRecordInit) FreeMembers(recursive bool) {
  4112  	js.Free(
  4113  		p.RecordType.Ref(),
  4114  		p.MediaType.Ref(),
  4115  		p.Id.Ref(),
  4116  		p.Encoding.Ref(),
  4117  		p.Lang.Ref(),
  4118  		p.Data.Ref(),
  4119  	)
  4120  	p.RecordType = p.RecordType.FromRef(js.Undefined)
  4121  	p.MediaType = p.MediaType.FromRef(js.Undefined)
  4122  	p.Id = p.Id.FromRef(js.Undefined)
  4123  	p.Encoding = p.Encoding.FromRef(js.Undefined)
  4124  	p.Lang = p.Lang.FromRef(js.Undefined)
  4125  	p.Data = p.Data.FromRef(js.Undefined)
  4126  }
  4127  
  4128  type NDEFMessageInit struct {
  4129  	// Records is "NDEFMessageInit.records"
  4130  	//
  4131  	// Required
  4132  	Records js.Array[NDEFRecordInit]
  4133  
  4134  	FFI_USE bool
  4135  }
  4136  
  4137  // FromRef calls UpdateFrom and returns a NDEFMessageInit with all fields set.
  4138  func (p NDEFMessageInit) FromRef(ref js.Ref) NDEFMessageInit {
  4139  	p.UpdateFrom(ref)
  4140  	return p
  4141  }
  4142  
  4143  // New creates a new NDEFMessageInit in the application heap.
  4144  func (p NDEFMessageInit) New() js.Ref {
  4145  	return bindings.NDEFMessageInitJSLoad(
  4146  		js.Pointer(&p), js.True, 0,
  4147  	)
  4148  }
  4149  
  4150  // UpdateFrom copies value of all fields of the heap object to p.
  4151  func (p *NDEFMessageInit) UpdateFrom(ref js.Ref) {
  4152  	bindings.NDEFMessageInitJSStore(
  4153  		js.Pointer(p), ref,
  4154  	)
  4155  }
  4156  
  4157  // Update writes all fields of the p to the heap object referenced by ref.
  4158  func (p *NDEFMessageInit) Update(ref js.Ref) {
  4159  	bindings.NDEFMessageInitJSLoad(
  4160  		js.Pointer(p), js.False, ref,
  4161  	)
  4162  }
  4163  
  4164  // FreeMembers frees fields with heap reference, if recursive is true
  4165  // free all heap references reachable from p.
  4166  func (p *NDEFMessageInit) FreeMembers(recursive bool) {
  4167  	js.Free(
  4168  		p.Records.Ref(),
  4169  	)
  4170  	p.Records = p.Records.FromRef(js.Undefined)
  4171  }
  4172  
  4173  func NewNDEFRecord(recordInit NDEFRecordInit) (ret NDEFRecord) {
  4174  	ret.ref = bindings.NewNDEFRecordByNDEFRecord(
  4175  		js.Pointer(&recordInit))
  4176  	return
  4177  }
  4178  
  4179  type NDEFRecord struct {
  4180  	ref js.Ref
  4181  }
  4182  
  4183  func (this NDEFRecord) Once() NDEFRecord {
  4184  	this.ref.Once()
  4185  	return this
  4186  }
  4187  
  4188  func (this NDEFRecord) Ref() js.Ref {
  4189  	return this.ref
  4190  }
  4191  
  4192  func (this NDEFRecord) FromRef(ref js.Ref) NDEFRecord {
  4193  	this.ref = ref
  4194  	return this
  4195  }
  4196  
  4197  func (this NDEFRecord) Free() {
  4198  	this.ref.Free()
  4199  }
  4200  
  4201  // RecordType returns the value of property "NDEFRecord.recordType".
  4202  //
  4203  // It returns ok=false if there is no such property.
  4204  func (this NDEFRecord) RecordType() (ret js.String, ok bool) {
  4205  	ok = js.True == bindings.GetNDEFRecordRecordType(
  4206  		this.ref, js.Pointer(&ret),
  4207  	)
  4208  	return
  4209  }
  4210  
  4211  // MediaType returns the value of property "NDEFRecord.mediaType".
  4212  //
  4213  // It returns ok=false if there is no such property.
  4214  func (this NDEFRecord) MediaType() (ret js.String, ok bool) {
  4215  	ok = js.True == bindings.GetNDEFRecordMediaType(
  4216  		this.ref, js.Pointer(&ret),
  4217  	)
  4218  	return
  4219  }
  4220  
  4221  // Id returns the value of property "NDEFRecord.id".
  4222  //
  4223  // It returns ok=false if there is no such property.
  4224  func (this NDEFRecord) Id() (ret js.String, ok bool) {
  4225  	ok = js.True == bindings.GetNDEFRecordId(
  4226  		this.ref, js.Pointer(&ret),
  4227  	)
  4228  	return
  4229  }
  4230  
  4231  // Data returns the value of property "NDEFRecord.data".
  4232  //
  4233  // It returns ok=false if there is no such property.
  4234  func (this NDEFRecord) Data() (ret js.DataView, ok bool) {
  4235  	ok = js.True == bindings.GetNDEFRecordData(
  4236  		this.ref, js.Pointer(&ret),
  4237  	)
  4238  	return
  4239  }
  4240  
  4241  // Encoding returns the value of property "NDEFRecord.encoding".
  4242  //
  4243  // It returns ok=false if there is no such property.
  4244  func (this NDEFRecord) Encoding() (ret js.String, ok bool) {
  4245  	ok = js.True == bindings.GetNDEFRecordEncoding(
  4246  		this.ref, js.Pointer(&ret),
  4247  	)
  4248  	return
  4249  }
  4250  
  4251  // Lang returns the value of property "NDEFRecord.lang".
  4252  //
  4253  // It returns ok=false if there is no such property.
  4254  func (this NDEFRecord) Lang() (ret js.String, ok bool) {
  4255  	ok = js.True == bindings.GetNDEFRecordLang(
  4256  		this.ref, js.Pointer(&ret),
  4257  	)
  4258  	return
  4259  }
  4260  
  4261  // HasFuncToRecords returns true if the method "NDEFRecord.toRecords" exists.
  4262  func (this NDEFRecord) HasFuncToRecords() bool {
  4263  	return js.True == bindings.HasFuncNDEFRecordToRecords(
  4264  		this.ref,
  4265  	)
  4266  }
  4267  
  4268  // FuncToRecords returns the method "NDEFRecord.toRecords".
  4269  func (this NDEFRecord) FuncToRecords() (fn js.Func[func() js.Array[NDEFRecord]]) {
  4270  	bindings.FuncNDEFRecordToRecords(
  4271  		this.ref, js.Pointer(&fn),
  4272  	)
  4273  	return
  4274  }
  4275  
  4276  // ToRecords calls the method "NDEFRecord.toRecords".
  4277  func (this NDEFRecord) ToRecords() (ret js.Array[NDEFRecord]) {
  4278  	bindings.CallNDEFRecordToRecords(
  4279  		this.ref, js.Pointer(&ret),
  4280  	)
  4281  
  4282  	return
  4283  }
  4284  
  4285  // TryToRecords calls the method "NDEFRecord.toRecords"
  4286  // in a try/catch block and returns (_, err, ok = false) when it went through
  4287  // the catch clause.
  4288  func (this NDEFRecord) TryToRecords() (ret js.Array[NDEFRecord], exception js.Any, ok bool) {
  4289  	ok = js.True == bindings.TryNDEFRecordToRecords(
  4290  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4291  	)
  4292  
  4293  	return
  4294  }
  4295  
  4296  func NewNDEFMessage(messageInit NDEFMessageInit) (ret NDEFMessage) {
  4297  	ret.ref = bindings.NewNDEFMessageByNDEFMessage(
  4298  		js.Pointer(&messageInit))
  4299  	return
  4300  }
  4301  
  4302  type NDEFMessage struct {
  4303  	ref js.Ref
  4304  }
  4305  
  4306  func (this NDEFMessage) Once() NDEFMessage {
  4307  	this.ref.Once()
  4308  	return this
  4309  }
  4310  
  4311  func (this NDEFMessage) Ref() js.Ref {
  4312  	return this.ref
  4313  }
  4314  
  4315  func (this NDEFMessage) FromRef(ref js.Ref) NDEFMessage {
  4316  	this.ref = ref
  4317  	return this
  4318  }
  4319  
  4320  func (this NDEFMessage) Free() {
  4321  	this.ref.Free()
  4322  }
  4323  
  4324  // Records returns the value of property "NDEFMessage.records".
  4325  //
  4326  // It returns ok=false if there is no such property.
  4327  func (this NDEFMessage) Records() (ret js.FrozenArray[NDEFRecord], ok bool) {
  4328  	ok = js.True == bindings.GetNDEFMessageRecords(
  4329  		this.ref, js.Pointer(&ret),
  4330  	)
  4331  	return
  4332  }
  4333  
  4334  type OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit struct {
  4335  	ref js.Ref
  4336  }
  4337  
  4338  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) Ref() js.Ref {
  4339  	return x.ref
  4340  }
  4341  
  4342  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) Free() {
  4343  	x.ref.Free()
  4344  }
  4345  
  4346  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) FromRef(ref js.Ref) OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit {
  4347  	return OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit{
  4348  		ref: ref,
  4349  	}
  4350  }
  4351  
  4352  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) String() js.String {
  4353  	return js.String{}.FromRef(x.ref)
  4354  }
  4355  
  4356  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayInt8() js.TypedArray[int8] {
  4357  	return js.TypedArray[int8]{}.FromRef(x.ref)
  4358  }
  4359  
  4360  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayInt16() js.TypedArray[int16] {
  4361  	return js.TypedArray[int16]{}.FromRef(x.ref)
  4362  }
  4363  
  4364  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayInt32() js.TypedArray[int32] {
  4365  	return js.TypedArray[int32]{}.FromRef(x.ref)
  4366  }
  4367  
  4368  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayUint8() js.TypedArray[uint8] {
  4369  	return js.TypedArray[uint8]{}.FromRef(x.ref)
  4370  }
  4371  
  4372  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayUint16() js.TypedArray[uint16] {
  4373  	return js.TypedArray[uint16]{}.FromRef(x.ref)
  4374  }
  4375  
  4376  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayUint32() js.TypedArray[uint32] {
  4377  	return js.TypedArray[uint32]{}.FromRef(x.ref)
  4378  }
  4379  
  4380  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayInt64() js.TypedArray[int64] {
  4381  	return js.TypedArray[int64]{}.FromRef(x.ref)
  4382  }
  4383  
  4384  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayUint64() js.TypedArray[uint64] {
  4385  	return js.TypedArray[uint64]{}.FromRef(x.ref)
  4386  }
  4387  
  4388  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayFloat32() js.TypedArray[float32] {
  4389  	return js.TypedArray[float32]{}.FromRef(x.ref)
  4390  }
  4391  
  4392  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) TypedArrayFloat64() js.TypedArray[float64] {
  4393  	return js.TypedArray[float64]{}.FromRef(x.ref)
  4394  }
  4395  
  4396  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) DataView() js.DataView {
  4397  	return js.DataView{}.FromRef(x.ref)
  4398  }
  4399  
  4400  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) ArrayBuffer() js.ArrayBuffer {
  4401  	return js.ArrayBuffer{}.FromRef(x.ref)
  4402  }
  4403  
  4404  func (x OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit) NDEFMessageInit() NDEFMessageInit {
  4405  	var ret NDEFMessageInit
  4406  	ret.UpdateFrom(x.ref)
  4407  	return ret
  4408  }
  4409  
  4410  type NDEFMessageSource = OneOf_String_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_ArrayBuffer_NDEFMessageInit
  4411  
  4412  type NDEFScanOptions struct {
  4413  	// Signal is "NDEFScanOptions.signal"
  4414  	//
  4415  	// Optional
  4416  	Signal AbortSignal
  4417  
  4418  	FFI_USE bool
  4419  }
  4420  
  4421  // FromRef calls UpdateFrom and returns a NDEFScanOptions with all fields set.
  4422  func (p NDEFScanOptions) FromRef(ref js.Ref) NDEFScanOptions {
  4423  	p.UpdateFrom(ref)
  4424  	return p
  4425  }
  4426  
  4427  // New creates a new NDEFScanOptions in the application heap.
  4428  func (p NDEFScanOptions) New() js.Ref {
  4429  	return bindings.NDEFScanOptionsJSLoad(
  4430  		js.Pointer(&p), js.True, 0,
  4431  	)
  4432  }
  4433  
  4434  // UpdateFrom copies value of all fields of the heap object to p.
  4435  func (p *NDEFScanOptions) UpdateFrom(ref js.Ref) {
  4436  	bindings.NDEFScanOptionsJSStore(
  4437  		js.Pointer(p), ref,
  4438  	)
  4439  }
  4440  
  4441  // Update writes all fields of the p to the heap object referenced by ref.
  4442  func (p *NDEFScanOptions) Update(ref js.Ref) {
  4443  	bindings.NDEFScanOptionsJSLoad(
  4444  		js.Pointer(p), js.False, ref,
  4445  	)
  4446  }
  4447  
  4448  // FreeMembers frees fields with heap reference, if recursive is true
  4449  // free all heap references reachable from p.
  4450  func (p *NDEFScanOptions) FreeMembers(recursive bool) {
  4451  	js.Free(
  4452  		p.Signal.Ref(),
  4453  	)
  4454  	p.Signal = p.Signal.FromRef(js.Undefined)
  4455  }
  4456  
  4457  type NDEFWriteOptions struct {
  4458  	// Overwrite is "NDEFWriteOptions.overwrite"
  4459  	//
  4460  	// Optional, defaults to true.
  4461  	//
  4462  	// NOTE: FFI_USE_Overwrite MUST be set to true to make this field effective.
  4463  	Overwrite bool
  4464  	// Signal is "NDEFWriteOptions.signal"
  4465  	//
  4466  	// Optional
  4467  	Signal AbortSignal
  4468  
  4469  	FFI_USE_Overwrite bool // for Overwrite.
  4470  
  4471  	FFI_USE bool
  4472  }
  4473  
  4474  // FromRef calls UpdateFrom and returns a NDEFWriteOptions with all fields set.
  4475  func (p NDEFWriteOptions) FromRef(ref js.Ref) NDEFWriteOptions {
  4476  	p.UpdateFrom(ref)
  4477  	return p
  4478  }
  4479  
  4480  // New creates a new NDEFWriteOptions in the application heap.
  4481  func (p NDEFWriteOptions) New() js.Ref {
  4482  	return bindings.NDEFWriteOptionsJSLoad(
  4483  		js.Pointer(&p), js.True, 0,
  4484  	)
  4485  }
  4486  
  4487  // UpdateFrom copies value of all fields of the heap object to p.
  4488  func (p *NDEFWriteOptions) UpdateFrom(ref js.Ref) {
  4489  	bindings.NDEFWriteOptionsJSStore(
  4490  		js.Pointer(p), ref,
  4491  	)
  4492  }
  4493  
  4494  // Update writes all fields of the p to the heap object referenced by ref.
  4495  func (p *NDEFWriteOptions) Update(ref js.Ref) {
  4496  	bindings.NDEFWriteOptionsJSLoad(
  4497  		js.Pointer(p), js.False, ref,
  4498  	)
  4499  }
  4500  
  4501  // FreeMembers frees fields with heap reference, if recursive is true
  4502  // free all heap references reachable from p.
  4503  func (p *NDEFWriteOptions) FreeMembers(recursive bool) {
  4504  	js.Free(
  4505  		p.Signal.Ref(),
  4506  	)
  4507  	p.Signal = p.Signal.FromRef(js.Undefined)
  4508  }
  4509  
  4510  type NDEFReader struct {
  4511  	EventTarget
  4512  }
  4513  
  4514  func (this NDEFReader) Once() NDEFReader {
  4515  	this.ref.Once()
  4516  	return this
  4517  }
  4518  
  4519  func (this NDEFReader) Ref() js.Ref {
  4520  	return this.EventTarget.Ref()
  4521  }
  4522  
  4523  func (this NDEFReader) FromRef(ref js.Ref) NDEFReader {
  4524  	this.EventTarget = this.EventTarget.FromRef(ref)
  4525  	return this
  4526  }
  4527  
  4528  func (this NDEFReader) Free() {
  4529  	this.ref.Free()
  4530  }
  4531  
  4532  // HasFuncScan returns true if the method "NDEFReader.scan" exists.
  4533  func (this NDEFReader) HasFuncScan() bool {
  4534  	return js.True == bindings.HasFuncNDEFReaderScan(
  4535  		this.ref,
  4536  	)
  4537  }
  4538  
  4539  // FuncScan returns the method "NDEFReader.scan".
  4540  func (this NDEFReader) FuncScan() (fn js.Func[func(options NDEFScanOptions) js.Promise[js.Void]]) {
  4541  	bindings.FuncNDEFReaderScan(
  4542  		this.ref, js.Pointer(&fn),
  4543  	)
  4544  	return
  4545  }
  4546  
  4547  // Scan calls the method "NDEFReader.scan".
  4548  func (this NDEFReader) Scan(options NDEFScanOptions) (ret js.Promise[js.Void]) {
  4549  	bindings.CallNDEFReaderScan(
  4550  		this.ref, js.Pointer(&ret),
  4551  		js.Pointer(&options),
  4552  	)
  4553  
  4554  	return
  4555  }
  4556  
  4557  // TryScan calls the method "NDEFReader.scan"
  4558  // in a try/catch block and returns (_, err, ok = false) when it went through
  4559  // the catch clause.
  4560  func (this NDEFReader) TryScan(options NDEFScanOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  4561  	ok = js.True == bindings.TryNDEFReaderScan(
  4562  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4563  		js.Pointer(&options),
  4564  	)
  4565  
  4566  	return
  4567  }
  4568  
  4569  // HasFuncScan1 returns true if the method "NDEFReader.scan" exists.
  4570  func (this NDEFReader) HasFuncScan1() bool {
  4571  	return js.True == bindings.HasFuncNDEFReaderScan1(
  4572  		this.ref,
  4573  	)
  4574  }
  4575  
  4576  // FuncScan1 returns the method "NDEFReader.scan".
  4577  func (this NDEFReader) FuncScan1() (fn js.Func[func() js.Promise[js.Void]]) {
  4578  	bindings.FuncNDEFReaderScan1(
  4579  		this.ref, js.Pointer(&fn),
  4580  	)
  4581  	return
  4582  }
  4583  
  4584  // Scan1 calls the method "NDEFReader.scan".
  4585  func (this NDEFReader) Scan1() (ret js.Promise[js.Void]) {
  4586  	bindings.CallNDEFReaderScan1(
  4587  		this.ref, js.Pointer(&ret),
  4588  	)
  4589  
  4590  	return
  4591  }
  4592  
  4593  // TryScan1 calls the method "NDEFReader.scan"
  4594  // in a try/catch block and returns (_, err, ok = false) when it went through
  4595  // the catch clause.
  4596  func (this NDEFReader) TryScan1() (ret js.Promise[js.Void], exception js.Any, ok bool) {
  4597  	ok = js.True == bindings.TryNDEFReaderScan1(
  4598  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4599  	)
  4600  
  4601  	return
  4602  }
  4603  
  4604  // HasFuncWrite returns true if the method "NDEFReader.write" exists.
  4605  func (this NDEFReader) HasFuncWrite() bool {
  4606  	return js.True == bindings.HasFuncNDEFReaderWrite(
  4607  		this.ref,
  4608  	)
  4609  }
  4610  
  4611  // FuncWrite returns the method "NDEFReader.write".
  4612  func (this NDEFReader) FuncWrite() (fn js.Func[func(message NDEFMessageSource, options NDEFWriteOptions) js.Promise[js.Void]]) {
  4613  	bindings.FuncNDEFReaderWrite(
  4614  		this.ref, js.Pointer(&fn),
  4615  	)
  4616  	return
  4617  }
  4618  
  4619  // Write calls the method "NDEFReader.write".
  4620  func (this NDEFReader) Write(message NDEFMessageSource, options NDEFWriteOptions) (ret js.Promise[js.Void]) {
  4621  	bindings.CallNDEFReaderWrite(
  4622  		this.ref, js.Pointer(&ret),
  4623  		message.Ref(),
  4624  		js.Pointer(&options),
  4625  	)
  4626  
  4627  	return
  4628  }
  4629  
  4630  // TryWrite calls the method "NDEFReader.write"
  4631  // in a try/catch block and returns (_, err, ok = false) when it went through
  4632  // the catch clause.
  4633  func (this NDEFReader) TryWrite(message NDEFMessageSource, options NDEFWriteOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  4634  	ok = js.True == bindings.TryNDEFReaderWrite(
  4635  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4636  		message.Ref(),
  4637  		js.Pointer(&options),
  4638  	)
  4639  
  4640  	return
  4641  }
  4642  
  4643  // HasFuncWrite1 returns true if the method "NDEFReader.write" exists.
  4644  func (this NDEFReader) HasFuncWrite1() bool {
  4645  	return js.True == bindings.HasFuncNDEFReaderWrite1(
  4646  		this.ref,
  4647  	)
  4648  }
  4649  
  4650  // FuncWrite1 returns the method "NDEFReader.write".
  4651  func (this NDEFReader) FuncWrite1() (fn js.Func[func(message NDEFMessageSource) js.Promise[js.Void]]) {
  4652  	bindings.FuncNDEFReaderWrite1(
  4653  		this.ref, js.Pointer(&fn),
  4654  	)
  4655  	return
  4656  }
  4657  
  4658  // Write1 calls the method "NDEFReader.write".
  4659  func (this NDEFReader) Write1(message NDEFMessageSource) (ret js.Promise[js.Void]) {
  4660  	bindings.CallNDEFReaderWrite1(
  4661  		this.ref, js.Pointer(&ret),
  4662  		message.Ref(),
  4663  	)
  4664  
  4665  	return
  4666  }
  4667  
  4668  // TryWrite1 calls the method "NDEFReader.write"
  4669  // in a try/catch block and returns (_, err, ok = false) when it went through
  4670  // the catch clause.
  4671  func (this NDEFReader) TryWrite1(message NDEFMessageSource) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  4672  	ok = js.True == bindings.TryNDEFReaderWrite1(
  4673  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4674  		message.Ref(),
  4675  	)
  4676  
  4677  	return
  4678  }
  4679  
  4680  // HasFuncMakeReadOnly returns true if the method "NDEFReader.makeReadOnly" exists.
  4681  func (this NDEFReader) HasFuncMakeReadOnly() bool {
  4682  	return js.True == bindings.HasFuncNDEFReaderMakeReadOnly(
  4683  		this.ref,
  4684  	)
  4685  }
  4686  
  4687  // FuncMakeReadOnly returns the method "NDEFReader.makeReadOnly".
  4688  func (this NDEFReader) FuncMakeReadOnly() (fn js.Func[func(options NDEFMakeReadOnlyOptions) js.Promise[js.Void]]) {
  4689  	bindings.FuncNDEFReaderMakeReadOnly(
  4690  		this.ref, js.Pointer(&fn),
  4691  	)
  4692  	return
  4693  }
  4694  
  4695  // MakeReadOnly calls the method "NDEFReader.makeReadOnly".
  4696  func (this NDEFReader) MakeReadOnly(options NDEFMakeReadOnlyOptions) (ret js.Promise[js.Void]) {
  4697  	bindings.CallNDEFReaderMakeReadOnly(
  4698  		this.ref, js.Pointer(&ret),
  4699  		js.Pointer(&options),
  4700  	)
  4701  
  4702  	return
  4703  }
  4704  
  4705  // TryMakeReadOnly calls the method "NDEFReader.makeReadOnly"
  4706  // in a try/catch block and returns (_, err, ok = false) when it went through
  4707  // the catch clause.
  4708  func (this NDEFReader) TryMakeReadOnly(options NDEFMakeReadOnlyOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) {
  4709  	ok = js.True == bindings.TryNDEFReaderMakeReadOnly(
  4710  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4711  		js.Pointer(&options),
  4712  	)
  4713  
  4714  	return
  4715  }
  4716  
  4717  // HasFuncMakeReadOnly1 returns true if the method "NDEFReader.makeReadOnly" exists.
  4718  func (this NDEFReader) HasFuncMakeReadOnly1() bool {
  4719  	return js.True == bindings.HasFuncNDEFReaderMakeReadOnly1(
  4720  		this.ref,
  4721  	)
  4722  }
  4723  
  4724  // FuncMakeReadOnly1 returns the method "NDEFReader.makeReadOnly".
  4725  func (this NDEFReader) FuncMakeReadOnly1() (fn js.Func[func() js.Promise[js.Void]]) {
  4726  	bindings.FuncNDEFReaderMakeReadOnly1(
  4727  		this.ref, js.Pointer(&fn),
  4728  	)
  4729  	return
  4730  }
  4731  
  4732  // MakeReadOnly1 calls the method "NDEFReader.makeReadOnly".
  4733  func (this NDEFReader) MakeReadOnly1() (ret js.Promise[js.Void]) {
  4734  	bindings.CallNDEFReaderMakeReadOnly1(
  4735  		this.ref, js.Pointer(&ret),
  4736  	)
  4737  
  4738  	return
  4739  }
  4740  
  4741  // TryMakeReadOnly1 calls the method "NDEFReader.makeReadOnly"
  4742  // in a try/catch block and returns (_, err, ok = false) when it went through
  4743  // the catch clause.
  4744  func (this NDEFReader) TryMakeReadOnly1() (ret js.Promise[js.Void], exception js.Any, ok bool) {
  4745  	ok = js.True == bindings.TryNDEFReaderMakeReadOnly1(
  4746  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4747  	)
  4748  
  4749  	return
  4750  }
  4751  
  4752  type NDEFReadingEventInit struct {
  4753  	// SerialNumber is "NDEFReadingEventInit.serialNumber"
  4754  	//
  4755  	// Optional, defaults to "".
  4756  	SerialNumber js.String
  4757  	// Message is "NDEFReadingEventInit.message"
  4758  	//
  4759  	// Required
  4760  	//
  4761  	// NOTE: Message.FFI_USE MUST be set to true to get Message used.
  4762  	Message NDEFMessageInit
  4763  	// Bubbles is "NDEFReadingEventInit.bubbles"
  4764  	//
  4765  	// Optional, defaults to false.
  4766  	//
  4767  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  4768  	Bubbles bool
  4769  	// Cancelable is "NDEFReadingEventInit.cancelable"
  4770  	//
  4771  	// Optional, defaults to false.
  4772  	//
  4773  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  4774  	Cancelable bool
  4775  	// Composed is "NDEFReadingEventInit.composed"
  4776  	//
  4777  	// Optional, defaults to false.
  4778  	//
  4779  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  4780  	Composed bool
  4781  
  4782  	FFI_USE_Bubbles    bool // for Bubbles.
  4783  	FFI_USE_Cancelable bool // for Cancelable.
  4784  	FFI_USE_Composed   bool // for Composed.
  4785  
  4786  	FFI_USE bool
  4787  }
  4788  
  4789  // FromRef calls UpdateFrom and returns a NDEFReadingEventInit with all fields set.
  4790  func (p NDEFReadingEventInit) FromRef(ref js.Ref) NDEFReadingEventInit {
  4791  	p.UpdateFrom(ref)
  4792  	return p
  4793  }
  4794  
  4795  // New creates a new NDEFReadingEventInit in the application heap.
  4796  func (p NDEFReadingEventInit) New() js.Ref {
  4797  	return bindings.NDEFReadingEventInitJSLoad(
  4798  		js.Pointer(&p), js.True, 0,
  4799  	)
  4800  }
  4801  
  4802  // UpdateFrom copies value of all fields of the heap object to p.
  4803  func (p *NDEFReadingEventInit) UpdateFrom(ref js.Ref) {
  4804  	bindings.NDEFReadingEventInitJSStore(
  4805  		js.Pointer(p), ref,
  4806  	)
  4807  }
  4808  
  4809  // Update writes all fields of the p to the heap object referenced by ref.
  4810  func (p *NDEFReadingEventInit) Update(ref js.Ref) {
  4811  	bindings.NDEFReadingEventInitJSLoad(
  4812  		js.Pointer(p), js.False, ref,
  4813  	)
  4814  }
  4815  
  4816  // FreeMembers frees fields with heap reference, if recursive is true
  4817  // free all heap references reachable from p.
  4818  func (p *NDEFReadingEventInit) FreeMembers(recursive bool) {
  4819  	js.Free(
  4820  		p.SerialNumber.Ref(),
  4821  	)
  4822  	p.SerialNumber = p.SerialNumber.FromRef(js.Undefined)
  4823  	if recursive {
  4824  		p.Message.FreeMembers(true)
  4825  	}
  4826  }
  4827  
  4828  func NewNDEFReadingEvent(typ js.String, readingEventInitDict NDEFReadingEventInit) (ret NDEFReadingEvent) {
  4829  	ret.ref = bindings.NewNDEFReadingEventByNDEFReadingEvent(
  4830  		typ.Ref(),
  4831  		js.Pointer(&readingEventInitDict))
  4832  	return
  4833  }
  4834  
  4835  type NDEFReadingEvent struct {
  4836  	Event
  4837  }
  4838  
  4839  func (this NDEFReadingEvent) Once() NDEFReadingEvent {
  4840  	this.ref.Once()
  4841  	return this
  4842  }
  4843  
  4844  func (this NDEFReadingEvent) Ref() js.Ref {
  4845  	return this.Event.Ref()
  4846  }
  4847  
  4848  func (this NDEFReadingEvent) FromRef(ref js.Ref) NDEFReadingEvent {
  4849  	this.Event = this.Event.FromRef(ref)
  4850  	return this
  4851  }
  4852  
  4853  func (this NDEFReadingEvent) Free() {
  4854  	this.ref.Free()
  4855  }
  4856  
  4857  // SerialNumber returns the value of property "NDEFReadingEvent.serialNumber".
  4858  //
  4859  // It returns ok=false if there is no such property.
  4860  func (this NDEFReadingEvent) SerialNumber() (ret js.String, ok bool) {
  4861  	ok = js.True == bindings.GetNDEFReadingEventSerialNumber(
  4862  		this.ref, js.Pointer(&ret),
  4863  	)
  4864  	return
  4865  }
  4866  
  4867  // Message returns the value of property "NDEFReadingEvent.message".
  4868  //
  4869  // It returns ok=false if there is no such property.
  4870  func (this NDEFReadingEvent) Message() (ret NDEFMessage, ok bool) {
  4871  	ok = js.True == bindings.GetNDEFReadingEventMessage(
  4872  		this.ref, js.Pointer(&ret),
  4873  	)
  4874  	return
  4875  }
  4876  
  4877  type NamedFlow struct {
  4878  	EventTarget
  4879  }
  4880  
  4881  func (this NamedFlow) Once() NamedFlow {
  4882  	this.ref.Once()
  4883  	return this
  4884  }
  4885  
  4886  func (this NamedFlow) Ref() js.Ref {
  4887  	return this.EventTarget.Ref()
  4888  }
  4889  
  4890  func (this NamedFlow) FromRef(ref js.Ref) NamedFlow {
  4891  	this.EventTarget = this.EventTarget.FromRef(ref)
  4892  	return this
  4893  }
  4894  
  4895  func (this NamedFlow) Free() {
  4896  	this.ref.Free()
  4897  }
  4898  
  4899  // Name returns the value of property "NamedFlow.name".
  4900  //
  4901  // It returns ok=false if there is no such property.
  4902  func (this NamedFlow) Name() (ret js.String, ok bool) {
  4903  	ok = js.True == bindings.GetNamedFlowName(
  4904  		this.ref, js.Pointer(&ret),
  4905  	)
  4906  	return
  4907  }
  4908  
  4909  // Overset returns the value of property "NamedFlow.overset".
  4910  //
  4911  // It returns ok=false if there is no such property.
  4912  func (this NamedFlow) Overset() (ret bool, ok bool) {
  4913  	ok = js.True == bindings.GetNamedFlowOverset(
  4914  		this.ref, js.Pointer(&ret),
  4915  	)
  4916  	return
  4917  }
  4918  
  4919  // FirstEmptyRegionIndex returns the value of property "NamedFlow.firstEmptyRegionIndex".
  4920  //
  4921  // It returns ok=false if there is no such property.
  4922  func (this NamedFlow) FirstEmptyRegionIndex() (ret int16, ok bool) {
  4923  	ok = js.True == bindings.GetNamedFlowFirstEmptyRegionIndex(
  4924  		this.ref, js.Pointer(&ret),
  4925  	)
  4926  	return
  4927  }
  4928  
  4929  // HasFuncGetRegions returns true if the method "NamedFlow.getRegions" exists.
  4930  func (this NamedFlow) HasFuncGetRegions() bool {
  4931  	return js.True == bindings.HasFuncNamedFlowGetRegions(
  4932  		this.ref,
  4933  	)
  4934  }
  4935  
  4936  // FuncGetRegions returns the method "NamedFlow.getRegions".
  4937  func (this NamedFlow) FuncGetRegions() (fn js.Func[func() js.Array[Element]]) {
  4938  	bindings.FuncNamedFlowGetRegions(
  4939  		this.ref, js.Pointer(&fn),
  4940  	)
  4941  	return
  4942  }
  4943  
  4944  // GetRegions calls the method "NamedFlow.getRegions".
  4945  func (this NamedFlow) GetRegions() (ret js.Array[Element]) {
  4946  	bindings.CallNamedFlowGetRegions(
  4947  		this.ref, js.Pointer(&ret),
  4948  	)
  4949  
  4950  	return
  4951  }
  4952  
  4953  // TryGetRegions calls the method "NamedFlow.getRegions"
  4954  // in a try/catch block and returns (_, err, ok = false) when it went through
  4955  // the catch clause.
  4956  func (this NamedFlow) TryGetRegions() (ret js.Array[Element], exception js.Any, ok bool) {
  4957  	ok = js.True == bindings.TryNamedFlowGetRegions(
  4958  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4959  	)
  4960  
  4961  	return
  4962  }
  4963  
  4964  // HasFuncGetContent returns true if the method "NamedFlow.getContent" exists.
  4965  func (this NamedFlow) HasFuncGetContent() bool {
  4966  	return js.True == bindings.HasFuncNamedFlowGetContent(
  4967  		this.ref,
  4968  	)
  4969  }
  4970  
  4971  // FuncGetContent returns the method "NamedFlow.getContent".
  4972  func (this NamedFlow) FuncGetContent() (fn js.Func[func() js.Array[Node]]) {
  4973  	bindings.FuncNamedFlowGetContent(
  4974  		this.ref, js.Pointer(&fn),
  4975  	)
  4976  	return
  4977  }
  4978  
  4979  // GetContent calls the method "NamedFlow.getContent".
  4980  func (this NamedFlow) GetContent() (ret js.Array[Node]) {
  4981  	bindings.CallNamedFlowGetContent(
  4982  		this.ref, js.Pointer(&ret),
  4983  	)
  4984  
  4985  	return
  4986  }
  4987  
  4988  // TryGetContent calls the method "NamedFlow.getContent"
  4989  // in a try/catch block and returns (_, err, ok = false) when it went through
  4990  // the catch clause.
  4991  func (this NamedFlow) TryGetContent() (ret js.Array[Node], exception js.Any, ok bool) {
  4992  	ok = js.True == bindings.TryNamedFlowGetContent(
  4993  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  4994  	)
  4995  
  4996  	return
  4997  }
  4998  
  4999  // HasFuncGetRegionsByContent returns true if the method "NamedFlow.getRegionsByContent" exists.
  5000  func (this NamedFlow) HasFuncGetRegionsByContent() bool {
  5001  	return js.True == bindings.HasFuncNamedFlowGetRegionsByContent(
  5002  		this.ref,
  5003  	)
  5004  }
  5005  
  5006  // FuncGetRegionsByContent returns the method "NamedFlow.getRegionsByContent".
  5007  func (this NamedFlow) FuncGetRegionsByContent() (fn js.Func[func(node Node) js.Array[Element]]) {
  5008  	bindings.FuncNamedFlowGetRegionsByContent(
  5009  		this.ref, js.Pointer(&fn),
  5010  	)
  5011  	return
  5012  }
  5013  
  5014  // GetRegionsByContent calls the method "NamedFlow.getRegionsByContent".
  5015  func (this NamedFlow) GetRegionsByContent(node Node) (ret js.Array[Element]) {
  5016  	bindings.CallNamedFlowGetRegionsByContent(
  5017  		this.ref, js.Pointer(&ret),
  5018  		node.Ref(),
  5019  	)
  5020  
  5021  	return
  5022  }
  5023  
  5024  // TryGetRegionsByContent calls the method "NamedFlow.getRegionsByContent"
  5025  // in a try/catch block and returns (_, err, ok = false) when it went through
  5026  // the catch clause.
  5027  func (this NamedFlow) TryGetRegionsByContent(node Node) (ret js.Array[Element], exception js.Any, ok bool) {
  5028  	ok = js.True == bindings.TryNamedFlowGetRegionsByContent(
  5029  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  5030  		node.Ref(),
  5031  	)
  5032  
  5033  	return
  5034  }
  5035  
  5036  type NavigationDestination struct {
  5037  	ref js.Ref
  5038  }
  5039  
  5040  func (this NavigationDestination) Once() NavigationDestination {
  5041  	this.ref.Once()
  5042  	return this
  5043  }
  5044  
  5045  func (this NavigationDestination) Ref() js.Ref {
  5046  	return this.ref
  5047  }
  5048  
  5049  func (this NavigationDestination) FromRef(ref js.Ref) NavigationDestination {
  5050  	this.ref = ref
  5051  	return this
  5052  }
  5053  
  5054  func (this NavigationDestination) Free() {
  5055  	this.ref.Free()
  5056  }
  5057  
  5058  // Url returns the value of property "NavigationDestination.url".
  5059  //
  5060  // It returns ok=false if there is no such property.
  5061  func (this NavigationDestination) Url() (ret js.String, ok bool) {
  5062  	ok = js.True == bindings.GetNavigationDestinationUrl(
  5063  		this.ref, js.Pointer(&ret),
  5064  	)
  5065  	return
  5066  }
  5067  
  5068  // Key returns the value of property "NavigationDestination.key".
  5069  //
  5070  // It returns ok=false if there is no such property.
  5071  func (this NavigationDestination) Key() (ret js.String, ok bool) {
  5072  	ok = js.True == bindings.GetNavigationDestinationKey(
  5073  		this.ref, js.Pointer(&ret),
  5074  	)
  5075  	return
  5076  }
  5077  
  5078  // Id returns the value of property "NavigationDestination.id".
  5079  //
  5080  // It returns ok=false if there is no such property.
  5081  func (this NavigationDestination) Id() (ret js.String, ok bool) {
  5082  	ok = js.True == bindings.GetNavigationDestinationId(
  5083  		this.ref, js.Pointer(&ret),
  5084  	)
  5085  	return
  5086  }
  5087  
  5088  // Index returns the value of property "NavigationDestination.index".
  5089  //
  5090  // It returns ok=false if there is no such property.
  5091  func (this NavigationDestination) Index() (ret int64, ok bool) {
  5092  	ok = js.True == bindings.GetNavigationDestinationIndex(
  5093  		this.ref, js.Pointer(&ret),
  5094  	)
  5095  	return
  5096  }
  5097  
  5098  // SameDocument returns the value of property "NavigationDestination.sameDocument".
  5099  //
  5100  // It returns ok=false if there is no such property.
  5101  func (this NavigationDestination) SameDocument() (ret bool, ok bool) {
  5102  	ok = js.True == bindings.GetNavigationDestinationSameDocument(
  5103  		this.ref, js.Pointer(&ret),
  5104  	)
  5105  	return
  5106  }
  5107  
  5108  // HasFuncGetState returns true if the method "NavigationDestination.getState" exists.
  5109  func (this NavigationDestination) HasFuncGetState() bool {
  5110  	return js.True == bindings.HasFuncNavigationDestinationGetState(
  5111  		this.ref,
  5112  	)
  5113  }
  5114  
  5115  // FuncGetState returns the method "NavigationDestination.getState".
  5116  func (this NavigationDestination) FuncGetState() (fn js.Func[func() js.Any]) {
  5117  	bindings.FuncNavigationDestinationGetState(
  5118  		this.ref, js.Pointer(&fn),
  5119  	)
  5120  	return
  5121  }
  5122  
  5123  // GetState calls the method "NavigationDestination.getState".
  5124  func (this NavigationDestination) GetState() (ret js.Any) {
  5125  	bindings.CallNavigationDestinationGetState(
  5126  		this.ref, js.Pointer(&ret),
  5127  	)
  5128  
  5129  	return
  5130  }
  5131  
  5132  // TryGetState calls the method "NavigationDestination.getState"
  5133  // in a try/catch block and returns (_, err, ok = false) when it went through
  5134  // the catch clause.
  5135  func (this NavigationDestination) TryGetState() (ret js.Any, exception js.Any, ok bool) {
  5136  	ok = js.True == bindings.TryNavigationDestinationGetState(
  5137  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  5138  	)
  5139  
  5140  	return
  5141  }
  5142  
  5143  type NavigateEventInit struct {
  5144  	// NavigationType is "NavigateEventInit.navigationType"
  5145  	//
  5146  	// Optional, defaults to "push".
  5147  	NavigationType NavigationType
  5148  	// Destination is "NavigateEventInit.destination"
  5149  	//
  5150  	// Required
  5151  	Destination NavigationDestination
  5152  	// CanIntercept is "NavigateEventInit.canIntercept"
  5153  	//
  5154  	// Optional, defaults to false.
  5155  	//
  5156  	// NOTE: FFI_USE_CanIntercept MUST be set to true to make this field effective.
  5157  	CanIntercept bool
  5158  	// UserInitiated is "NavigateEventInit.userInitiated"
  5159  	//
  5160  	// Optional, defaults to false.
  5161  	//
  5162  	// NOTE: FFI_USE_UserInitiated MUST be set to true to make this field effective.
  5163  	UserInitiated bool
  5164  	// HashChange is "NavigateEventInit.hashChange"
  5165  	//
  5166  	// Optional, defaults to false.
  5167  	//
  5168  	// NOTE: FFI_USE_HashChange MUST be set to true to make this field effective.
  5169  	HashChange bool
  5170  	// Signal is "NavigateEventInit.signal"
  5171  	//
  5172  	// Required
  5173  	Signal AbortSignal
  5174  	// FormData is "NavigateEventInit.formData"
  5175  	//
  5176  	// Optional, defaults to null.
  5177  	FormData FormData
  5178  	// DownloadRequest is "NavigateEventInit.downloadRequest"
  5179  	//
  5180  	// Optional, defaults to null.
  5181  	DownloadRequest js.String
  5182  	// Info is "NavigateEventInit.info"
  5183  	//
  5184  	// Optional
  5185  	Info js.Any
  5186  	// HasUAVisualTransition is "NavigateEventInit.hasUAVisualTransition"
  5187  	//
  5188  	// Optional, defaults to false.
  5189  	//
  5190  	// NOTE: FFI_USE_HasUAVisualTransition MUST be set to true to make this field effective.
  5191  	HasUAVisualTransition bool
  5192  	// Bubbles is "NavigateEventInit.bubbles"
  5193  	//
  5194  	// Optional, defaults to false.
  5195  	//
  5196  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  5197  	Bubbles bool
  5198  	// Cancelable is "NavigateEventInit.cancelable"
  5199  	//
  5200  	// Optional, defaults to false.
  5201  	//
  5202  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  5203  	Cancelable bool
  5204  	// Composed is "NavigateEventInit.composed"
  5205  	//
  5206  	// Optional, defaults to false.
  5207  	//
  5208  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  5209  	Composed bool
  5210  
  5211  	FFI_USE_CanIntercept          bool // for CanIntercept.
  5212  	FFI_USE_UserInitiated         bool // for UserInitiated.
  5213  	FFI_USE_HashChange            bool // for HashChange.
  5214  	FFI_USE_HasUAVisualTransition bool // for HasUAVisualTransition.
  5215  	FFI_USE_Bubbles               bool // for Bubbles.
  5216  	FFI_USE_Cancelable            bool // for Cancelable.
  5217  	FFI_USE_Composed              bool // for Composed.
  5218  
  5219  	FFI_USE bool
  5220  }
  5221  
  5222  // FromRef calls UpdateFrom and returns a NavigateEventInit with all fields set.
  5223  func (p NavigateEventInit) FromRef(ref js.Ref) NavigateEventInit {
  5224  	p.UpdateFrom(ref)
  5225  	return p
  5226  }
  5227  
  5228  // New creates a new NavigateEventInit in the application heap.
  5229  func (p NavigateEventInit) New() js.Ref {
  5230  	return bindings.NavigateEventInitJSLoad(
  5231  		js.Pointer(&p), js.True, 0,
  5232  	)
  5233  }
  5234  
  5235  // UpdateFrom copies value of all fields of the heap object to p.
  5236  func (p *NavigateEventInit) UpdateFrom(ref js.Ref) {
  5237  	bindings.NavigateEventInitJSStore(
  5238  		js.Pointer(p), ref,
  5239  	)
  5240  }
  5241  
  5242  // Update writes all fields of the p to the heap object referenced by ref.
  5243  func (p *NavigateEventInit) Update(ref js.Ref) {
  5244  	bindings.NavigateEventInitJSLoad(
  5245  		js.Pointer(p), js.False, ref,
  5246  	)
  5247  }
  5248  
  5249  // FreeMembers frees fields with heap reference, if recursive is true
  5250  // free all heap references reachable from p.
  5251  func (p *NavigateEventInit) FreeMembers(recursive bool) {
  5252  	js.Free(
  5253  		p.Destination.Ref(),
  5254  		p.Signal.Ref(),
  5255  		p.FormData.Ref(),
  5256  		p.DownloadRequest.Ref(),
  5257  		p.Info.Ref(),
  5258  	)
  5259  	p.Destination = p.Destination.FromRef(js.Undefined)
  5260  	p.Signal = p.Signal.FromRef(js.Undefined)
  5261  	p.FormData = p.FormData.FromRef(js.Undefined)
  5262  	p.DownloadRequest = p.DownloadRequest.FromRef(js.Undefined)
  5263  	p.Info = p.Info.FromRef(js.Undefined)
  5264  }