-
Notifications
You must be signed in to change notification settings - Fork 65
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
Extract 'Extensibility of the API' #72
Closed
Closed
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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title> | ||
Extending the Web Share API | ||
</title> | ||
<script src="https://www.w3.org/Tools/respec/respec-w3c-common" class= | ||
"remove"></script> | ||
</head> | ||
<body> | ||
<section style="display:none;"> | ||
<h2> | ||
Dependencies | ||
</h2> | ||
<p> | ||
<code><dfn data-cite= | ||
"!ECMASCRIPT#sec-native-error-types-used-in-this-standard-typeerror">TypeError</dfn></code> | ||
is defined by [[!ECMASCRIPT]]. | ||
</p> | ||
</section> | ||
<section class="appendix informative"> | ||
<h2> | ||
Extending the Web Share API | ||
</h2> | ||
<p> | ||
The Web Share API is designed to be extended in the future by way of | ||
new members added to the | ||
<a href="https://wicg.github.io/web-share/#sharedata-dictionary">ShareData</a> | ||
dictionary, to allow both | ||
sharing of new types of data (<i>e.g.</i>, <a href= | ||
"https://github.com/WICG/web-share/issues/12">images</a>) and strings | ||
with new semantics (<i>e.g.</i> author). | ||
</p> | ||
<div class="warning"> | ||
This doesn't mean user agents can add whatever members they like. It | ||
means that new members can be added to the standard in the future. | ||
</div> | ||
<p data-link-for="ShareData"> | ||
The three members <a href="https://wicg.github.io/web-share/#dom-sharedata-title">title</a>, | ||
<a href="https://wicg.github.io/web-share/#dom-sharedata-text">text</a>, | ||
and <a href="https://wicg.github.io/web-share/#dom-sharedata-url">url</a>, are part | ||
of the base feature set, and implementations that provide | ||
<a href="https://wicg.github.io/web-share/#dom-navigator-share">navigator.share()</a> | ||
need to accept all three. Any new members that | ||
are added in the future will be <em>individually | ||
feature-detectable</em>, to allow for backwards-compatibility with | ||
older implementations that don't recognize those members. These new | ||
members might also be added as optional "MAY" requirements. | ||
</p> | ||
<div class="note"> | ||
There is <a href="https://github.com/heycam/webidl/issues/107">an open | ||
discussion</a> about how to provide feature-detection for dictionary | ||
members. Web Share will use the mechanism produced by that discussion. | ||
</div> | ||
<p data-link-for="Navigator"> | ||
The <a href="https://wicg.github.io/web-share/#dom-navigator-share">share()</a> | ||
method returns a rejected promise | ||
with a <a>TypeError</a> if none of the | ||
specified members are present. The intention is that when a new member | ||
is added, it will also be added to this list of recognized members. | ||
This is for future-proofing implementations: | ||
if a web site written against a future version of this spec uses | ||
<em>only</em> new members (<i>e.g.</i>, <code>navigator.share({image: | ||
x})</code>), it will be valid in future user agents, but a | ||
<a>TypeError</a> on user agents implementing an older version of the | ||
spec. Developers will be asked to feature-detect any new fields they | ||
rely on, to avoid having errors surface in their program. | ||
</p> | ||
<p> | ||
Editors of this spec will want to carefully consider the genericity of | ||
any new members being added, avoiding fields that are closely | ||
associated with a particular service, user agent or operating system, | ||
in favour of fields that can potentially be applied to a wide range of | ||
platforms and targets. | ||
</p> | ||
</section> | ||
</body> | ||
</html> |
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
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.
If this is going to go in a separate, informal, document, then: