diff --git a/docs/catalog/blocks/canvas-dom-refractor.mdx b/docs/catalog/blocks/canvas-dom-refractor.mdx new file mode 100644 index 0000000000..5068a3ec47 --- /dev/null +++ b/docs/catalog/blocks/canvas-dom-refractor.mdx @@ -0,0 +1,58 @@ +--- +title: "Canvas DOM Refractor" +description: "Native HTML-in-canvas showcase that refracts, magnifies, slices, and curves one editable DOM source as pixels" +--- + +# Canvas DOM Refractor + +Native HTML-in-canvas showcase that refracts, magnifies, slices, and curves one editable DOM source as pixels + +`experimental` `showcase` `canvas` `html` `refractor` `native` + + +This catalog item is experimental. Its native path uses Chrome's HTML-in-canvas API, which is unstable and can change or be removed. Stable Chrome keeps the fallback path. For native rendering, enable `chrome://flags/#canvas-draw-element`, restart the browser after changing the flag, or launch Chromium with `--enable-features=CanvasDrawElement`. + + +## Agent Setup + +When adapting this item for a user, edit the feature flag yourself when browser access is available, then tell the user to restart the browser before previewing again. If launching Chromium from automation or render scripts, include: + +```bash +--enable-features=CanvasDrawElement +``` + +Do not assume native capture is available. Keep the fallback path intact and verify `drawElementImage` support in the target browser. + +