Yeah, I think having just a well-defined set of APIs is enough. Suppose B2G comes with API definition, and some good applications written with it: both iOS and Android can use native bits to enhance built-in javascript functionality, so provided that the APIs are not too demanding to support, a compatibility glue layer to make B2G applications work on iOS and Android should be possible.
After that, it's just up or the platform vendors to natively support B2G, so that the compatibility layer can be shrunk and dropped eventually. But if they don't do this, it doesn't really matter: the application is there and will work anyway. That's the theory, anyway.