-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple-selector doesn't return elements in document order #43
Comments
Is this behavior defined by CSS standard, or is it just a jQuery feature? Reported by |
Whilst jQuery does define this, the CSS spec does not appear to: CSS3 "A comma-separated list of selectors represents the union of all elements selected by each of the individual selectors in the list." Since jQuery and Fizzler can be used to manipulate (and not just display) documents it's arguably far more important that they each define an order for how that union happens. Reported by |
Fizzler intentionally does not return the results in document order because running a sort would end up buffering the results prior to yielding them. This was done to maintain deferred execution semantics as much as possible and make the caller pay for only the least necessary computation. For cases where document order is significant, it seemed reasonable to let the caller compose the results of
I am less concerned with jQuery. What Fizzler clearly violates is the
One way forward I see is first have Reported by @atifaziz on 2011-01-25 01:12:22 |
Reported by
|
http://api.jquery.com/multiple-selector/ states that for a multiple-selector "The order of the DOM elements in the returned jQuery object ... will be in document order."
Fizzler doesn't respect this order, instead returning all the matches for each selector in turn and not in document order.
Originally reported on Google Code with ID 43
Reported by
HighTechRider
on 2011-01-16 20:48:12The text was updated successfully, but these errors were encountered: