|
|
@ -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>
|
|
|
|