@genexus/web-standard-functions
Version:
GeneXus JavaScript standard functions library for web generators
28 lines • 678 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.shareText = void 0;
const msg_1 = require("../../../misc/msg");
/**
* @param text
* @param url
* @param title
*/
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 (0, msg_1.msg)("Share API not available in this browser", "status");
}
};
exports.shareText = shareText;
//# sourceMappingURL=shareText.js.map