On 2/8/20 2:31 PM, Domenic Denicola wrote:
Would you consider using something that avoids the confusion with static
methods/properties? E.g.
- InterfaceName's methodName()
- InterfaceName's attrName getter
- InterfaceName's attrName setter
We could think about doing that, yes. If we do, we should change all
the existing messages that talk about InterfaceName.methodName (e.g. the
ones that get thrown for invalid arguments, etc).
The main goal here is to give web developers an idea of which method
they were calling quickly, without taking up space from the actual error
message which tells them what it was they did wrong in calling it. So
there's a tension between brevity and getting the details right... Your
suggestions are pretty decent on the brevity front, though, so that
seems workable.
I wonder what web developers think of the options here...
I'm also curious what the output would be for actually-static methods, e.g.
CSS.escape(), DOMPointReadOnly.fromPoint(), etc.
It'd be "CSS.escape: ", etc.
You can test this now in the console using:
CSS.escape() /* no args */
document.getElementById() /* no args */
My changes did not affect the error messages from those, note; just used
that same string in more places.
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform