Re: [whatwg] <iframe async>

On 2/27/15 2:18 PM, Tim Streater wrote:
> One thing I'd like would be to be able to put content into an iframe (and thus have it parsed), but defer any rendering or speculative download of resources referred to in the content.

Depending on whether you care about the href of your iframe and whether 
you want it sandboxed and so forth:

var parsedThing =
   new DOMParser().parseFromString(myString, "text/html");
// Process parsedThing however you want.
myIframe.contentDocument.replaceChild(
   parsedThing.documentElement,
   myIframe.contentDocument.documentElement
);

-Boris

Received on Friday, 27 February 2015 19:39:21 UTC