Open Bug 1614471 Opened 6 years ago Updated 6 years ago

Disambiguate error reporting for static and non-static IDL methods/attributes

Categories

(Core :: DOM: Bindings (WebIDL), enhancement, P2)

enhancement

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:

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?

Flags: needinfo?(jensimmons)

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.

Jen, would you be willing to try polling people you know about this?

Sure. I'm sending it around...

Flags: needinfo?(jensimmons)

Thank you!

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 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.

Attachment #9125654 - Attachment is obsolete: true
Attachment #9125655 - Attachment description: Bug 1614471 part 2. Insert ".prototype" in non-static IDL member descriptions. → Bug 1614471. Insert ".prototype" in non-static IDL member descriptions.

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.

Flags: needinfo?(bzbarsky)

We're not sure we want to take that patch. See comment 5.

Flags: needinfo?(bzbarsky)
Assignee: bzbarsky → nobody
Blocks: dom-error
Severity: normal → N/A
Type: defect → enhancement
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: