I have multiple HTMLS. I want to embed them into the plugin through iframe, but some of the contents cannot be displayed completely.
For example: In the canvas area chart, the Dark Mode button cannot be switched;
However, html can be displayed and used normally on the browser. May I ask if there are any restrictions on figma? I hope you can help answer this
const updateIframeContent = () => {
nextTick(() => {
if (previewFrame.value && props.htmlContent) {
try {
const iframeDoc = previewFrame.value.contentDocument || previewFrame.value.contentWindow.document;
iframeDoc.open();
iframeDoc.write(props.htmlContent);
iframeDoc.close();
playLightAnimationOnce();
} catch (e) {
console.error('error', e);
}
}
});
};
<iframe ref="previewFrame" class="html-iframe" :class="device" @load="onIframeLoad"></iframe>