Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
First Round of 1.3 Patches
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Resig  
View profile  
 More options Dec 16 2008, 3:32 pm
From: "John Resig" <jere...@gmail.com>
Date: Tue, 16 Dec 2008 15:32:17 -0500
Local: Tues, Dec 16 2008 3:32 pm
Subject: First Round of 1.3 Patches
Hi Everyone -

I have the first round of jQuery 1.3 patches ready:
http://dev.jquery.com/~john/jquery1.3/

This is in addition to the Sizzle selector engine patch which I posted
a little bit ago (and which I'll be making an updated version of very
soon).

The patches are as follows:

append.patch: Use DocumentFragment in .domManip. This is a large
overhaul of .domManip (and moves some of the logic into jQuery.clean).
The result is that manipulation code (append/prepend/etc.) is about
15x faster. During this overhaul I made a change to how scripts are
executed. Roughly it means that scripts that are brought in as a
string and inserted are executed - but scripts that exist as DOM nodes
are not. This will solve the common problem wherein a script that
already exists in the page will be dual-executed. Let me know if this
affects your code - I suspect we'll learn more during the beta, as
well.

append-2.patch: Just in case, this is the same patch as above, but
with the old-style of functionality intact.

closest.patch: This adds a new method: .closest(selector). You can
think of it as .firstSelfOrAncestor. This has been a commonly
requested function and it will make implementing delegation code
trivial.

domready.patch: An overhaul of the ready code, removing the the "wait
for stylesheets to load" logic. I did a bunch of testing on this and
it really appears as if it's impossible to get proper stylesheet
loading detection implemented (I wanted to have a "cssready" event for
1.3, but it's not looking likely). Instead we need to back off and
simply provide normal DOM ready functionality in .ready(). This means
that we need to educate users to include their stylesheets before
their scripts in order for them to be accessible in time for DOM
ready.

multi-namespace.patch: This adds multiple-namespace support to events.
Previously you could only do it with one namespace e.g.
.bind("click.foo") or .trigger("click.foo"). The patch allows you to
use any number of namespaces e.g.
.bind("click.foo.bar").trigger("click.bar").unbind(".bar.foo").

selector.patch: Adds a new internal property that keeps track of the
selector chain.
$("div").find("span").filter(":hidden").parent().selector == "div
span.filter(:hidden).parent()". This is meant to be used by plugins
(like liveQuery), primarily. The implementation of selectors like
.parent() will be coming in a follow-up patch along with Sizzle.

strict.patch: Makes it so that we pass strict mode in Firefox 3. Only
a few minor tweaks necessary.

I have the following patches coming:
 - Landing Sizzle
 - Landing .parent()/.filter()/etc. selector implementation.
 - Native event delegation
 - Removing the remaining uses of jQuery.browser

--John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe [at] subprint.com  
View profile  
 More options Dec 16 2008, 3:40 pm
From: "Joe [at] subprint.com" <joseph.is...@gmail.com>
Date: Tue, 16 Dec 2008 12:40:22 -0800 (PST)
Local: Tues, Dec 16 2008 3:40 pm
Subject: Re: First Round of 1.3 Patches
Nice one John...dig the new "closest()" method as well.

cheers.

--Joe

http://www.subprint.com

On Dec 16, 2:32 pm, "John Resig" <jere...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chris thatcher  
View profile  
 More options Dec 16 2008, 4:13 pm
From: "chris thatcher" <thatcher.christop...@gmail.com>
Date: Tue, 16 Dec 2008 16:13:18 -0500
Local: Tues, Dec 16 2008 4:13 pm
Subject: Re: [jquery-dev] Re: First Round of 1.3 Patches

mutli-namespace patch makes my day.

On Tue, Dec 16, 2008 at 3:40 PM, Joe [at] subprint.com <

--
Christopher Thatcher

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diogo Baeder  
View profile  
 More options Dec 16 2008, 4:37 pm
From: Diogo Baeder <diogobae...@gmail.com>
Date: Tue, 16 Dec 2008 19:37:04 -0200
Local: Tues, Dec 16 2008 4:37 pm
Subject: Re: [jquery-dev] First Round of 1.3 Patches
Great ones, John!

What about "isOrphan()" or "inDOM()" methods, to prevent uneeded JS
processing for non-existant elements, as discussed before?:
http://groups.google.com/group/jquery-dev/browse_thread/thread/ac5ca8...

Maybe a long discussion, but everybody contributed for the community to
have a nice implementation, right?!

Congratulations for the great work!

Diogo

John Resig escreveu:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iraê  
View profile  
 More options Dec 16 2008, 6:50 pm
From: Iraê <i.bra...@gmail.com>
Date: Tue, 16 Dec 2008 15:50:25 -0800 (PST)
Local: Tues, Dec 16 2008 6:50 pm
Subject: Re: First Round of 1.3 Patches
This is awesome, as always.

Today I use only jQuery throughout my projects. But reglib has gotten
my attention. This selector patch is to make livequery able to do the
'behind the scenes' functionality in a reglib delegation like way?
This would be awesome.

I was thinking of doing that, but I've got only the time to read
reglib once and, as it seems to me, their way is a little bit the
reverse way as jQuery selector works. Am I right? I plan to dive into
this further.

John,
Is this idea already in the works? Or you plan to provide this
selector.patch naively for someone to eventually contribute to
livequery?

On Dec 16, 6:32 pm, "John Resig" <jere...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Dec 17 2008, 9:14 am
From: "John Resig" <jere...@gmail.com>
Date: Wed, 17 Dec 2008 09:14:47 -0500
Local: Wed, Dec 17 2008 9:14 am
Subject: Re: [jquery-dev] Re: First Round of 1.3 Patches
Iraê -

The event delegation code that we're landing (and what we've been
planning on landing for a long time) is going to be very similar to
what's in reglib.

In 1.3 you will be able to do:
$("div.menu li > a").live("click", function(e) { ... });

in reglib the equivalent would be:
reg.click("div.menu li > a", function(e) { ... });

--John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Dec 17 2008, 9:19 am
From: "John Resig" <jere...@gmail.com>
Date: Wed, 17 Dec 2008 09:19:26 -0500
Local: Wed, Dec 17 2008 9:19 am
Subject: Re: [jquery-dev] Re: First Round of 1.3 Patches
Diogo -

I would rather shoot for something that's a little more idiomatic to
jQuery. For example jQuery already has a way to figure out if an
element contains a selector: "div:has(a)".

Thus, I think a better result would be:
$("div").has("a") // true
$(document).has("div") // true
$(document).has(document.getElementsByTagName("div")[0]); // true

--John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ricardo Tomasi  
View profile  
 More options Dec 17 2008, 2:21 pm
From: Ricardo Tomasi <ricardob...@gmail.com>
Date: Wed, 17 Dec 2008 11:21:09 -0800 (PST)
Local: Wed, Dec 17 2008 2:21 pm
Subject: Re: First Round of 1.3 Patches
Out of curiosity, what is the effect of removing the DOMContentLoaded
listener after execution?

- ricardo

On Dec 16, 6:32 pm, "John Resig" <jere...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diogo Baeder  
View profile  
 More options Dec 17 2008, 2:42 pm
From: Diogo Baeder <diogobae...@gmail.com>
Date: Wed, 17 Dec 2008 17:42:08 -0200
Local: Wed, Dec 17 2008 2:42 pm
Subject: Re: [jquery-dev] Re: First Round of 1.3 Patches
Hi, John,

Maybe I got it wrong, but I think the main idea was to create a method
that could be used several times, if needed, to test the elements
existance, say, on a variable pointing to a jQuery object... for
example, if you need to test an array element several times during a
processing, and, if at some point it relates to a non-existant element,
it's removed from the list, thus preventing a memory leak. I thought
about this situation because I already passed by one of this kind, but
maybe I'm thinking of something that may not be that necessary to
everyone, though...

Just synthetizing the discussion on the group thread, this is the
difference between the first and the last implementations of the method
- during a 1000 iterations test -:

- First implementation: 451ms on my machine (using traversal);
- Last: 43ms on my machine (using native code to test document elements
supporting also iframes and XML).

Thank you :-)

Diogo

P.S.: Someone has told me jQuery might have some native implementation
in some future Firefox version... maybe just a silly rumour?
Nevertheless, it would be interesting how one would put hands on the FF
C source code and insert a fast as hell jQuery in it... :-)

John Resig escreveu:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Dec 17 2008, 8:07 pm
From: "John Resig" <jere...@gmail.com>
Date: Wed, 17 Dec 2008 20:07:46 -0500
Local: Wed, Dec 17 2008 8:07 pm
Subject: Re: [jquery-dev] Re: First Round of 1.3 Patches

> Out of curiosity, what is the effect of removing the DOMContentLoaded
> listener after execution?

No huge effect - but it's good to run a tidy ship :-)

--John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diogo Baeder  
View profile  
 More options Dec 18 2008, 9:26 am
From: "Diogo Baeder" <diogobae...@gmail.com>
Date: Thu, 18 Dec 2008 12:26:22 -0200
Local: Thurs, Dec 18 2008 9:26 am
Subject: Re: [jquery-dev] Re: First Round of 1.3 Patches

Oops, John, sorry, I think I misunderstood your message... did you mean
implementing a "has" method by using native "contains" and
"compareDocumentPosition"? If yes, it seems much more reasonable, since it
can be applied to other nodes than document.documentElement or
someElement.ownerDocument...

Diogo

--
Diogo Baeder
http://www.diogobaeder.com.br

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google