Confirmed users
978
edits
m (→Web API: navigator.mozMobileConnections) |
|||
| Line 3: | Line 3: | ||
=== Web API === | === Web API === | ||
The change is quite simple | The change is quite simple -- navigator.mozMobileConnection becomes an array of nsIDOMMozMobileConnection obect, i.e. navigator.mozMobileConnections. The length of the array is actually the number of services provided on a device. And the index of the array is used as 'serviceId.' | ||
We don't modify the existed interface, like nsIDOMMozMobileConnection, nsIDOMMozMobileConnectionInfo ...etc, to minimize the coding effort of gaia. | We don't modify the existed interface, like nsIDOMMozMobileConnection, nsIDOMMozMobileConnectionInfo ...etc, to minimize the coding effort of gaia. | ||
interface nsIMozNavigatorMobileConnectionManager: nsISupports | |||
{ | |||
// An array of nsIDOMMozMobileConnection. | |||
readonly attribute jsval mozMobileConnections; | |||
}; | |||
interface nsIDOMMozMobileConnection : nsIDOMEventTarget | interface nsIDOMMozMobileConnection : nsIDOMEventTarget | ||
{ | { | ||