Main Content

Achieving harmony with third-party JavaScript

About the Talk

October 2, 2011 11:45 AM

Boston, MA, USA

Boston, MA, USA

Today, the common dogma is that we—library and widget developers—are responsible for writing defensive code that can co-exist with whatever other code is running on the page. We embraced that and library authors are getting pretty good in writing code that works in a myriad of different environments. However, there is always that website that does something so weird that all your tricks fail and your app goes crazy. Sometimes the failure is so severe, it breaks even the host page. I believe it is time to split the responsibility between library developers and their users. It is time for people to start writing their code with third-party JavaScript in mind. In this talk I will show a few things you probably do on your website that make it extremely hard for us to do our job. We will talk about using globals, modifying built-ins, changing the document's origin, tossing DOM nodes around and other cool things that can really screw things up for the next library or widget you will want to use.

Ratings and Recommendations

Avg. Rating

Average based
on 6 ratings

comments powered by Disqus