Skip to content

🎥 Make videos programmatically with React

docs: expand HtmlInCanvas nesting error message

JonnyBurger48d79169fc8e
diff --git a/packages/core/src/HtmlInCanvas.tsx b/packages/core/src/HtmlInCanvas.tsx
index 7db58cd4c6..f5dfb9d412 100644
--- a/packages/core/src/HtmlInCanvas.tsx
+++ b/packages/core/src/HtmlInCanvas.tsx
@@ -522,7 +522,9 @@ const HtmlInCanvasInner = forwardRef<
}, [width, height, style]);
if (isInsideAncestorHtmlInCanvas) {
- throw new Error('<HtmlInCanvas> effects cannot be nested together');
+ throw new Error(
+ '<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.',
+ );
}
return (
diff --git a/packages/docs/docs/remotion/html-in-canvas.mdx b/packages/docs/docs/remotion/html-in-canvas.mdx
index 54b9647f9a..3d3e92f346 100644
--- a/packages/docs/docs/remotion/html-in-canvas.mdx
+++ b/packages/docs/docs/remotion/html-in-canvas.mdx
@@ -58,7 +58,7 @@ Children will be wrapped in a `<div>` with the given `width` and `height`.
Do not nest `<HtmlInCanvas>` inside another `<HtmlInCanvas>`. Nesting is not supported and throws:
```
-<HtmlInCanvas> effects cannot be nested together
+<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.
```
### `onPaint?`