(no title)
c-smile | 6 months ago
Their API is probably the problem. Not modular so makes the mess.
Options to modularize them:
DOM, concept of interfaces/behaviors rather than inheritance leading to huge maps. Let say for <textarea> we may have separate "textarea" interface:
element.tagName
... and the rest of DOM-as-a-tree methods ...
element.textarea // <textarea> specific interface of its behavior
element.textarea.select(startEnd) // interface method
element.textarea.selectionStart // interface prop
element.textarea.selectionEnd // interface prop
element.textarea.rows // interface prop
element.textarea.columns // interface prop
...
CSS, that huge flat table is a nightmare, not just because of its size, but because of extensibility problems right now and in the future. Example, all CSS grid related properties should rather go to their own namespace: section {
color: red;
// ... and other basic CSS 2.1 props
display: grid(
rows: ...;
columns: ...;
align-items: center;
justify-items: start
);
}
So different layouts ( like display:flex(), display:waterfall() ) may have their own rows, columns, etc.As sooner we will do that - the better. API is on the brink of collapsing / combinatorial explosion, indeed.
bawolff|6 months ago