Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.iFrame = document.createElement("iframe");
const perm = ["allow-same-origin", "allow-scripts"];
this.iFrame.style.display = "none";
this.iFrame.sandbox = perm.join(" ");
this.iFrame.onload = () => {
this.iFrame.contentWindow.document.open("text/html", "replace");
this.iFrame.contentWindow.document.write(this.iframeContent());
this.iFrame.contentWindow.document.close();
};
document.body.appendChild(this.iFrame);
// FIXME We have to improve this
ExpressionEvaluator.evaluateExpression = this.evaluateCode.bind(this);
}