Modify ↓
Ticket #3085 (closed enhancement: wontfix)
In NetFront Browser v3.4SP16 UTF-8 version, most of jQuery's functions are not run
| Reported by: | ohkuma | Owned by: | |
|---|---|---|---|
| Priority: | trivial | Milestone: | 1.3 |
| Component: | core | Version: | 1.2.3 |
| Keywords: | NetFront | Cc: | |
| Blocking: | Blocked by: |
Description
cause:
The following (L1369, jquery-1.2.3.js):
var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
"(?:[\\w*_-]|\\\\.)" :
"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
quickChild = new RegExp("^>\\s*(" + chars + "+)"),
quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
quickClass = new RegExp("^([#.]?)(" + chars + "*)");
Script seems to stop by treating Unicode at RegExp().
workaround:
jQuery.browser = {
- version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
+ version: (window.netfront == null) ? (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1] : window.netfront.version(),
safari: /webkit/.test( userAgent ),
opera: /opera/.test( userAgent ),
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
- mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+ mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ),
+ netfront: window.netfront != null || /netfront/.test( userAgent )
};
...
-var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
+var chars = ((jQuery.browser.safari && parseInt(jQuery.browser.version) < 417) || (jQuery.browser.netfront && parseFloat(jQuery.browser.version) <= 3.4)) ?
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

As you might know, NetFront isn't supported by jQuery. You say that with those single changes, then everything works on NetFront ?
Please make a checkout/export from the svn repository. You need to run a make to generate a jQuery deploy:
Then go to /dist/jquery.js and add the modifications you mention. Now run /test/ on your NetFront.
Let me know if all the tests pass. Thanks