(In a previous article, I introduced a convenient method for shipping stylesheets with your third-party JavaScript application.) When styling content in your third-party JavaScript application, you have a unique challenge to overcome: interference. The publisher may have used any number of techniques to define styles, and many of them threaten to modify the appearance of […]

Tagged:

CC BY-SA

As a practicing masochist, I have recently developed an interest in third-party JavaScript application development. I’m not alone: third-party JavaScript (or “3PJS”) applications are becoming more and more common on the web (see Disqus, Optimizely, and Google Analytics, for instance). Like any developing methodology, best practices are constantly being explored and re-defined. In this article, […]

Tagged:

CC BY-SA

I was recently re-factoring some code under Rick‘s guidance, and we implemented what I would later recognize as the Strategy pattern. JavaScript’s objects and first-class functions make this pattern extremely simple to implement, although you can optionally take some additional steps to add robustness. Background: Design Patterns A lot of my troubles with design patterns […]

Tagged:

CC BY-SA

I spent a good half hour writing an answer to a question on Quora today and I thought it was good enough to qualify as a blog post. The question was How do you implement object orientation in JavaScript? I’ll be honest, I was a little disappointed by the answers posted prior to mine, however […]

Tagged:

After spending the day finishing out cross-browser EventSource support in the form of jQuery.EventSource.js, then wrapping up with a commit of 55 new unit tests, I finally left the Bocoup Loft for the day around 8 o’clock… But as most developers know, no matter how hard you try, you just can’t leave this kind of […]

Tagged:

Al MacDonald recently posted https://bocoup.com/weblog/javascript-typed-arrays – which is an interesting look at the benchmarkable speed differences between FireFox 4’s Float32Array constructor and the traditional Array constructor. As expected, the Typed Arrays are definitively faster due entirely to native optimization: they only allow integer or floating point numbers (respectively to their Int or Float prefix); additionally […]

Tagged:

In my excitement and haste upon discovering new SharedWorker() support in the Opera 10.60 Beta, I neglected to snoop around the window object of my two favorites, Chrome 5+ and FireFox 3.6+ … WHOOPS! If I had done so, I would’ve discovered, as I did just now, that Chrome 5+ ALSO supports new SharedWorker(). Of […]

Tagged:

While poking around the Web Worker API in the latest Opera Beta Release, I discovered that they had also implemented support for Shared Web Workers. If you’re not familiar with Shared Web Workers, have a look here. The basic premise is that a Shared Worker can have multiple connections made to one Worker. Paraphrased from […]

Tagged:

Opera 10.60 Beta was announced this week and along with the list of new HTML5 features it’s supporting was Web Workers. Of course I was excited to run it through the renderer/worker test suite I set up for my previous posts about Safari 5 and Chrome 5. The results were pleasing, the first Opera release […]

Tagged:

Following the announcement of Safari 5 [ 5.0 (7533.16) ] today, I did some due diligence and ran it through the json-object, array, boolean and string Worker message cases that I had produced for testing against Chrome 5. The results are in and thankfully consistent – so not much to report here accept that – […]

Tagged: