Mozilla is working on a project named WebAPI that tries to create a standard (cross browser) API stack for web applications (html5+javascript) to interact with phone services such as the dialer, camera, etc.