Skip to content

Instantly share code, notes, and snippets.

@sudikrt
Created August 7, 2019 09:50
Show Gist options
  • Save sudikrt/16174ce198670a3bbf8e7c508254964b to your computer and use it in GitHub Desktop.
Save sudikrt/16174ce198670a3bbf8e7c508254964b to your computer and use it in GitHub Desktop.
var path = $A.get("$Resource.sampleScript");
var req = new XMLHttpRequest();
req.open("GET", path);
req.addEventListener("load", $A.getCallback(function() {
$A.createComponent ('aura:unescapedHTML', {value: req.response},
function(newComp, status, errorMessage ) {
if (status === 'SUCCESS') {
component.set ('v.scriptDataComp',newComp );
}
});
//component.set("v.scriptData", req.response);
}));
req.send(null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment