See http://whatwg.org/demos/2008-sept/gadget-host/