Hi Pete, Eric and Ingmar,

I've spent quite some time making Brian Donovan's attribute selectors for $$() IE6 compatible* and extending it with *=, ^= and $= selectors and the negation selector :not(X).

These were the selectors I was really missing and thought could be the most useful. I purposely limited their number to keep the library lightweight.

I added a bunch of tests and my patch here: http://dev.rubyonrails.org/ticket/5170

I'm already using this patch to great success in an application I'm currently working on.

Your comments, suggestions, enhancement requests or bug reports are of course more then welcome.

Hope this also answers some of your needs.

Best regards,

Tobie

* There where various issues regarding IE6's way of rendering getAttribute in case of empty attributes versus non-existing ones, and peculiarities in it's handling of the href attribute. These, by the way, have been documented since by Glenn Jones: http://www.glennjones.net/Post/809/getAttributehrefbug.htm.





Hi Pete and Eric,

Eric Anderson wrote:
> We can just use selectors. CSS selectors are very good as specifying
> elements in a document.

That's exactly what I thought, too.

Using $$() is IMHO the way to go, and keeps us from adding more and more
getElementsByWhatever() functions.

Enhancing the generic $$() function to fully support (unit testable)
CSS2 selectors while maintaining reasonable performance, would be the
real challenge.

cheers
Ingmar

_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to