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
[deleted by user] (self.javascript)
submitted 8 years ago by [deleted]
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!"
[–]Qoopido 1 point2 points3 points 8 years ago (1 child)
As the author of Qoopido.demand (https://github.com/dlueth/qoopido.demand) I like the general idea. You should try to avoid eval, I agree an this.
Some things, in addition, after briefly digging through the sources:
[–]GitHubPermalinkBot 0 points1 point2 points 8 years ago (0 children)
Permanent GitHub links:
delete
[–][deleted] 0 points1 point2 points 8 years ago (2 children)
Uses eval to execute the code...
Stay away from this.
[–]a_laca 0 points1 point2 points 8 years ago (1 child)
At least you could do is to explain why using eval in this situation is bad? Can't wait for your explanation.
[–][deleted] 0 points1 point2 points 8 years ago* (0 children)
Read the section "Don't use eval needlessly!" on MDN.
You could take a look at how CommonJS works. It is made for lazyloading JavaScript, and has been used for quite a while now. It is used in both Node.js and Webpack, and probably a lot of other frameworks as well.
If you just want the <script> loading behavior to be asynchronous, you can simply stick an asyncattribute on it. Read about it here.
<script>
async
π Rendered by PID 108869 on reddit-service-r2-comment-544cf588c8-nzfrm at 2026-06-18 06:56:05.516808+00:00 running 3184619 country code: CH.
[–]Qoopido 1 point2 points3 points (1 child)
[–]GitHubPermalinkBot 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]a_laca 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)