Added Context to emulate node behaviour#8
Added Context to emulate node behaviour#8pluma wants to merge 3 commits intobrowserify:masterfrom pluma:node-like-context
Conversation
|
Having the Context object adds some redundancy, but if node demands it, it's the right thing to do if we want to make sure code written for browserify remains compatible with node. |
|
I've adjusted the behaviour to further mimic nodes behaviour. This seems to also fix #6. |
|
Published in 0.0.3. I had to tweak the code slightly to save the reference to |
| @@ -63,11 +103,15 @@ Script.prototype.runInThisContext = function () { | |||
| return eval(this.code); // maybe... | |||
There was a problem hiding this comment.
Firefox : 65.0.1
throws error where as Chrome doesnt.
Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”).
There was a problem hiding this comment.
If you are using a CSP header that does not allow eval as script-src, compliant browsers will throw an error and not let you use eval. This is working as intended.
There was a problem hiding this comment.
Also way to gravedig an unrelated PR with an issue that isn't even related to the project directly. Please don't do that.
Fixes #7.