The Zombie DOM - old DOM stuff that still haunts us today | HTTP 203
Вставка
- Опубліковано 10 лют 2025
- Jake and Surma chat about 'features' of yesterday that still get in our way today. You might have encountered some of them before, but here's why they're weird.
Bgcolor → goo.gle/3s2Znuq
X-Mixed-Replace image → goo.gle/3pRgwo2
Box model and quirks mode → goo.gle/30l5rCQ
image → goo.gle/3ym1cDC
document.all in the HTML spec → goo.gle/3oOxOTh
document.all in the ES spec → goo.gle/3oOQHFK
Live and static nodelists → goo.gle/30pXlci
Java bindings for the DOM spec → goo.gle/33gxfcC
The WebIDL spec → goo.gle/3m1Xn1w
Document.domain → goo.gle/33sfwiH
More videos in the HTTP 203 series → goo.gle/HTTP203
Subscribe to Google Chrome Developers here → goo.gle/Chrome...
Also, if you enjoyed this, you might like the HTTP203 podcast → goo.gle/HTTP20...
#HTTP203 #ChromeDeveloper #WebDev
Thank you for calling out APIs that return either items or arrays depending on the number of results. I've had many a murderous thought because of it.
This web archeology stuff is fascinating! Like with POSIX, I'm always amazed by all the weird esoterisms we've built into our systems. Of these historical artifacts, part of me thinks "CULL THEM!" and part of me thinks they're beautiful in their ugliness and complexity. Like the endless and uncharted catacombs of Paris or the abandoned metro stations of NYC, there's so much wonder in our civilization's forgotten subspaces. It makes the web feel magical, like you're always one hammer throw away from rediscovering a tunnel that leads to Narnia. Or, more likely I guess, to a vandalized used toilet in an abandoned war bunker.
I love these so much. Jake and Surma are so knowledgeable and enjoyable and the production is great too. Happy Halloween, Christmas and Easter!
"Bad Decisions Driven By Good Intentions" absolutely _does_ sound like an MCR album
I was laughing on the outside but crying on the inside while watching this... Not sure what to feel but great episode anyway!
This is the best reaction I could have hoped for really
love your content. I can't get enough of this :D
Loved every minute of this episode !
Very much appreciate the explanations. I lived through this evolution, especially when I tried to do screen scraping in the 90s and had to figure out the nascent DOM. The "all" scaler or array thing was just one of a slew of challenges. The other side was the way sites were implemented idiosyncratically. The backward compatibility is amazing though not perfect. I had to junk a device that was too clever by half in using JavaScript that no longer worked. What made it especially challenging is trying to figure this out by experimenting when the actual behavior was perverse.
I recall a few years ago using a backwards compatibility trick by inserting an tag inside a . Older browsers would ignore the SVG since it wasn't recognized, but it would pick up the tag that contained the bitmap fallback. So yeah, I'm one of those culprits.
Ohhh I remember that trick!
Loving this series really! I'm not a huge fan of Google, but these two are making me laugh and learn every single time!
I felt sure 'document.write' would be a star in this monster show. But I'm happy to discover a few lesser monsters.
Tech history is always a blast to watch
Those quirks are good to not know, but your presentation teaches about the inners of the browsers anyway, so good topic
😂😂😂 This .all is deprecated don’t use it…
But it’s the web.
😂😂🤣🤣 I’m crying laughing.
Thank you for this informative video! Yesterday, I actually encountered the array Htmldocument and I was puzzled why I could not use .map so I ended up using for loop instead.
I had forgotten about how people used to make popup menus with Java, somehow this reminded me of that. The horror!
Interesting topic
If the !DOCTYPE is used as a type of version control, why don't we just define a new version that removes all these shenanigans?
JS did this once with strict mode. Perhaps there could be a 'DOM strict mode' someday.
It's been discussed multiple times, but the benefit never seems big enough.
would love to have a big website with all of those features and pass it to a junior dev :)
I would be interested in how much that slows performance (probably almost none) and how much of the code are these edge cases. Except for the stuff at the end, it didn't seem so bad like 'image' as an alias for 'img'. The picture-tag is also written out and not 'pic')
@Surma If you're prototyping, it's okay to use the ids directly as variable names. All the html ids that are also valid js variable names are auto-registered as variables under the global scope. Typescript always scream at me but, oh well… ¯\_(ツ)_/¯
I use "window as any" or "window as unknown as Record"
I was hoping that the industrial look was temporary, I like the old set better.
Are you two going back some day to a coffeeshop type of set, or is this permanent?
It isn't permanent
Wonderful episode... make this a recurring theme, please!
Enjoyed the episode with the only downside being it didn't get released as a Halloween troll special.
Will there be a sequel next Halloween?
Another good one is document referrer or HTTP referer?
Tim can't spell 😀
Surprised you didn't mention navigator.userAgent, but I suppose that's not as obscure. I didn't know any of these, except the whole live and static NodeList thing. Super annoying to deal with.
What's wrong with navigator.userAgent?
@@31redorange08 Mostly that all browsers identify themselves to be... all other browsers at the same time.
@@dassurma But that's not a real problem of the API. Site developers should've been punished for trying to parse it for feature detection.
OK, so I get why the likes of `.map` don't exist on NodeList, but can we at least get them on iterators?
And can we also have a nice way to convert a NodeList to an iterator, so we can use those methods there too?
Sometimes I don't want to convert it to an array just so I can filter it
NodeList is an iterator now, so we can't add map to that for compat reasons
@@jakearchibald 🙁
TC39 is looking into that: github.com/tc39/proposal-iterator-helpers
Is this a bad thing? `NodeList.prototype.map = Array.prototype.map`
@@vchabal it's always risky editing objects you don't own, but it might be ok in this case
Can I have episode with H1 "The Old blond Vampire DOM - old DOM from other continet that need everblackgreen those days"
The shoes, are they gone for good?
Dunno 🤷♂️
Not sure what a gef image format is.
I thought
var a = ""
would make it into the list.
Thank u I am a old time I needs help...
pretty much everything
All this features does not make me proud to be a web dev.
Thanks! I hate it.
You're welcome 😀
Are u on Facebook?
As an aspiring tech person, I find this a tad exclusionary. Just a little more laying out the ground around some of these cases would've brought me in on the shenanigans. I understand there are always someone who'll feel like that, but why not include a little more than the experienced crowd? Apart from that I like this format, and these guys work well in it.
Happy to fill in some of the details! Which parts did you find exclusionary?
@@jakearchibald Thanks for replying. I mean there's a certain quite high level of knowledge/experience assumed by your conversation, and if you lowered it a bit, it could be accessible to a bigger audience. I find a lot of tech people explain stuff as if the audience understands everything except the exact thing being explained. This is often correct in a professional setting, but not in most broader contexts.
@@peppigue since this episode was about a bunch of different 'features', is there a particular section that you didn't find well-explained? What bit of detail was missing?
Hello World!
I feel like 1995
Real men write HTML and JS with notepad!
First!
Too many jokes and acting and comedy and fooling around, I would appreciate the videos more on the point.... thankx!
I appreciate the honest feedback, but maybe the show just isn't for you. We do this all in one take, so there isn't any acting. This episode in particular was focusing on silly stuff, and I enjoyed having a bit of fun with it. I'd rather it was like this than just a straight reading of facts.
@@jakearchibald I find the actual content VERY interesting and funny too, the playing around is distracting me and rather unfunny for me. In my eyes you could attract more viewers :)) Thanx for the openness!
@@kaipulfer8229 just so I'm on the same page, can you give me an example or two of what you didn't like? Was it just the intro, or particular parts within the episode too?
@@jakearchibald You know, I don't want to be ugly here, its so personal to give feedback to a creative work. First: its free what you show to us, thank you so much for that. I wouldn't need the whole 2 person format. Showing the examples and expressing how astonishing they are would be enough and be much shorter and compressed. For me, you too you have far more fun with each other than I have with watching it :)) And I refer to all episodes and the general style. I only give that feedback because I would like to see this original content but the format is annoying me so much, that I do not watch it anymore :)) Selfish guy I am.
@@kaipulfer8229 ah ok, it sounds like the issues here are pretty fundamental rather than just a couple of tweaks. Yeah, I just don't think this show is for you. However, I really appreciate the honest feedback, and hopefully you can find another show to enjoy on the channel!
Firrrrrst