翻译不完整。 请帮助我们翻译这篇文章!


已废弃 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.

此 API 仅在 Firefox OS内部应用程序中可用。

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

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


var sms = window.navigator.mozSms;


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

Specification Status Comment
Messaging API Obsolete Editor Draft (WIP).


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

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

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).