OffscreenCanvas
Generated.swift:13185class OffscreenCanvas
class OffscreenCanvas
import DOM
class EventTarget
protocol Any_CanvasImageSource : ConvertibleToJSValue
protocol Any_HTMLCanvasElement_or_OffscreenCanvas : ConvertibleToJSValue
protocol ConstructibleFromJSValue
Types conforming to this protocol can be constructed from JSValue
.
protocol ConvertibleToJSValue
Objects that can be converted to a JavaScript value, preferably in a lossless manner.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Escapable
protocol JSBridgedClass : JSBridgedType
Conform to this protocol when your Swift class wraps a JavaScript class.
protocol JSBridgedType : ConstructibleFromJSValue, ConvertibleToJSValue, CustomStringConvertible
Use this protocol when your type has no single JavaScript class. For example, a union type of multiple classes or primitive values.
required init(unsafelyWrapping jsObject: JSObject)
convenience init(width: UInt64, height: UInt64)
override class var constructor: JSFunction? { get }
@ReadWriteAttribute var height: UInt64 { get set }
@ClosureAttribute1Optional var oncontextlost: EventHandler { get set }
@ClosureAttribute1Optional var oncontextrestored: EventHandler { get set }
@ReadWriteAttribute var width: UInt64 { get set }
func convertToBlob(options: ImageEncodeOptions? = nil) -> JSPromise
func convertToBlob(options: ImageEncodeOptions? = nil) async throws -> Blob
func getContext<Context>(_ contextType: Context.Type, options: JSValue? = nil) -> Context? where Context : OffscreenRenderingContext
func transferToImageBitmap() -> ImageBitmap
import WebGL1
protocol Any_HTMLCanvasElement_or_OffscreenCanvas : ConvertibleToJSValue
protocol Any_TexImageSource : ConvertibleToJSValue
import WebGPU
protocol Any_GPUImageCopyExternalImageSource : ConvertibleToJSValue
protocol Any_HTMLCanvasElement_or_OffscreenCanvas : ConvertibleToJSValue