WebAPI: Difference between revisions

1,636 bytes added ,  2 December 2016
adding link to MDN documentation in highlighted box
(adding link to MDN documentation in highlighted box)
 
(15 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<div style="border: thick solid red; width: 50%; padding: 5px;"><em><center>Warning: Information on this page is mostly obsolete! Check the general [[Platform/Roadmap]] for up to date projects. Use [https://lists.mozilla.org/listinfo/dev-platform dev-platform] and [irc://irc.mozilla.org/developers #developers] or [irc://irc.mozilla.org/content #content] to get in touch.
[https://developer.mozilla.org/en-US/docs/WebAPI See MDN documentation on WebAPI]
</center></em></div>
The Mozilla WebAPI team is pushing the envelope of the web to include --- and in places exceed --- the capabilities of competing stacks.
The Mozilla WebAPI team is pushing the envelope of the web to include --- and in places exceed --- the capabilities of competing stacks.


== Contributing ==
== Contributing ==


WebAPI work is being tracked by Mozilla {{bug|673923}}.  Find an dependent bug that interests you (and is unassigned), and assign it to yourself.
WebAPI work is being tracked by Mozilla {{bug|673923}}.  Find a dependent bug that interests you (and is unassigned), and assign it to yourself.


== Documentation ==
== Documentation ==
Line 36: Line 41:
| [[WebAPI/WebTelephony|WebTelephony]]
| [[WebAPI/WebTelephony|WebTelephony]]
| Allow placing and answering phone calls as well as build in-call UI.
| Allow placing and answering phone calls as well as build in-call UI.
| W3C ED (SysApps)
| [http://www.w3.org/2012/sysapps/telephony/ W3C ED] (SysApps)
<!--
<!--
* dom.telephony.enabled=false in all.js, true in b2g.js
* dom.telephony.enabled=false in all.js, true in b2g.js
Line 47: Line 52:
| [http://dev.w3.org/2009/dap/vibration/ Vibration API]
| [http://dev.w3.org/2009/dap/vibration/ Vibration API]
| Control device vibration for things like haptic feedback in games. Not intended to solve things like vibration for notification.
| Control device vibration for things like haptic feedback in games. Not intended to solve things like vibration for notification.
| W3C CR (Device APIs)
| [http://www.w3.org/TR/vibration/ W3C REC] (Device APIs)
<!--
<!--
* dom.vibrator.enabled set to true in Navigator.cpp
* dom.vibrator.enabled set to true in Navigator.cpp
Line 58: Line 63:
| [[WebAPI/WebSMS|WebSMS]]
| [[WebAPI/WebSMS|WebSMS]]
| Send/receive SMS messages as well as manage messages stored on device.
| Send/receive SMS messages as well as manage messages stored on device.
| W3C ED (SysApps)
| [http://www.w3.org/2012/sysapps/messaging/ W3C ED] (SysApps)
<!--
<!--
* dom.sms.enabled=false in all.js, true in b2g.js
* dom.sms.enabled=false in all.js, true in b2g.js
Line 81: Line 86:
| [[WebAPI/ScreenOrientation|Screen Orientation]]
| [[WebAPI/ScreenOrientation|Screen Orientation]]
| Get notification when screen orientation changes as well as control which screen orientation a page/app wants.
| Get notification when screen orientation changes as well as control which screen orientation a page/app wants.
| W3C WD (WebApps)
| [https://w3c.github.io/screen-orientation/ W3C WD] (WebApps)
<!--
<!--
* implementations in widget/{android,gonk}
* implementations in widget/{android,gonk}
Line 129: Line 134:
| TCP Socket API
| TCP Socket API
| Low-level TCP socket API. Will also include SSL support.
| Low-level TCP socket API. Will also include SSL support.
| W3C ED (SysApps)
| [http://www.w3.org/2012/sysapps/tcp-udp-sockets/ W3C ED] (SysApps)
<!--
<!--
* dom.mozTCPSocket.enabled only true in b2g/app/b2g.js, not in all.js
* dom.mozTCPSocket.enabled only true in b2g/app/b2g.js, not in all.js
Line 140: Line 145:
| [http://www.w3.org/TR/geolocation-API/ Geolocation API]
| [http://www.w3.org/TR/geolocation-API/ Geolocation API]
| Access to the end user's location.
| Access to the end user's location.
| W3C CR
| [http://www.w3.org/TR/geolocation-API/ W3C REC]
<!--
<!--
* geolocation PROMPT_ACTION for app/privileged/certified
* geolocation PROMPT_ACTION for app/privileged/certified
Line 175: Line 180:
| [[WebAPI/ContactsAPI|Contacts API]]
| [[WebAPI/ContactsAPI|Contacts API]]
| Add/Read/Modify the device contacts address book.
| Add/Read/Modify the device contacts address book.
| W3C ED (SysApps)
| [http://www.w3.org/2012/sysapps/contacts-manager-api/ W3C ED] (SysApps)
<!--
<!--
* privileged:  prompt
* privileged:  prompt
Line 188: Line 193:
| [http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html Mouse Lock API]
| [http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html Mouse Lock API]
| Lock access to mouse and get access to movement deltas rather than coordinates.
| Lock access to mouse and get access to movement deltas rather than coordinates.
| W3C ED
| [http://www.w3.org/TR/pointerlock/ W3C CR] (WebApps)
<!--
<!--
* FIXME:  I see implementation but it's unclear how it's not implemented on b2g
* FIXME:  I see implementation but it's unclear how it's not implemented on b2g
Line 197: Line 202:
|-
|-
| [https://developer.mozilla.org/en-US/docs/JavaScript_API Open WebApps]
| [https://developer.mozilla.org/en-US/docs/JavaScript_API Open WebApps]
| Install web apps and manage installed webapps. Also allows an installed webapp to get payment information. Everything needed to build a Open WebApps app store.
| Install web apps and manage installed webapps. Also allows an installed webapp to get payment information. Everything needed to build an Open WebApps app store.
| W3C WD (SysApps)
| [http://w3c.github.io/manifest/ W3C ED] (WebAps)
<!--
<!--
* interfaces/apps in dom/moz.build with no conditionals
* interfaces/apps in dom/moz.build with no conditionals
Line 234: Line 239:
| [http://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html Battery Status API]
| [http://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html Battery Status API]
| Information about battery charge level and if device is plugged in.
| Information about battery charge level and if device is plugged in.
| W3C CR (DAP)
| [http://www.w3.org/TR/battery-status/ W3C CR] (Device APIs)
<!--
<!--
* no explicit permission
* no explicit permission
Line 291: Line 296:
| [[WebAPI/SimplePush|Push Notifications API]]
| [[WebAPI/SimplePush|Push Notifications API]]
| Allow the platform to send notification messages to specific applications.
| Allow the platform to send notification messages to specific applications.
| [http://telefonicaid.github.com/WebAPISpecs/Push/index.html W3C ED (Webapps)]
| [https://w3c.github.io/push-api/index.html W3C ED] (Webapps)
<!--
<!--
* pref "services.push.enabled" true on b2g, false on Android and in libpref all.js
* pref "services.push.enabled" true on b2g, false on Android and in libpref all.js
Line 359: Line 364:
| [http://www.w3.org/TR/IndexedDB/ IndexedDB]
| [http://www.w3.org/TR/IndexedDB/ IndexedDB]
| Client-side storage of structured data and high performance searches on this data
| Client-side storage of structured data and high performance searches on this data
| W3C WD
| [http://www.w3.org/TR/IndexedDB/ W3C REC] (WebApps)
<!--
<!--
* in dom/moz.build
* in dom/moz.build
Line 512: Line 517:
| {{WebAPIPlatformAvailability|notImplemented|Android}}
| {{WebAPIPlatformAvailability|notImplemented|Android}}
| {{WebAPIPlatformAvailability|certifiedOnly|B2G}}
| {{WebAPIPlatformAvailability|certifiedOnly|B2G}}
|-
| [[WebAPI/TVAPI|TV API]]
| {{bug|998872}}
| Allow apps to acquire the information from TV service providers as well as to manage the native TV hardwares (i.e. tuners).
| Shipped in FxOS 2.2. But requires explicitly turning on the preference. <br> Standardization: [http://w3c.github.io/tvapi/spec/ W3C ED (TV Control API)]
| {{WebAPIPlatformAvailability|notPlanned|Desktop}}
| {{WebAPIPlatformAvailability|notPlanned|Android}}
| {{WebAPIPlatformAvailability|certifiedOnly|B2G}}
|-
| [[WebAPI/PresentationAPI|Presentation API]]
| {{bug|1184073}} {{bug|1184036}}
| Enable web content to access external presentation-type displays and use them for presenting web content.
| Shipped in FxOS 2.5 for receiver side. <br> Standardization: [http://www.w3.org/TR/presentation-api/ Presentation API]
| {{WebAPIPlatformAvailability|notImplemented|Desktop}}
| {{WebAPIPlatformAvailability|notImplemented|Android}}
| {{WebAPIPlatformAvailability|privilegedAndCertified|B2G}}
|}
|}


Line 534: Line 555:
== Process ==
== Process ==


A draft specification and prototype implementation of new Web APIs will be discussed publicly on our mailing list and at our public meetings (see below). Once we have an API that we feel that we are satisfied with, we will submit the new API for standardization to the W3C.
A draft specification and prototype implementation of new Web APIs will be discussed publicly on our mailing list and at our public meetings (see below). Once we have an API that we feel that we are satisfied with, we will submit the new API for standardization to the W3C.  See also [[WebAPI/DesignGuidelines|tips for standardizing APIs]].


The goal is to standardize all APIs.
The goal is to standardize all APIs.
Line 544: Line 565:
Security will be a central aspect of all the APIs that we design. We wouldn't want any random webpage to be able to read the user's contact list, or able to issue arbitrary commands to any USB device which is hooked up to the user's computer.
Security will be a central aspect of all the APIs that we design. We wouldn't want any random webpage to be able to read the user's contact list, or able to issue arbitrary commands to any USB device which is hooked up to the user's computer.


In some cases the solution will be to simply ask the user, like we do today for Geolocation for example. In other cases, where security implications are scarier or where describing the risk to the user is harder, we'll have to come up with better solutions.
In some cases the solution will be to simply ask the user, like we do today for Geolocation for example. In other cases, where security implications are scarier or where describing the risk to the user is harder, we'll have to come up with better solutions. For example, enumerating sensitive information or exposing device specific configuration to the web can be avoided by implementing dialogs (like the file picker for <input type=file>). Those can be implemented in the platform and ask the user which information to expose to the current website specifically.


This is an area where we're still doing a lot of research. I really want to emphasize that we don't have all the answers yet, but that we plan on having them before we roll out these APIs to millions of users.
This is an area where we're still doing a lot of research. I really want to emphasize that we don't have all the answers yet, but that we plan on having them before we roll out these APIs to millions of users.
Line 555: Line 576:


== Plans ==
== Plans ==
* [[WebAPI/PlannedWork|Work we'd like to do in the future]]
* [[WebAPI/PlannedWork|Old planning document]]
* Somewhat older (2013) [[WebAPI/Storage2013|storage discussion notes]]
* Old (2013) [[WebAPI/Storage2013|storage discussion notes]]


== Meetings ==
== Meetings ==
We used to have weekly meetings but as of 1 October 2014 we no longer do.


Meeting Details:
If there's something you'd like to discuss, ask on [https://lists.mozilla.org/listinfo/dev-platform dev-platform]. Since much of this effort is under Mozilla's DOM team, [irc://irc.mozilla.org/content #content] isn't a bad place for IRC conversation.
* [[WebAPI/{{#time: Y-m-d | tuesday}}|Agenda for this week (create below if it doesn't exist yet)]]
* Tuesdays alternating [http://arewemeetingyet.com/Toronto/2013-11-26/11:00/b/*Early*%20WebAPI%20meeting 8:00 AM Pacific Time] and [http://arewemeetingyet.com/Toronto/2013-11-19/19:00/b/*Late*%20WebAPI%20meeting 4:00 PM Pacific Time] (watch [https://groups.google.com/forum/#!forum/mozilla.dev.webapi mailing list] for announcement or ask :overholt to be added to the meeting invite)
* [https://v.mozilla.com/flex.html?roomdirect.html&key=H1q64MSinl9H '''WebAPI Vidyo room''']
{{conf|98413}}
* San Francisco:  Amoeba conference room (7th floor)
* London:  Allo Allo conference room
* Toronto:  Spadina conference room
* Join irc.mozilla.org [irc://irc.mozilla.org/webapi|IRC #webapi] for back channel
 
Notes will be taken on etherpad:  https://etherpad.mozilla.org/webapi-meetingnotes


=== Meeting Notes ===
=== Meeting Notes ===
<!--
Create a new weekly agenda from the [[WebAPI/0-0-0|template]]:
Create a new weekly agenda from the [[WebAPI/0-0-0|template]]:
<createbox>
<createbox>
Line 583: Line 596:


'''''Remember:''''' You'll still need to link it below!
'''''Remember:''''' You'll still need to link it below!
-->
{| class="wikitable collapsible" style="width: 100%"
{| class="wikitable collapsible" style="width: 100%"
! 2014  
! 2014  
|-
|-
|
|
* [[WebAPI/2014-09-30|September 30 2014]]
* No meeting 2014-09-23 due to no topics
* No meeting 2014-09-16 due to no topics
* [[WebAPI/2014-09-09|September 09 2014]]
* No meeting 2014-09-02 due to no topics
* No meeting 2014-08-26 due to no topics
* No meeting 2014-08-19 due to no topics
* [[WebAPI/2014-08-12|August 12 2014]]
* [[WebAPI/2014-08-05|August 05 2014]]
* No meeting 2014-07-29 due to no topics
* No meeting 2014-07-29 due to no topics
* [[WebAPI/2014-07-22|July 22 2014]]
* [[WebAPI/2014-07-22|July 22 2014]]
Line 753: Line 776:
* [[WebAPI/2011-08-23|August 23 2011]]
* [[WebAPI/2011-08-23|August 23 2011]]
|}
|}
== Communication ==
=== Mailing-list / Newsgroup ===
You can subscribe to the mailing list here: https://lists.mozilla.org/listinfo/dev-webapi
And the web based archive is here: http://groups.google.com/group/mozilla.dev.webapi/topics
The newsgroup lives on the news.mozilla.org server and has the name mozilla.dev.webapi
=== IRC ===
Find us on irc.mozilla.org in #webapi.
[[IRC|Need help to use Mozilla IRC servers?]]


=== See also ===
=== See also ===
6

edits