Skip to content

Absolute path url arguments do not get merged with current domain before passing through to share targets in fallback mode #61

Description

@josefdlange

I'm honestly not sure if this is documented behavior of the Web Share API but I'm seeing diverging behavior in this instance:

  1. Call navigator.share with the url argument as a /-prefixed path, like /articles/123/
  2. Native navigator.share interprets that into <protocol>://<current-domain-and-port>/articles/123/ when passing through to share target. Kind of how the href of an <a> element is understood correctly when it's just /articles/123/.
  3. Polyfill fallback behavior does not do this and just passes through /articles/123/ as the "URL" to any share target.

I'm happy to work on this as a PR to this project but wanted to propose it first and get approval before investing the work.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions