UNPKG

endpoint-share-api-polyfill

Version:

This is a polyfill for the `Web Share API` that can be used in desktop too, so your users can share in their twitter, facebook, messenger, linkedin, sms, e-mail, print, telegram or whatsapp.

222 lines (69 loc) 2.85 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Global</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2></h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="sharePolyfill"><span class="type-signature"></span>sharePolyfill<span class="type-signature"> :<a href="SharePolyfill.html">SharePolyfill</a></span></h4> <div class="description"> This will setup the polyfill with default options. So it will only use the polyfill if navigator.share does not exist You can still use sharePolyfill.share(); or initalize with sharePolyfill = new SharePolyfill({forcePolyfill:true}); equivalently navigator.share = sharePolyfill.share; happy hacking </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SharePolyfill.html">SharePolyfill</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="share.js.html">share.js</a>, <a href="share.js.html#line1287">line 1287</a> </li></ul></dd> </dl> <h5>Example</h5> <pre class="prettyprint"><code>//minimal navigator.share({ title: 'SGOL' text: 'One For all All For One' url: 'https://sharedgoalof.life' }) //advanced sharePolyfill.</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="SharePolyfill.html">SharePolyfill</a></li><li><a href="ShareTarget.html">ShareTarget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#sharePolyfill">sharePolyfill</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sun Oct 29 2023 07:27:00 GMT-0600 (Mountain Daylight Saving Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>