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

Demo broken with new API (v2) #70

Closed kael closed 5 years ago

kael commented 5 years ago

Seems the demo is broken using the new Web Share Target API (v2):

  "share_target": {
    "url_template": "sharetarget.html?oldapi=true&title={title}&text={text}&url={url}",
    "action": "sharetarget.html",
    "params": {
      "title": "title",
      "text": "text",
      "url": "url"
    }
  },

The handler is registered with Chromium 65 Linux, it used to work with v1, but now when sharing a link, Chome opens a blank page without nothing more, no HTTP request pointing to the uri_template.

I tried to uninstall the app by deleting it from .local/share/applications/* but not sure I deleted the correct or the only version, because the handler is still there despite having deleted the chrome-app manifest file.

Also, although currently it doesn't seem possible to register the handler with Chrome 69 Linux (unclear), it'd be nice to have a way to know to which webengine/browser a registered PWA is related to. Actually, I've tested using Chrome and Chromium, and I don't know to which browser it's attached (and how to flush the PWA handler).

Perhaps the handler unregistration could better designed also.

From which version of Chrome or Firefox (desktop and mobile) the new API demo can be used with, specially the case using a POST request to share a link ?

kael commented 5 years ago

API v2 is now fixed in Chrome Canary, and the demo works.