w3c/web-share-target

Support for hashfragments in share target action

Opened this issue · 2 comments

The use of '#!' in the share target action is not supported. But for (older) SPAs this would be usefull. The #! is usually a part of the routing but could be used for other extra information aswell.

"share_target": {
  "action": "/index.html/#!/share",
  "method": "GET",
  "params": {
    "title": "title",
    "text": "text",
    "url": "url"
  }
}

I think this is supported right now (weirdly, it looks like we override the query, but not the fragment), according to this algorithm.

Does the fragment get deleted in the actual implementation?

I've tried with "action": "/#!/share", on android/chrome and it does not seem to route my app to the correct location. Wheras if I type in manually https://mydomain.com/#!/share it does route me to the correct page.

Don't take my word for it though, I'm not sure. There's a lot of caching going which is not ideal for testing.