Titanium Android webView evalJS does not deal well with typeof -


i've got webview in titanium app returns empty string when ask check typeof variable. point of exercise figuring out if function exists on page reloads in different forms.

var hasauth = self.registerview.evaljs("typeof authenticate;") 

this works fine in ios, , in fact in android works on many occasions well. yet on android, return nothingness, represented 'undefined.'

ps: no, problem not including 'return' in javascript string. titanium , causes errors if too.

the solution in case turns out be:

var hasauth = self.registerview.evaljs("'' + typeof authenticate;") 

somehow evaljs can typeof work, not if line starts typeof.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -