PDA

View Full Version : Ext.DomQuery "type"?



harley.333
24 Aug 2008, 6:27 PM
What's the difference between "simple" and "select" when using Ext.DomQuery.compile?

evant
24 Aug 2008, 6:56 PM
I had a brief look at the source, it seems simple only seems to match either
a) Id only.
b) Tag names only.

Select handles the rest.

harley.333
24 Aug 2008, 8:31 PM
Yeah, I read through the source too and that was my initial conclusion. But now, I don't think so. It looks like "simple" and "select" just determine how ID and tagName are searched for. Both types support everything. Except, "select" supports these selectors and "simple" does not:
E > F
E/F
E + F
E ~ F

I'm guessing that "simple" has better performance, but only slightly (especially after compiling the query).

Is this correct?