outaTiME

at devel days

DOMAssistant 2.6 Released

leave a comment »

DOMAssistant 2.6 has been released and the team focused on performance for this version.

They have their own version of slickspeed which includes their library.

The CSS changes include:

Where querySelectorAll and getElementsByClassName aren’t available, DOMAssistant resorts to XPath to select elements, which is an approach that also has very impressive performance results, not to mention native web browser support. The only web browser not supporting XPath is Internet Explorer, where the only option is “regular” looping through elements.

The new version includes a new plugin architecture and an update of the magic methods:

The $ method

Accepts either a CSS selector or an object reference. E.g. $("#container .external-links"), $(document). Fails silently if you try to call a method when the selector didn’t return any matches; i.e., $("input[type=text]").addClass("text-fields") won’t throw an error trying to call the addClass method, even if the $ selector didn’t match any elements.

Returns: A collection of one or several nodes for CSS selectors/object reference when an object was sent in.

The $$ method

Accepts a string parameter, expected to be the id of an element. E.g. $$("container"), $$("navigation"). Will throw an error if you try to call a method, if there wasn’t any match.

Returns: A direct reference to the DOM element.

(Via Ajaxian.)

Written by outaTiME

February 21, 2008 at 1:00 pm

Leave a Reply