aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/navigator/moznotification/index.html
blob: 9c593ec4a120b9cb70edb732405cf174fcf134a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: navigator.mozNotification
slug: Web/API/Navigator/mozNotification
translation_of: Archive/API/Navigator/mozNotification
---
<div class="warning">
<p style="text-align: center;">The support for this property as been dropped in favor of the standard {{domxref("Notification")}} constructor.</p>
</div>

<p>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 <a href="/en/DOM/Displaying_notifications" title="en/DOM/Displaying notifications">Displaying notifications</a> for an example.</p>

<h2 id="Method_overview" name="Method_overview">Method overview</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <td><code>notification <a href="#createNotification()">createNotification</a>(in DOMString title, in DOMString description, in DOMString iconURL {{ optional_inline() }});</code></td>
  </tr>
 </tbody>
</table>

<h2 id="Methods" name="Methods">Methods</h2>

<h3 id="createNotification()" name="createNotification()">createNotification()</h3>

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

<pre class="eval">notification createNotification(
  in DOMString title,
  in DOMString description,
  in DOMString iconURL {{ optional_inline() }}
);
</pre>

<h6 id="Parameters" name="Parameters">Parameters</h6>

<dl>
 <dt><code>title</code></dt>
 <dd>알림 타이틀.</dd>
 <dt><code>description</code></dt>
 <dd>알림에 표시할 텍스트.</dd>
 <dt><code>iconURL</code> {{ optional_inline() }}</dt>
 <dd>A URL identifying the image to display in the notification.</dd>
</dl>

<h6 id="Return_value" name="Return_value">Return value</h6>

<p>A new {{ domxref("notification") }} object.</p>

<h2 id="Methods" name="Methods">Permissions</h2>

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

<pre class="default prettyprint prettyprinted"><code><span class="str">"permissions"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="str">"desktop-notification"</span><span class="pun">:{}</span><span class="pln">
</span><span class="pun">}</span></code></pre>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{ domxref("notification") }}</li>
 <li><a href="/en/DOM/Displaying_notifications" title="en/DOM/Displaying notifications">Displaying notifications</a></li>
</ul>