How Google Broke the Web! (and Javascript's Weird Parts)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
have you seen the weird parts of javascript it's full of them so before we get into google's web sabotage let's remind ourselves because some of them are actually pretty funny and stick with me this is all relevant we've got things like the fact that null despite its very definition being the absence of a meaningful value is actually an object even weirder nan believe it or not is not not a number it is a number what about the way that javascript tries to do you a favor when you use double equals like when your code is something like string one equals number one it goes okay you gave me a string and a number but i know what you really mean and it tells you of course they're equal or when you ask javascript to add number five plus string five and instead of going sorry pal you can't do that it says sure i can do that it's 55 obviously speaking of how javascript adds things we can't forget the most egregious one 0.1 plus 0.1 is equal to 0.2 of course but what does 0.1 and 0.2 equal it's not 0.3 it's this what's my point here it's that javascript is kind of broken and it has been from the start but you can't fix any of it not directly anyway because doing so would change javascript and break potentially millions of apps and websites that expect the weird parts to stay weird which brings us how to google have broken the internet they shipped a version of chrome recently that completely removes support for javascript dialogues like confirm prompt and alert from cross-origin iframes i was first alerted to this issue by a tweet from chris coyer that prompted me to read an article he had published on css tricks i can confirm chris is not happy all three of those puns were deliberate and bad codepen dot io the popular online dev environment that chris runs uses cross-origin iframes for every single one of its pens so you can imagine what this means for them anyone that uses any of those dialogue methods in their code on codepen has all of a sudden discovered that their code is broken now i get it google hasn't broken the internet these dialogues all still work everywhere else you could argue they're also clunky user experiences and browsers drop support for features all the time right the reason that they did this is legit it means that cross-origin iframes can't trigger dishonest alerts pretending to be from the parent side and potentially spoofing you into something malicious but dropping support for this is a pretty big move and it'll potentially break more than just people's code on codepen for now following some blow back they've suspended this move for about six months but it still appears to be on the roadmap so watch this space and if you are using iframes maybe have a look to see if you're using alert confirm or prompt and start thinking about how you're going to replace those thanks for watching if you found this video useful subscribe and like the video and i'll see you in the next video
Info
Channel: Ian Lenehan
Views: 20
Rating: undefined out of 5
Keywords: Google, Chrome, Javascript, Google Chrome, CSS Tricks, Programming, Coding, Programmer, Web Developer, Software Development, Web Development
Id: 4wBKu-6SEsk
Channel Id: undefined
Length: 2min 55sec (175 seconds)
Published: Thu Aug 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.