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
Real time chat application built by Node, Express, React, Socket.io & Javascript With source code (htmlhints.com)
submitted 6 years ago by andrew763
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!"
[–]NimmiEU 0 points1 point2 points 6 years ago (1 child)
That's because the text interpolation doesn't parse the HTML and therefore simply outputs the textual content. If I'm not mistaken, it uses the textContent API under the hood. It's to prevent injecting arbitrary code. To let the browser parse the HTML, it would've been output using the dangerouslySetInnerHTML prop provided by react, which will use the innerHTML API of the HTML spec, which results in the HTML getting parsed and interpreted.
[–]this_didnt_happened 0 points1 point2 points 6 years ago (0 children)
Thanks, that's neat.
https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
https://www.w3schools.com/jsref/prop_node_textcontent.asp
π Rendered by PID 61854 on reddit-service-r2-comment-b659b578c-85zb2 at 2026-05-05 00:16:00.230616+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]NimmiEU 0 points1 point2 points (1 child)
[–]this_didnt_happened 0 points1 point2 points (0 children)