⬆️ ⬇️

New APIs in the Firefox browser allow JavaScript to work with mobile communication.

Anyone who looked at the schedule for the release of new versions of the Firefox browser, expected in 2012, certainly saw there that right now we are working on introducing new features in Firefox version 12 - which, gradually going through the “Aurora” and “Beta” stages , will be published in late April of this year. And this is why, just looking at all the features that are being introduced in Firefox 12, you can foresee the future capabilities of web applications almost half a year in advance - and be happy (and not even sit with a hanging jaw) in advance.



Now I will draw your attention to two of the most remarkable of the recent innovations.



Implemented a WebSMS API (described in MozillaWiki and discussed in bugzilla ) that will add objects to the DOM that control sending and receiving SMS messages .

')

Implemented WebTelephony API (described in MozillaWiki and discussed in bugzilla ), which will add objects to the DOM that allow you to make phone calls , as well as receive (or reject) incoming calls and be interested in the state of the mobile phone (such as "dialing", "dialing" , "Busy", "connected", "disconnected", "incoming call", and so on).



It goes without saying that these interfaces are designed for mobile versions of Firefox.



Fans of comparisons will probably be pleased to compare the WebSMS API (implemented by the Mozilla Foundation) with its closest analogue, namely with the W3C intentions expressed in the April draft of 2011 (2011) to create some more general API ( The Messaging API ): according to the W3C, the Messaging interface should be able to send not only SMS, but also any other messages (MMS, e-mail), and with the attachment of files to them. So far, Firefox 12 is more modest: it will only be able to send SMS. But not only send but also receive. (Work with MMS is planned , though; but its implementation has not started yet.)



It is clear that the APIs I mentioned are still in a pre-alpha state, so that before the actual appearance of these new products, Firefox developers will have to do a lot of auxiliary things, like with respect to security (for example, to introduce white lists) of those phone numbers with which the user allows the browser to call up), and in relation to the processing of matches (for example, decide what to do when two different sites are about to call on a mobile phone at the same time).

Source: https://habr.com/ru/post/137054/



All Articles