Chapter 9. Selector Engines
Selecting elements from the DOM is quite an easy affair these days. We simply use the element methods, put in a selector, and we're done. However, the technology that operates this selection process is actually quite complex. In fact, it's interesting enough that it warrants our attention for the next few pages.
In this chapter, we'll learn how selection is done in tree-based structures like the DOM. We'll also learn about the MooTools selector engine, called Slick, which makes the process easier for us.
What Node?
In Chapter 7, we learned about trees, which are special data structures composed of several linked nodes. We learned that all trees have one node from which all other nodes come, and we called that the root ...
Get Pro JavaScript with MooTools: Learning Advanced JavaScript Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.