3 ms·
I unironically appreciate that it supports String.blink. It's always a good sign if the developer has a sense of humor and playfulness.
by vanderZwan 2y ago
I unironically appreciate that it supports String.blink. It's always a good sign if the developer has a sense of humor and playfulness.
- chrismorgan 2y agoIf it’s interested in behaving as though “the ECMAScript host is a web browser”, of course it does, it’s part of the spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-string.prototype.blink https://tc39.es/ecma262/multipage/additional-ecmascript-feat.... And given how trivial it is (function() { return "<blink>" + this + "</blink>"; }), it makes a fair amount of sense to implement it even if the ECMAScript host is not a web browser, in which case it’s optional (see the top of the linked document). I wouldn’t expect it to have any association with “a sense of humor or playfulness” whatsoever.
- vanderZwan 2y agoThe reason I would argue that it does imply a sense of humor is that on any web browser that supports WASM, the <blink> tag itself has been deprecated and non-functional for ages. In fact, it doesn't even have an entry on MDN, only an indirect reference through String.blink() https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/blink https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- chrismorgan 2y ago<blink>, sure, but String.prototype.blink is still part of the spec, and unlike the HTML Standard, the ECMAScript specs are much more pseudocode that you largely just copy and turn into actual code as necessary, to the point that, if as an ECMAScript host it’s playing the web browser, I’d be extremely surprised (as in, “wait, what!? This is literally the weirdest technical thing I’ve seen all year, maybe this decade”) if that one method wasn’t there. When you’re implementing specs written like this, you just do it all; you don’t—you never—pick and choose based on “that thing is obsolete and no one uses it anyway”.
- vanderZwan 2y agoOk, ok, fine. But I still find it humorous to see it pop up in the list of supported JS functions
- CxByte 2y ago> you don’t—you never—pick and choose based on “that thing is obsolete and no one uses it anyway This might make sense for a complete implementation, but in reality...no one would implement a useless API. Also, if truly no one used it, it would simply not exist (e.g. `with` in module mode), a new implementation of some spec will always pick and choose based on utility and use-cases.
- csjh 2y agoIt's in test262, so it basically has to be supported for the project to accomplish its goals.