UNPKG

@genexus/web-standard-functions

Version:

GeneXus JavaScript standard functions library for web generators

24 lines 535 B
import { msg } from "../../../misc/msg"; /** * @param text * @param url * @param title */ export const shareText = (text, url, title) => { const nav = window.navigator; const data = {}; data["text"] = text; if (url !== "") { data["url"] = url; } if (title !== "") { data["title"] = title; } if (nav && nav.share) { return nav.share(data); } else { return msg("Share API not available in this browser", "status"); } }; //# sourceMappingURL=shareText.js.map