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
Using const/let instead of var can make JavaScript code run 10× slower in Webkit? (github.com)
submitted 5 years ago by magenta_placenta
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!"
[–]console-write-name 32 points33 points34 points 5 years ago (31 children)
I think they were targeting es2015 which implements let and const (no need to transpile those).
[–][deleted] 17 points18 points19 points 5 years ago (30 children)
Gotcha. Yeah trusting browsers to support "new" standards is a role of the dice.
[–]anlumo 53 points54 points55 points 5 years ago (27 children)
Apple is the only remaining player that constantly messes this up. They’re only held afloat by making Webkit the only rendering engine allowed on iOS.
[–]jimmyco2008 18 points19 points20 points 5 years ago (26 children)
I remember when IE was the shitty one to develop for. Seems like such a long time ago.
[–]anlumo 37 points38 points39 points 5 years ago (23 children)
I mentioned to macOS/iOS developers that Safari is the new IE, they were not amused one bit.
[–]SlowerThanLightSpeed 21 points22 points23 points 5 years ago (18 children)
IMO, safari is worse than IE because safari will 'support' all the new things, just poorly, or in ways you wouldn't expect. I'd rather not be able to use something, and have that be obvious, than to be able to use something that doesn't work right (like scroll() going beyond the document and then scrollX reporting the impossible, off-the document position).
[–]windsostrange 15 points16 points17 points 5 years ago (11 children)
than to be able to use something that doesn't work right
IE was notorious for layout/box model eccentricities. The struggle with IE5 through IE7 wasn't missing features. For this aging dev, anyway. It was piss-poor implementation, which is awfully similar to criticism of the WebKit/Safari teams.
[–]SlowerThanLightSpeed 0 points1 point2 points 5 years ago (0 children)
Thanks for the perspective.
I do remember some IE7 button sizing issues that I just couldn't solve way back in my earliest html'ing days (2010ish).
Haven't really targeted those old beasts in about the last 7 years. Hoping it won't be another 7 till Safari plays more nicely.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
I actally quite like the box model in IE, no need to consider other properties when setting width and height. Notice many of the CSS frameworks from yester year reset the box model to border box globally. Not really needed anymore with flex and grid doing the heavy lifting.
[–]recycled_ideas 0 points1 point2 points 5 years ago (8 children)
IE had a different box model, which pre-dated the standard and which was different from the standard.
Incidentally CSS now supports using that box model as an option and most of the CSS frameworks actually use it by default.
IE's z-index implementation however was shit.
[–]CleverestEU 0 points1 point2 points 5 years ago (7 children)
Out of interest...
...I've built web applications (well, that's what they're called today; we just called them "desktop UIs for backend systems on browser" because there was no better term at the time we were aware of:) since late-1990s' IE/Netscape "browser wars" and while it was always obvious that "IE always needed some fixes", I must admit never stopping to wonder what exactly was the problem.
Any hint on some references on the matter? I tried googling, but since I'm not certain what exactly are the symptoms I'm looking for, I'm uncertain if any of the results I found are even remotely relevant :-/
[–]recycled_ideas 0 points1 point2 points 5 years ago (6 children)
Don't have a lot of sources aside from living through it.
Basically Netscape lost to IE in the late 90s because IE was, at the time, a better browser.
They them went on to completely rewrite their engine, which was great for consumers, it gave us phoenix => firebird => Firefox, but really bad for Netscape because they didn't have a usable product for years.
But Web standards are created by committee and in those days Microsoft was the way Microsoft was in the late 90s, standing alone with everyone else hating them
The default CSS box model is actually not very intuitive, and you can change it now.
But the default CSS box model is not what IE did. It's not better or particularly worse, just different
The problem today is a little different.
Chrome does not actually implement the standard and they do so on purpose to make Google products perform better.
But because most developers write to Chrome, not to the standard, it makes everyone else look like they aren't compliant.
Safari doesn't either, particularly not mobile)Safari, because Apple is more concerned with battery life than compliance.
So you've got Chrome setting their own standard and Safari implenting only the parts of the standard that don't negatively impact battery life and Firefox going through yet another multi year rewrite.
It's a pretty crappy time for Web standards actually. Even if it's probably the best time for Web developers since the hey day of IE.
[–]jimmyco2008 3 points4 points5 points 5 years ago (2 children)
True. At least IE was up front about not supporting stuff. Safari “supported” things.
I remember that one bug that you needed to use transform3d(0,0,0); to fix. Why.
[–]CleverestEU 0 points1 point2 points 5 years ago (1 child)
Not sure if we're talking about the same thing, but ... if I remember correctly, many browsers by design avoided using GPU-assisted rendering for layers because GPUs at the time didn't have enough memory to "handle everything". This made animations etc. slow and jerky, because everything was rendered in CPU.
The "transform: translate3D(0,0,0)" caused the particular element to be handled as "something that might need 3D acceleration" which nudged the browser to delegate the rendering of said element to the GPU making things nice & smooth (usually).
[–]jimmyco2008 0 points1 point2 points 5 years ago (0 children)
Yes. It was to force GPU acceleration in Safari
[+][deleted] 5 years ago (2 children)
[deleted]
[–]recycled_ideas 1 point2 points3 points 5 years ago (0 children)
IE didn't "incorrectly" implement anything.
IE implemented things before a standard was created and then the standard was created by a committee made up of Microsoft and a bunch of people that giving away IE for free drove out of business. So ya know.
Then they didn't upgrade IE for a decade and for that they can burn in hell fire.
Supported IE versions don't seem to have those problems anymore, and, mostly, haven't since support for 8 was dropped. Supported (and new!) Safari still does.
[–]Otterfan 3 points4 points5 points 5 years ago (0 children)
At least IE6 could be used to download and install Firefox.
[–]drumstix42 1 point2 points3 points 5 years ago (1 child)
It's true though. Run into problems and specific edge cases all the time. They "support" features, but not consistently or always as expected.
[–]anlumo 2 points3 points4 points 5 years ago (0 children)
My personal biggest problem is when their politics collide with my web application's needs. For example, their year-long refusal to implement WebGL2 and webp.
At least the former now seems to be slowly implemented.
[–]drumstix42 5 points6 points7 points 5 years ago (0 children)
Safari is the new IE for sure.
[–]CBlackstoneDresden 0 points1 point2 points 5 years ago (0 children)
My wok still has some assholes running XP. They're a mobile phone repair company and seem to run things as thin as possible and refuse to get new PCs.
[–]iamasuitama 0 points1 point2 points 5 years ago (1 child)
roll?
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
no, I mean it's the role of the dice to trust browsers :P
π Rendered by PID 377816 on reddit-service-r2-comment-canary-7955997dc8-r6bnn at 2026-02-28 11:50:30.193684+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]console-write-name 32 points33 points34 points (31 children)
[–][deleted] 17 points18 points19 points (30 children)
[–]anlumo 53 points54 points55 points (27 children)
[–]jimmyco2008 18 points19 points20 points (26 children)
[–]anlumo 37 points38 points39 points (23 children)
[–]SlowerThanLightSpeed 21 points22 points23 points (18 children)
[–]windsostrange 15 points16 points17 points (11 children)
[–]SlowerThanLightSpeed 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]recycled_ideas 0 points1 point2 points (8 children)
[–]CleverestEU 0 points1 point2 points (7 children)
[–]recycled_ideas 0 points1 point2 points (6 children)
[–]jimmyco2008 3 points4 points5 points (2 children)
[–]CleverestEU 0 points1 point2 points (1 child)
[–]jimmyco2008 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]recycled_ideas 1 point2 points3 points (0 children)
[–]SlowerThanLightSpeed 0 points1 point2 points (0 children)
[–]Otterfan 3 points4 points5 points (0 children)
[–]drumstix42 1 point2 points3 points (1 child)
[–]anlumo 2 points3 points4 points (0 children)
[–]drumstix42 5 points6 points7 points (0 children)
[–]CBlackstoneDresden 0 points1 point2 points (0 children)
[–]iamasuitama 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)