Is their any alternative to HTML5 iframe srcdoc?

JavascriptWeb DevelopmentFront End Scripts

The srcdoc attribute specifies the HTML content of the page to show in the iframe. The HTML <iframe> tag is used to create an inline frame.

Alternative of the srcdoc attribute will be:

var doc = document.querySelector('#demo').contentWindow.document;
var content = '<html></html>';

doc.open('text/html', 'replace');
doc.write(content);
doc.close();
raja
Published on 11-Apr-2018 11:51:34
Advertisements