document.getElementById() with no args throws. What should the message start with? "Document.getElementById requires ..."? "Document.prototype.getElementById requires ..."? "Document's getElementById requires ..."? "Document#getElementById requires ..."? Something else?
-
-
Replying to @really_bz @bz_moz
fwiw I've been asking MDN to standardise on "The path of the object from the global. If there isn't one, use the class name with the first upper-case part lower-cased" So, document.getElementById in this case.
2 replies 0 retweets 17 likes -
Replying to @jaffathecake
I don't have the path information. I have the IDL interface name and the method name, and whether the method is static, that's it. (And note: the document might be an XHR responseXML or whatever, so `document` would be wrong in many cases anyway.)
2 replies 0 retweets 1 like -
Replying to @really_bz @jaffathecake
Also worth thinking about how `eventTarget.addEventListener` looks. Maybe it's OK...
1 reply 0 retweets 0 likes -
Replying to @really_bz @jaffathecake
And for XHR, would it be `xMLHttpRequest.send` or `xmlhttpRequest.send` or something else?
2 replies 0 retweets 0 likes -
Replying to @really_bz @bz_moz
Yeah… xmlHttpRequest? The intent is to make the class name look like an instance name.
1 reply 0 retweets 0 likes -
Replying to @jaffathecake
Right, I understand the intent. I'm not sure how to automatically do that for all interface names in the web platform. Maybe XHR is a special-enough snowflake we can hardcode it.. maybe.
1 reply 0 retweets 0 likes -
Replying to @really_bz @bz_moz
I think XMLHttpRequest is less problematic than, say, SVGSVGElement
1 reply 0 retweets 0 likes
Yeah, that one is also not great. Lots of leading-many-caps interface names in the platform. :(
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.