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
Post a Comment