When porting a chrome packaged app to a firefox packaged app you will need to do an inventory as to which chrome specific api’s you are using and create a level of abstraction around them, as the naming / capabilities of the apis vary across the platforms.
I will try to break this article into information on which apis are supported across both platforms, where you can find docs, and lastly which apis have no commonality across both platforms (Firefox or Chrome).
Web APIs in Common:
The Web APIs that share commonality in function between the two platforms, are listed below:
alarm, getUserMedia(audio), Bluetooth, Device Storage API, navigator.id API, Idle API, Geolocation API, Web Notifications, Permissions API, Battery Status API, Simple Push API, TCP Socket API, Pointer Lock API, Power Management API, ContextMenus
List of Chrome’s HTML5 apis: http://developer.chrome.com/apps/api_other.html
The difficulty for the developer will be in writing an app that can handle both browsers elegantly. This is already done in many cases with the use of W3C compliant API’s such as geolocation data.(navigator.geolocation, which is also supported under google chrome, just not listed as such in their packaged apps documentation (ack), and soon to be battery status. But for the majority the function calls are different as well as the data being returned.
The other part of the discussion could revolve around which Firefox OS API’s are not yet implemented in Chrome OS. How close are all the APIs to standardization ?
Chrome OS similarly has a set of APIs which are not implemented in Firefox OS:
app.window = a concept not supported in firefox, generally gives the ability to maximize, minimize, change window size..etc
app.runtime = a concept not supported in firefox, basically used to notify when the app has been restarted
i18n = internationalization API.
serial= An API that allows you to read contents of the serial port.
runtime = API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle.
tts: Text To Speech API
usb: An API that allows you to access USB based devices
Just thought i’d throw out a challenge to the best and brightest, who might be interested in learning a little more about the openwebapps development / testing infrastructure.
This is the mission if you choose to accept it.
Below is a podcast on how to add unit tests:
Your mission is to find as many test cases / edge cases that are not represented in our test suite and get your submissions in to me.
Show me your pull requests in the comment feed and we can get this competition going!
*** Technical Details ***
To the top contributor i will send a goodie bag of the coolest Mozilla stuff I can find. The coolness of the stuff depends on the coolness of the submissions!!!