--- title: navigator.mozNotification slug: Web/API/Navigator/mozNotification translation_of: Archive/API/Navigator/mozNotification ---

The support for this property as been dropped in favor of the standard {{domxref("Notification")}} constructor.

Provides support for creating {{ domxref("notification") }} objects, which are used to display desktop notification alerts to the user. Currently, these are only supported on Firefox Mobile and Firefox OS. See Displaying notifications for an example.

Method overview

notification createNotification(in DOMString title, in DOMString description, in DOMString iconURL {{ optional_inline() }});

Methods

createNotification()

Creates and returns a notification object that can be used to display the specified message with an optional URL.

notification createNotification(
  in DOMString title,
  in DOMString description,
  in DOMString iconURL {{ optional_inline() }}
);
Parameters
title
알림 타이틀.
description
알림에 표시할 텍스트.
iconURL {{ optional_inline() }}
A URL identifying the image to display in the notification.
Return value

A new {{ domxref("notification") }} object.

Permissions

manifest 파일에 "desktop-notification" permission 을 추가 해야 한다.

"permissions": {
    "desktop-notification":{}
}

See also