2 ms·
If I'd submitted this, I'd use this quote as the title: "What would it mean to be able to subclass an HTML Element?" And then copy Alex's "platform manifest
by adamesque 15y ago
If I'd submitted this, I'd use this quote as the title:
"What would it mean to be able to subclass an HTML Element?"
And then copy Alex's "platform manifesto" (from http://infrequently.org/2012/04/one-for-dave-and-david/ http://infrequently.org/2012/04/one-for-dave-and-david/) as the TL;DR:
"The network is our bottleneck and markup is our lingua-franca. To deny these facts is to design for failure. Because the network is our bottleneck, there is incredible power in growing the platform to cover our common use cases. To the extent possible, we should attempt to grow the platform through markup first, as that provides the most value to the most authors and provides a coherent way to describe behavior to JS.
As markup begets JS objects via a parser. DOM, therefore, is merely the largest built-in JS library.
Any place where you cannot draw a line from browser-provided behavior from a tag to the JS API which describes it is magical. The job of Web API designers is first to introduce new power through markup and second to banish magic, replacing it with understanding. There may continue to be things which exist outside of our understanding, but that is a challenge to be met by cataloging and describing them in our language, not an excuse for why we cannot or should not."
And then finally sum it up with this quote:
"It is high time we started designing low-level stuff for the web in idiomatic JS …"