Ghost/ghost/admin/app/components/gh-html-iframe.js

14 lines
400 B
JavaScript
Raw Normal View History

import Component from '@glimmer/component';
import {action} from '@ember/object';
export default class GhHtmlIframeComponent extends Component {
@action
replaceIframeContents(iframe) {
if (iframe) {
iframe.contentWindow.document.open();
iframe.contentWindow.document.write(this.args.html);
iframe.contentWindow.document.close();
}
}
}