I am developing a chrome App based on Cylonjs. I love the project and wanted to augment it so that we can dynamically send new code and it get flashed to the serial device. The example app here refers to a static browser.js file which is generated by browserify combining script.js and other node modules required. I figured that the browser.js file can be built dynmically as contents of script.js are already included in that file. So, that is the whole motivation of my project as this could evolve into a full fledged arduino web editor chrome App. I am able to dynamically build browser.js file but Chrome doesn't let me inject javascript dynamically into the DOM and I get the following error:
Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-Mugizlz7AFKJ2hm6UA9ySY/31cKCVhLaEX9/QYpJIsk='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
I am developing a chrome App based on Cylonjs. I love the project and wanted to augment it so that we can dynamically send new code and it get flashed to the serial device. The example app here refers to a static
browser.js
file which is generated by browserify combiningscript.js
and other node modules required. I figured that thebrowser.js
file can be built dynmically as contents ofscript.js
are already included in that file. So, that is the whole motivation of my project as this could evolve into a full fledged arduino web editor chrome App. I am able to dynamically buildbrowser.js
file but Chrome doesn't let me inject javascript dynamically into the DOM and I get the following error:I would really love some ideas on how do I solve this issue so that we can have a Cylonjs based 'Thing editor' of sorts as a chrome app.