github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis50_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package web 5 6 import ( 7 "github.com/primecitizens/pcz/std/core/abi" 8 "github.com/primecitizens/pcz/std/ffi/js" 9 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 10 ) 11 12 type RTCTrackEventInit struct { 13 // Receiver is "RTCTrackEventInit.receiver" 14 // 15 // Required 16 Receiver RTCRtpReceiver 17 // Track is "RTCTrackEventInit.track" 18 // 19 // Required 20 Track MediaStreamTrack 21 // Streams is "RTCTrackEventInit.streams" 22 // 23 // Optional, defaults to []. 24 Streams js.Array[MediaStream] 25 // Transceiver is "RTCTrackEventInit.transceiver" 26 // 27 // Required 28 Transceiver RTCRtpTransceiver 29 // Bubbles is "RTCTrackEventInit.bubbles" 30 // 31 // Optional, defaults to false. 32 // 33 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 34 Bubbles bool 35 // Cancelable is "RTCTrackEventInit.cancelable" 36 // 37 // Optional, defaults to false. 38 // 39 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 40 Cancelable bool 41 // Composed is "RTCTrackEventInit.composed" 42 // 43 // Optional, defaults to false. 44 // 45 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 46 Composed bool 47 48 FFI_USE_Bubbles bool // for Bubbles. 49 FFI_USE_Cancelable bool // for Cancelable. 50 FFI_USE_Composed bool // for Composed. 51 52 FFI_USE bool 53 } 54 55 // FromRef calls UpdateFrom and returns a RTCTrackEventInit with all fields set. 56 func (p RTCTrackEventInit) FromRef(ref js.Ref) RTCTrackEventInit { 57 p.UpdateFrom(ref) 58 return p 59 } 60 61 // New creates a new RTCTrackEventInit in the application heap. 62 func (p RTCTrackEventInit) New() js.Ref { 63 return bindings.RTCTrackEventInitJSLoad( 64 js.Pointer(&p), js.True, 0, 65 ) 66 } 67 68 // UpdateFrom copies value of all fields of the heap object to p. 69 func (p *RTCTrackEventInit) UpdateFrom(ref js.Ref) { 70 bindings.RTCTrackEventInitJSStore( 71 js.Pointer(p), ref, 72 ) 73 } 74 75 // Update writes all fields of the p to the heap object referenced by ref. 76 func (p *RTCTrackEventInit) Update(ref js.Ref) { 77 bindings.RTCTrackEventInitJSLoad( 78 js.Pointer(p), js.False, ref, 79 ) 80 } 81 82 // FreeMembers frees fields with heap reference, if recursive is true 83 // free all heap references reachable from p. 84 func (p *RTCTrackEventInit) FreeMembers(recursive bool) { 85 js.Free( 86 p.Receiver.Ref(), 87 p.Track.Ref(), 88 p.Streams.Ref(), 89 p.Transceiver.Ref(), 90 ) 91 p.Receiver = p.Receiver.FromRef(js.Undefined) 92 p.Track = p.Track.FromRef(js.Undefined) 93 p.Streams = p.Streams.FromRef(js.Undefined) 94 p.Transceiver = p.Transceiver.FromRef(js.Undefined) 95 } 96 97 func NewRTCTrackEvent(typ js.String, eventInitDict RTCTrackEventInit) (ret RTCTrackEvent) { 98 ret.ref = bindings.NewRTCTrackEventByRTCTrackEvent( 99 typ.Ref(), 100 js.Pointer(&eventInitDict)) 101 return 102 } 103 104 type RTCTrackEvent struct { 105 Event 106 } 107 108 func (this RTCTrackEvent) Once() RTCTrackEvent { 109 this.ref.Once() 110 return this 111 } 112 113 func (this RTCTrackEvent) Ref() js.Ref { 114 return this.Event.Ref() 115 } 116 117 func (this RTCTrackEvent) FromRef(ref js.Ref) RTCTrackEvent { 118 this.Event = this.Event.FromRef(ref) 119 return this 120 } 121 122 func (this RTCTrackEvent) Free() { 123 this.ref.Free() 124 } 125 126 // Receiver returns the value of property "RTCTrackEvent.receiver". 127 // 128 // It returns ok=false if there is no such property. 129 func (this RTCTrackEvent) Receiver() (ret RTCRtpReceiver, ok bool) { 130 ok = js.True == bindings.GetRTCTrackEventReceiver( 131 this.ref, js.Pointer(&ret), 132 ) 133 return 134 } 135 136 // Track returns the value of property "RTCTrackEvent.track". 137 // 138 // It returns ok=false if there is no such property. 139 func (this RTCTrackEvent) Track() (ret MediaStreamTrack, ok bool) { 140 ok = js.True == bindings.GetRTCTrackEventTrack( 141 this.ref, js.Pointer(&ret), 142 ) 143 return 144 } 145 146 // Streams returns the value of property "RTCTrackEvent.streams". 147 // 148 // It returns ok=false if there is no such property. 149 func (this RTCTrackEvent) Streams() (ret js.FrozenArray[MediaStream], ok bool) { 150 ok = js.True == bindings.GetRTCTrackEventStreams( 151 this.ref, js.Pointer(&ret), 152 ) 153 return 154 } 155 156 // Transceiver returns the value of property "RTCTrackEvent.transceiver". 157 // 158 // It returns ok=false if there is no such property. 159 func (this RTCTrackEvent) Transceiver() (ret RTCRtpTransceiver, ok bool) { 160 ok = js.True == bindings.GetRTCTrackEventTransceiver( 161 this.ref, js.Pointer(&ret), 162 ) 163 return 164 } 165 166 func NewRTCTransformEvent(typ js.String, eventInitDict EventInit) (ret RTCTransformEvent) { 167 ret.ref = bindings.NewRTCTransformEventByRTCTransformEvent( 168 typ.Ref(), 169 js.Pointer(&eventInitDict)) 170 return 171 } 172 173 func NewRTCTransformEventByRTCTransformEvent1(typ js.String) (ret RTCTransformEvent) { 174 ret.ref = bindings.NewRTCTransformEventByRTCTransformEvent1( 175 typ.Ref()) 176 return 177 } 178 179 type RTCTransformEvent struct { 180 Event 181 } 182 183 func (this RTCTransformEvent) Once() RTCTransformEvent { 184 this.ref.Once() 185 return this 186 } 187 188 func (this RTCTransformEvent) Ref() js.Ref { 189 return this.Event.Ref() 190 } 191 192 func (this RTCTransformEvent) FromRef(ref js.Ref) RTCTransformEvent { 193 this.Event = this.Event.FromRef(ref) 194 return this 195 } 196 197 func (this RTCTransformEvent) Free() { 198 this.ref.Free() 199 } 200 201 // Transformer returns the value of property "RTCTransformEvent.transformer". 202 // 203 // It returns ok=false if there is no such property. 204 func (this RTCTransformEvent) Transformer() (ret RTCRtpScriptTransformer, ok bool) { 205 ok = js.True == bindings.GetRTCTransformEventTransformer( 206 this.ref, js.Pointer(&ret), 207 ) 208 return 209 } 210 211 type RTCTransportStats struct { 212 // PacketsSent is "RTCTransportStats.packetsSent" 213 // 214 // Optional 215 // 216 // NOTE: FFI_USE_PacketsSent MUST be set to true to make this field effective. 217 PacketsSent uint64 218 // PacketsReceived is "RTCTransportStats.packetsReceived" 219 // 220 // Optional 221 // 222 // NOTE: FFI_USE_PacketsReceived MUST be set to true to make this field effective. 223 PacketsReceived uint64 224 // BytesSent is "RTCTransportStats.bytesSent" 225 // 226 // Optional 227 // 228 // NOTE: FFI_USE_BytesSent MUST be set to true to make this field effective. 229 BytesSent uint64 230 // BytesReceived is "RTCTransportStats.bytesReceived" 231 // 232 // Optional 233 // 234 // NOTE: FFI_USE_BytesReceived MUST be set to true to make this field effective. 235 BytesReceived uint64 236 // IceRole is "RTCTransportStats.iceRole" 237 // 238 // Optional 239 IceRole RTCIceRole 240 // IceLocalUsernameFragment is "RTCTransportStats.iceLocalUsernameFragment" 241 // 242 // Optional 243 IceLocalUsernameFragment js.String 244 // DtlsState is "RTCTransportStats.dtlsState" 245 // 246 // Required 247 DtlsState RTCDtlsTransportState 248 // IceState is "RTCTransportStats.iceState" 249 // 250 // Optional 251 IceState RTCIceTransportState 252 // SelectedCandidatePairId is "RTCTransportStats.selectedCandidatePairId" 253 // 254 // Optional 255 SelectedCandidatePairId js.String 256 // LocalCertificateId is "RTCTransportStats.localCertificateId" 257 // 258 // Optional 259 LocalCertificateId js.String 260 // RemoteCertificateId is "RTCTransportStats.remoteCertificateId" 261 // 262 // Optional 263 RemoteCertificateId js.String 264 // TlsVersion is "RTCTransportStats.tlsVersion" 265 // 266 // Optional 267 TlsVersion js.String 268 // DtlsCipher is "RTCTransportStats.dtlsCipher" 269 // 270 // Optional 271 DtlsCipher js.String 272 // DtlsRole is "RTCTransportStats.dtlsRole" 273 // 274 // Optional 275 DtlsRole RTCDtlsRole 276 // SrtpCipher is "RTCTransportStats.srtpCipher" 277 // 278 // Optional 279 SrtpCipher js.String 280 // SelectedCandidatePairChanges is "RTCTransportStats.selectedCandidatePairChanges" 281 // 282 // Optional 283 // 284 // NOTE: FFI_USE_SelectedCandidatePairChanges MUST be set to true to make this field effective. 285 SelectedCandidatePairChanges uint32 286 // Timestamp is "RTCTransportStats.timestamp" 287 // 288 // Required 289 Timestamp DOMHighResTimeStamp 290 // Type is "RTCTransportStats.type" 291 // 292 // Required 293 Type RTCStatsType 294 // Id is "RTCTransportStats.id" 295 // 296 // Required 297 Id js.String 298 299 FFI_USE_PacketsSent bool // for PacketsSent. 300 FFI_USE_PacketsReceived bool // for PacketsReceived. 301 FFI_USE_BytesSent bool // for BytesSent. 302 FFI_USE_BytesReceived bool // for BytesReceived. 303 FFI_USE_SelectedCandidatePairChanges bool // for SelectedCandidatePairChanges. 304 305 FFI_USE bool 306 } 307 308 // FromRef calls UpdateFrom and returns a RTCTransportStats with all fields set. 309 func (p RTCTransportStats) FromRef(ref js.Ref) RTCTransportStats { 310 p.UpdateFrom(ref) 311 return p 312 } 313 314 // New creates a new RTCTransportStats in the application heap. 315 func (p RTCTransportStats) New() js.Ref { 316 return bindings.RTCTransportStatsJSLoad( 317 js.Pointer(&p), js.True, 0, 318 ) 319 } 320 321 // UpdateFrom copies value of all fields of the heap object to p. 322 func (p *RTCTransportStats) UpdateFrom(ref js.Ref) { 323 bindings.RTCTransportStatsJSStore( 324 js.Pointer(p), ref, 325 ) 326 } 327 328 // Update writes all fields of the p to the heap object referenced by ref. 329 func (p *RTCTransportStats) Update(ref js.Ref) { 330 bindings.RTCTransportStatsJSLoad( 331 js.Pointer(p), js.False, ref, 332 ) 333 } 334 335 // FreeMembers frees fields with heap reference, if recursive is true 336 // free all heap references reachable from p. 337 func (p *RTCTransportStats) FreeMembers(recursive bool) { 338 js.Free( 339 p.IceLocalUsernameFragment.Ref(), 340 p.SelectedCandidatePairId.Ref(), 341 p.LocalCertificateId.Ref(), 342 p.RemoteCertificateId.Ref(), 343 p.TlsVersion.Ref(), 344 p.DtlsCipher.Ref(), 345 p.SrtpCipher.Ref(), 346 p.Id.Ref(), 347 ) 348 p.IceLocalUsernameFragment = p.IceLocalUsernameFragment.FromRef(js.Undefined) 349 p.SelectedCandidatePairId = p.SelectedCandidatePairId.FromRef(js.Undefined) 350 p.LocalCertificateId = p.LocalCertificateId.FromRef(js.Undefined) 351 p.RemoteCertificateId = p.RemoteCertificateId.FromRef(js.Undefined) 352 p.TlsVersion = p.TlsVersion.FromRef(js.Undefined) 353 p.DtlsCipher = p.DtlsCipher.FromRef(js.Undefined) 354 p.SrtpCipher = p.SrtpCipher.FromRef(js.Undefined) 355 p.Id = p.Id.FromRef(js.Undefined) 356 } 357 358 type RTCVideoSourceStats struct { 359 // Width is "RTCVideoSourceStats.width" 360 // 361 // Optional 362 // 363 // NOTE: FFI_USE_Width MUST be set to true to make this field effective. 364 Width uint32 365 // Height is "RTCVideoSourceStats.height" 366 // 367 // Optional 368 // 369 // NOTE: FFI_USE_Height MUST be set to true to make this field effective. 370 Height uint32 371 // Frames is "RTCVideoSourceStats.frames" 372 // 373 // Optional 374 // 375 // NOTE: FFI_USE_Frames MUST be set to true to make this field effective. 376 Frames uint32 377 // FramesPerSecond is "RTCVideoSourceStats.framesPerSecond" 378 // 379 // Optional 380 // 381 // NOTE: FFI_USE_FramesPerSecond MUST be set to true to make this field effective. 382 FramesPerSecond float64 383 // TrackIdentifier is "RTCVideoSourceStats.trackIdentifier" 384 // 385 // Required 386 TrackIdentifier js.String 387 // Kind is "RTCVideoSourceStats.kind" 388 // 389 // Required 390 Kind js.String 391 // Timestamp is "RTCVideoSourceStats.timestamp" 392 // 393 // Required 394 Timestamp DOMHighResTimeStamp 395 // Type is "RTCVideoSourceStats.type" 396 // 397 // Required 398 Type RTCStatsType 399 // Id is "RTCVideoSourceStats.id" 400 // 401 // Required 402 Id js.String 403 404 FFI_USE_Width bool // for Width. 405 FFI_USE_Height bool // for Height. 406 FFI_USE_Frames bool // for Frames. 407 FFI_USE_FramesPerSecond bool // for FramesPerSecond. 408 409 FFI_USE bool 410 } 411 412 // FromRef calls UpdateFrom and returns a RTCVideoSourceStats with all fields set. 413 func (p RTCVideoSourceStats) FromRef(ref js.Ref) RTCVideoSourceStats { 414 p.UpdateFrom(ref) 415 return p 416 } 417 418 // New creates a new RTCVideoSourceStats in the application heap. 419 func (p RTCVideoSourceStats) New() js.Ref { 420 return bindings.RTCVideoSourceStatsJSLoad( 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 *RTCVideoSourceStats) UpdateFrom(ref js.Ref) { 427 bindings.RTCVideoSourceStatsJSStore( 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 *RTCVideoSourceStats) Update(ref js.Ref) { 434 bindings.RTCVideoSourceStatsJSLoad( 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 *RTCVideoSourceStats) FreeMembers(recursive bool) { 442 js.Free( 443 p.TrackIdentifier.Ref(), 444 p.Kind.Ref(), 445 p.Id.Ref(), 446 ) 447 p.TrackIdentifier = p.TrackIdentifier.FromRef(js.Undefined) 448 p.Kind = p.Kind.FromRef(js.Undefined) 449 p.Id = p.Id.FromRef(js.Undefined) 450 } 451 452 type ReadableStreamBYOBRequest struct { 453 ref js.Ref 454 } 455 456 func (this ReadableStreamBYOBRequest) Once() ReadableStreamBYOBRequest { 457 this.ref.Once() 458 return this 459 } 460 461 func (this ReadableStreamBYOBRequest) Ref() js.Ref { 462 return this.ref 463 } 464 465 func (this ReadableStreamBYOBRequest) FromRef(ref js.Ref) ReadableStreamBYOBRequest { 466 this.ref = ref 467 return this 468 } 469 470 func (this ReadableStreamBYOBRequest) Free() { 471 this.ref.Free() 472 } 473 474 // View returns the value of property "ReadableStreamBYOBRequest.view". 475 // 476 // It returns ok=false if there is no such property. 477 func (this ReadableStreamBYOBRequest) View() (ret js.ArrayBufferView, ok bool) { 478 ok = js.True == bindings.GetReadableStreamBYOBRequestView( 479 this.ref, js.Pointer(&ret), 480 ) 481 return 482 } 483 484 // HasFuncRespond returns true if the method "ReadableStreamBYOBRequest.respond" exists. 485 func (this ReadableStreamBYOBRequest) HasFuncRespond() bool { 486 return js.True == bindings.HasFuncReadableStreamBYOBRequestRespond( 487 this.ref, 488 ) 489 } 490 491 // FuncRespond returns the method "ReadableStreamBYOBRequest.respond". 492 func (this ReadableStreamBYOBRequest) FuncRespond() (fn js.Func[func(bytesWritten uint64)]) { 493 bindings.FuncReadableStreamBYOBRequestRespond( 494 this.ref, js.Pointer(&fn), 495 ) 496 return 497 } 498 499 // Respond calls the method "ReadableStreamBYOBRequest.respond". 500 func (this ReadableStreamBYOBRequest) Respond(bytesWritten uint64) (ret js.Void) { 501 bindings.CallReadableStreamBYOBRequestRespond( 502 this.ref, js.Pointer(&ret), 503 float64(bytesWritten), 504 ) 505 506 return 507 } 508 509 // TryRespond calls the method "ReadableStreamBYOBRequest.respond" 510 // in a try/catch block and returns (_, err, ok = false) when it went through 511 // the catch clause. 512 func (this ReadableStreamBYOBRequest) TryRespond(bytesWritten uint64) (ret js.Void, exception js.Any, ok bool) { 513 ok = js.True == bindings.TryReadableStreamBYOBRequestRespond( 514 this.ref, js.Pointer(&ret), js.Pointer(&exception), 515 float64(bytesWritten), 516 ) 517 518 return 519 } 520 521 // HasFuncRespondWithNewView returns true if the method "ReadableStreamBYOBRequest.respondWithNewView" exists. 522 func (this ReadableStreamBYOBRequest) HasFuncRespondWithNewView() bool { 523 return js.True == bindings.HasFuncReadableStreamBYOBRequestRespondWithNewView( 524 this.ref, 525 ) 526 } 527 528 // FuncRespondWithNewView returns the method "ReadableStreamBYOBRequest.respondWithNewView". 529 func (this ReadableStreamBYOBRequest) FuncRespondWithNewView() (fn js.Func[func(view js.ArrayBufferView)]) { 530 bindings.FuncReadableStreamBYOBRequestRespondWithNewView( 531 this.ref, js.Pointer(&fn), 532 ) 533 return 534 } 535 536 // RespondWithNewView calls the method "ReadableStreamBYOBRequest.respondWithNewView". 537 func (this ReadableStreamBYOBRequest) RespondWithNewView(view js.ArrayBufferView) (ret js.Void) { 538 bindings.CallReadableStreamBYOBRequestRespondWithNewView( 539 this.ref, js.Pointer(&ret), 540 view.Ref(), 541 ) 542 543 return 544 } 545 546 // TryRespondWithNewView calls the method "ReadableStreamBYOBRequest.respondWithNewView" 547 // in a try/catch block and returns (_, err, ok = false) when it went through 548 // the catch clause. 549 func (this ReadableStreamBYOBRequest) TryRespondWithNewView(view js.ArrayBufferView) (ret js.Void, exception js.Any, ok bool) { 550 ok = js.True == bindings.TryReadableStreamBYOBRequestRespondWithNewView( 551 this.ref, js.Pointer(&ret), js.Pointer(&exception), 552 view.Ref(), 553 ) 554 555 return 556 } 557 558 type ReadableByteStreamController struct { 559 ref js.Ref 560 } 561 562 func (this ReadableByteStreamController) Once() ReadableByteStreamController { 563 this.ref.Once() 564 return this 565 } 566 567 func (this ReadableByteStreamController) Ref() js.Ref { 568 return this.ref 569 } 570 571 func (this ReadableByteStreamController) FromRef(ref js.Ref) ReadableByteStreamController { 572 this.ref = ref 573 return this 574 } 575 576 func (this ReadableByteStreamController) Free() { 577 this.ref.Free() 578 } 579 580 // ByobRequest returns the value of property "ReadableByteStreamController.byobRequest". 581 // 582 // It returns ok=false if there is no such property. 583 func (this ReadableByteStreamController) ByobRequest() (ret ReadableStreamBYOBRequest, ok bool) { 584 ok = js.True == bindings.GetReadableByteStreamControllerByobRequest( 585 this.ref, js.Pointer(&ret), 586 ) 587 return 588 } 589 590 // DesiredSize returns the value of property "ReadableByteStreamController.desiredSize". 591 // 592 // It returns ok=false if there is no such property. 593 func (this ReadableByteStreamController) DesiredSize() (ret float64, ok bool) { 594 ok = js.True == bindings.GetReadableByteStreamControllerDesiredSize( 595 this.ref, js.Pointer(&ret), 596 ) 597 return 598 } 599 600 // HasFuncClose returns true if the method "ReadableByteStreamController.close" exists. 601 func (this ReadableByteStreamController) HasFuncClose() bool { 602 return js.True == bindings.HasFuncReadableByteStreamControllerClose( 603 this.ref, 604 ) 605 } 606 607 // FuncClose returns the method "ReadableByteStreamController.close". 608 func (this ReadableByteStreamController) FuncClose() (fn js.Func[func()]) { 609 bindings.FuncReadableByteStreamControllerClose( 610 this.ref, js.Pointer(&fn), 611 ) 612 return 613 } 614 615 // Close calls the method "ReadableByteStreamController.close". 616 func (this ReadableByteStreamController) Close() (ret js.Void) { 617 bindings.CallReadableByteStreamControllerClose( 618 this.ref, js.Pointer(&ret), 619 ) 620 621 return 622 } 623 624 // TryClose calls the method "ReadableByteStreamController.close" 625 // in a try/catch block and returns (_, err, ok = false) when it went through 626 // the catch clause. 627 func (this ReadableByteStreamController) TryClose() (ret js.Void, exception js.Any, ok bool) { 628 ok = js.True == bindings.TryReadableByteStreamControllerClose( 629 this.ref, js.Pointer(&ret), js.Pointer(&exception), 630 ) 631 632 return 633 } 634 635 // HasFuncEnqueue returns true if the method "ReadableByteStreamController.enqueue" exists. 636 func (this ReadableByteStreamController) HasFuncEnqueue() bool { 637 return js.True == bindings.HasFuncReadableByteStreamControllerEnqueue( 638 this.ref, 639 ) 640 } 641 642 // FuncEnqueue returns the method "ReadableByteStreamController.enqueue". 643 func (this ReadableByteStreamController) FuncEnqueue() (fn js.Func[func(chunk js.ArrayBufferView)]) { 644 bindings.FuncReadableByteStreamControllerEnqueue( 645 this.ref, js.Pointer(&fn), 646 ) 647 return 648 } 649 650 // Enqueue calls the method "ReadableByteStreamController.enqueue". 651 func (this ReadableByteStreamController) Enqueue(chunk js.ArrayBufferView) (ret js.Void) { 652 bindings.CallReadableByteStreamControllerEnqueue( 653 this.ref, js.Pointer(&ret), 654 chunk.Ref(), 655 ) 656 657 return 658 } 659 660 // TryEnqueue calls the method "ReadableByteStreamController.enqueue" 661 // in a try/catch block and returns (_, err, ok = false) when it went through 662 // the catch clause. 663 func (this ReadableByteStreamController) TryEnqueue(chunk js.ArrayBufferView) (ret js.Void, exception js.Any, ok bool) { 664 ok = js.True == bindings.TryReadableByteStreamControllerEnqueue( 665 this.ref, js.Pointer(&ret), js.Pointer(&exception), 666 chunk.Ref(), 667 ) 668 669 return 670 } 671 672 // HasFuncError returns true if the method "ReadableByteStreamController.error" exists. 673 func (this ReadableByteStreamController) HasFuncError() bool { 674 return js.True == bindings.HasFuncReadableByteStreamControllerError( 675 this.ref, 676 ) 677 } 678 679 // FuncError returns the method "ReadableByteStreamController.error". 680 func (this ReadableByteStreamController) FuncError() (fn js.Func[func(e js.Any)]) { 681 bindings.FuncReadableByteStreamControllerError( 682 this.ref, js.Pointer(&fn), 683 ) 684 return 685 } 686 687 // Error calls the method "ReadableByteStreamController.error". 688 func (this ReadableByteStreamController) Error(e js.Any) (ret js.Void) { 689 bindings.CallReadableByteStreamControllerError( 690 this.ref, js.Pointer(&ret), 691 e.Ref(), 692 ) 693 694 return 695 } 696 697 // TryError calls the method "ReadableByteStreamController.error" 698 // in a try/catch block and returns (_, err, ok = false) when it went through 699 // the catch clause. 700 func (this ReadableByteStreamController) TryError(e js.Any) (ret js.Void, exception js.Any, ok bool) { 701 ok = js.True == bindings.TryReadableByteStreamControllerError( 702 this.ref, js.Pointer(&ret), js.Pointer(&exception), 703 e.Ref(), 704 ) 705 706 return 707 } 708 709 // HasFuncError1 returns true if the method "ReadableByteStreamController.error" exists. 710 func (this ReadableByteStreamController) HasFuncError1() bool { 711 return js.True == bindings.HasFuncReadableByteStreamControllerError1( 712 this.ref, 713 ) 714 } 715 716 // FuncError1 returns the method "ReadableByteStreamController.error". 717 func (this ReadableByteStreamController) FuncError1() (fn js.Func[func()]) { 718 bindings.FuncReadableByteStreamControllerError1( 719 this.ref, js.Pointer(&fn), 720 ) 721 return 722 } 723 724 // Error1 calls the method "ReadableByteStreamController.error". 725 func (this ReadableByteStreamController) Error1() (ret js.Void) { 726 bindings.CallReadableByteStreamControllerError1( 727 this.ref, js.Pointer(&ret), 728 ) 729 730 return 731 } 732 733 // TryError1 calls the method "ReadableByteStreamController.error" 734 // in a try/catch block and returns (_, err, ok = false) when it went through 735 // the catch clause. 736 func (this ReadableByteStreamController) TryError1() (ret js.Void, exception js.Any, ok bool) { 737 ok = js.True == bindings.TryReadableByteStreamControllerError1( 738 this.ref, js.Pointer(&ret), js.Pointer(&exception), 739 ) 740 741 return 742 } 743 744 type ReadableStreamDefaultController struct { 745 ref js.Ref 746 } 747 748 func (this ReadableStreamDefaultController) Once() ReadableStreamDefaultController { 749 this.ref.Once() 750 return this 751 } 752 753 func (this ReadableStreamDefaultController) Ref() js.Ref { 754 return this.ref 755 } 756 757 func (this ReadableStreamDefaultController) FromRef(ref js.Ref) ReadableStreamDefaultController { 758 this.ref = ref 759 return this 760 } 761 762 func (this ReadableStreamDefaultController) Free() { 763 this.ref.Free() 764 } 765 766 // DesiredSize returns the value of property "ReadableStreamDefaultController.desiredSize". 767 // 768 // It returns ok=false if there is no such property. 769 func (this ReadableStreamDefaultController) DesiredSize() (ret float64, ok bool) { 770 ok = js.True == bindings.GetReadableStreamDefaultControllerDesiredSize( 771 this.ref, js.Pointer(&ret), 772 ) 773 return 774 } 775 776 // HasFuncClose returns true if the method "ReadableStreamDefaultController.close" exists. 777 func (this ReadableStreamDefaultController) HasFuncClose() bool { 778 return js.True == bindings.HasFuncReadableStreamDefaultControllerClose( 779 this.ref, 780 ) 781 } 782 783 // FuncClose returns the method "ReadableStreamDefaultController.close". 784 func (this ReadableStreamDefaultController) FuncClose() (fn js.Func[func()]) { 785 bindings.FuncReadableStreamDefaultControllerClose( 786 this.ref, js.Pointer(&fn), 787 ) 788 return 789 } 790 791 // Close calls the method "ReadableStreamDefaultController.close". 792 func (this ReadableStreamDefaultController) Close() (ret js.Void) { 793 bindings.CallReadableStreamDefaultControllerClose( 794 this.ref, js.Pointer(&ret), 795 ) 796 797 return 798 } 799 800 // TryClose calls the method "ReadableStreamDefaultController.close" 801 // in a try/catch block and returns (_, err, ok = false) when it went through 802 // the catch clause. 803 func (this ReadableStreamDefaultController) TryClose() (ret js.Void, exception js.Any, ok bool) { 804 ok = js.True == bindings.TryReadableStreamDefaultControllerClose( 805 this.ref, js.Pointer(&ret), js.Pointer(&exception), 806 ) 807 808 return 809 } 810 811 // HasFuncEnqueue returns true if the method "ReadableStreamDefaultController.enqueue" exists. 812 func (this ReadableStreamDefaultController) HasFuncEnqueue() bool { 813 return js.True == bindings.HasFuncReadableStreamDefaultControllerEnqueue( 814 this.ref, 815 ) 816 } 817 818 // FuncEnqueue returns the method "ReadableStreamDefaultController.enqueue". 819 func (this ReadableStreamDefaultController) FuncEnqueue() (fn js.Func[func(chunk js.Any)]) { 820 bindings.FuncReadableStreamDefaultControllerEnqueue( 821 this.ref, js.Pointer(&fn), 822 ) 823 return 824 } 825 826 // Enqueue calls the method "ReadableStreamDefaultController.enqueue". 827 func (this ReadableStreamDefaultController) Enqueue(chunk js.Any) (ret js.Void) { 828 bindings.CallReadableStreamDefaultControllerEnqueue( 829 this.ref, js.Pointer(&ret), 830 chunk.Ref(), 831 ) 832 833 return 834 } 835 836 // TryEnqueue calls the method "ReadableStreamDefaultController.enqueue" 837 // in a try/catch block and returns (_, err, ok = false) when it went through 838 // the catch clause. 839 func (this ReadableStreamDefaultController) TryEnqueue(chunk js.Any) (ret js.Void, exception js.Any, ok bool) { 840 ok = js.True == bindings.TryReadableStreamDefaultControllerEnqueue( 841 this.ref, js.Pointer(&ret), js.Pointer(&exception), 842 chunk.Ref(), 843 ) 844 845 return 846 } 847 848 // HasFuncEnqueue1 returns true if the method "ReadableStreamDefaultController.enqueue" exists. 849 func (this ReadableStreamDefaultController) HasFuncEnqueue1() bool { 850 return js.True == bindings.HasFuncReadableStreamDefaultControllerEnqueue1( 851 this.ref, 852 ) 853 } 854 855 // FuncEnqueue1 returns the method "ReadableStreamDefaultController.enqueue". 856 func (this ReadableStreamDefaultController) FuncEnqueue1() (fn js.Func[func()]) { 857 bindings.FuncReadableStreamDefaultControllerEnqueue1( 858 this.ref, js.Pointer(&fn), 859 ) 860 return 861 } 862 863 // Enqueue1 calls the method "ReadableStreamDefaultController.enqueue". 864 func (this ReadableStreamDefaultController) Enqueue1() (ret js.Void) { 865 bindings.CallReadableStreamDefaultControllerEnqueue1( 866 this.ref, js.Pointer(&ret), 867 ) 868 869 return 870 } 871 872 // TryEnqueue1 calls the method "ReadableStreamDefaultController.enqueue" 873 // in a try/catch block and returns (_, err, ok = false) when it went through 874 // the catch clause. 875 func (this ReadableStreamDefaultController) TryEnqueue1() (ret js.Void, exception js.Any, ok bool) { 876 ok = js.True == bindings.TryReadableStreamDefaultControllerEnqueue1( 877 this.ref, js.Pointer(&ret), js.Pointer(&exception), 878 ) 879 880 return 881 } 882 883 // HasFuncError returns true if the method "ReadableStreamDefaultController.error" exists. 884 func (this ReadableStreamDefaultController) HasFuncError() bool { 885 return js.True == bindings.HasFuncReadableStreamDefaultControllerError( 886 this.ref, 887 ) 888 } 889 890 // FuncError returns the method "ReadableStreamDefaultController.error". 891 func (this ReadableStreamDefaultController) FuncError() (fn js.Func[func(e js.Any)]) { 892 bindings.FuncReadableStreamDefaultControllerError( 893 this.ref, js.Pointer(&fn), 894 ) 895 return 896 } 897 898 // Error calls the method "ReadableStreamDefaultController.error". 899 func (this ReadableStreamDefaultController) Error(e js.Any) (ret js.Void) { 900 bindings.CallReadableStreamDefaultControllerError( 901 this.ref, js.Pointer(&ret), 902 e.Ref(), 903 ) 904 905 return 906 } 907 908 // TryError calls the method "ReadableStreamDefaultController.error" 909 // in a try/catch block and returns (_, err, ok = false) when it went through 910 // the catch clause. 911 func (this ReadableStreamDefaultController) TryError(e js.Any) (ret js.Void, exception js.Any, ok bool) { 912 ok = js.True == bindings.TryReadableStreamDefaultControllerError( 913 this.ref, js.Pointer(&ret), js.Pointer(&exception), 914 e.Ref(), 915 ) 916 917 return 918 } 919 920 // HasFuncError1 returns true if the method "ReadableStreamDefaultController.error" exists. 921 func (this ReadableStreamDefaultController) HasFuncError1() bool { 922 return js.True == bindings.HasFuncReadableStreamDefaultControllerError1( 923 this.ref, 924 ) 925 } 926 927 // FuncError1 returns the method "ReadableStreamDefaultController.error". 928 func (this ReadableStreamDefaultController) FuncError1() (fn js.Func[func()]) { 929 bindings.FuncReadableStreamDefaultControllerError1( 930 this.ref, js.Pointer(&fn), 931 ) 932 return 933 } 934 935 // Error1 calls the method "ReadableStreamDefaultController.error". 936 func (this ReadableStreamDefaultController) Error1() (ret js.Void) { 937 bindings.CallReadableStreamDefaultControllerError1( 938 this.ref, js.Pointer(&ret), 939 ) 940 941 return 942 } 943 944 // TryError1 calls the method "ReadableStreamDefaultController.error" 945 // in a try/catch block and returns (_, err, ok = false) when it went through 946 // the catch clause. 947 func (this ReadableStreamDefaultController) TryError1() (ret js.Void, exception js.Any, ok bool) { 948 ok = js.True == bindings.TryReadableStreamDefaultControllerError1( 949 this.ref, js.Pointer(&ret), js.Pointer(&exception), 950 ) 951 952 return 953 } 954 955 type OneOf_ReadableStreamDefaultController_ReadableByteStreamController struct { 956 ref js.Ref 957 } 958 959 func (x OneOf_ReadableStreamDefaultController_ReadableByteStreamController) Ref() js.Ref { 960 return x.ref 961 } 962 963 func (x OneOf_ReadableStreamDefaultController_ReadableByteStreamController) Free() { 964 x.ref.Free() 965 } 966 967 func (x OneOf_ReadableStreamDefaultController_ReadableByteStreamController) FromRef(ref js.Ref) OneOf_ReadableStreamDefaultController_ReadableByteStreamController { 968 return OneOf_ReadableStreamDefaultController_ReadableByteStreamController{ 969 ref: ref, 970 } 971 } 972 973 func (x OneOf_ReadableStreamDefaultController_ReadableByteStreamController) ReadableStreamDefaultController() ReadableStreamDefaultController { 974 return ReadableStreamDefaultController{}.FromRef(x.ref) 975 } 976 977 func (x OneOf_ReadableStreamDefaultController_ReadableByteStreamController) ReadableByteStreamController() ReadableByteStreamController { 978 return ReadableByteStreamController{}.FromRef(x.ref) 979 } 980 981 type ReadableStreamController = OneOf_ReadableStreamDefaultController_ReadableByteStreamController 982 983 type ReadableStreamIteratorOptions struct { 984 // PreventCancel is "ReadableStreamIteratorOptions.preventCancel" 985 // 986 // Optional, defaults to false. 987 // 988 // NOTE: FFI_USE_PreventCancel MUST be set to true to make this field effective. 989 PreventCancel bool 990 991 FFI_USE_PreventCancel bool // for PreventCancel. 992 993 FFI_USE bool 994 } 995 996 // FromRef calls UpdateFrom and returns a ReadableStreamIteratorOptions with all fields set. 997 func (p ReadableStreamIteratorOptions) FromRef(ref js.Ref) ReadableStreamIteratorOptions { 998 p.UpdateFrom(ref) 999 return p 1000 } 1001 1002 // New creates a new ReadableStreamIteratorOptions in the application heap. 1003 func (p ReadableStreamIteratorOptions) New() js.Ref { 1004 return bindings.ReadableStreamIteratorOptionsJSLoad( 1005 js.Pointer(&p), js.True, 0, 1006 ) 1007 } 1008 1009 // UpdateFrom copies value of all fields of the heap object to p. 1010 func (p *ReadableStreamIteratorOptions) UpdateFrom(ref js.Ref) { 1011 bindings.ReadableStreamIteratorOptionsJSStore( 1012 js.Pointer(p), ref, 1013 ) 1014 } 1015 1016 // Update writes all fields of the p to the heap object referenced by ref. 1017 func (p *ReadableStreamIteratorOptions) Update(ref js.Ref) { 1018 bindings.ReadableStreamIteratorOptionsJSLoad( 1019 js.Pointer(p), js.False, ref, 1020 ) 1021 } 1022 1023 // FreeMembers frees fields with heap reference, if recursive is true 1024 // free all heap references reachable from p. 1025 func (p *ReadableStreamIteratorOptions) FreeMembers(recursive bool) { 1026 } 1027 1028 type ReadableStreamType uint32 1029 1030 const ( 1031 _ ReadableStreamType = iota 1032 1033 ReadableStreamType_BYTES 1034 ) 1035 1036 func (ReadableStreamType) FromRef(str js.Ref) ReadableStreamType { 1037 return ReadableStreamType(bindings.ConstOfReadableStreamType(str)) 1038 } 1039 1040 func (x ReadableStreamType) String() (string, bool) { 1041 switch x { 1042 case ReadableStreamType_BYTES: 1043 return "bytes", true 1044 default: 1045 return "", false 1046 } 1047 } 1048 1049 type RelativeOrientationReadingValues struct { 1050 // Quaternion is "RelativeOrientationReadingValues.quaternion" 1051 // 1052 // Required 1053 Quaternion js.FrozenArray[float64] 1054 1055 FFI_USE bool 1056 } 1057 1058 // FromRef calls UpdateFrom and returns a RelativeOrientationReadingValues with all fields set. 1059 func (p RelativeOrientationReadingValues) FromRef(ref js.Ref) RelativeOrientationReadingValues { 1060 p.UpdateFrom(ref) 1061 return p 1062 } 1063 1064 // New creates a new RelativeOrientationReadingValues in the application heap. 1065 func (p RelativeOrientationReadingValues) New() js.Ref { 1066 return bindings.RelativeOrientationReadingValuesJSLoad( 1067 js.Pointer(&p), js.True, 0, 1068 ) 1069 } 1070 1071 // UpdateFrom copies value of all fields of the heap object to p. 1072 func (p *RelativeOrientationReadingValues) UpdateFrom(ref js.Ref) { 1073 bindings.RelativeOrientationReadingValuesJSStore( 1074 js.Pointer(p), ref, 1075 ) 1076 } 1077 1078 // Update writes all fields of the p to the heap object referenced by ref. 1079 func (p *RelativeOrientationReadingValues) Update(ref js.Ref) { 1080 bindings.RelativeOrientationReadingValuesJSLoad( 1081 js.Pointer(p), js.False, ref, 1082 ) 1083 } 1084 1085 // FreeMembers frees fields with heap reference, if recursive is true 1086 // free all heap references reachable from p. 1087 func (p *RelativeOrientationReadingValues) FreeMembers(recursive bool) { 1088 js.Free( 1089 p.Quaternion.Ref(), 1090 ) 1091 p.Quaternion = p.Quaternion.FromRef(js.Undefined) 1092 } 1093 1094 func NewRelativeOrientationSensor(sensorOptions OrientationSensorOptions) (ret RelativeOrientationSensor) { 1095 ret.ref = bindings.NewRelativeOrientationSensorByRelativeOrientationSensor( 1096 js.Pointer(&sensorOptions)) 1097 return 1098 } 1099 1100 func NewRelativeOrientationSensorByRelativeOrientationSensor1() (ret RelativeOrientationSensor) { 1101 ret.ref = bindings.NewRelativeOrientationSensorByRelativeOrientationSensor1() 1102 return 1103 } 1104 1105 type RelativeOrientationSensor struct { 1106 OrientationSensor 1107 } 1108 1109 func (this RelativeOrientationSensor) Once() RelativeOrientationSensor { 1110 this.ref.Once() 1111 return this 1112 } 1113 1114 func (this RelativeOrientationSensor) Ref() js.Ref { 1115 return this.OrientationSensor.Ref() 1116 } 1117 1118 func (this RelativeOrientationSensor) FromRef(ref js.Ref) RelativeOrientationSensor { 1119 this.OrientationSensor = this.OrientationSensor.FromRef(ref) 1120 return this 1121 } 1122 1123 func (this RelativeOrientationSensor) Free() { 1124 this.ref.Free() 1125 } 1126 1127 type ReportBody struct { 1128 ref js.Ref 1129 } 1130 1131 func (this ReportBody) Once() ReportBody { 1132 this.ref.Once() 1133 return this 1134 } 1135 1136 func (this ReportBody) Ref() js.Ref { 1137 return this.ref 1138 } 1139 1140 func (this ReportBody) FromRef(ref js.Ref) ReportBody { 1141 this.ref = ref 1142 return this 1143 } 1144 1145 func (this ReportBody) Free() { 1146 this.ref.Free() 1147 } 1148 1149 // HasFuncToJSON returns true if the method "ReportBody.toJSON" exists. 1150 func (this ReportBody) HasFuncToJSON() bool { 1151 return js.True == bindings.HasFuncReportBodyToJSON( 1152 this.ref, 1153 ) 1154 } 1155 1156 // FuncToJSON returns the method "ReportBody.toJSON". 1157 func (this ReportBody) FuncToJSON() (fn js.Func[func() js.Object]) { 1158 bindings.FuncReportBodyToJSON( 1159 this.ref, js.Pointer(&fn), 1160 ) 1161 return 1162 } 1163 1164 // ToJSON calls the method "ReportBody.toJSON". 1165 func (this ReportBody) ToJSON() (ret js.Object) { 1166 bindings.CallReportBodyToJSON( 1167 this.ref, js.Pointer(&ret), 1168 ) 1169 1170 return 1171 } 1172 1173 // TryToJSON calls the method "ReportBody.toJSON" 1174 // in a try/catch block and returns (_, err, ok = false) when it went through 1175 // the catch clause. 1176 func (this ReportBody) TryToJSON() (ret js.Object, exception js.Any, ok bool) { 1177 ok = js.True == bindings.TryReportBodyToJSON( 1178 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1179 ) 1180 1181 return 1182 } 1183 1184 type Report struct { 1185 ref js.Ref 1186 } 1187 1188 func (this Report) Once() Report { 1189 this.ref.Once() 1190 return this 1191 } 1192 1193 func (this Report) Ref() js.Ref { 1194 return this.ref 1195 } 1196 1197 func (this Report) FromRef(ref js.Ref) Report { 1198 this.ref = ref 1199 return this 1200 } 1201 1202 func (this Report) Free() { 1203 this.ref.Free() 1204 } 1205 1206 // Type returns the value of property "Report.type". 1207 // 1208 // It returns ok=false if there is no such property. 1209 func (this Report) Type() (ret js.String, ok bool) { 1210 ok = js.True == bindings.GetReportType( 1211 this.ref, js.Pointer(&ret), 1212 ) 1213 return 1214 } 1215 1216 // Url returns the value of property "Report.url". 1217 // 1218 // It returns ok=false if there is no such property. 1219 func (this Report) Url() (ret js.String, ok bool) { 1220 ok = js.True == bindings.GetReportUrl( 1221 this.ref, js.Pointer(&ret), 1222 ) 1223 return 1224 } 1225 1226 // Body returns the value of property "Report.body". 1227 // 1228 // It returns ok=false if there is no such property. 1229 func (this Report) Body() (ret ReportBody, ok bool) { 1230 ok = js.True == bindings.GetReportBody( 1231 this.ref, js.Pointer(&ret), 1232 ) 1233 return 1234 } 1235 1236 // HasFuncToJSON returns true if the method "Report.toJSON" exists. 1237 func (this Report) HasFuncToJSON() bool { 1238 return js.True == bindings.HasFuncReportToJSON( 1239 this.ref, 1240 ) 1241 } 1242 1243 // FuncToJSON returns the method "Report.toJSON". 1244 func (this Report) FuncToJSON() (fn js.Func[func() js.Object]) { 1245 bindings.FuncReportToJSON( 1246 this.ref, js.Pointer(&fn), 1247 ) 1248 return 1249 } 1250 1251 // ToJSON calls the method "Report.toJSON". 1252 func (this Report) ToJSON() (ret js.Object) { 1253 bindings.CallReportToJSON( 1254 this.ref, js.Pointer(&ret), 1255 ) 1256 1257 return 1258 } 1259 1260 // TryToJSON calls the method "Report.toJSON" 1261 // in a try/catch block and returns (_, err, ok = false) when it went through 1262 // the catch clause. 1263 func (this Report) TryToJSON() (ret js.Object, exception js.Any, ok bool) { 1264 ok = js.True == bindings.TryReportToJSON( 1265 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1266 ) 1267 1268 return 1269 } 1270 1271 type ReportList = js.Array[Report] 1272 1273 type ReportResultBrowserSignals struct { 1274 // Desirability is "ReportResultBrowserSignals.desirability" 1275 // 1276 // Required 1277 Desirability float64 1278 // TopLevelSellerSignals is "ReportResultBrowserSignals.topLevelSellerSignals" 1279 // 1280 // Optional 1281 TopLevelSellerSignals js.String 1282 // ModifiedBid is "ReportResultBrowserSignals.modifiedBid" 1283 // 1284 // Optional 1285 // 1286 // NOTE: FFI_USE_ModifiedBid MUST be set to true to make this field effective. 1287 ModifiedBid float64 1288 // DataVersion is "ReportResultBrowserSignals.dataVersion" 1289 // 1290 // Optional 1291 // 1292 // NOTE: FFI_USE_DataVersion MUST be set to true to make this field effective. 1293 DataVersion uint32 1294 // TopWindowHostname is "ReportResultBrowserSignals.topWindowHostname" 1295 // 1296 // Required 1297 TopWindowHostname js.String 1298 // InterestGroupOwner is "ReportResultBrowserSignals.interestGroupOwner" 1299 // 1300 // Required 1301 InterestGroupOwner js.String 1302 // RenderURL is "ReportResultBrowserSignals.renderURL" 1303 // 1304 // Required 1305 RenderURL js.String 1306 // Bid is "ReportResultBrowserSignals.bid" 1307 // 1308 // Required 1309 Bid float64 1310 // HighestScoringOtherBid is "ReportResultBrowserSignals.highestScoringOtherBid" 1311 // 1312 // Required 1313 HighestScoringOtherBid float64 1314 // BidCurrency is "ReportResultBrowserSignals.bidCurrency" 1315 // 1316 // Optional 1317 BidCurrency js.String 1318 // HighestScoringOtherBidCurrency is "ReportResultBrowserSignals.highestScoringOtherBidCurrency" 1319 // 1320 // Optional 1321 HighestScoringOtherBidCurrency js.String 1322 // TopLevelSeller is "ReportResultBrowserSignals.topLevelSeller" 1323 // 1324 // Optional 1325 TopLevelSeller js.String 1326 // ComponentSeller is "ReportResultBrowserSignals.componentSeller" 1327 // 1328 // Optional 1329 ComponentSeller js.String 1330 // BuyerAndSellerReportingId is "ReportResultBrowserSignals.buyerAndSellerReportingId" 1331 // 1332 // Optional 1333 BuyerAndSellerReportingId js.String 1334 1335 FFI_USE_ModifiedBid bool // for ModifiedBid. 1336 FFI_USE_DataVersion bool // for DataVersion. 1337 1338 FFI_USE bool 1339 } 1340 1341 // FromRef calls UpdateFrom and returns a ReportResultBrowserSignals with all fields set. 1342 func (p ReportResultBrowserSignals) FromRef(ref js.Ref) ReportResultBrowserSignals { 1343 p.UpdateFrom(ref) 1344 return p 1345 } 1346 1347 // New creates a new ReportResultBrowserSignals in the application heap. 1348 func (p ReportResultBrowserSignals) New() js.Ref { 1349 return bindings.ReportResultBrowserSignalsJSLoad( 1350 js.Pointer(&p), js.True, 0, 1351 ) 1352 } 1353 1354 // UpdateFrom copies value of all fields of the heap object to p. 1355 func (p *ReportResultBrowserSignals) UpdateFrom(ref js.Ref) { 1356 bindings.ReportResultBrowserSignalsJSStore( 1357 js.Pointer(p), ref, 1358 ) 1359 } 1360 1361 // Update writes all fields of the p to the heap object referenced by ref. 1362 func (p *ReportResultBrowserSignals) Update(ref js.Ref) { 1363 bindings.ReportResultBrowserSignalsJSLoad( 1364 js.Pointer(p), js.False, ref, 1365 ) 1366 } 1367 1368 // FreeMembers frees fields with heap reference, if recursive is true 1369 // free all heap references reachable from p. 1370 func (p *ReportResultBrowserSignals) FreeMembers(recursive bool) { 1371 js.Free( 1372 p.TopLevelSellerSignals.Ref(), 1373 p.TopWindowHostname.Ref(), 1374 p.InterestGroupOwner.Ref(), 1375 p.RenderURL.Ref(), 1376 p.BidCurrency.Ref(), 1377 p.HighestScoringOtherBidCurrency.Ref(), 1378 p.TopLevelSeller.Ref(), 1379 p.ComponentSeller.Ref(), 1380 p.BuyerAndSellerReportingId.Ref(), 1381 ) 1382 p.TopLevelSellerSignals = p.TopLevelSellerSignals.FromRef(js.Undefined) 1383 p.TopWindowHostname = p.TopWindowHostname.FromRef(js.Undefined) 1384 p.InterestGroupOwner = p.InterestGroupOwner.FromRef(js.Undefined) 1385 p.RenderURL = p.RenderURL.FromRef(js.Undefined) 1386 p.BidCurrency = p.BidCurrency.FromRef(js.Undefined) 1387 p.HighestScoringOtherBidCurrency = p.HighestScoringOtherBidCurrency.FromRef(js.Undefined) 1388 p.TopLevelSeller = p.TopLevelSeller.FromRef(js.Undefined) 1389 p.ComponentSeller = p.ComponentSeller.FromRef(js.Undefined) 1390 p.BuyerAndSellerReportingId = p.BuyerAndSellerReportingId.FromRef(js.Undefined) 1391 } 1392 1393 type ReportWinBrowserSignals struct { 1394 // AdCost is "ReportWinBrowserSignals.adCost" 1395 // 1396 // Optional 1397 // 1398 // NOTE: FFI_USE_AdCost MUST be set to true to make this field effective. 1399 AdCost float64 1400 // Seller is "ReportWinBrowserSignals.seller" 1401 // 1402 // Optional 1403 Seller js.String 1404 // MadeHighestScoringOtherBid is "ReportWinBrowserSignals.madeHighestScoringOtherBid" 1405 // 1406 // Optional 1407 // 1408 // NOTE: FFI_USE_MadeHighestScoringOtherBid MUST be set to true to make this field effective. 1409 MadeHighestScoringOtherBid bool 1410 // InterestGroupName is "ReportWinBrowserSignals.interestGroupName" 1411 // 1412 // Optional 1413 InterestGroupName js.String 1414 // BuyerReportingId is "ReportWinBrowserSignals.buyerReportingId" 1415 // 1416 // Optional 1417 BuyerReportingId js.String 1418 // ModelingSignals is "ReportWinBrowserSignals.modelingSignals" 1419 // 1420 // Optional 1421 // 1422 // NOTE: FFI_USE_ModelingSignals MUST be set to true to make this field effective. 1423 ModelingSignals uint16 1424 // DataVersion is "ReportWinBrowserSignals.dataVersion" 1425 // 1426 // Optional 1427 // 1428 // NOTE: FFI_USE_DataVersion MUST be set to true to make this field effective. 1429 DataVersion uint32 1430 // TopWindowHostname is "ReportWinBrowserSignals.topWindowHostname" 1431 // 1432 // Required 1433 TopWindowHostname js.String 1434 // InterestGroupOwner is "ReportWinBrowserSignals.interestGroupOwner" 1435 // 1436 // Required 1437 InterestGroupOwner js.String 1438 // RenderURL is "ReportWinBrowserSignals.renderURL" 1439 // 1440 // Required 1441 RenderURL js.String 1442 // Bid is "ReportWinBrowserSignals.bid" 1443 // 1444 // Required 1445 Bid float64 1446 // HighestScoringOtherBid is "ReportWinBrowserSignals.highestScoringOtherBid" 1447 // 1448 // Required 1449 HighestScoringOtherBid float64 1450 // BidCurrency is "ReportWinBrowserSignals.bidCurrency" 1451 // 1452 // Optional 1453 BidCurrency js.String 1454 // HighestScoringOtherBidCurrency is "ReportWinBrowserSignals.highestScoringOtherBidCurrency" 1455 // 1456 // Optional 1457 HighestScoringOtherBidCurrency js.String 1458 // TopLevelSeller is "ReportWinBrowserSignals.topLevelSeller" 1459 // 1460 // Optional 1461 TopLevelSeller js.String 1462 // ComponentSeller is "ReportWinBrowserSignals.componentSeller" 1463 // 1464 // Optional 1465 ComponentSeller js.String 1466 // BuyerAndSellerReportingId is "ReportWinBrowserSignals.buyerAndSellerReportingId" 1467 // 1468 // Optional 1469 BuyerAndSellerReportingId js.String 1470 1471 FFI_USE_AdCost bool // for AdCost. 1472 FFI_USE_MadeHighestScoringOtherBid bool // for MadeHighestScoringOtherBid. 1473 FFI_USE_ModelingSignals bool // for ModelingSignals. 1474 FFI_USE_DataVersion bool // for DataVersion. 1475 1476 FFI_USE bool 1477 } 1478 1479 // FromRef calls UpdateFrom and returns a ReportWinBrowserSignals with all fields set. 1480 func (p ReportWinBrowserSignals) FromRef(ref js.Ref) ReportWinBrowserSignals { 1481 p.UpdateFrom(ref) 1482 return p 1483 } 1484 1485 // New creates a new ReportWinBrowserSignals in the application heap. 1486 func (p ReportWinBrowserSignals) New() js.Ref { 1487 return bindings.ReportWinBrowserSignalsJSLoad( 1488 js.Pointer(&p), js.True, 0, 1489 ) 1490 } 1491 1492 // UpdateFrom copies value of all fields of the heap object to p. 1493 func (p *ReportWinBrowserSignals) UpdateFrom(ref js.Ref) { 1494 bindings.ReportWinBrowserSignalsJSStore( 1495 js.Pointer(p), ref, 1496 ) 1497 } 1498 1499 // Update writes all fields of the p to the heap object referenced by ref. 1500 func (p *ReportWinBrowserSignals) Update(ref js.Ref) { 1501 bindings.ReportWinBrowserSignalsJSLoad( 1502 js.Pointer(p), js.False, ref, 1503 ) 1504 } 1505 1506 // FreeMembers frees fields with heap reference, if recursive is true 1507 // free all heap references reachable from p. 1508 func (p *ReportWinBrowserSignals) FreeMembers(recursive bool) { 1509 js.Free( 1510 p.Seller.Ref(), 1511 p.InterestGroupName.Ref(), 1512 p.BuyerReportingId.Ref(), 1513 p.TopWindowHostname.Ref(), 1514 p.InterestGroupOwner.Ref(), 1515 p.RenderURL.Ref(), 1516 p.BidCurrency.Ref(), 1517 p.HighestScoringOtherBidCurrency.Ref(), 1518 p.TopLevelSeller.Ref(), 1519 p.ComponentSeller.Ref(), 1520 p.BuyerAndSellerReportingId.Ref(), 1521 ) 1522 p.Seller = p.Seller.FromRef(js.Undefined) 1523 p.InterestGroupName = p.InterestGroupName.FromRef(js.Undefined) 1524 p.BuyerReportingId = p.BuyerReportingId.FromRef(js.Undefined) 1525 p.TopWindowHostname = p.TopWindowHostname.FromRef(js.Undefined) 1526 p.InterestGroupOwner = p.InterestGroupOwner.FromRef(js.Undefined) 1527 p.RenderURL = p.RenderURL.FromRef(js.Undefined) 1528 p.BidCurrency = p.BidCurrency.FromRef(js.Undefined) 1529 p.HighestScoringOtherBidCurrency = p.HighestScoringOtherBidCurrency.FromRef(js.Undefined) 1530 p.TopLevelSeller = p.TopLevelSeller.FromRef(js.Undefined) 1531 p.ComponentSeller = p.ComponentSeller.FromRef(js.Undefined) 1532 p.BuyerAndSellerReportingId = p.BuyerAndSellerReportingId.FromRef(js.Undefined) 1533 } 1534 1535 type ReportingBrowserSignals struct { 1536 // TopWindowHostname is "ReportingBrowserSignals.topWindowHostname" 1537 // 1538 // Required 1539 TopWindowHostname js.String 1540 // InterestGroupOwner is "ReportingBrowserSignals.interestGroupOwner" 1541 // 1542 // Required 1543 InterestGroupOwner js.String 1544 // RenderURL is "ReportingBrowserSignals.renderURL" 1545 // 1546 // Required 1547 RenderURL js.String 1548 // Bid is "ReportingBrowserSignals.bid" 1549 // 1550 // Required 1551 Bid float64 1552 // HighestScoringOtherBid is "ReportingBrowserSignals.highestScoringOtherBid" 1553 // 1554 // Required 1555 HighestScoringOtherBid float64 1556 // BidCurrency is "ReportingBrowserSignals.bidCurrency" 1557 // 1558 // Optional 1559 BidCurrency js.String 1560 // HighestScoringOtherBidCurrency is "ReportingBrowserSignals.highestScoringOtherBidCurrency" 1561 // 1562 // Optional 1563 HighestScoringOtherBidCurrency js.String 1564 // TopLevelSeller is "ReportingBrowserSignals.topLevelSeller" 1565 // 1566 // Optional 1567 TopLevelSeller js.String 1568 // ComponentSeller is "ReportingBrowserSignals.componentSeller" 1569 // 1570 // Optional 1571 ComponentSeller js.String 1572 // BuyerAndSellerReportingId is "ReportingBrowserSignals.buyerAndSellerReportingId" 1573 // 1574 // Optional 1575 BuyerAndSellerReportingId js.String 1576 1577 FFI_USE bool 1578 } 1579 1580 // FromRef calls UpdateFrom and returns a ReportingBrowserSignals with all fields set. 1581 func (p ReportingBrowserSignals) FromRef(ref js.Ref) ReportingBrowserSignals { 1582 p.UpdateFrom(ref) 1583 return p 1584 } 1585 1586 // New creates a new ReportingBrowserSignals in the application heap. 1587 func (p ReportingBrowserSignals) New() js.Ref { 1588 return bindings.ReportingBrowserSignalsJSLoad( 1589 js.Pointer(&p), js.True, 0, 1590 ) 1591 } 1592 1593 // UpdateFrom copies value of all fields of the heap object to p. 1594 func (p *ReportingBrowserSignals) UpdateFrom(ref js.Ref) { 1595 bindings.ReportingBrowserSignalsJSStore( 1596 js.Pointer(p), ref, 1597 ) 1598 } 1599 1600 // Update writes all fields of the p to the heap object referenced by ref. 1601 func (p *ReportingBrowserSignals) Update(ref js.Ref) { 1602 bindings.ReportingBrowserSignalsJSLoad( 1603 js.Pointer(p), js.False, ref, 1604 ) 1605 } 1606 1607 // FreeMembers frees fields with heap reference, if recursive is true 1608 // free all heap references reachable from p. 1609 func (p *ReportingBrowserSignals) FreeMembers(recursive bool) { 1610 js.Free( 1611 p.TopWindowHostname.Ref(), 1612 p.InterestGroupOwner.Ref(), 1613 p.RenderURL.Ref(), 1614 p.BidCurrency.Ref(), 1615 p.HighestScoringOtherBidCurrency.Ref(), 1616 p.TopLevelSeller.Ref(), 1617 p.ComponentSeller.Ref(), 1618 p.BuyerAndSellerReportingId.Ref(), 1619 ) 1620 p.TopWindowHostname = p.TopWindowHostname.FromRef(js.Undefined) 1621 p.InterestGroupOwner = p.InterestGroupOwner.FromRef(js.Undefined) 1622 p.RenderURL = p.RenderURL.FromRef(js.Undefined) 1623 p.BidCurrency = p.BidCurrency.FromRef(js.Undefined) 1624 p.HighestScoringOtherBidCurrency = p.HighestScoringOtherBidCurrency.FromRef(js.Undefined) 1625 p.TopLevelSeller = p.TopLevelSeller.FromRef(js.Undefined) 1626 p.ComponentSeller = p.ComponentSeller.FromRef(js.Undefined) 1627 p.BuyerAndSellerReportingId = p.BuyerAndSellerReportingId.FromRef(js.Undefined) 1628 } 1629 1630 type ReportingObserverCallbackFunc func(this js.Ref, reports js.Array[Report], observer ReportingObserver) js.Ref 1631 1632 func (fn ReportingObserverCallbackFunc) Register() js.Func[func(reports js.Array[Report], observer ReportingObserver)] { 1633 return js.RegisterCallback[func(reports js.Array[Report], observer ReportingObserver)]( 1634 fn, abi.FuncPCABIInternal(fn), 1635 ) 1636 } 1637 1638 func (fn ReportingObserverCallbackFunc) DispatchCallback( 1639 targetPC uintptr, ctx *js.CallbackContext, 1640 ) { 1641 args := ctx.Args() 1642 if len(args) != 2+1 /* js this */ || 1643 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1644 js.ThrowInvalidCallbackInvocation() 1645 } 1646 1647 if ctx.Return(fn( 1648 args[0], 1649 1650 js.Array[Report]{}.FromRef(args[0+1]), 1651 ReportingObserver{}.FromRef(args[1+1]), 1652 )) { 1653 return 1654 } 1655 1656 js.ThrowCallbackValueNotReturned() 1657 } 1658 1659 type ReportingObserverCallback[T any] struct { 1660 Fn func(arg T, this js.Ref, reports js.Array[Report], observer ReportingObserver) js.Ref 1661 Arg T 1662 } 1663 1664 func (cb *ReportingObserverCallback[T]) Register() js.Func[func(reports js.Array[Report], observer ReportingObserver)] { 1665 return js.RegisterCallback[func(reports js.Array[Report], observer ReportingObserver)]( 1666 cb, abi.FuncPCABIInternal(cb.Fn), 1667 ) 1668 } 1669 1670 func (cb *ReportingObserverCallback[T]) DispatchCallback( 1671 targetPC uintptr, ctx *js.CallbackContext, 1672 ) { 1673 args := ctx.Args() 1674 if len(args) != 2+1 /* js this */ || 1675 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1676 js.ThrowInvalidCallbackInvocation() 1677 } 1678 1679 if ctx.Return(cb.Fn( 1680 cb.Arg, 1681 args[0], 1682 1683 js.Array[Report]{}.FromRef(args[0+1]), 1684 ReportingObserver{}.FromRef(args[1+1]), 1685 )) { 1686 return 1687 } 1688 1689 js.ThrowCallbackValueNotReturned() 1690 } 1691 1692 type ReportingObserverOptions struct { 1693 // Types is "ReportingObserverOptions.types" 1694 // 1695 // Optional 1696 Types js.Array[js.String] 1697 // Buffered is "ReportingObserverOptions.buffered" 1698 // 1699 // Optional, defaults to false. 1700 // 1701 // NOTE: FFI_USE_Buffered MUST be set to true to make this field effective. 1702 Buffered bool 1703 1704 FFI_USE_Buffered bool // for Buffered. 1705 1706 FFI_USE bool 1707 } 1708 1709 // FromRef calls UpdateFrom and returns a ReportingObserverOptions with all fields set. 1710 func (p ReportingObserverOptions) FromRef(ref js.Ref) ReportingObserverOptions { 1711 p.UpdateFrom(ref) 1712 return p 1713 } 1714 1715 // New creates a new ReportingObserverOptions in the application heap. 1716 func (p ReportingObserverOptions) New() js.Ref { 1717 return bindings.ReportingObserverOptionsJSLoad( 1718 js.Pointer(&p), js.True, 0, 1719 ) 1720 } 1721 1722 // UpdateFrom copies value of all fields of the heap object to p. 1723 func (p *ReportingObserverOptions) UpdateFrom(ref js.Ref) { 1724 bindings.ReportingObserverOptionsJSStore( 1725 js.Pointer(p), ref, 1726 ) 1727 } 1728 1729 // Update writes all fields of the p to the heap object referenced by ref. 1730 func (p *ReportingObserverOptions) Update(ref js.Ref) { 1731 bindings.ReportingObserverOptionsJSLoad( 1732 js.Pointer(p), js.False, ref, 1733 ) 1734 } 1735 1736 // FreeMembers frees fields with heap reference, if recursive is true 1737 // free all heap references reachable from p. 1738 func (p *ReportingObserverOptions) FreeMembers(recursive bool) { 1739 js.Free( 1740 p.Types.Ref(), 1741 ) 1742 p.Types = p.Types.FromRef(js.Undefined) 1743 } 1744 1745 func NewReportingObserver(callback js.Func[func(reports js.Array[Report], observer ReportingObserver)], options ReportingObserverOptions) (ret ReportingObserver) { 1746 ret.ref = bindings.NewReportingObserverByReportingObserver( 1747 callback.Ref(), 1748 js.Pointer(&options)) 1749 return 1750 } 1751 1752 func NewReportingObserverByReportingObserver1(callback js.Func[func(reports js.Array[Report], observer ReportingObserver)]) (ret ReportingObserver) { 1753 ret.ref = bindings.NewReportingObserverByReportingObserver1( 1754 callback.Ref()) 1755 return 1756 } 1757 1758 type ReportingObserver struct { 1759 ref js.Ref 1760 } 1761 1762 func (this ReportingObserver) Once() ReportingObserver { 1763 this.ref.Once() 1764 return this 1765 } 1766 1767 func (this ReportingObserver) Ref() js.Ref { 1768 return this.ref 1769 } 1770 1771 func (this ReportingObserver) FromRef(ref js.Ref) ReportingObserver { 1772 this.ref = ref 1773 return this 1774 } 1775 1776 func (this ReportingObserver) Free() { 1777 this.ref.Free() 1778 } 1779 1780 // HasFuncObserve returns true if the method "ReportingObserver.observe" exists. 1781 func (this ReportingObserver) HasFuncObserve() bool { 1782 return js.True == bindings.HasFuncReportingObserverObserve( 1783 this.ref, 1784 ) 1785 } 1786 1787 // FuncObserve returns the method "ReportingObserver.observe". 1788 func (this ReportingObserver) FuncObserve() (fn js.Func[func()]) { 1789 bindings.FuncReportingObserverObserve( 1790 this.ref, js.Pointer(&fn), 1791 ) 1792 return 1793 } 1794 1795 // Observe calls the method "ReportingObserver.observe". 1796 func (this ReportingObserver) Observe() (ret js.Void) { 1797 bindings.CallReportingObserverObserve( 1798 this.ref, js.Pointer(&ret), 1799 ) 1800 1801 return 1802 } 1803 1804 // TryObserve calls the method "ReportingObserver.observe" 1805 // in a try/catch block and returns (_, err, ok = false) when it went through 1806 // the catch clause. 1807 func (this ReportingObserver) TryObserve() (ret js.Void, exception js.Any, ok bool) { 1808 ok = js.True == bindings.TryReportingObserverObserve( 1809 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1810 ) 1811 1812 return 1813 } 1814 1815 // HasFuncDisconnect returns true if the method "ReportingObserver.disconnect" exists. 1816 func (this ReportingObserver) HasFuncDisconnect() bool { 1817 return js.True == bindings.HasFuncReportingObserverDisconnect( 1818 this.ref, 1819 ) 1820 } 1821 1822 // FuncDisconnect returns the method "ReportingObserver.disconnect". 1823 func (this ReportingObserver) FuncDisconnect() (fn js.Func[func()]) { 1824 bindings.FuncReportingObserverDisconnect( 1825 this.ref, js.Pointer(&fn), 1826 ) 1827 return 1828 } 1829 1830 // Disconnect calls the method "ReportingObserver.disconnect". 1831 func (this ReportingObserver) Disconnect() (ret js.Void) { 1832 bindings.CallReportingObserverDisconnect( 1833 this.ref, js.Pointer(&ret), 1834 ) 1835 1836 return 1837 } 1838 1839 // TryDisconnect calls the method "ReportingObserver.disconnect" 1840 // in a try/catch block and returns (_, err, ok = false) when it went through 1841 // the catch clause. 1842 func (this ReportingObserver) TryDisconnect() (ret js.Void, exception js.Any, ok bool) { 1843 ok = js.True == bindings.TryReportingObserverDisconnect( 1844 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1845 ) 1846 1847 return 1848 } 1849 1850 // HasFuncTakeRecords returns true if the method "ReportingObserver.takeRecords" exists. 1851 func (this ReportingObserver) HasFuncTakeRecords() bool { 1852 return js.True == bindings.HasFuncReportingObserverTakeRecords( 1853 this.ref, 1854 ) 1855 } 1856 1857 // FuncTakeRecords returns the method "ReportingObserver.takeRecords". 1858 func (this ReportingObserver) FuncTakeRecords() (fn js.Func[func() ReportList]) { 1859 bindings.FuncReportingObserverTakeRecords( 1860 this.ref, js.Pointer(&fn), 1861 ) 1862 return 1863 } 1864 1865 // TakeRecords calls the method "ReportingObserver.takeRecords". 1866 func (this ReportingObserver) TakeRecords() (ret ReportList) { 1867 bindings.CallReportingObserverTakeRecords( 1868 this.ref, js.Pointer(&ret), 1869 ) 1870 1871 return 1872 } 1873 1874 // TryTakeRecords calls the method "ReportingObserver.takeRecords" 1875 // in a try/catch block and returns (_, err, ok = false) when it went through 1876 // the catch clause. 1877 func (this ReportingObserver) TryTakeRecords() (ret ReportList, exception js.Any, ok bool) { 1878 ok = js.True == bindings.TryReportingObserverTakeRecords( 1879 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1880 ) 1881 1882 return 1883 } 1884 1885 type ResidentKeyRequirement uint32 1886 1887 const ( 1888 _ ResidentKeyRequirement = iota 1889 1890 ResidentKeyRequirement_DISCOURAGED 1891 ResidentKeyRequirement_PREFERRED 1892 ResidentKeyRequirement_REQUIRED 1893 ) 1894 1895 func (ResidentKeyRequirement) FromRef(str js.Ref) ResidentKeyRequirement { 1896 return ResidentKeyRequirement(bindings.ConstOfResidentKeyRequirement(str)) 1897 } 1898 1899 func (x ResidentKeyRequirement) String() (string, bool) { 1900 switch x { 1901 case ResidentKeyRequirement_DISCOURAGED: 1902 return "discouraged", true 1903 case ResidentKeyRequirement_PREFERRED: 1904 return "preferred", true 1905 case ResidentKeyRequirement_REQUIRED: 1906 return "required", true 1907 default: 1908 return "", false 1909 } 1910 } 1911 1912 type ResizeObserverCallbackFunc func(this js.Ref, entries js.Array[ResizeObserverEntry], observer ResizeObserver) js.Ref 1913 1914 func (fn ResizeObserverCallbackFunc) Register() js.Func[func(entries js.Array[ResizeObserverEntry], observer ResizeObserver)] { 1915 return js.RegisterCallback[func(entries js.Array[ResizeObserverEntry], observer ResizeObserver)]( 1916 fn, abi.FuncPCABIInternal(fn), 1917 ) 1918 } 1919 1920 func (fn ResizeObserverCallbackFunc) DispatchCallback( 1921 targetPC uintptr, ctx *js.CallbackContext, 1922 ) { 1923 args := ctx.Args() 1924 if len(args) != 2+1 /* js this */ || 1925 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1926 js.ThrowInvalidCallbackInvocation() 1927 } 1928 1929 if ctx.Return(fn( 1930 args[0], 1931 1932 js.Array[ResizeObserverEntry]{}.FromRef(args[0+1]), 1933 ResizeObserver{}.FromRef(args[1+1]), 1934 )) { 1935 return 1936 } 1937 1938 js.ThrowCallbackValueNotReturned() 1939 } 1940 1941 type ResizeObserverCallback[T any] struct { 1942 Fn func(arg T, this js.Ref, entries js.Array[ResizeObserverEntry], observer ResizeObserver) js.Ref 1943 Arg T 1944 } 1945 1946 func (cb *ResizeObserverCallback[T]) Register() js.Func[func(entries js.Array[ResizeObserverEntry], observer ResizeObserver)] { 1947 return js.RegisterCallback[func(entries js.Array[ResizeObserverEntry], observer ResizeObserver)]( 1948 cb, abi.FuncPCABIInternal(cb.Fn), 1949 ) 1950 } 1951 1952 func (cb *ResizeObserverCallback[T]) DispatchCallback( 1953 targetPC uintptr, ctx *js.CallbackContext, 1954 ) { 1955 args := ctx.Args() 1956 if len(args) != 2+1 /* js this */ || 1957 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1958 js.ThrowInvalidCallbackInvocation() 1959 } 1960 1961 if ctx.Return(cb.Fn( 1962 cb.Arg, 1963 args[0], 1964 1965 js.Array[ResizeObserverEntry]{}.FromRef(args[0+1]), 1966 ResizeObserver{}.FromRef(args[1+1]), 1967 )) { 1968 return 1969 } 1970 1971 js.ThrowCallbackValueNotReturned() 1972 } 1973 1974 type ResizeObserverSize struct { 1975 ref js.Ref 1976 } 1977 1978 func (this ResizeObserverSize) Once() ResizeObserverSize { 1979 this.ref.Once() 1980 return this 1981 } 1982 1983 func (this ResizeObserverSize) Ref() js.Ref { 1984 return this.ref 1985 } 1986 1987 func (this ResizeObserverSize) FromRef(ref js.Ref) ResizeObserverSize { 1988 this.ref = ref 1989 return this 1990 } 1991 1992 func (this ResizeObserverSize) Free() { 1993 this.ref.Free() 1994 } 1995 1996 // InlineSize returns the value of property "ResizeObserverSize.inlineSize". 1997 // 1998 // It returns ok=false if there is no such property. 1999 func (this ResizeObserverSize) InlineSize() (ret float64, ok bool) { 2000 ok = js.True == bindings.GetResizeObserverSizeInlineSize( 2001 this.ref, js.Pointer(&ret), 2002 ) 2003 return 2004 } 2005 2006 // BlockSize returns the value of property "ResizeObserverSize.blockSize". 2007 // 2008 // It returns ok=false if there is no such property. 2009 func (this ResizeObserverSize) BlockSize() (ret float64, ok bool) { 2010 ok = js.True == bindings.GetResizeObserverSizeBlockSize( 2011 this.ref, js.Pointer(&ret), 2012 ) 2013 return 2014 } 2015 2016 type ResizeObserverEntry struct { 2017 ref js.Ref 2018 } 2019 2020 func (this ResizeObserverEntry) Once() ResizeObserverEntry { 2021 this.ref.Once() 2022 return this 2023 } 2024 2025 func (this ResizeObserverEntry) Ref() js.Ref { 2026 return this.ref 2027 } 2028 2029 func (this ResizeObserverEntry) FromRef(ref js.Ref) ResizeObserverEntry { 2030 this.ref = ref 2031 return this 2032 } 2033 2034 func (this ResizeObserverEntry) Free() { 2035 this.ref.Free() 2036 } 2037 2038 // Target returns the value of property "ResizeObserverEntry.target". 2039 // 2040 // It returns ok=false if there is no such property. 2041 func (this ResizeObserverEntry) Target() (ret Element, ok bool) { 2042 ok = js.True == bindings.GetResizeObserverEntryTarget( 2043 this.ref, js.Pointer(&ret), 2044 ) 2045 return 2046 } 2047 2048 // ContentRect returns the value of property "ResizeObserverEntry.contentRect". 2049 // 2050 // It returns ok=false if there is no such property. 2051 func (this ResizeObserverEntry) ContentRect() (ret DOMRectReadOnly, ok bool) { 2052 ok = js.True == bindings.GetResizeObserverEntryContentRect( 2053 this.ref, js.Pointer(&ret), 2054 ) 2055 return 2056 } 2057 2058 // BorderBoxSize returns the value of property "ResizeObserverEntry.borderBoxSize". 2059 // 2060 // It returns ok=false if there is no such property. 2061 func (this ResizeObserverEntry) BorderBoxSize() (ret js.FrozenArray[ResizeObserverSize], ok bool) { 2062 ok = js.True == bindings.GetResizeObserverEntryBorderBoxSize( 2063 this.ref, js.Pointer(&ret), 2064 ) 2065 return 2066 } 2067 2068 // ContentBoxSize returns the value of property "ResizeObserverEntry.contentBoxSize". 2069 // 2070 // It returns ok=false if there is no such property. 2071 func (this ResizeObserverEntry) ContentBoxSize() (ret js.FrozenArray[ResizeObserverSize], ok bool) { 2072 ok = js.True == bindings.GetResizeObserverEntryContentBoxSize( 2073 this.ref, js.Pointer(&ret), 2074 ) 2075 return 2076 } 2077 2078 // DevicePixelContentBoxSize returns the value of property "ResizeObserverEntry.devicePixelContentBoxSize". 2079 // 2080 // It returns ok=false if there is no such property. 2081 func (this ResizeObserverEntry) DevicePixelContentBoxSize() (ret js.FrozenArray[ResizeObserverSize], ok bool) { 2082 ok = js.True == bindings.GetResizeObserverEntryDevicePixelContentBoxSize( 2083 this.ref, js.Pointer(&ret), 2084 ) 2085 return 2086 } 2087 2088 type ResizeObserverBoxOptions uint32 2089 2090 const ( 2091 _ ResizeObserverBoxOptions = iota 2092 2093 ResizeObserverBoxOptions_BORDER_BOX 2094 ResizeObserverBoxOptions_CONTENT_BOX 2095 ResizeObserverBoxOptions_DEVICE_PIXEL_CONTENT_BOX 2096 ) 2097 2098 func (ResizeObserverBoxOptions) FromRef(str js.Ref) ResizeObserverBoxOptions { 2099 return ResizeObserverBoxOptions(bindings.ConstOfResizeObserverBoxOptions(str)) 2100 } 2101 2102 func (x ResizeObserverBoxOptions) String() (string, bool) { 2103 switch x { 2104 case ResizeObserverBoxOptions_BORDER_BOX: 2105 return "border-box", true 2106 case ResizeObserverBoxOptions_CONTENT_BOX: 2107 return "content-box", true 2108 case ResizeObserverBoxOptions_DEVICE_PIXEL_CONTENT_BOX: 2109 return "device-pixel-content-box", true 2110 default: 2111 return "", false 2112 } 2113 } 2114 2115 type ResizeObserverOptions struct { 2116 // Box is "ResizeObserverOptions.box" 2117 // 2118 // Optional, defaults to "content-box". 2119 Box ResizeObserverBoxOptions 2120 2121 FFI_USE bool 2122 } 2123 2124 // FromRef calls UpdateFrom and returns a ResizeObserverOptions with all fields set. 2125 func (p ResizeObserverOptions) FromRef(ref js.Ref) ResizeObserverOptions { 2126 p.UpdateFrom(ref) 2127 return p 2128 } 2129 2130 // New creates a new ResizeObserverOptions in the application heap. 2131 func (p ResizeObserverOptions) New() js.Ref { 2132 return bindings.ResizeObserverOptionsJSLoad( 2133 js.Pointer(&p), js.True, 0, 2134 ) 2135 } 2136 2137 // UpdateFrom copies value of all fields of the heap object to p. 2138 func (p *ResizeObserverOptions) UpdateFrom(ref js.Ref) { 2139 bindings.ResizeObserverOptionsJSStore( 2140 js.Pointer(p), ref, 2141 ) 2142 } 2143 2144 // Update writes all fields of the p to the heap object referenced by ref. 2145 func (p *ResizeObserverOptions) Update(ref js.Ref) { 2146 bindings.ResizeObserverOptionsJSLoad( 2147 js.Pointer(p), js.False, ref, 2148 ) 2149 } 2150 2151 // FreeMembers frees fields with heap reference, if recursive is true 2152 // free all heap references reachable from p. 2153 func (p *ResizeObserverOptions) FreeMembers(recursive bool) { 2154 } 2155 2156 func NewResizeObserver(callback js.Func[func(entries js.Array[ResizeObserverEntry], observer ResizeObserver)]) (ret ResizeObserver) { 2157 ret.ref = bindings.NewResizeObserverByResizeObserver( 2158 callback.Ref()) 2159 return 2160 } 2161 2162 type ResizeObserver struct { 2163 ref js.Ref 2164 } 2165 2166 func (this ResizeObserver) Once() ResizeObserver { 2167 this.ref.Once() 2168 return this 2169 } 2170 2171 func (this ResizeObserver) Ref() js.Ref { 2172 return this.ref 2173 } 2174 2175 func (this ResizeObserver) FromRef(ref js.Ref) ResizeObserver { 2176 this.ref = ref 2177 return this 2178 } 2179 2180 func (this ResizeObserver) Free() { 2181 this.ref.Free() 2182 } 2183 2184 // HasFuncObserve returns true if the method "ResizeObserver.observe" exists. 2185 func (this ResizeObserver) HasFuncObserve() bool { 2186 return js.True == bindings.HasFuncResizeObserverObserve( 2187 this.ref, 2188 ) 2189 } 2190 2191 // FuncObserve returns the method "ResizeObserver.observe". 2192 func (this ResizeObserver) FuncObserve() (fn js.Func[func(target Element, options ResizeObserverOptions)]) { 2193 bindings.FuncResizeObserverObserve( 2194 this.ref, js.Pointer(&fn), 2195 ) 2196 return 2197 } 2198 2199 // Observe calls the method "ResizeObserver.observe". 2200 func (this ResizeObserver) Observe(target Element, options ResizeObserverOptions) (ret js.Void) { 2201 bindings.CallResizeObserverObserve( 2202 this.ref, js.Pointer(&ret), 2203 target.Ref(), 2204 js.Pointer(&options), 2205 ) 2206 2207 return 2208 } 2209 2210 // TryObserve calls the method "ResizeObserver.observe" 2211 // in a try/catch block and returns (_, err, ok = false) when it went through 2212 // the catch clause. 2213 func (this ResizeObserver) TryObserve(target Element, options ResizeObserverOptions) (ret js.Void, exception js.Any, ok bool) { 2214 ok = js.True == bindings.TryResizeObserverObserve( 2215 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2216 target.Ref(), 2217 js.Pointer(&options), 2218 ) 2219 2220 return 2221 } 2222 2223 // HasFuncObserve1 returns true if the method "ResizeObserver.observe" exists. 2224 func (this ResizeObserver) HasFuncObserve1() bool { 2225 return js.True == bindings.HasFuncResizeObserverObserve1( 2226 this.ref, 2227 ) 2228 } 2229 2230 // FuncObserve1 returns the method "ResizeObserver.observe". 2231 func (this ResizeObserver) FuncObserve1() (fn js.Func[func(target Element)]) { 2232 bindings.FuncResizeObserverObserve1( 2233 this.ref, js.Pointer(&fn), 2234 ) 2235 return 2236 } 2237 2238 // Observe1 calls the method "ResizeObserver.observe". 2239 func (this ResizeObserver) Observe1(target Element) (ret js.Void) { 2240 bindings.CallResizeObserverObserve1( 2241 this.ref, js.Pointer(&ret), 2242 target.Ref(), 2243 ) 2244 2245 return 2246 } 2247 2248 // TryObserve1 calls the method "ResizeObserver.observe" 2249 // in a try/catch block and returns (_, err, ok = false) when it went through 2250 // the catch clause. 2251 func (this ResizeObserver) TryObserve1(target Element) (ret js.Void, exception js.Any, ok bool) { 2252 ok = js.True == bindings.TryResizeObserverObserve1( 2253 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2254 target.Ref(), 2255 ) 2256 2257 return 2258 } 2259 2260 // HasFuncUnobserve returns true if the method "ResizeObserver.unobserve" exists. 2261 func (this ResizeObserver) HasFuncUnobserve() bool { 2262 return js.True == bindings.HasFuncResizeObserverUnobserve( 2263 this.ref, 2264 ) 2265 } 2266 2267 // FuncUnobserve returns the method "ResizeObserver.unobserve". 2268 func (this ResizeObserver) FuncUnobserve() (fn js.Func[func(target Element)]) { 2269 bindings.FuncResizeObserverUnobserve( 2270 this.ref, js.Pointer(&fn), 2271 ) 2272 return 2273 } 2274 2275 // Unobserve calls the method "ResizeObserver.unobserve". 2276 func (this ResizeObserver) Unobserve(target Element) (ret js.Void) { 2277 bindings.CallResizeObserverUnobserve( 2278 this.ref, js.Pointer(&ret), 2279 target.Ref(), 2280 ) 2281 2282 return 2283 } 2284 2285 // TryUnobserve calls the method "ResizeObserver.unobserve" 2286 // in a try/catch block and returns (_, err, ok = false) when it went through 2287 // the catch clause. 2288 func (this ResizeObserver) TryUnobserve(target Element) (ret js.Void, exception js.Any, ok bool) { 2289 ok = js.True == bindings.TryResizeObserverUnobserve( 2290 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2291 target.Ref(), 2292 ) 2293 2294 return 2295 } 2296 2297 // HasFuncDisconnect returns true if the method "ResizeObserver.disconnect" exists. 2298 func (this ResizeObserver) HasFuncDisconnect() bool { 2299 return js.True == bindings.HasFuncResizeObserverDisconnect( 2300 this.ref, 2301 ) 2302 } 2303 2304 // FuncDisconnect returns the method "ResizeObserver.disconnect". 2305 func (this ResizeObserver) FuncDisconnect() (fn js.Func[func()]) { 2306 bindings.FuncResizeObserverDisconnect( 2307 this.ref, js.Pointer(&fn), 2308 ) 2309 return 2310 } 2311 2312 // Disconnect calls the method "ResizeObserver.disconnect". 2313 func (this ResizeObserver) Disconnect() (ret js.Void) { 2314 bindings.CallResizeObserverDisconnect( 2315 this.ref, js.Pointer(&ret), 2316 ) 2317 2318 return 2319 } 2320 2321 // TryDisconnect calls the method "ResizeObserver.disconnect" 2322 // in a try/catch block and returns (_, err, ok = false) when it went through 2323 // the catch clause. 2324 func (this ResizeObserver) TryDisconnect() (ret js.Void, exception js.Any, ok bool) { 2325 ok = js.True == bindings.TryResizeObserverDisconnect( 2326 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2327 ) 2328 2329 return 2330 } 2331 2332 type RsaHashedImportParams struct { 2333 // Hash is "RsaHashedImportParams.hash" 2334 // 2335 // Required 2336 Hash HashAlgorithmIdentifier 2337 // Name is "RsaHashedImportParams.name" 2338 // 2339 // Required 2340 Name js.String 2341 2342 FFI_USE bool 2343 } 2344 2345 // FromRef calls UpdateFrom and returns a RsaHashedImportParams with all fields set. 2346 func (p RsaHashedImportParams) FromRef(ref js.Ref) RsaHashedImportParams { 2347 p.UpdateFrom(ref) 2348 return p 2349 } 2350 2351 // New creates a new RsaHashedImportParams in the application heap. 2352 func (p RsaHashedImportParams) New() js.Ref { 2353 return bindings.RsaHashedImportParamsJSLoad( 2354 js.Pointer(&p), js.True, 0, 2355 ) 2356 } 2357 2358 // UpdateFrom copies value of all fields of the heap object to p. 2359 func (p *RsaHashedImportParams) UpdateFrom(ref js.Ref) { 2360 bindings.RsaHashedImportParamsJSStore( 2361 js.Pointer(p), ref, 2362 ) 2363 } 2364 2365 // Update writes all fields of the p to the heap object referenced by ref. 2366 func (p *RsaHashedImportParams) Update(ref js.Ref) { 2367 bindings.RsaHashedImportParamsJSLoad( 2368 js.Pointer(p), js.False, ref, 2369 ) 2370 } 2371 2372 // FreeMembers frees fields with heap reference, if recursive is true 2373 // free all heap references reachable from p. 2374 func (p *RsaHashedImportParams) FreeMembers(recursive bool) { 2375 js.Free( 2376 p.Hash.Ref(), 2377 p.Name.Ref(), 2378 ) 2379 p.Hash = p.Hash.FromRef(js.Undefined) 2380 p.Name = p.Name.FromRef(js.Undefined) 2381 } 2382 2383 type RsaHashedKeyAlgorithm struct { 2384 // Hash is "RsaHashedKeyAlgorithm.hash" 2385 // 2386 // Required 2387 // 2388 // NOTE: Hash.FFI_USE MUST be set to true to get Hash used. 2389 Hash KeyAlgorithm 2390 // ModulusLength is "RsaHashedKeyAlgorithm.modulusLength" 2391 // 2392 // Required 2393 ModulusLength uint32 2394 // PublicExponent is "RsaHashedKeyAlgorithm.publicExponent" 2395 // 2396 // Required 2397 PublicExponent BigInteger 2398 // Name is "RsaHashedKeyAlgorithm.name" 2399 // 2400 // Required 2401 Name js.String 2402 2403 FFI_USE bool 2404 } 2405 2406 // FromRef calls UpdateFrom and returns a RsaHashedKeyAlgorithm with all fields set. 2407 func (p RsaHashedKeyAlgorithm) FromRef(ref js.Ref) RsaHashedKeyAlgorithm { 2408 p.UpdateFrom(ref) 2409 return p 2410 } 2411 2412 // New creates a new RsaHashedKeyAlgorithm in the application heap. 2413 func (p RsaHashedKeyAlgorithm) New() js.Ref { 2414 return bindings.RsaHashedKeyAlgorithmJSLoad( 2415 js.Pointer(&p), js.True, 0, 2416 ) 2417 } 2418 2419 // UpdateFrom copies value of all fields of the heap object to p. 2420 func (p *RsaHashedKeyAlgorithm) UpdateFrom(ref js.Ref) { 2421 bindings.RsaHashedKeyAlgorithmJSStore( 2422 js.Pointer(p), ref, 2423 ) 2424 } 2425 2426 // Update writes all fields of the p to the heap object referenced by ref. 2427 func (p *RsaHashedKeyAlgorithm) Update(ref js.Ref) { 2428 bindings.RsaHashedKeyAlgorithmJSLoad( 2429 js.Pointer(p), js.False, ref, 2430 ) 2431 } 2432 2433 // FreeMembers frees fields with heap reference, if recursive is true 2434 // free all heap references reachable from p. 2435 func (p *RsaHashedKeyAlgorithm) FreeMembers(recursive bool) { 2436 js.Free( 2437 p.PublicExponent.Ref(), 2438 p.Name.Ref(), 2439 ) 2440 p.PublicExponent = p.PublicExponent.FromRef(js.Undefined) 2441 p.Name = p.Name.FromRef(js.Undefined) 2442 if recursive { 2443 p.Hash.FreeMembers(true) 2444 } 2445 } 2446 2447 type RsaHashedKeyGenParams struct { 2448 // Hash is "RsaHashedKeyGenParams.hash" 2449 // 2450 // Required 2451 Hash HashAlgorithmIdentifier 2452 // ModulusLength is "RsaHashedKeyGenParams.modulusLength" 2453 // 2454 // Required 2455 ModulusLength uint32 2456 // PublicExponent is "RsaHashedKeyGenParams.publicExponent" 2457 // 2458 // Required 2459 PublicExponent BigInteger 2460 // Name is "RsaHashedKeyGenParams.name" 2461 // 2462 // Required 2463 Name js.String 2464 2465 FFI_USE bool 2466 } 2467 2468 // FromRef calls UpdateFrom and returns a RsaHashedKeyGenParams with all fields set. 2469 func (p RsaHashedKeyGenParams) FromRef(ref js.Ref) RsaHashedKeyGenParams { 2470 p.UpdateFrom(ref) 2471 return p 2472 } 2473 2474 // New creates a new RsaHashedKeyGenParams in the application heap. 2475 func (p RsaHashedKeyGenParams) New() js.Ref { 2476 return bindings.RsaHashedKeyGenParamsJSLoad( 2477 js.Pointer(&p), js.True, 0, 2478 ) 2479 } 2480 2481 // UpdateFrom copies value of all fields of the heap object to p. 2482 func (p *RsaHashedKeyGenParams) UpdateFrom(ref js.Ref) { 2483 bindings.RsaHashedKeyGenParamsJSStore( 2484 js.Pointer(p), ref, 2485 ) 2486 } 2487 2488 // Update writes all fields of the p to the heap object referenced by ref. 2489 func (p *RsaHashedKeyGenParams) Update(ref js.Ref) { 2490 bindings.RsaHashedKeyGenParamsJSLoad( 2491 js.Pointer(p), js.False, ref, 2492 ) 2493 } 2494 2495 // FreeMembers frees fields with heap reference, if recursive is true 2496 // free all heap references reachable from p. 2497 func (p *RsaHashedKeyGenParams) FreeMembers(recursive bool) { 2498 js.Free( 2499 p.Hash.Ref(), 2500 p.PublicExponent.Ref(), 2501 p.Name.Ref(), 2502 ) 2503 p.Hash = p.Hash.FromRef(js.Undefined) 2504 p.PublicExponent = p.PublicExponent.FromRef(js.Undefined) 2505 p.Name = p.Name.FromRef(js.Undefined) 2506 } 2507 2508 type RsaKeyAlgorithm struct { 2509 // ModulusLength is "RsaKeyAlgorithm.modulusLength" 2510 // 2511 // Required 2512 ModulusLength uint32 2513 // PublicExponent is "RsaKeyAlgorithm.publicExponent" 2514 // 2515 // Required 2516 PublicExponent BigInteger 2517 // Name is "RsaKeyAlgorithm.name" 2518 // 2519 // Required 2520 Name js.String 2521 2522 FFI_USE bool 2523 } 2524 2525 // FromRef calls UpdateFrom and returns a RsaKeyAlgorithm with all fields set. 2526 func (p RsaKeyAlgorithm) FromRef(ref js.Ref) RsaKeyAlgorithm { 2527 p.UpdateFrom(ref) 2528 return p 2529 } 2530 2531 // New creates a new RsaKeyAlgorithm in the application heap. 2532 func (p RsaKeyAlgorithm) New() js.Ref { 2533 return bindings.RsaKeyAlgorithmJSLoad( 2534 js.Pointer(&p), js.True, 0, 2535 ) 2536 } 2537 2538 // UpdateFrom copies value of all fields of the heap object to p. 2539 func (p *RsaKeyAlgorithm) UpdateFrom(ref js.Ref) { 2540 bindings.RsaKeyAlgorithmJSStore( 2541 js.Pointer(p), ref, 2542 ) 2543 } 2544 2545 // Update writes all fields of the p to the heap object referenced by ref. 2546 func (p *RsaKeyAlgorithm) Update(ref js.Ref) { 2547 bindings.RsaKeyAlgorithmJSLoad( 2548 js.Pointer(p), js.False, ref, 2549 ) 2550 } 2551 2552 // FreeMembers frees fields with heap reference, if recursive is true 2553 // free all heap references reachable from p. 2554 func (p *RsaKeyAlgorithm) FreeMembers(recursive bool) { 2555 js.Free( 2556 p.PublicExponent.Ref(), 2557 p.Name.Ref(), 2558 ) 2559 p.PublicExponent = p.PublicExponent.FromRef(js.Undefined) 2560 p.Name = p.Name.FromRef(js.Undefined) 2561 } 2562 2563 type RsaKeyGenParams struct { 2564 // ModulusLength is "RsaKeyGenParams.modulusLength" 2565 // 2566 // Required 2567 ModulusLength uint32 2568 // PublicExponent is "RsaKeyGenParams.publicExponent" 2569 // 2570 // Required 2571 PublicExponent BigInteger 2572 // Name is "RsaKeyGenParams.name" 2573 // 2574 // Required 2575 Name js.String 2576 2577 FFI_USE bool 2578 } 2579 2580 // FromRef calls UpdateFrom and returns a RsaKeyGenParams with all fields set. 2581 func (p RsaKeyGenParams) FromRef(ref js.Ref) RsaKeyGenParams { 2582 p.UpdateFrom(ref) 2583 return p 2584 } 2585 2586 // New creates a new RsaKeyGenParams in the application heap. 2587 func (p RsaKeyGenParams) New() js.Ref { 2588 return bindings.RsaKeyGenParamsJSLoad( 2589 js.Pointer(&p), js.True, 0, 2590 ) 2591 } 2592 2593 // UpdateFrom copies value of all fields of the heap object to p. 2594 func (p *RsaKeyGenParams) UpdateFrom(ref js.Ref) { 2595 bindings.RsaKeyGenParamsJSStore( 2596 js.Pointer(p), ref, 2597 ) 2598 } 2599 2600 // Update writes all fields of the p to the heap object referenced by ref. 2601 func (p *RsaKeyGenParams) Update(ref js.Ref) { 2602 bindings.RsaKeyGenParamsJSLoad( 2603 js.Pointer(p), js.False, ref, 2604 ) 2605 } 2606 2607 // FreeMembers frees fields with heap reference, if recursive is true 2608 // free all heap references reachable from p. 2609 func (p *RsaKeyGenParams) FreeMembers(recursive bool) { 2610 js.Free( 2611 p.PublicExponent.Ref(), 2612 p.Name.Ref(), 2613 ) 2614 p.PublicExponent = p.PublicExponent.FromRef(js.Undefined) 2615 p.Name = p.Name.FromRef(js.Undefined) 2616 } 2617 2618 type RsaOaepParams struct { 2619 // Label is "RsaOaepParams.label" 2620 // 2621 // Optional 2622 Label BufferSource 2623 // Name is "RsaOaepParams.name" 2624 // 2625 // Required 2626 Name js.String 2627 2628 FFI_USE bool 2629 } 2630 2631 // FromRef calls UpdateFrom and returns a RsaOaepParams with all fields set. 2632 func (p RsaOaepParams) FromRef(ref js.Ref) RsaOaepParams { 2633 p.UpdateFrom(ref) 2634 return p 2635 } 2636 2637 // New creates a new RsaOaepParams in the application heap. 2638 func (p RsaOaepParams) New() js.Ref { 2639 return bindings.RsaOaepParamsJSLoad( 2640 js.Pointer(&p), js.True, 0, 2641 ) 2642 } 2643 2644 // UpdateFrom copies value of all fields of the heap object to p. 2645 func (p *RsaOaepParams) UpdateFrom(ref js.Ref) { 2646 bindings.RsaOaepParamsJSStore( 2647 js.Pointer(p), ref, 2648 ) 2649 } 2650 2651 // Update writes all fields of the p to the heap object referenced by ref. 2652 func (p *RsaOaepParams) Update(ref js.Ref) { 2653 bindings.RsaOaepParamsJSLoad( 2654 js.Pointer(p), js.False, ref, 2655 ) 2656 } 2657 2658 // FreeMembers frees fields with heap reference, if recursive is true 2659 // free all heap references reachable from p. 2660 func (p *RsaOaepParams) FreeMembers(recursive bool) { 2661 js.Free( 2662 p.Label.Ref(), 2663 p.Name.Ref(), 2664 ) 2665 p.Label = p.Label.FromRef(js.Undefined) 2666 p.Name = p.Name.FromRef(js.Undefined) 2667 } 2668 2669 type RsaPssParams struct { 2670 // SaltLength is "RsaPssParams.saltLength" 2671 // 2672 // Required 2673 SaltLength uint32 2674 // Name is "RsaPssParams.name" 2675 // 2676 // Required 2677 Name js.String 2678 2679 FFI_USE bool 2680 } 2681 2682 // FromRef calls UpdateFrom and returns a RsaPssParams with all fields set. 2683 func (p RsaPssParams) FromRef(ref js.Ref) RsaPssParams { 2684 p.UpdateFrom(ref) 2685 return p 2686 } 2687 2688 // New creates a new RsaPssParams in the application heap. 2689 func (p RsaPssParams) New() js.Ref { 2690 return bindings.RsaPssParamsJSLoad( 2691 js.Pointer(&p), js.True, 0, 2692 ) 2693 } 2694 2695 // UpdateFrom copies value of all fields of the heap object to p. 2696 func (p *RsaPssParams) UpdateFrom(ref js.Ref) { 2697 bindings.RsaPssParamsJSStore( 2698 js.Pointer(p), ref, 2699 ) 2700 } 2701 2702 // Update writes all fields of the p to the heap object referenced by ref. 2703 func (p *RsaPssParams) Update(ref js.Ref) { 2704 bindings.RsaPssParamsJSLoad( 2705 js.Pointer(p), js.False, ref, 2706 ) 2707 } 2708 2709 // FreeMembers frees fields with heap reference, if recursive is true 2710 // free all heap references reachable from p. 2711 func (p *RsaPssParams) FreeMembers(recursive bool) { 2712 js.Free( 2713 p.Name.Ref(), 2714 ) 2715 p.Name = p.Name.FromRef(js.Undefined) 2716 } 2717 2718 type SFrameTransformErrorEventType uint32 2719 2720 const ( 2721 _ SFrameTransformErrorEventType = iota 2722 2723 SFrameTransformErrorEventType_AUTHENTICATION 2724 SFrameTransformErrorEventType_KEY_ID 2725 SFrameTransformErrorEventType_SYNTAX 2726 ) 2727 2728 func (SFrameTransformErrorEventType) FromRef(str js.Ref) SFrameTransformErrorEventType { 2729 return SFrameTransformErrorEventType(bindings.ConstOfSFrameTransformErrorEventType(str)) 2730 } 2731 2732 func (x SFrameTransformErrorEventType) String() (string, bool) { 2733 switch x { 2734 case SFrameTransformErrorEventType_AUTHENTICATION: 2735 return "authentication", true 2736 case SFrameTransformErrorEventType_KEY_ID: 2737 return "keyID", true 2738 case SFrameTransformErrorEventType_SYNTAX: 2739 return "syntax", true 2740 default: 2741 return "", false 2742 } 2743 } 2744 2745 type SFrameTransformErrorEventInit struct { 2746 // ErrorType is "SFrameTransformErrorEventInit.errorType" 2747 // 2748 // Required 2749 ErrorType SFrameTransformErrorEventType 2750 // Frame is "SFrameTransformErrorEventInit.frame" 2751 // 2752 // Required 2753 Frame js.Any 2754 // KeyID is "SFrameTransformErrorEventInit.keyID" 2755 // 2756 // Optional 2757 KeyID CryptoKeyID 2758 // Bubbles is "SFrameTransformErrorEventInit.bubbles" 2759 // 2760 // Optional, defaults to false. 2761 // 2762 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2763 Bubbles bool 2764 // Cancelable is "SFrameTransformErrorEventInit.cancelable" 2765 // 2766 // Optional, defaults to false. 2767 // 2768 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2769 Cancelable bool 2770 // Composed is "SFrameTransformErrorEventInit.composed" 2771 // 2772 // Optional, defaults to false. 2773 // 2774 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2775 Composed bool 2776 2777 FFI_USE_Bubbles bool // for Bubbles. 2778 FFI_USE_Cancelable bool // for Cancelable. 2779 FFI_USE_Composed bool // for Composed. 2780 2781 FFI_USE bool 2782 } 2783 2784 // FromRef calls UpdateFrom and returns a SFrameTransformErrorEventInit with all fields set. 2785 func (p SFrameTransformErrorEventInit) FromRef(ref js.Ref) SFrameTransformErrorEventInit { 2786 p.UpdateFrom(ref) 2787 return p 2788 } 2789 2790 // New creates a new SFrameTransformErrorEventInit in the application heap. 2791 func (p SFrameTransformErrorEventInit) New() js.Ref { 2792 return bindings.SFrameTransformErrorEventInitJSLoad( 2793 js.Pointer(&p), js.True, 0, 2794 ) 2795 } 2796 2797 // UpdateFrom copies value of all fields of the heap object to p. 2798 func (p *SFrameTransformErrorEventInit) UpdateFrom(ref js.Ref) { 2799 bindings.SFrameTransformErrorEventInitJSStore( 2800 js.Pointer(p), ref, 2801 ) 2802 } 2803 2804 // Update writes all fields of the p to the heap object referenced by ref. 2805 func (p *SFrameTransformErrorEventInit) Update(ref js.Ref) { 2806 bindings.SFrameTransformErrorEventInitJSLoad( 2807 js.Pointer(p), js.False, ref, 2808 ) 2809 } 2810 2811 // FreeMembers frees fields with heap reference, if recursive is true 2812 // free all heap references reachable from p. 2813 func (p *SFrameTransformErrorEventInit) FreeMembers(recursive bool) { 2814 js.Free( 2815 p.Frame.Ref(), 2816 p.KeyID.Ref(), 2817 ) 2818 p.Frame = p.Frame.FromRef(js.Undefined) 2819 p.KeyID = p.KeyID.FromRef(js.Undefined) 2820 } 2821 2822 func NewSFrameTransformErrorEvent(typ js.String, eventInitDict SFrameTransformErrorEventInit) (ret SFrameTransformErrorEvent) { 2823 ret.ref = bindings.NewSFrameTransformErrorEventBySFrameTransformErrorEvent( 2824 typ.Ref(), 2825 js.Pointer(&eventInitDict)) 2826 return 2827 } 2828 2829 type SFrameTransformErrorEvent struct { 2830 Event 2831 } 2832 2833 func (this SFrameTransformErrorEvent) Once() SFrameTransformErrorEvent { 2834 this.ref.Once() 2835 return this 2836 } 2837 2838 func (this SFrameTransformErrorEvent) Ref() js.Ref { 2839 return this.Event.Ref() 2840 } 2841 2842 func (this SFrameTransformErrorEvent) FromRef(ref js.Ref) SFrameTransformErrorEvent { 2843 this.Event = this.Event.FromRef(ref) 2844 return this 2845 } 2846 2847 func (this SFrameTransformErrorEvent) Free() { 2848 this.ref.Free() 2849 } 2850 2851 // ErrorType returns the value of property "SFrameTransformErrorEvent.errorType". 2852 // 2853 // It returns ok=false if there is no such property. 2854 func (this SFrameTransformErrorEvent) ErrorType() (ret SFrameTransformErrorEventType, ok bool) { 2855 ok = js.True == bindings.GetSFrameTransformErrorEventErrorType( 2856 this.ref, js.Pointer(&ret), 2857 ) 2858 return 2859 } 2860 2861 // KeyID returns the value of property "SFrameTransformErrorEvent.keyID". 2862 // 2863 // It returns ok=false if there is no such property. 2864 func (this SFrameTransformErrorEvent) KeyID() (ret CryptoKeyID, ok bool) { 2865 ok = js.True == bindings.GetSFrameTransformErrorEventKeyID( 2866 this.ref, js.Pointer(&ret), 2867 ) 2868 return 2869 } 2870 2871 // Frame returns the value of property "SFrameTransformErrorEvent.frame". 2872 // 2873 // It returns ok=false if there is no such property. 2874 func (this SFrameTransformErrorEvent) Frame() (ret js.Any, ok bool) { 2875 ok = js.True == bindings.GetSFrameTransformErrorEventFrame( 2876 this.ref, js.Pointer(&ret), 2877 ) 2878 return 2879 } 2880 2881 type SVGAElement struct { 2882 SVGGraphicsElement 2883 } 2884 2885 func (this SVGAElement) Once() SVGAElement { 2886 this.ref.Once() 2887 return this 2888 } 2889 2890 func (this SVGAElement) Ref() js.Ref { 2891 return this.SVGGraphicsElement.Ref() 2892 } 2893 2894 func (this SVGAElement) FromRef(ref js.Ref) SVGAElement { 2895 this.SVGGraphicsElement = this.SVGGraphicsElement.FromRef(ref) 2896 return this 2897 } 2898 2899 func (this SVGAElement) Free() { 2900 this.ref.Free() 2901 } 2902 2903 // Target returns the value of property "SVGAElement.target". 2904 // 2905 // It returns ok=false if there is no such property. 2906 func (this SVGAElement) Target() (ret SVGAnimatedString, ok bool) { 2907 ok = js.True == bindings.GetSVGAElementTarget( 2908 this.ref, js.Pointer(&ret), 2909 ) 2910 return 2911 } 2912 2913 // Download returns the value of property "SVGAElement.download". 2914 // 2915 // It returns ok=false if there is no such property. 2916 func (this SVGAElement) Download() (ret js.String, ok bool) { 2917 ok = js.True == bindings.GetSVGAElementDownload( 2918 this.ref, js.Pointer(&ret), 2919 ) 2920 return 2921 } 2922 2923 // SetDownload sets the value of property "SVGAElement.download" to val. 2924 // 2925 // It returns false if the property cannot be set. 2926 func (this SVGAElement) SetDownload(val js.String) bool { 2927 return js.True == bindings.SetSVGAElementDownload( 2928 this.ref, 2929 val.Ref(), 2930 ) 2931 } 2932 2933 // Ping returns the value of property "SVGAElement.ping". 2934 // 2935 // It returns ok=false if there is no such property. 2936 func (this SVGAElement) Ping() (ret js.String, ok bool) { 2937 ok = js.True == bindings.GetSVGAElementPing( 2938 this.ref, js.Pointer(&ret), 2939 ) 2940 return 2941 } 2942 2943 // SetPing sets the value of property "SVGAElement.ping" to val. 2944 // 2945 // It returns false if the property cannot be set. 2946 func (this SVGAElement) SetPing(val js.String) bool { 2947 return js.True == bindings.SetSVGAElementPing( 2948 this.ref, 2949 val.Ref(), 2950 ) 2951 } 2952 2953 // Rel returns the value of property "SVGAElement.rel". 2954 // 2955 // It returns ok=false if there is no such property. 2956 func (this SVGAElement) Rel() (ret js.String, ok bool) { 2957 ok = js.True == bindings.GetSVGAElementRel( 2958 this.ref, js.Pointer(&ret), 2959 ) 2960 return 2961 } 2962 2963 // SetRel sets the value of property "SVGAElement.rel" to val. 2964 // 2965 // It returns false if the property cannot be set. 2966 func (this SVGAElement) SetRel(val js.String) bool { 2967 return js.True == bindings.SetSVGAElementRel( 2968 this.ref, 2969 val.Ref(), 2970 ) 2971 } 2972 2973 // RelList returns the value of property "SVGAElement.relList". 2974 // 2975 // It returns ok=false if there is no such property. 2976 func (this SVGAElement) RelList() (ret DOMTokenList, ok bool) { 2977 ok = js.True == bindings.GetSVGAElementRelList( 2978 this.ref, js.Pointer(&ret), 2979 ) 2980 return 2981 } 2982 2983 // Hreflang returns the value of property "SVGAElement.hreflang". 2984 // 2985 // It returns ok=false if there is no such property. 2986 func (this SVGAElement) Hreflang() (ret js.String, ok bool) { 2987 ok = js.True == bindings.GetSVGAElementHreflang( 2988 this.ref, js.Pointer(&ret), 2989 ) 2990 return 2991 } 2992 2993 // SetHreflang sets the value of property "SVGAElement.hreflang" to val. 2994 // 2995 // It returns false if the property cannot be set. 2996 func (this SVGAElement) SetHreflang(val js.String) bool { 2997 return js.True == bindings.SetSVGAElementHreflang( 2998 this.ref, 2999 val.Ref(), 3000 ) 3001 } 3002 3003 // Type returns the value of property "SVGAElement.type". 3004 // 3005 // It returns ok=false if there is no such property. 3006 func (this SVGAElement) Type() (ret js.String, ok bool) { 3007 ok = js.True == bindings.GetSVGAElementType( 3008 this.ref, js.Pointer(&ret), 3009 ) 3010 return 3011 } 3012 3013 // SetType sets the value of property "SVGAElement.type" to val. 3014 // 3015 // It returns false if the property cannot be set. 3016 func (this SVGAElement) SetType(val js.String) bool { 3017 return js.True == bindings.SetSVGAElementType( 3018 this.ref, 3019 val.Ref(), 3020 ) 3021 } 3022 3023 // Text returns the value of property "SVGAElement.text". 3024 // 3025 // It returns ok=false if there is no such property. 3026 func (this SVGAElement) Text() (ret js.String, ok bool) { 3027 ok = js.True == bindings.GetSVGAElementText( 3028 this.ref, js.Pointer(&ret), 3029 ) 3030 return 3031 } 3032 3033 // SetText sets the value of property "SVGAElement.text" to val. 3034 // 3035 // It returns false if the property cannot be set. 3036 func (this SVGAElement) SetText(val js.String) bool { 3037 return js.True == bindings.SetSVGAElementText( 3038 this.ref, 3039 val.Ref(), 3040 ) 3041 } 3042 3043 // ReferrerPolicy returns the value of property "SVGAElement.referrerPolicy". 3044 // 3045 // It returns ok=false if there is no such property. 3046 func (this SVGAElement) ReferrerPolicy() (ret js.String, ok bool) { 3047 ok = js.True == bindings.GetSVGAElementReferrerPolicy( 3048 this.ref, js.Pointer(&ret), 3049 ) 3050 return 3051 } 3052 3053 // SetReferrerPolicy sets the value of property "SVGAElement.referrerPolicy" to val. 3054 // 3055 // It returns false if the property cannot be set. 3056 func (this SVGAElement) SetReferrerPolicy(val js.String) bool { 3057 return js.True == bindings.SetSVGAElementReferrerPolicy( 3058 this.ref, 3059 val.Ref(), 3060 ) 3061 } 3062 3063 // Origin returns the value of property "SVGAElement.origin". 3064 // 3065 // It returns ok=false if there is no such property. 3066 func (this SVGAElement) Origin() (ret js.String, ok bool) { 3067 ok = js.True == bindings.GetSVGAElementOrigin( 3068 this.ref, js.Pointer(&ret), 3069 ) 3070 return 3071 } 3072 3073 // Protocol returns the value of property "SVGAElement.protocol". 3074 // 3075 // It returns ok=false if there is no such property. 3076 func (this SVGAElement) Protocol() (ret js.String, ok bool) { 3077 ok = js.True == bindings.GetSVGAElementProtocol( 3078 this.ref, js.Pointer(&ret), 3079 ) 3080 return 3081 } 3082 3083 // SetProtocol sets the value of property "SVGAElement.protocol" to val. 3084 // 3085 // It returns false if the property cannot be set. 3086 func (this SVGAElement) SetProtocol(val js.String) bool { 3087 return js.True == bindings.SetSVGAElementProtocol( 3088 this.ref, 3089 val.Ref(), 3090 ) 3091 } 3092 3093 // Username returns the value of property "SVGAElement.username". 3094 // 3095 // It returns ok=false if there is no such property. 3096 func (this SVGAElement) Username() (ret js.String, ok bool) { 3097 ok = js.True == bindings.GetSVGAElementUsername( 3098 this.ref, js.Pointer(&ret), 3099 ) 3100 return 3101 } 3102 3103 // SetUsername sets the value of property "SVGAElement.username" to val. 3104 // 3105 // It returns false if the property cannot be set. 3106 func (this SVGAElement) SetUsername(val js.String) bool { 3107 return js.True == bindings.SetSVGAElementUsername( 3108 this.ref, 3109 val.Ref(), 3110 ) 3111 } 3112 3113 // Password returns the value of property "SVGAElement.password". 3114 // 3115 // It returns ok=false if there is no such property. 3116 func (this SVGAElement) Password() (ret js.String, ok bool) { 3117 ok = js.True == bindings.GetSVGAElementPassword( 3118 this.ref, js.Pointer(&ret), 3119 ) 3120 return 3121 } 3122 3123 // SetPassword sets the value of property "SVGAElement.password" to val. 3124 // 3125 // It returns false if the property cannot be set. 3126 func (this SVGAElement) SetPassword(val js.String) bool { 3127 return js.True == bindings.SetSVGAElementPassword( 3128 this.ref, 3129 val.Ref(), 3130 ) 3131 } 3132 3133 // Host returns the value of property "SVGAElement.host". 3134 // 3135 // It returns ok=false if there is no such property. 3136 func (this SVGAElement) Host() (ret js.String, ok bool) { 3137 ok = js.True == bindings.GetSVGAElementHost( 3138 this.ref, js.Pointer(&ret), 3139 ) 3140 return 3141 } 3142 3143 // SetHost sets the value of property "SVGAElement.host" to val. 3144 // 3145 // It returns false if the property cannot be set. 3146 func (this SVGAElement) SetHost(val js.String) bool { 3147 return js.True == bindings.SetSVGAElementHost( 3148 this.ref, 3149 val.Ref(), 3150 ) 3151 } 3152 3153 // Hostname returns the value of property "SVGAElement.hostname". 3154 // 3155 // It returns ok=false if there is no such property. 3156 func (this SVGAElement) Hostname() (ret js.String, ok bool) { 3157 ok = js.True == bindings.GetSVGAElementHostname( 3158 this.ref, js.Pointer(&ret), 3159 ) 3160 return 3161 } 3162 3163 // SetHostname sets the value of property "SVGAElement.hostname" to val. 3164 // 3165 // It returns false if the property cannot be set. 3166 func (this SVGAElement) SetHostname(val js.String) bool { 3167 return js.True == bindings.SetSVGAElementHostname( 3168 this.ref, 3169 val.Ref(), 3170 ) 3171 } 3172 3173 // Port returns the value of property "SVGAElement.port". 3174 // 3175 // It returns ok=false if there is no such property. 3176 func (this SVGAElement) Port() (ret js.String, ok bool) { 3177 ok = js.True == bindings.GetSVGAElementPort( 3178 this.ref, js.Pointer(&ret), 3179 ) 3180 return 3181 } 3182 3183 // SetPort sets the value of property "SVGAElement.port" to val. 3184 // 3185 // It returns false if the property cannot be set. 3186 func (this SVGAElement) SetPort(val js.String) bool { 3187 return js.True == bindings.SetSVGAElementPort( 3188 this.ref, 3189 val.Ref(), 3190 ) 3191 } 3192 3193 // Pathname returns the value of property "SVGAElement.pathname". 3194 // 3195 // It returns ok=false if there is no such property. 3196 func (this SVGAElement) Pathname() (ret js.String, ok bool) { 3197 ok = js.True == bindings.GetSVGAElementPathname( 3198 this.ref, js.Pointer(&ret), 3199 ) 3200 return 3201 } 3202 3203 // SetPathname sets the value of property "SVGAElement.pathname" to val. 3204 // 3205 // It returns false if the property cannot be set. 3206 func (this SVGAElement) SetPathname(val js.String) bool { 3207 return js.True == bindings.SetSVGAElementPathname( 3208 this.ref, 3209 val.Ref(), 3210 ) 3211 } 3212 3213 // Search returns the value of property "SVGAElement.search". 3214 // 3215 // It returns ok=false if there is no such property. 3216 func (this SVGAElement) Search() (ret js.String, ok bool) { 3217 ok = js.True == bindings.GetSVGAElementSearch( 3218 this.ref, js.Pointer(&ret), 3219 ) 3220 return 3221 } 3222 3223 // SetSearch sets the value of property "SVGAElement.search" to val. 3224 // 3225 // It returns false if the property cannot be set. 3226 func (this SVGAElement) SetSearch(val js.String) bool { 3227 return js.True == bindings.SetSVGAElementSearch( 3228 this.ref, 3229 val.Ref(), 3230 ) 3231 } 3232 3233 // Hash returns the value of property "SVGAElement.hash". 3234 // 3235 // It returns ok=false if there is no such property. 3236 func (this SVGAElement) Hash() (ret js.String, ok bool) { 3237 ok = js.True == bindings.GetSVGAElementHash( 3238 this.ref, js.Pointer(&ret), 3239 ) 3240 return 3241 } 3242 3243 // SetHash sets the value of property "SVGAElement.hash" to val. 3244 // 3245 // It returns false if the property cannot be set. 3246 func (this SVGAElement) SetHash(val js.String) bool { 3247 return js.True == bindings.SetSVGAElementHash( 3248 this.ref, 3249 val.Ref(), 3250 ) 3251 } 3252 3253 // Href returns the value of property "SVGAElement.href". 3254 // 3255 // It returns ok=false if there is no such property. 3256 func (this SVGAElement) Href() (ret SVGAnimatedString, ok bool) { 3257 ok = js.True == bindings.GetSVGAElementHref( 3258 this.ref, js.Pointer(&ret), 3259 ) 3260 return 3261 } 3262 3263 type SVGAnimateElement struct { 3264 SVGAnimationElement 3265 } 3266 3267 func (this SVGAnimateElement) Once() SVGAnimateElement { 3268 this.ref.Once() 3269 return this 3270 } 3271 3272 func (this SVGAnimateElement) Ref() js.Ref { 3273 return this.SVGAnimationElement.Ref() 3274 } 3275 3276 func (this SVGAnimateElement) FromRef(ref js.Ref) SVGAnimateElement { 3277 this.SVGAnimationElement = this.SVGAnimationElement.FromRef(ref) 3278 return this 3279 } 3280 3281 func (this SVGAnimateElement) Free() { 3282 this.ref.Free() 3283 } 3284 3285 type SVGAnimateMotionElement struct { 3286 SVGAnimationElement 3287 } 3288 3289 func (this SVGAnimateMotionElement) Once() SVGAnimateMotionElement { 3290 this.ref.Once() 3291 return this 3292 } 3293 3294 func (this SVGAnimateMotionElement) Ref() js.Ref { 3295 return this.SVGAnimationElement.Ref() 3296 } 3297 3298 func (this SVGAnimateMotionElement) FromRef(ref js.Ref) SVGAnimateMotionElement { 3299 this.SVGAnimationElement = this.SVGAnimationElement.FromRef(ref) 3300 return this 3301 } 3302 3303 func (this SVGAnimateMotionElement) Free() { 3304 this.ref.Free() 3305 } 3306 3307 type SVGAnimateTransformElement struct { 3308 SVGAnimationElement 3309 } 3310 3311 func (this SVGAnimateTransformElement) Once() SVGAnimateTransformElement { 3312 this.ref.Once() 3313 return this 3314 } 3315 3316 func (this SVGAnimateTransformElement) Ref() js.Ref { 3317 return this.SVGAnimationElement.Ref() 3318 } 3319 3320 func (this SVGAnimateTransformElement) FromRef(ref js.Ref) SVGAnimateTransformElement { 3321 this.SVGAnimationElement = this.SVGAnimationElement.FromRef(ref) 3322 return this 3323 } 3324 3325 func (this SVGAnimateTransformElement) Free() { 3326 this.ref.Free() 3327 } 3328 3329 type SVGAnimatedAngle struct { 3330 ref js.Ref 3331 } 3332 3333 func (this SVGAnimatedAngle) Once() SVGAnimatedAngle { 3334 this.ref.Once() 3335 return this 3336 } 3337 3338 func (this SVGAnimatedAngle) Ref() js.Ref { 3339 return this.ref 3340 } 3341 3342 func (this SVGAnimatedAngle) FromRef(ref js.Ref) SVGAnimatedAngle { 3343 this.ref = ref 3344 return this 3345 } 3346 3347 func (this SVGAnimatedAngle) Free() { 3348 this.ref.Free() 3349 } 3350 3351 // BaseVal returns the value of property "SVGAnimatedAngle.baseVal". 3352 // 3353 // It returns ok=false if there is no such property. 3354 func (this SVGAnimatedAngle) BaseVal() (ret SVGAngle, ok bool) { 3355 ok = js.True == bindings.GetSVGAnimatedAngleBaseVal( 3356 this.ref, js.Pointer(&ret), 3357 ) 3358 return 3359 } 3360 3361 // AnimVal returns the value of property "SVGAnimatedAngle.animVal". 3362 // 3363 // It returns ok=false if there is no such property. 3364 func (this SVGAnimatedAngle) AnimVal() (ret SVGAngle, ok bool) { 3365 ok = js.True == bindings.GetSVGAnimatedAngleAnimVal( 3366 this.ref, js.Pointer(&ret), 3367 ) 3368 return 3369 } 3370 3371 type SVGAnimatedBoolean struct { 3372 ref js.Ref 3373 } 3374 3375 func (this SVGAnimatedBoolean) Once() SVGAnimatedBoolean { 3376 this.ref.Once() 3377 return this 3378 } 3379 3380 func (this SVGAnimatedBoolean) Ref() js.Ref { 3381 return this.ref 3382 } 3383 3384 func (this SVGAnimatedBoolean) FromRef(ref js.Ref) SVGAnimatedBoolean { 3385 this.ref = ref 3386 return this 3387 } 3388 3389 func (this SVGAnimatedBoolean) Free() { 3390 this.ref.Free() 3391 } 3392 3393 // BaseVal returns the value of property "SVGAnimatedBoolean.baseVal". 3394 // 3395 // It returns ok=false if there is no such property. 3396 func (this SVGAnimatedBoolean) BaseVal() (ret bool, ok bool) { 3397 ok = js.True == bindings.GetSVGAnimatedBooleanBaseVal( 3398 this.ref, js.Pointer(&ret), 3399 ) 3400 return 3401 } 3402 3403 // SetBaseVal sets the value of property "SVGAnimatedBoolean.baseVal" to val. 3404 // 3405 // It returns false if the property cannot be set. 3406 func (this SVGAnimatedBoolean) SetBaseVal(val bool) bool { 3407 return js.True == bindings.SetSVGAnimatedBooleanBaseVal( 3408 this.ref, 3409 js.Bool(bool(val)), 3410 ) 3411 } 3412 3413 // AnimVal returns the value of property "SVGAnimatedBoolean.animVal". 3414 // 3415 // It returns ok=false if there is no such property. 3416 func (this SVGAnimatedBoolean) AnimVal() (ret bool, ok bool) { 3417 ok = js.True == bindings.GetSVGAnimatedBooleanAnimVal( 3418 this.ref, js.Pointer(&ret), 3419 ) 3420 return 3421 }