The potential candidates for Satori included:
- Canvas-based solutions lacked dynamic behaviors (e.g., layout) and APIs.
- Web Browser-based solutions were too slow
- SVG (File Format)-based solutions were the perfect balance of the two, being fast and dev-friendly (HTML/CSS)
However, SVG (File Format) solutions lacked layout support. Given that SVG (File Format) and HTML + CSS are alike, we can convert HTML and CSS to SVG (File Format). We can calculate the elements' positions through a layout engine and convert them into SVG (File Format) markups.
This is already done by an open-source project facebook/yoga. Converting it into WASM will also benefit by targeting Web Workers. Using a WASM-based approach also unlocked the possibility of running it on edge. Introducing support for WebAssembly at the Edge.