From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- files/zh-cn/web/api/notification/sound/index.html | 129 ---------------------- 1 file changed, 129 deletions(-) delete mode 100644 files/zh-cn/web/api/notification/sound/index.html (limited to 'files/zh-cn/web/api/notification/sound') diff --git a/files/zh-cn/web/api/notification/sound/index.html b/files/zh-cn/web/api/notification/sound/index.html deleted file mode 100644 index ffe90b4955..0000000000 --- a/files/zh-cn/web/api/notification/sound/index.html +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Notification.sound -slug: Web/API/notification/sound -translation_of: Web/API/notification/sound ---- -

{{APIRef("Web Notifications")}}

- -
-

Note: 这个属性并没有完全被一些浏览器支持.

-
- -

 sound 是 {{domxref("Notification")}}的只读属性,interface specifies the URL of an audio file to be played when the notification fires. This is specified in the sound option of the {{domxref("Notification.Notification","Notification()")}} constructor.

- -

Syntax

- -
var sound = Notification.sound;
-
- -

Value

- -

A {{domxref("USVString")}}.

- -

Examples

- -

The following snippet is intended to fire a sound along with the notification; a simple options object is created, then the notification is fired using the Notification() constructor.

- -
var options = {
-  body: 'Do you like my body?',
-  sound: 'audio/alert.mp3'
-}
-
-var n = new Notification('Test notification',options);
-
-n.sound // should return 'audio/alert.mp3'
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Web Notifications','#dom-notification-sound','sound')}}{{Spec2('Web Notifications')}}Living standard
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{ CompatNo() }} -

{{ CompatNo() }}

-
{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }} -

{{ CompatNo() }}

-
-
- -

Firefox OS notes

- -

{{Page("/en-US/docs/Web/API/Notifications_API", "Firefox OS notes")}}

- -

Chrome notes

- -

{{Page("/en-US/docs/Web/API/Notifications_API", "Chrome notes")}}

- -

Safari notes

- -

{{Page("/en-US/docs/Web/API/Notifications_API", "Safari notes")}}

- -

See also

- - -- cgit v1.2.3-54-g00ecf