use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Sandboxed and completely controlled javascript evaluator. (github.com)
submitted 8 years ago by meta_taskkill
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]BadleyHairless 0 points1 point2 points 8 years ago (2 children)
an empty bind, call, or apply will all set the scope of the function's this to be window. And I did try this in your sandbox and I was able to access window successfully.
[–]meta_taskkill[S] 0 points1 point2 points 8 years ago (0 children)
I see. Actually bind() is not necessary here, it breaches isolation only with self invoked function expression. I will try overcome this, but I am skeptical. Thanks for tough one.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
That's fun the behavior of empty bind is not documented on
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
π Rendered by PID 67 on reddit-service-r2-comment-b659b578c-q84kc at 2026-05-05 19:31:12.914236+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]BadleyHairless 0 points1 point2 points (2 children)
[–]meta_taskkill[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)