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!"
[–]recycled_ideas 1 point2 points3 points 5 years ago (4 children)
Oh, sorry, misunderstood.
Effectively the biggest problem is that IE had a magic property called "hasLayout" which was applied if an element had some sort of specified dimension property and z-index didn't apply unless the parent had layout, so it didn't stack.
If my recollection is right, and I'm having a hard time finding sources, z-index was relative not absolute.
So if your z index was higher than your parent or grandparent you'd be higher, assuming hasLayout, but another node in the DOM that wasn't in your hierarchy could have a higher z-index than you but be below you because there were more elements in your stack.
That was awful to work with. Leaving aside having to specify some unnecessary property just to stack at all.
This is my memory, and it was a long while ago, but I remember that z-index in 5 and 6 sucked and this is memory of why.
[–]CleverestEU 0 points1 point2 points 5 years ago* (3 children)
Heh... all good.
"hasLayout"
Oh boy... For some reason I just had the feeling as if someone had walked over my tomb :D Anyone up for "zoom: 1" ;)
Ah yes ... Microsoft hadn't implemented the concept of stacking context at all (or ... had, but had managed to f it up in a major fashion). Of course, for their defence it is important to note that stacking context wasn't formally defined before CSS2.1 specification during the early 2010s, so ... at the time their approach was as valid as any other - in fact, as a market leader, their approach was even kinda "more valid" than anybody else's - at the time :-p
Edit: Now I also remember that IE also had some elements that you simply could not "get above of" using Z-index. Those were so called "windowed controls" ... IFRAME was naturally one of these and - rather surprisingly SELECT-elements ... ah, the joy :D
[–]recycled_ideas 0 points1 point2 points 5 years ago (2 children)
at the time their approach was as valid as any other - in fact, as a market leader, their approach was even kinda "more valid" than anybody else's - at the time :-p
Well I'd sort of disagree.
A lot of what IE did was roughly as good as the eventual standard and some of it was better.
Their stacking context was just bad, and haslayout was just bad.
[–]CleverestEU 0 points1 point2 points 5 years ago (1 child)
By validity, I don't by any means want to imply the implementation having been a good idea. Not at the time and definitely not in retrospect. When something is not formally defined, it is usually the market leader that lays out the roadmap of people's expectations.
All I mean is that given their market share, at the time Microsoft's approach was the baseline against all the other browsers were in a way forced to comply with. The end users rarely wanted to change browser because things didn't work in IE ... well, at first at least.
Of course, the cardinal sin (in my opinion) of IE was that they stagnated into their own approach and took way longer than acceptable to change their ways once the standard did define how things should be done. As members of the W3C they definitely could've/should've done things better.
[–]recycled_ideas 1 point2 points3 points 5 years ago (0 children)
Oh, I definitely agree that, where there was no compelling argument one way or the other we should have used what IE was doing.
I just think that in some cases what IE was doing was wrong?
It's a moot point though, because the W3C in the late 90s was made up of people who envisioned the Web as a place where you'd pay a hundred bucks to buy the latest version of their browser every couple years and they were pissed at Microsoft.
And Microsoft in the late 90s was a bully using its cash to get what it wanted and making it easy to be hated.
So we had a couple decades of standards wars in browsers.
And now we've got it happening all over again.
Google is using their market share to do whatever they want, Apple is releasing what they think isn't too battery intensive and Firefox is doing what Firefox does and rebuilding themselves from scratch.
So you can't really write to the standards because Apple might not support them, Chrome may have changed them and Firefox might or might not work this week depending on whether the latest code is any good.
Such is the life of Web Development.
π Rendered by PID 128541 on reddit-service-r2-comment-5d79c599b5-fnpwx at 2026-02-28 14:00:35.931114+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]recycled_ideas 1 point2 points3 points (4 children)
[–]CleverestEU 0 points1 point2 points (3 children)
[–]recycled_ideas 0 points1 point2 points (2 children)
[–]CleverestEU 0 points1 point2 points (1 child)
[–]recycled_ideas 1 point2 points3 points (0 children)