I’m concerned about the trend I’ve been seeing over the last year or two, both on Specifiction/WICG and in the edge-browser community, of leaping to add more JS APIs to the platform, while ignoring any consideration toward actual HTML properties, and especially not daring to entertain the idea of another declarative format. (It’s worth noting that, as a platform, we’ve been around this block before.)
It’s not that exposing functionality to JavaScript is bad. Service Worker made sense, as a plain Extensible Web component providing a base on which any future declarative standards may be polyfilled (and any logic too complex for any sensible declarative solution may be scripted by the end developer). The trouble is with the way Service Workers are being looked as a role model for a scripting-only culture where every feature is being surfaced to the DOM and nowhere else. Under this mindset, basic, universal tasks that could have been expressed perfectly cleanly as a declarative attribute in HTML, now require the page to import or define scripts to act out their intentions.
We can’t just foist all the burdens of implementation on the page, without regard for how widespread the need. If there weren’t value in letting the UA handle tasks specified by declarative content, the W3C would just redefine the content of every page to be <canvas></canvas><input type="file"><style>*{position:absolute;width:100%;height:100%}</style>
followed by a list of scripts, throw out every spec that isn’t Fetch, ServiceWorker, UI Events, Pointer Events, or WebGL, and hand everything else to the Technical Architecture Group in a big brown envelope labeled “your problem now”.
We can’t build the web out of polyfills. The value in specifications isn’t just making impossible things possible, it’s about letting simple tasks have simple implementations. The next time disregarding any proposal that could be implemented using a large amount of code calling out to Fetch, Canvas, and Web Components, drive to a bookstore, take a look at that massive shelf sagging under the weight of all the books, IDEs, and libraries you need to read just to implement a simple CRUD app on Windows, X11, and/or OSX, and ask yourself if you really want to go back to that.