/** * EventEmitter Mixin * * Designed to be used in conjunction with a mixin "augment" function, * such as http://chamnapchhorn.blogspot.com/2009/05/javascript-mixins.html * * @usage augment(MyClass, EventEmitter); * my_inst = new MyClass(); * my_inst.on('someEvent', function(e){ console.dir(e); }); * my_inst.trigger('someEvent', {eventProp:'value'}); */ var EventEmitter = function() {}; EventEmitter.prototype.on = function(name, callback, context) { if ( !context )… Read more »
Posts Categorized: Professional
Started work on jQuery UI Modal widget
I’ve started working a jQuery UI Modal widget, for use in a project built on top of the widget library. We have very high accessibility standards, and the current “{modal:true}” option for the dialog widget unfortunately wasn’t as good as we needed. Seeing that the team had identified the need for a standalone Modal widget,… Read more »
CSSP: Loading CSS with Javascript – and getting an onload callback.
It seems fairly straightforward to require CSS with Javascript. The most obvious method that I thought of was creating a <link> tag and appending it to the head of the document. An alternative would be to load the text of the css file with an ajax XHR call, and then inject that into a <style>… Read more »
Review of “Simplicity is Highly Overrated”
Dan Norman writes that “simplicity is highly overrated” and asks whether you would buy an equivalent product with less features for the same, or more, money. Dan is a usability expert and although says that while he prefers simplicity and what I would call “poignancy” in design, most purchases are not based on the premise… Read more »
Adobe CS3 “licensing for this product has stopped working” fix
After getting a new computer, and restoring my old system from a Time Machine backup, I found my Adobe Web Premium CS3 stopped working. Every application I started (Photoshop, Fireworks, Flash, etc) gave the error message: Licensing for this product has stopped working. After following every suggestion I could find in Adobe’s knowledge base and… Read more »