w3c / web-share-target

Web API proposal for receiving shared data
https://w3c.github.io/web-share-target/
Other
191 stars 20 forks source link

Better descriptions of the semantics of each piece of ShareData #56

Closed mgiuca closed 6 years ago

mgiuca commented 6 years ago

Raised in w3ctag/design-reviews#221.

@dbaron: "It would probably be useful to say what a share consists of. I understand it to be a sort of arbitrary bundle of title, text, url, and in the future files. Right now that's stated in the example section but the relevant normative part of the spec seems to assume the reader knows what "the title", "the text", etc., are.

"I think it's useful to state that it's basically an arbitrary set of data possibly coming from an OS sharing system or possibly coming from Web Share."

mgiuca commented 6 years ago

Discussed with @ewilligers about this. We think it's already taken care of in the current spec text:

It would probably be useful to say what a share consists of. I understand it to be a sort of arbitrary bundle of title, text, url, and in the future files. Right now that's stated in the example section but the relevant normative part of the spec seems to assume the reader knows what "the title", "the text", etc., are.

Covered by ShareTargetParams and its members:

The title member specifies the name of the query parameter used for the title of the document being shared. The text member specifies the name of the query parameter used for the arbitrary text that forms the body of the message being shared. The url member specifies the name of the query parameter used for the URL string referring to a resource being shared.

I think it's useful to state that it's basically an arbitrary set of data possibly coming from an OS sharing system or possibly coming from Web Share.

Covered by Handling incoming shares:

It is not specified where the data comes from, or how the end user indicates the web share target as the receiver. However, one possible source is a call to navigator.share in the same user agent.

NOTE: Examples of other possible sources of a web share target invocation are:

  • From the built-in UI of the user agent (e.g., the end user picks "Share" from a browser's menu, to share the current page title as "title" and the current page URL as "url").
  • A share action triggered from a native application (via a proprietary share system), followed by the end user choosing a web share target as the receiver.