iframe
Override the root of the iframe.
const overrides = {
iframe: ({ children, document }) => {
useEffect(() => {
if (document) {
document.body.setAttribute("style", "background: hotpink;");
}
}, [document]);
return <>{children}</>;
},
};
Props
Prop | Example | Type |
---|---|---|
document | {} | Document |
children | <div /> | ReactNode |
document
The document of the iframe window.
children
The default node for the iframe.