0
Help me solve this error
const shareButton = document.querySelector('.share-button'); const shareDialog = document.querySelector('.share-dialog'); const closeButton = document.querySelector('.close-button'); shareButton.addEventListener('click', event => { if (navigator.share) { navigator.share({ title: 'WebSh', url: 'https://codepen.io/ayoisaiah/pen/YbNazJ' }).then(() => { console.log('Thanks for sharing!'); }) .catch(console.error); } else { shareDialog.classList.add('is-open'); } }); closeButton.addEventListener('click', event => { shareDialog.classList.remove('is-open'); });
2 Antworten
+ 3
Please save your whole code on SL Playground and link here.
There above is no HTML part.