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

Stringifying functions #31

Open
DayDun opened this issue May 30, 2019 · 0 comments
Open

Stringifying functions #31

DayDun opened this issue May 30, 2019 · 0 comments

Comments

@DayDun
Copy link

DayDun commented May 30, 2019

Converting a function to a string can give different results depending on which environment is running the code.

"" + console.log

gives

"function () { [native code] }"

in JStillery while in chrome it gives

"function log() { [native code] }"

and in firefox

"function log() {\n    [native code]\n}"

"" + function() {/* Hello world */}

should also return

"function() {/* Hello world */}"

instead of

"function () {\n}"

like it does right now.

I think it would be great if options were added to JStillery where you could specify which environment should be emulated, where you could choose a browser for example.

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

1 participant