navigator.share on Safari iOS not working with LittleJS #117
Replies: 1 comment
-
|
I just tried it out by using modifying the button in the ui example to use this code... I can confirm it is working on iPhone in both Safari and Chrome. It is also working in chrome on PC. It will not work in some browsers that don't support the share API feature, like Firefox is a major one. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share here's what it looks like on pc...
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Does anybody have ideas as to why navigator.share doesn't seem to be compatible with LittleJS when running a game on Safari on an iPhone?
Here is some sample code. Here is a bare bones index.html
If you load this, you get a simple share button that when clicked, brings up the opportunity to send the sample text to a friend via to OS share sheet.
However, if you add a simple blank LittleJS (let's say you use the game.js from LittleJS/examples/empty) then the share button no longer works.
Beta Was this translation helpful? Give feedback.
All reactions