OpenSocial

It's Open. It's Social. It's up to you.

I really enjoy using Firebug to debug my web applications. Nothing like being able to inspect items on the page, log debug information to the console, and execute arbitrary Javascript on the page to test out a quick fix.

When working with OpenSocial gadgets, I usually find myself using Firebug to inspect an IFrame to get the URL of the gadget spec that is being loaded. While Firebug gives me access to this data, it's a little hard to get to, and I need to decode the URL before I can paste it into a browser. So to help with this, I created a Firebug extension which scans the current page to see if any OpenSocial gadgets have been loaded. If the extension finds any gadgets, it attempts to discover the XML spec URLs for all the gadgets on the page and lists these as links which will go directly to the gadget XML spec. (Note that this feature works for Shindig based websites, but will not work on MySpace).

Additionally, I wanted to be able to execute JavaScript code inside of the gadget IFrame (and not the container page, which Firebug lets you do normally). This kind of functionality really help debug gadgets, because you can test out JavaScript without needing to save and upload an XML file again (or even reload the page!). So I added a box below each XML spec URL which will let you execute any JavaScript you want, in the context of the gadget's IFrame.

You can find the extension on addons.mozilla.org here. Please leave a review on that site if you wind up using it!


Happy coding,
~Arne

Comment

You need to be a member of OpenSocial to add comments!

Join OpenSocial

Ali Haider Comment by Ali Haider on November 10, 2009 at 9:23pm
Thanks
Robson Dantas Comment by Robson Dantas on August 3, 2009 at 6:48am
Well done Arne! It´s really useful, congrats!
Matin Rahman Comment by Matin Rahman on July 24, 2009 at 8:34pm
Thanks 4 ur important information.

© 2010   OpenSocial Foundation

Badges  |  Report an Issue  |  Privacy  |  Terms of Service

Sign in to chat!