opal / opal-browser

Browser support for Opal.
MIT License
115 stars 36 forks source link

Using in Chrome Extension #108

Open bendangelo opened 3 weeks ago

bendangelo commented 3 weeks ago

I would like to use this in my chrome extension but eval is blocked. Do you have any work arounds? This is caused by the custom node class.

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

    at Function (<anonymous>)
    at custom.rb:21:1
    at custom.rb:11:1
    at custom.rb:5:29
    at custom.rb:5:17
    at Opal.modules.browser/dom/element/custom (custom.rb:5:1)
    at Object.load_normalized (runtime.js:2752:7)
    at Object.require (runtime.js:2787:5)
    at klass.$$require (kernel.rb:744:1)
    at Opal.modules.browser/setup/full (full.rb:11:1)
    at Object.load_normalized (runtime.js:2752:7)
    at Object.require (runtime.js:2787:5)
    at require.js:1:55