source: Dev/trunk/src/client/dojox/jq/README @ 529

Last change on this file since 529 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 4.2 KB
Line 
1-------------------------------------------------------------------------------
2DojoX jq
3-------------------------------------------------------------------------------
4Version 0.0.1
5Release date: 8/9/2009
6-------------------------------------------------------------------------------
7Project state:
8experimental
9-------------------------------------------------------------------------------
10Credits
11        James Burke
12-------------------------------------------------------------------------------
13Project description
14
15DojoX jq is a compatibility layer that tries to match the jquery 1.3.2 API.
16-------------------------------------------------------------------------------
17Dependencies:
18
19- Dojo Core.
20-------------------------------------------------------------------------------
21Documentation
22
23IF YOU WISH TO WORK ON THIS MODULE, PLEASE DO NOT LOOK AT THE JQUERY SOURCE.
24
25We want CLA-clean code to be put in the Dojo repos. Just refer to the jquery API
26documentation and unit tests. As we get bug reports, we can build up our own test
27suite, and then hopefully contribute those tests back to jquery if their tests
28do not adequately cover an API call.
29
30This module needs a lot of work, it is in the very initial, rough stages. Some
31(all?) of the code is ugly. It is missing some APIs, notably queue/dequeue,
32the FX methods and live/die.
33
34There are also some incompatibilities with how acme and sizzle operate at the moment,
35mentioned in the comments in jq.js
36
37The tests for this module so far have been the jquery 1.3.2 tests. Since those
38tests are not CLA-clean, you will need to download them from here:
39
40http://www.tagneto.org/dojo/jquery132.zip
41
42Place the zip file in the dojox/jq/tests directory and unzip it. Then you can
43run the jquery132/test/index.html file inside there to start the tests.
44
45The tests were changed in a couple ways. For the tests I modified,
46you can look for //JRB changed: to find the original test construction.
47Things that were changed:
48
491) acme requires spaces between CSS3 selectors, where sizzle does
50not ("div>span" fails in acme, but works in sizzle). There is a
51dtk.org bug on it, and it is allowed by the CSS3 spec to not have
52spaces so hopefully that incompatibility can go away after a while.
53
542) sizzle supports some psuedos like :last, :first: :odd, :even that
55work on the list of matched elements, not just individual elements or
56their children. This is a more fundamental change to acme, but it is probably
57doable.
58
593) The XML tests and ajax tests that call out to files fail because of
60some weird timing interaction between the jquery unit test thing and
61our XHR code. I believe since our code has a timer where we check the
62status of the XHR calls instead of using load callbacks directly on
63the XHR callbacks, something is confused in jquery -- the failure case
64is fired before our callbacks work. If only they used deferreds. ;)
65To get those tests to sort of work, I modified qunit/testrunner.js's process()
66method to be like so:
67
68function process() {
69        if(config.queue.length && !config.blocking){
70                setTimeout(function(){
71                if(config.queue.length && !config.blocking){
72                        config.queue.shift()();
73                        process();
74                }
75                }, 100);
76        }
77}
78
79Change 100 above to tune it depending on your patience and how much
80you want to make sure the tests have enough time to run. With 100, you
81can see some of the ajax tests passing.
82
83From some previous notes (I have not checked more recently), it looks
84like the compat layer fires "ajaxStop" more than jquery, I think due
85to how we do our async in-flight testing, so that messes up some of
86the testing in the ajax calls, but I think that is a detail that is
87fine to go with. I just have to make sure that is really the cause of
88a test failure and not something else. So I will probably need to
89modify the tests more.
90
91
92-------------------------------------------------------------------------------
93Installation instructions
94
95Grab the following from the Dojo SVN Repository:
96http://svn.dojotoolkit.org/src/dojox/trunk/jq.js
97http://svn.dojotoolkit.org/src/dojox/trunk/jq/*
98
99Install into the following directory structure:
100/dojox/jq.js
101
102...which should be at the same level as your Dojo checkout.
103-------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.