text
stringlengths
0
1.36k
**Rebecca Murphey:** So you didn't have to hear that.
**Alex Sexton:** And if you're unlucky, then you heard us yelling it. Maybe you got both. Cool. So the hiddenhancement this week... Adam, why don't you introduce the concept?
**Adam Sontag:** Okay, so the concept of a hiddenhancement - it's an enhancement that's hidden; kind of like the first syllable of the word "enhancement" is hidden and the last syllable of the word "hidden". \[laughter\] So this is a segment where we would talk about cool stuff that was around and you didn't know you c...
**Rebecca Murphey:** Like, in jQuery.
**Adam Sontag:** Primarily in jQuery, but now most of that is in the DOM... Right, Paul? \[laughter\]
**Paul Irish:** Yeah, sure. Okay, so there was at least two hiddenhancements that I wanted to share... Actually, they're both kind of new. You might be familiar with document.elementFromPoint(), where you provide an x, y location and it tells you the element that is right there. But there is another method which is mor...
**Alex Sexton:** Is it a NodeList or is it an Array?
**Paul Irish:** It's an Array. God damn... Well, you know, there's an interesting distinction between Arrays and NodeLists, right?
**Alex Sexton:** What's that, Paul?
**Paul Irish:** \[laughs\] A NodeList is like this Array-like thing, but it's kind of -- it's been frustrating, because we always get back NodeLists from querySelectorAll() or getElementsByTagName(), right? And in NodeLists you can't do things that you'd normally do with an Array, right?
**Adam Sontag:** If I recall, there's like prototype methods missing...
**Alex Sexton:** Do a slice, yeah. \[laughter\]
**Paul Irish:** Yeah, it's always been frustrating, so that's why we always do that arrayed prototype slice deal. So number two hiddenhancement is that the NodeList object is now iterable.
**Alex Sexton:** It's everywhere?
**Paul Irish:** Yeah, it is everywhere. I think probably IE10 is where it bottoms out. But yeah, iterable NodeList available on all modern browsers. You get back the result from querySelectorAll(), and you have foreach sitting on that.
**Rebecca Murphey:** Speaking of IE10, I just wanted to let you know about this other browser that came out... It's called IE9. It's gonna have CSS3 support, and you can hear us talk all about this in the South by Southwest (???) episode of yayQuery. \[laughter\]
**Alex Sexton:** \[27:41\] Yeah, me and Paul -- oh, that's a good story. Paul and I were given, via yayQuery - because we were on the yayQuery podcast, for some reason, we got VIP press badges to the IE9 launch party at South by Southwest, and we sat at press tables as they did the press announcement. We were next to W...
Then we got to go see yaySayer at the after party, in the VIP section. We were there with -- who was it...? Werner Vogels from Amazon, the CTO of Amazon. It was a wild ride. IE9... Good old days. \[laughter\] Yeah, yayQuery press badges were a thing at some point... \[laughter\]
**Paul Irish:** That was so legit!
**Alex Sexton:** That's funny. So one other hiddenhancement that I wanted to bring up... I saw an Addy Osmani tweet maybe a few bits ago; there's a new feature in DevTools -- Paul knows a little bit about DevTools, Chrome DevTools specifically... And we're always talking about splitting up your code, and only uploading...
**Paul Irish:** Sure. In DevTools, what you can do is -- it's in a place that we call "the drawer", which is the little console at the bottom, when you hit Escape and that pops up... So you can definitely hit Escape to bring up that, or you can go through the top-right, the little three dots menu, go to More Tools and ...
You can do it instantly... If all you wanna look at is CSS, it's just gonna look at the CSS that's used on the page. But usually, you're looking at scripts, so you'll wanna load the page and maybe open up, like try out some functionality. Then you get a report on exactly how many bytes of every file that's loaded have ...
**Alex Sexton:** Very nifty.
**Paul Irish:** We're also thinking of making it more like live, so all those results would be streaming, and maybe you would be able to rewind to certain interesting points, like at DOM content loaded it was this, but then you scrub the slider forward and see what it was at window load, so you can get the history of a...
**Alex Sexton:** Is this available as data from Lighthouse, or anything like that?
**Paul Irish:** Yeah, we have it available... We have some audits for this in Lighthouse 2, and we just kind of summarize it at a high level. You can also build some tooling around this on your own, if you wanna dig into the DevTools protocol. It's pretty raw data over there, it's gonna need some massaging, but if you ...
**Alex Sexton:** Sure. I think you have a tool that was my pick last week... It's pw-something or other, right?
**Paul Irish:** Yeah, pwmetrics.
**Alex Sexton:** \[31:55\] Pwmetrics - it's a command line tool that will automatically run Lighthouse locally in a Chrome instance... So if you wanna hook that up to your build process to get metrics out, and then kind of like test that pass. I think it could be a really nifty test to say that like "You can never ship...
**Paul Irish:** Yeah, exactly.
**Alex Sexton:** Cool. That's really nifty, good job! Good job at your job! \[laughter\] Next up we have probably the most famous segment... It's the --
**Adam Sontag:** Plugin of the Week!
**Rebecca Murphey:** What would we have today? Would we have like the Webpack loader of the week? \[laughter\]
**Alex Sexton:** The Babel transform of the week...
**Adam Sontag:** The React reduction of the week... \[laughter\].
**Paul Irish:** Today's plugin of the week - I picked this, but Rebecca, I don't know if you've actually looked at it... So why don't you go ahead and actually take this one for us?
**Rebecca Murphey:** Wow... That's really -- I mean, it's an explosive modal... It's the most explosive modal on the web.
**Alex Sexton:** What is it called?
**Rebecca Murphey:** It's called Explodal - duh! Like, what else would you call the most explosive modal on the web...? This is in the true spirit of jQuery plugins, I feel like.
**Alex Sexton:** It's just CSS. \[laughter\]
**Rebecca Murphey:** Well, I was gonna say it's functionality that you probably don't need on your website, but there's a plugin for it, so why don't you add it? It's good.
**Alex Sexton:** It's a modal that explodes open!
**Rebecca Murphey:** It explodes!
**Paul Irish:** I think some good use cases for this like the Add To Cart button on Amazon would be good; so you click Add To Cart, and instantly, Amazon's like "Boom!!!' with flames and fire... Yeah, it's those little touches that really add to that user experience.
**Rebecca Murphey:** Only 97.32% CSS, so I don't think we can say it's CSS.
**Alex Sexton:** I think the other part is a gif though, right?
**Rebecca Murphey:** No, there's one line of JavaScript.
**Alex Sexton:** Oh, okay...
**Rebecca Murphey:** I don't know, I'd have to look at this on GitHub really to see...
**Paul Irish:** It's an onclick handler...