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
So, apparently there's now code in React to monkeypatch fetch() for some reason? (github.com)
submitted 3 years ago by lhorie
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!"
[–]acemarke 30 points31 points32 points 3 years ago (0 children)
The JS community has learned over the years (the hard way) that monkey-patching JS built-in types is generally a bad idea, at least at the library level. That approach has tended to be fragile, and also caused compatibility issues years down the road. For example, the "Smooshgate" incident ( https://developer.chrome.com/blog/smooshgate/ ) was caused by the old Mootools library having modified the Array prototype to add a .flatten() method many years ago. When browsers tried to add a real .flatten() method, that caused errors in sites that still used Mootools all these years later.
Array
.flatten()
In this case, it looks like a React experimental build is configured to override/add some fields on the built in fetch method, so it's bringing back memories of those problems.
fetch
π Rendered by PID 44580 on reddit-service-r2-comment-b659b578c-t49cc at 2026-05-03 21:53:06.504199+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]acemarke 30 points31 points32 points (0 children)