I am updating a div content via ajax call. The response(html) which i get contains a reference to an internal JavaScript file.
The referenced javascript is not getting loaded. How can I solved the issue.
Below is how I am setting it to a div.
document.getElementById('content-wrapper').innerHTML = data;
The file is loaded correctly when i set the content using jQuery's .html() function. But for that we have to disable 'unsafe-eval' in our content security policy. So jQuery is not an option.