Search
Items tagged with: ESModules
Here’s a niche gotcha with the clipboard API’s `navigator.clipboard.writeText()` method that’s unique to Safari:
If you access a function from a module within your gesture handler (e.g., click handler), you will get a permission error.
The (sadly hacky and not as robust) workaround is to set a global variable from your module instead.
Full gist:
#Safari #clipboardAPI #JavaScript #ESModules #web #dev #gist
gists/clipboard-writetext-permission-error-when-using-modules-in-safari.md at main
gists - A place for me to post and share small, self-contained code snippets.Codeberg.org