Skip to content
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

Doesn't work in Chrome Apps #37

Closed
alex7kom opened this issue Apr 17, 2015 · 4 comments
Closed

Doesn't work in Chrome Apps #37

alex7kom opened this issue Apr 17, 2015 · 4 comments

Comments

@alex7kom
Copy link
Contributor

vm-browserify uses eval which is disabled in Chrome Apps (completely) and Extensions (by default CSP), therefore browserified asn1.js doesn't work.
https://developer.chrome.com/extensions/sandboxingEval
https://developer.chrome.com/apps/contentSecurityPolicy

@indutny
Copy link
Owner

indutny commented Apr 17, 2015

Right! Good that you found it!

I think the problem is with the following code:

https://github.com/indutny/asn1.js/blob/master/lib/asn1/api.js#L20-L22

It doesn't have any other use than the better error stack traces. Guess, it could be polyfill'ed for the browser by just using proper function.

I wonder if you might be interested in helping me with this! I would really appreciate it!

@alex7kom
Copy link
Contributor Author

I'm sorry, I don't understand.
I tried to find a way to do this without eval/new Function but it seems there is no such way. Or did you mean to just replace it with an anonymous function?

@indutny
Copy link
Owner

indutny commented Apr 18, 2015

@alex7kom thanks for taking a look! I meant replacing it with anonymous function, sorry for the confusion!

@alex7kom
Copy link
Contributor Author

I thought that without that named function the method doesn't seem to make any sense, so I removed it.
#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants