Skip to content

Add image attachments support for Wasm (JavaScript) #1387

@grynspan

Description

@grynspan

This issue tracks adding AttachableAsImage support on Wasm via JavaScript bridging.

Standardized JavaScript has several classes (types? prototypes? whatever the JS terminology is) that represent images that can be serialized. For example, HTMLCanvasElement has a toBlob() function that converts the contents of the canvas to PNG, JPEG, etc.

We would need to be able to link to JavaScriptKit in some fashion and would need to see how HTMLCanvasElement is represented on the Swift side before we could add protocol conformances: it's possible we would need to add blanket conformance for JSObject via isInstanceOf(_:).

Metadata

Metadata

Assignees

Labels

attachments/activities🖇️ Work related to attachments and/or activitiescross-import-overlays🍰 Cross-import overlays (Foundation, Core Graphics, etc.)enhancementNew feature or requesthelp wantedExtra attention is neededimage-attachments📸 Work related to image attachmentswasi/wasm🧭 WebAssembly support

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions