3 ms·
The DOM stitches several useful but unrelated concepts together. Besides just being a tree of composable views: * You can query elements arbitrarily deep using
by sdegutis 7y ago
The DOM stitches several useful but unrelated concepts together. Besides just being a tree of composable views:
* You can query elements arbitrarily deep using different patterns (depth, class names, ids, tag names, attribute presence/values).
* You can attach event handlers to arbitrarily deep nodes that you just queried, not just the nodes at the level your "controller" is in charge of creating/updating like traditional frameworks.
* Customizing style and behavior is entirely done via properties and composition rather than subclassing like traditional frameworks.
* And more!