Update index.html

dev
Aji Kamaludin 6 years ago committed by GitHub
parent 9069382df0
commit 7c8666d408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,18 @@
<p class="subtitle"> <p class="subtitle">
My first website with <strong>Bulma</strong>! My first website with <strong>Bulma</strong>!
</p> </p>
<button name="shareButton" id="shareButton" >Share</button>
</div> </div>
</section> </section>
</body> </body>
<script>
shareButton.addEventListener("click", async () => {
try {
await navigator.share({ title: "Example Page", url: "" });
console.log("Data was shared successfully");
} catch (err) {
console.error("Share failed:", err.message);
}
});
</script>
</html> </html>

Loading…
Cancel
Save