Open
Description
Hi,
I am using tensorboard to create a plugin so that I can render custom charts. I wish to use Chart.JS to add this feature and need to add a script to be able to use it. I do so by calling the loadScript
function here in the example plugin.
However, I get Refused to load the script 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-PVZp/wXI2V6hq7T2aNiDNM+vJWIOWwNwyhE53i+6lSQ='". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
function loadScript() {
const script = document.createElement('script');
script.src = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js";
document.body.appendChild(script);
console.log("I am here...Trying to load ", url);
}
Is there a better way to plot custom charts?