New issue
Advanced search Search tips

Issue 734599 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jul 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Method declared in idl files should support default values for union objects

Project Member Reported by sunyunjia@chromium.org, Jun 19 2017

Issue description

Method declared in idl files should support default values for union objects, e.g. void scrollIntoView((boolean or object) arg = true);
 
Components: Blink>Bindings
Status: Available (was: Untriaged)
Note that default values only exist for optional arguments, so you actually need this instead:
    void scrollIntoView(optional (boolean or object) arg = true);

With that said, reading the spec there doesn't seem to be anything forbidding unions from having default values when used as optional operation arguments.

Is there any spec you're currently working on that uses those? Having a real life example always helps.
Project Member

Comment 2 by sheriffbot@chromium.org, Jul 9

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Archived (was: Untriaged)
Since there has been no response from the reporter, assuming there is no actual demand, I archive the issue.

IMHO, default values shouldn't be abused.  No use case looks good to me.

Sign in to add a comment