Skip to content

Web Share Target API #11

Closed
Closed

Description

@matteocargnelutti

Request for position on an emerging web specification

Information about the spec

Design reviews and vendor positions

Bugs tracking this feature

Anything else we need to know

Summary: While the Web Share API allows browsers to make use of the operating system's native "share" mechanism in web-to-native contexts, the Web Share Target API intent is to enable web-to-web and native-to-web sharing scenarios.
What is WebKit's position on this spec?

Activity

  1. added
    topic: web apis
    topic: app-like capabilities
    on Jun 29, 2022
  2. othermaciej commented on Jun 29, 2022

    @othermaciej

    Is this an Unofficial Draft of the Web Apps WG? Is it a community group thing? Can't tell the venue from the document itself.

  3. matteocargnelutti commented on Jun 29, 2022

    @matteocargnelutti
    Author

    @othermaciej My understanding is that this draft comes from the WICG, as the Specification - Level 2 doc suggests:

    [...] Web Share Target API - Level 2 Specification, published by the Web Incubator Community Group under the W3C Community Contributor License Agreement (CLA). [...]

    https://github.com/WICG/web-share-target/ redirects to https://github.com/w3c/web-share-target.

  4. marcoscaceres commented on Jun 29, 2022

    @marcoscaceres
    Contributor

    It's an unofficial draft, but it's in scope for WebApps WG should another implementer become interested:
    https://www.w3.org/2019/05/webapps-charter.html#wicgspecs

  5. othermaciej commented on Jun 29, 2022

    @othermaciej

    OK, so for now WICG, but has fast track to go to Web Apps WG depending on interest?

  6. added
    venue: WICG
    on Jun 29, 2022
  7. marcoscaceres commented on Jun 30, 2022

    @marcoscaceres
    Contributor

    That's correct, yes.

  8. hober commented on Jun 30, 2022

    @hober
    Member

    @hortont424, thoughts?

  9. othermaciej commented on Jul 1, 2022

    @othermaciej

    Potential security concerns if this allows a website to appear in the Share Sheet with a site-chosen icon and name, as it can then intentionally duplicate a popular or preinstalled app and thus mislead users.

  10. tomayac commented on Jul 1, 2022

    @tomayac

    The user would need to add the app to their home screen pro-actively, so when they are on Banana Game with a [🍌] icon and they try to add it and it suddenly says Facebook Messenger with a [💬] icon, they would notice there.

  11. othermaciej commented on Jul 1, 2022

    @othermaciej

    So this API is only usable by installed/homescreen web apps? Not in the browser?

  12. matteocargnelutti commented on Jul 3, 2022

    @matteocargnelutti
    Author

    @othermaciej: So this API is only usable by installed/homescreen web apps? Not in the browser?

    In its current state, the spec leaves the user agent determine how, if, and when targets should be registered.

    The spec suggests different strategies that can be used to determine if the share target(s) should be registered: whether or not the web app is installed is one of them.

    Chrome's current implementation of the Web Share Target API requires the web app to be installed.


    @othermaciej: Potential security concerns if this allows a website to appear in the Share Sheet with a site-chosen icon and name, as it can then intentionally duplicate a popular or preinstalled app and thus mislead users.

    The spec also lists spoofing as a risk of "particular concern", and suggests that this risk is heightened when the user agent doesn't require the web app to be installed.

  13. tomayac commented on Jul 4, 2022

    @tomayac

    @othermaciej I have opened WICG/web-share-target#109 asking if some sort of installation ceremony should be made obligatory by the spec. In practice, the API in its current implementation in Chromium already requires apps to be installed for it to have an effect.

  14. othermaciej commented on Sep 25, 2022

    @othermaciej

    @othermaciej: Potential security concerns if this allows a website to appear in the Share Sheet with a site-chosen icon and name, as it can then intentionally duplicate a popular or preinstalled app and thus mislead users.

    The spec also lists spoofing as a risk of "particular concern", and suggests that this risk is heightened when the user agent doesn't require the web app to be installed.

    Ideally there should be not just an identification of the risk but also something in the spec (even if just a suggestion) to mitigate it. The risk is also heightened if it's possible for a web app's name or icon to change post-install (without user confirmation).

  15. added
    from: Google
    on Sep 25, 2022
  16. tomayac commented on Sep 26, 2022

    @tomayac

    Regarding changing icons and/or name: both are considered security-sensitive and the spec mandates UAs make users aware of such changes.

  17. added
    concerns: security
    concerns: integration
    on Nov 11, 2022
  18. marcoscaceres commented on Nov 11, 2022

    @marcoscaceres
    Contributor

    This is a DRAFT POSITION and does not represent the consensus of the WebKit community.

    However, unless anyone objects by Friday 16th of November 2022, we will make the below the "official position". Please feel free to object or requests more time if needed. Please expressed support through the thumbs up reaction or additional comments (no +1 comments please!).

    WebKit’s position is "neutral" but with concerns.

    The main pro of the API is that it allows applications applications that have been added to the home screen to participate as share targets, putting them on a more equal footing with other applications participating as share targets. We continue to evaluate ways to determine user trust for arbitrary websites (those not “installed”) to serve as a share targets. Stronger spec wording may be required to make sure that a regular web application can’t change its visual identity after the user has registered a site as a share target (e.g., perhaps it might be prudent to just say that an application MUST be “installed” per Web Manifest).

    The WebKit community probably needs to evaluate if the mechanism proposed is compatible across various platforms (particularly macOS, which use “Share Extensions”, and iOS, which relies on “Actions“). Further investigation is needed to evaluate how this would integrate in other platforms, like Linux.

    Other positive is how it integrates with existing web content by leveraging HTTP GET and POST in the form of a Request. However, the WebKit community would need to further evaluate how well it integrates with both navigating and the use of the Fetch API: presumedly, the origin of the request is set when it is created to be in the correct context, etc. plus probably need to verify the behavior with respect to HTML’s navigation algorithm.

    As a side, it would be good to see the spec migrate away from using Web IDL for the extensions to Web Manifest.

  19. tomayac commented on Nov 11, 2022

    @tomayac

    Thanks for your position, @marcoscaceres!

    If the spec were to hard-require installation (i.e., Add to Home Screen on iOS/iPadOS) of an app before it can appear as a Web Share Target, would that possibly move your position more toward positive?

  20. marcoscaceres commented on Nov 16, 2022

    @marcoscaceres
    Contributor

    Personally, I still think we need to think about this more in the Web Community at large. I'm personally worried about creating an "installed web" and a regular web: where some things only work if an app is installed. We should avoid that as much as possible, though it may be unavoidable in this case.

    Having said that, "neutral" shouldn't be seen as negative. Maybe with a bit of work, Web Apps WG can turn it into something worth "support"ing?

  21. hober commented on Mar 23, 2023

    @hober
    Member

    Closing as we've identified our position.

  22. moved this from Unscreened to Done in Standards Positions Review Backlogon Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    concerns: integrationconcerns: securityfrom: Googleposition: neutraltopic: app-like capabilitiestopic: web apisvenue: WICG

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions