The guys at widgetbox did some nice work and what you build and create as widgets can be ported and installed on:
Below is a cut-n-paste from their developer faq's on how they did it. Enjoy...
Widgets have the option of being sized dynamically, rather than the end user typing in a specific width and height in pixels.
What it does
Widgets are hosted in an iFrame (for security reasons), and iFrames don’t naturally have the ability to resize themselves to nicely fit around their contents. Dynamic sizing attempts to size the iFrame to fit the contents.
How it works
How does it determine my widget’s size?
It looks at a combination of things. One thing to note is that it often chooses the narrowest possible width. In order to keep your widgets from being too skinny, try wrapping your widget’s content in a DIV and specify a width or min-width.
Does it work for both hosted and remote HTML widgets?
It’s not sizing my widget correctly!
- Document.writes() are not yet supported. If your widget uses document.writes(), dynamic sizing probably won’t work correctly.
Does it perform consistently across browsers?
When I check “size dynamically”, why does my widget suddenly start requiring Adobe Flash?
The communication between the widget’s HTML page inside the iFrame and the parent page requires Flash. Using Flash is the only way to avoid cross domain scripting issues. This is very simple Flash. Flash is available on 98 to 99% of all web browsers, according to Adobe.