Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Navigator.mozSms

这篇翻译不完整。请帮忙从英语翻译这篇文章

非标准
该特性是非标准的,请尽量不要在生产环境中使用它!

已废弃 Gecko 25 (Firefox 25 / Thunderbird 25 / SeaMonkey 2.22)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

This API is available on Firefox OS for internal applications only.

返回 SmsManager 对象,你可以通过该对象进行短消息的收发操作。

注意: 废弃! 该对象已被废弃,请参考使用: window.navigator.mozMobileMessage

语法

var sms = window.navigator.mozSms;

参数说明

这是一个非标准接口,不过该接口有在 W3C 部分提及: System Application Working Group.

Specification Status Comment
Messaging API Editor's Draft Editor Draft (WIP).

浏览器兼容

For obvious reasons, support is primarily expected on mobile browsers.

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 未实现 未实现 未实现 未实现 未实现
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 未实现 12.0 (12.0) 未实现 未实现 未实现

Preferences & availability

  • WebSMS is disabled by default and can be enabled setting the preference dom.sms.enabled to true.
  • A comma-separated whitelist of allowed hostnames that are allowed to use the WebSMS API must be specified using the dom.sms.whitelist preference. This string is empty by default.
  • WebSMS is only available to certified apps on Firefox OS (B2G).

参阅

文档标签和贡献者

 此页面的贡献者: mrshelly
 最后编辑者: mrshelly,