This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
any <a href=#dom-showmodaldialog title=dom-showModalDialog>showModalDialog</a>(in DOMString url);
any <a href=#dom-showmodaldialog title=dom-showModalDialog>showModalDialog</a>(in DOMString url, in any arguments);<!--
any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url, in any arguments, in DOMString features);-->
void <a href=#dom-shownotification title=dom-showNotification>showNotification</a>(in DOMString title, in DOMString subtitle, in DOMString description);
void <a href=#dom-shownotification title=dom-showNotification>showNotification</a>(in DOMString title, in DOMString subtitle, in DOMString description, in VoidCallback onclick);
any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url, in any arguments, in DOMString features);--><!-- XXX-NOTIFY
void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description);
void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description, in VoidCallback onclick);-->
<p>Otherwise, if the <a href=#origin-0>origin</a> of the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
<a href=#concept-script title=concept-script>script</a> that invoked the method is <em>not</em> flagged as being a
<a href=#trusted-notification-source>trusted notification source</a>, then the notification
should be rendered within the <a href=#top-level-browsing-context>top-level browsing
context</a> of the <a href="#script's-browsing-context">script's browsing context</a>. The
notification is said to be a <dfn id=normal-notification>normal notification</dfn>. User
agents should provide a way to set the origin's <a href=#trusted-notification-source>trusted
notification source</a> flag from the notification, so that the
user can benefit from notifications even when the user agent is not
the active application.</p>
<p>Otherwise, the <a href=#origin-0>origin</a> is flagged as a <a href=#trusted-notification-source>trusted
notification source</a>, and the notification should be shown
<p id="sandboxNotifications">If the method was invoked from a <span
<p>When a <a href=#normal-notification>normal notification</a> (but not a
<a href=#sandboxed-notification>sandboxed notification</a>) is shown, the user agent may
bring the user's attention to the <a href=#top-level-browsing-context>top-level browsing
context</a> of the <a href="#script's-browsing-context" title="script's browsing
context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the
method, if that would be useful; but user agents should not use
system-wide notification mechanisms to do so.</p>
<p>When a <span>normal notification</span> (but not a
<span>sandboxed notification</span>) is shown, the user agent may
bring the user's attention to the <span>top-level browsing
context</span> of the <span title="script's browsing
context">browsing context</span> of the <span
title="concept-script">script</span> that invoked the method, if
that would be useful; but user agents should not use system-wide
notification mechanisms to do so.</p>
<p>When a <span>trusted notification</span> is shown, the user agent
should bring the user's attention to the notification and the <span
title="script's browsing context">browsing context</span> of the
<span title="concept-script">script</span> that invoked the method,
as per the platform conventions for attracting the user's attention
to applications.</p>
<p>When a <a href=#trusted-notification>trusted notification</a> is shown, the user agent
should bring the user's attention to the notification and the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
<a href=#concept-script title=concept-script>script</a> that invoked the method, as per the platform conventions for
attracting the user's attention to applications.</p>
<div class=example>
<div class="example">
<p>In the case of <a href=#normal-notification title="normal notification">normal
notifications</a>, typically the only attention-grabbing device
<p>In the case of <span title="normal notification">normal
notifications</span>, typically the only attention-grabbing device
that would be employed would be something like flashing the tab's
caption, or making it bold, or some such.</p>
<p>In addition, in the case of a <a href=#trusted-notification>trusted notification</a>,
<p>In addition, in the case of a <span>trusted notification</span>,
the entire window could flash, or the browser's application icon
could bounce or flash briefly, or a short sound effect could be
name</a>, if available, or else the <a href=#document.title title=dom-document-title>document title</a>, of the
<a href=#active-document>active document</a> of the <a href="#script's-browsing-context" title="script's browsing
context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the
method.</li>
<li>An icon chosen from the <a href=#external-resource-link title="external resource
link">external resource links</a> of type <code title=rel-icon><a href=#rel-icon>icon</a></code>, if any are available.</li>
</ul><p>If a new notification from one <a href=#browsing-context>browsing context</a> has
<var title="">title</var>, <var title="">subtitle</var>, and <var title="">description</var> strings that are identical to the <var title="">title</var>, <var title="">subtitle</var>, and <var title="">description</var> strings of an already-active notification
from the same <a href=#browsing-context>browsing context</a> or another <a href=#browsing-context title="browsing context">browsing context</a> with the same
<a href=#origin-0>origin</a>, the user agent should not display the new
<p>Notifications should have a lifetime based on the platform
conventions for notifications. However, the lifetime of a
notification should not begin until the user has had the opportunity
to see it, so if a notification is spawned for a <a href=#browsing-context>browsing
context</a> that is hidden, it should be shown for its complete
lifetime once the user brings that <a href=#browsing-context>browsing context</a>
to see it, so if a notification is spawned for a <span>browsing
context</span> that is hidden, it should be shown for its complete
lifetime once the user brings that <span>browsing context</span>
into view.</p>
<p>User agents should support multiple notifications at once.</p>
<p>User agents should support user interaction with notifications,
if and as appropriate given the platform conventions. If a user
activates a notification, and the <var title="">onclick</var>
callback argument was present and is not null, then the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
<a href=#concept-script title=concept-script>script</a> of the function given by
callback argument was present and is not null, then the <span
title="script's browsing context">browsing context</span> of the
<span title="concept-script">script</span> of the function given by
<var title="">onclick</var> should be brought to the user's
attention, and the <var title="">onclick</var> callback should then
be invoked.</p>
-->
<h3 id=system-state-and-capabilities><span class=secno>5.6 </span>System state and capabilities</h3>