-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible with content-security-policy without unsafe-eval #56
Comments
GordonSmith
added a commit
to GordonSmith/hpcc-js-wasm
that referenced
this issue
Mar 13, 2021
Switch to globalThis polyfill (primarily for Node 10) Fix issue resetting wasmFolder to undefined Fixes hpcc-systems#56 Signed-off-by: Gordon Smith <[email protected]>
Merged
FYI the graphviz team are planning a 2.47.0 release on Monday so I can release this fix in tandem with that? |
Oh that would be perfect - no rush on my end :) Have a pleasant weekend! |
This was referenced Aug 13, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thanks for maintaining this - I've been using both at work and for personal projects. Great to be able to quickly put together useful graphs.
Recently, I'm using this in an Electron app, which by default has a strict content security policy, blocking
eval
unlessunsafe-eval
is explicitly specified, which I wouldn't want to enable for security reasons.Unfortunately, this line violates the policy, since the
Function()
constructor is effectivelyeval
.Perhaps we could use
globalThis
to get a reference to the global object, no matter the environment, which has decent browser support at this point (aside from IE)? WASM doesn't work in IE11 anyways so we wouldn't be losing much. Not sure if there is much node usage of this module butglobalThis
was introduced in node 12. The previous node release, 10, is being end-of-lifed on2021-04-30
.Let me know and I could make a PR for it!
The text was updated successfully, but these errors were encountered: