Disambiguate error reporting for static and non-static IDL methods/attributes
Categories
(Core :: DOM: Bindings (WebIDL), enhancement, P2)
Tracking
()
People
(Reporter: bzbarsky, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
People on .platform (Domenic, Anne) pointed out that something like Document.getElementById is a bit confusing in an error message like this:
Document.getElementById requires at least 1 argument
which you get if you call document.getElementById() with no args.
Some options:
Document.prototype.getElementByIdDocument's getElementByIdDocument#getElementById(see https://mathiasbynens.be/notes/javascript-prototype-notation).- What else?
I'm going to post a patch to do Document.prototype.getElementById for the moment, for non-static things, but would love some actual web developer feedback if we can get it.
Jen, would you be willing to try polling people you know about this?
| Reporter | ||
Comment 1•6 years ago
|
||
The only behavior change here is that now we consistently use "Foo constructor"
to describe constructors. Before this we used "Foo" for the argument count and
arguments up to the overload resolution distinguishing argument and "Foo
constructor" for later arguments.
| Reporter | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Jen, would you be willing to try polling people you know about this?
Sure. I'm sending it around...
| Reporter | ||
Comment 4•6 years ago
|
||
Thank you!
| Reporter | ||
Comment 5•6 years ago
|
||
Poll results are ... very inconclusive.
I am going to spin of the refactoring into a separate bug, because I want it anyway, then do some more thinking about what the string should look like.
Comment 6•6 years ago
|
||
Comment on attachment 9125654 [details]
Bug 1614471 part 1. Refactor how we get IDL method names for error reporting.
Revision D62346 was moved to bug 1615719. Setting attachment 9125654 [details] to obsolete.
Updated•6 years ago
|
Comment 7•6 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:bzbarsky, could you have a look please?
For more information, please visit auto_nag documentation.
| Reporter | ||
Comment 8•6 years ago
|
||
We're not sure we want to take that patch. See comment 5.
| Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Description
•