| > The Shadow DOM provides style isolation ... I've proposed once @ www-styles concept of style sets: the @set construct. Style sets mechanism solves two principal problems of CSS: 1. They allow to define local and independent style systems for elements in the same DOM tree. 2. Style sets allow to reduce computational complexity of style resolution. In classic CSS all style rules that used by the document are placed in the single ordered table. Task of finding list of matching selectors for the element has computational complexity near O(n), where n is a number of rules in the table. And style resolution of the whole DOM tree is O(n * m * d) task. Where m is a number of DOM elements and d is an average depth of the tree. Style sets allow to reduce significantly n multiplier in this formula. http://sciter.com/css-extensions-in-h-smile-engine-part-i-st... > to provide a lower-level API ... I haven't seen any requests from framework/platform developers. In contrary, the feature to call particular function when particular element appears in the DOM was actual from the time of first framework appearance. People were trying to solve it with DOM mutation events but they did not go through - too expensive, etc. |