Skip to content
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

Support for custom protocols in share target #90

Closed
JeremyMahieu opened this issue May 19, 2020 · 2 comments
Closed

Support for custom protocols in share target #90

JeremyMahieu opened this issue May 19, 2020 · 2 comments

Comments

@JeremyMahieu
Copy link

One limitation I'm facing is, imagine a SPA that is connected to a backend with a websocket. This application is intended to run as a single instance. It's in a state that cannot be simply created again in a new instance. When using a share target, it always opens a new instance, which is undesirable in this case.

Expanding the navigational scope of share target action to include custom protocols could be a solution. That way the running instance of the app could perhaps pick up the called share target action.

This is all a bit speculative though, I'm not sure it would actually work or be a good idea.

"share_target": {
  "action": "myapp://mydomain.com/share",
  "method": "GET",
  "params": {
    "title": "title",
    "text": "text",
    "url": "url"
  }
}
@JeremyMahieu
Copy link
Author

Or perhaps to not expand the scope too much, just change the protocol:

"share_target": {
  "protocol": "myapp",
  "action": "/share",
  "method": "GET",
  "params": {
    "title": "title",
    "text": "text",
    "url": "url"
  }
}

Results in a call to myapp://mydomain.com/share

@mgiuca
Copy link
Collaborator

mgiuca commented May 20, 2020

I think this is out of scope of Web Share Target. There's a feature request for protocol handlers to be registerable from within the manifest.

@mgiuca mgiuca closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants