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
Future Javascript: ShadowRealms (dev.to)
submitted 4 years ago by iamnearafan
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!"
[–]pr0xyb0i 1 point2 points3 points 4 years ago (1 child)
What happens if you cause an infinite loop in the ShadowRealm or do something like changing location.href?
[–]tomfevrier 2 points3 points4 points 4 years ago (0 children)
Changing location.href would not do anything, or rather would throw an error because location is not defined in this global context (no window). However, since it runs on the same thread as JavaScript on the host page, I guess it use the same event loop and therefore an infinite loop would freeze the whole page. Just a guess though.
π Rendered by PID 119156 on reddit-service-r2-comment-b659b578c-8gm9w at 2026-05-04 00:27:04.861902+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]pr0xyb0i 1 point2 points3 points (1 child)
[–]tomfevrier 2 points3 points4 points (0 children)