November 12, 2006
@ 03:32 PM

So a few weeks ago I wrote a moderately popular embedded video gadget for Windows Live Spaces which allows you to embed videos from popular video sharing sites on your or Spaces page. Somewhere along the line it seems that this gadget stopped working correctly in Firefox. Specifically click events on the [Preview] and [Save] buttons were not working. After doing some research I came across an article entitled addEventListener attachEvent - Pass parameters to event-function which made me realize that I had to change my code from

btn2.attachEvent("onclick", OnSave);
     btn2.addEventListener("click", OnSave, true); //Firefox
     btn2.attachEvent("onclick", OnSave); //MSIE
I'm pretty sure that the code used to work at one point in time and from this post on Adam Kinney's blog it does seem that the Atlas framework which is what is used by the Windows Live gadgets platform did write a cross-browser version of attachEvent. I wonder if they took that change out due to negative feedback from developers? I guess this is just another example of why I think trying to standardize gadget widget packaging and then expecting it'll lead to interop between gadget widget platforms is an amusingly naive idea. See the discussion in the comments to my post entitled W3C Working on Widgets 1.0 Spec for more context. :)

UPDATE: Kevin Daly just posted a comment in response to this post which links to a blog post entitled DOM events in the Microsoft AJAX Library. The post confirms that negative developer feedback led to a change in Atlas which breaks event handling in Firefox for any app written against previous versions of the Atlas framework as I speculated above. I've just spent 15 minutes updating and resubmitting all my old gadgets to Windows Live Gallery. If you are a gadget developer you may want to check out your code as well. 

PS: Visit to see what it looks like to embed an MSN SoapBox video in your blog.


Sunday, November 12, 2006 3:57:50 PM (GMT Standard Time, UTC+00:00)
I don't know if this is relevant, but they've changed the model for adding client-side events in the Beta version of The Framework Formerly Known As Atlas.

There's an explanation here:
Sunday, November 12, 2006 4:10:45 PM (GMT Standard Time, UTC+00:00)
I've updated my post and added the that link.

Sunday, November 12, 2006 10:17:44 PM (GMT Standard Time, UTC+00:00)
Hm, pretty sure the live js framework and atlas diverged some time ago, and don't depend or synch up at all anymore. While I'm glad to see Atlas move to a slightly more standards-oriented approach, that shouldn't directly affect Live stuff one way or the other now.
Monday, November 13, 2006 9:17:30 AM (GMT Standard Time, UTC+00:00)

Why is your blog disappearing frequently these days? I again saw a DNS error this morning.

Vivek Ravindran
Comments are closed.