I am creating an Iframe and trying to add Html to it's body, butI constantly get an error Cannot read property body of null.
My code looks something like this:
var frameToPrint = document.createElement("IFRAME") as HTMLFrameElement;
frameToPrint.contentDocument.body.innerHTML = "";
Thank you in advance!