You've got the hang of this whole JavaScript thing. Your code works on ancient browsers, and positively sings on new ones. AMD, SPA, MVC -- you can do that stuff in your sleep, amirite?
But now your users are trying to type in your Very Important Form, and nothing is showing up; you loaded Backbone into your app right there on line 1, but window.Backbone
is nowhere to be found; that widget that's supposed to end up in a certain div is showing up somewhere completely different; calls to jQuery's .css()
are doing absolutely nothing; and, rarely but not never, your app just doesn't load at all.
You thought you had the hang of this whole JavaScript thing, but now you're in the world of third-party JavaScript, where all you control is a single script tag and where it's all but impossible to dream up every hostile environment in which your code will be expected to work. "It works on my machine" has never rung quite so hollow.
In this talk, we'll take a look at some of the delightful bugs we've had to solve at Bazaarvoice while working on the third-party JavaScript app that collects and displays ratings and reviews for some of the world's largest retailers.