I agree. A key point to achieve that is to define what the embedding api looks like. Right now on FirefoxOS it's partly the mozbrowser api for iframe-centric features, and partly custom events that are dispatched on the top level "chrome" iframe. There's still some cleanup to do there ;)