-
Notifications
You must be signed in to change notification settings - Fork 50
Remove Notification's vibrate feature #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marcoscaceres
wants to merge
3
commits into
whatwg:main
Choose a base branch
from
marcoscaceres:remove_vibration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,12 +11,6 @@ Translation: ko https://ko.htmlspecs.com/notifications/ | |
| </pre> | ||
|
|
||
| <pre class=anchors> | ||
| urlPrefix: https://w3c.github.io/vibration/ | ||
| urlPrefix: #dfn-; type: dfn | ||
| text: perform vibration | ||
| text: validate and normalize | ||
| urlPrefix: #idl-def-; type: interface | ||
| text: VibratePattern; url: vibratepattern | ||
| urlPrefix: https://tc39.github.io/ecma262/ | ||
| urlPrefix: #sec-object.; type: dfn | ||
| text: freeze | ||
|
|
@@ -29,15 +23,14 @@ urlPrefix: https://tc39.github.io/ecma262/ | |
| <p>This specification depends on the Infra Standard. [[!INFRA]] | ||
|
|
||
| <p>Some terms used in this specification are defined in the DOM, Fetch, High Resolution Time, HTML, | ||
| IDL, Service Workers, URL, and Vibration API Standards. | ||
| IDL, Service Workers, and URL Standards. | ||
| [[!DOM]] | ||
| [[!FETCH]] | ||
| [[!HR-TIME]] | ||
| [[!HTML]] | ||
| [[!WEBIDL]] | ||
| [[!SERVICE-WORKERS]] | ||
| [[!URL]] | ||
| [[!VIBRATION]] | ||
|
|
||
|
|
||
| <h2 id=notifications>Notifications</h2> | ||
|
|
@@ -88,8 +81,8 @@ initially false. When true, indicates that the end user should be alerted after | |
|
|
||
| <p>A <a for=/>notification</a> has an associated | ||
| <dfn for=notification id=silent-preference-flag>silent preference</dfn> (null or a boolean). It is | ||
| initially null. When true, indicates that no sounds or vibrations should be made. When null, | ||
| indicates that producing sounds or vibrations should be left to platform conventions. | ||
| initially null. When true, indicates that no sounds should be made. When null, indicates that | ||
| producing sounds should be left to platform conventions. | ||
|
|
||
| <p>A <a for=/>notification</a> has an associated | ||
| <dfn for=notification id=require-interaction-preference-flag>require interaction preference</dfn> | ||
|
|
@@ -119,15 +112,10 @@ not enough space to display the <a for=/>notification</a> itself. It <em>may</em | |
| the <a for=/>notification</a>, but then it should have less visual priority than the | ||
| <a for=notification>image resource</a> and <a for=notification>icon resource</a>. | ||
|
|
||
| <p>A <a for=/>notification</a> has an associated | ||
| <dfn for=notification id=vibration-pattern>vibration pattern</dfn> (a <a for=/>list</a>). It is | ||
| initially « ». | ||
|
|
||
| <p class=note>Developers are encouraged to not convey information through an | ||
| <a for=notification lt="image resource">image</a>, <a for=notification lt="icon resource">icon</a>, | ||
| <a for=notification lt="badge resource">badge</a>, or <a for=notification>vibration pattern</a> that | ||
| is not otherwise accessible to the end user, especially since notification platforms that do not | ||
| support these features might ignore them. | ||
| or <a for=notification lt="badge resource">badge</a> that is not otherwise accessible to the end | ||
| user, especially since notification platforms that do not support these features might ignore them. | ||
|
|
||
| <p>A <a for=/>notification</a> has associated <dfn export for=notification id=actions>actions</dfn> | ||
| (a <a for=/>list</a> of zero or more <a for=/>notification actions</a>). A | ||
|
|
@@ -203,10 +191,6 @@ important information through, e.g., loss of color or clipped corners. | |
| <ol> | ||
| <li><p>Let <var>notification</var> be a new <a for=/>notification</a>. | ||
|
|
||
| <li><p>If <var>options</var>["{{NotificationOptions/silent}}"] is true and | ||
| <var>options</var>["{{NotificationOptions/vibrate}}"] <a for=map>exists</a>, then <a>throw</a> a | ||
| {{TypeError}}. | ||
|
|
||
| <li><p>If <var>options</var>["{{NotificationOptions/renotify}}"] is true and | ||
| <var>options</var>["{{NotificationOptions/tag}}"] is the empty string, then <a>throw</a> a | ||
| {{TypeError}}. | ||
|
|
@@ -250,10 +234,6 @@ important information through, e.g., loss of color or clipped corners. | |
| <var>notification</var>'s <a for=notification>badge URL</a> to the return value. (Otherwise | ||
| <var>notification</var>'s <a for=notification>badge URL</a> is not set.) | ||
|
|
||
| <li><p>If <var>options</var>["{{NotificationOptions/vibrate}}"] <a for=map>exists</a>, then | ||
| <a>validate and normalize</a> it and set <var>notification</var>'s | ||
| <a for=notification>vibration pattern</a> to the return value. | ||
|
|
||
| <li><p>If <var>options</var>["{{NotificationOptions/timestamp}}"] <a for=map>exists</a>, then set | ||
| <var>notification</var>'s <a for=notification>timestamp</a> to the value. Otherwise, set | ||
| <var>notification</var>'s <a for=notification>timestamp</a> to <var>fallbackTimestamp</var>. | ||
|
|
@@ -660,15 +640,8 @@ the end user, the <a>close steps</a> for it must be run. | |
|
|
||
| <h3 id=alerting-the-user>Alerting the end user</h3> | ||
|
|
||
| <div algorithm> | ||
| <p>The <dfn>alert steps</dfn> for alerting the end user about a given <a for=/>notification</a> | ||
| <var>notification</var> are: | ||
|
|
||
| <ol> | ||
| <li><p><a>Perform vibration</a> using <var>notification</var>'s | ||
| <a for=notification>vibration pattern</a>, if any. | ||
| </ol> | ||
| </div> | ||
| <p>The <dfn>alert steps</dfn> for alerting the end user about a given <a for=/>notification</a> are | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not necessarily something should be done in this PR, but this can probably just be inlined. |
||
| to optionally alert the end user in a user-agent-defined manner (e.g., by playing a sound). | ||
|
|
||
|
|
||
| <h2 id=api>API</h2> | ||
|
|
@@ -697,7 +670,6 @@ interface Notification : EventTarget { | |
| readonly attribute USVString image; | ||
| readonly attribute USVString icon; | ||
| readonly attribute USVString badge; | ||
| [SameObject] readonly attribute FrozenArray<unsigned long> vibrate; | ||
| readonly attribute EpochTimeStamp timestamp; | ||
| readonly attribute boolean renotify; | ||
| readonly attribute boolean? silent; | ||
|
|
@@ -717,7 +689,6 @@ dictionary NotificationOptions { | |
| USVString image; | ||
| USVString icon; | ||
| USVString badge; | ||
| VibratePattern vibrate; | ||
| EpochTimeStamp timestamp; | ||
| boolean renotify = false; | ||
| boolean? silent = null; | ||
|
|
@@ -948,9 +919,6 @@ return the <a>maximum number of actions</a> supported. | |
| <a lt="URL serializer">serialized</a>. | ||
| </ol> | ||
|
|
||
| <p>The <dfn attribute for=Notification><code>vibrate</code></dfn> getter steps are to return | ||
| <a>this</a>'s <a for=/>notification</a>'s <a for=notification>vibration pattern</a>. | ||
|
|
||
| <p>The <dfn attribute for=Notification><code>timestamp</code></dfn> getter steps are to return | ||
| <a>this</a>'s <a for=/>notification</a>'s <a for=notification>timestamp</a>. | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be kept intact, because notifications can still make vibrations regardless of Vibration API?