I am encountering a very stragne bug, i am trying to call javascript from AIR like this
this.webView.loadURL( 'javascript:alert(5)' ); — This works
this.webView.loadURL( 'javascript:alert("hello there")' ); — This is not working
I am not able to pass strings, in any function. I am not sure why this is happening and it is driving me insane. It works correctly in Android though.
Any help would be greatly appreciated.
Thanks
EDIT: after spending sometime tweaking it seems to be the space. alert(“hello”) works fine alert(“hello there”) doesnot.
Ok I think I found it.
You cannot pass whitespaces. You can in Android and Desktop – but no, the glorious iOs refuses to digest such an advanced entity.
So you must encode your whitespaces in strings and make sure that there will be no stray whitespace in your functiond declration
for example
while
Good luck