I'm trying to test my javascript alerts and such on my iphone and they won't work. They do however work on the emulator. What's the problem? I have very very simple javascript. I've included a screenshot. It's an event_listener and a click counter.
Asked
Active
Viewed 88 times
1

Spilot
- 1,495
- 8
- 29
- 55
1 Answers
1
Try to use textContent
instead of innerText
.
You can find difference here

Viktor Kukurba
- 1,360
- 9
- 14
-
Same deal. Works in emulator. Not on device. – Spilot Jan 14 '16 at 03:17
-
Why do you use 'var document;' ? – Viktor Kukurba Jan 14 '16 at 03:25
-
The Intel xdk code editor will give me an error if I don't. Every dom object you use there has to be declared first. If I do window.alert I will have to declare "var window" first, etc. – Spilot Jan 14 '16 at 04:48
-
Regarding those "errors" in the edit window, especially the one for alert(), see this reply to your related post > http://stackoverflow.com/a/34845771/2914328 – xmnboy Jan 18 '16 at 18:57