admin管理员组文章数量:1334326
I am part way through developing a mobile web app which contains almost no HTML elements. JSON2HTML is used to create HTML elements.
My problem is that it works ok except for on
- iPad
- Android 4.0.3 Native browser.
The problem with these browsers is that the content isn't being rendered.
It works fine on
- Android 4.0.3 Chrome,
- Android 4.0.3 Firefox
- Android 4.0.3 Opera
- Android 4.0.3 Dolphin
- Android 4.1.1 Native
- Android 4.1.1 Other browsers
Just to clarify, this is a mobile web app, not a native mobile app. I am not using any native code, I am using standard web technologies (HTML5, CSS3, jQuery, Javascript, JSON)
I am part way through developing a mobile web app which contains almost no HTML elements. JSON2HTML is used to create HTML elements.
My problem is that it works ok except for on
- iPad
- Android 4.0.3 Native browser.
The problem with these browsers is that the content isn't being rendered.
It works fine on
- Android 4.0.3 Chrome,
- Android 4.0.3 Firefox
- Android 4.0.3 Opera
- Android 4.0.3 Dolphin
- Android 4.1.1 Native
- Android 4.1.1 Other browsers
Just to clarify, this is a mobile web app, not a native mobile app. I am not using any native code, I am using standard web technologies (HTML5, CSS3, jQuery, Javascript, JSON)
Share Improve this question edited Jul 15, 2013 at 10:33 Jez D asked Jul 11, 2013 at 14:09 Jez DJez D 1,4892 gold badges25 silver badges54 bronze badges2 Answers
Reset to default 2After days of research and testing, I have found the solution.
- First I activated the built-in debugger on my Android phone - instructions at http://tinyurl./768qltl
- The debugger then told me that the error was at line 71 of jquery.json2html.js
- I opened jquery.json2html.js
- I replaced line 71 with the following code
else $.fn.append.call($(this),$(dom).children());
This works because the previous line 71 was calling the jquery append.apply function, which only works with specific data type on older browsers.
Your best bet would be finding a way to remotely debug what's happening in the native browser. There are a couple ways to do this.
- Install an app like JsHybugger, which acts as a reverse proxy
- Add some new JavaScript to the source page and use Weinre, JSConsole, or to attach remotely
本文标签: javascript not working on native android browserStack Overflow
版权声明:本文标题:javascript not working on native android browser - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742369322a2461913.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论