Skip to content

DOM lib: add support for navigator.share #18642

@OliverJAsh

Description

@OliverJAsh

The window.navigator Navigator interface has a new property share https://developers.google.com/web/updates/2016/09/navigator-share.

Would it be possible to add this to the DOM lib typings?

I am currently shimming the type locally:

type ShareOptions = { title: string; text: string; url: string };

type NavigatorShare = (options: ShareOptions) => Promise<{}>;

interface Navigator {
  share?: NavigatorShare;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptRevisitAn issue worth coming back to

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions