-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should callback interface objects have a "length" property? #279
Comments
idlharness excludes callback interfaces (with constants) from testing for the presence and value of length. |
Edge also supports this. |
A more interesting question is whether it should be an own property. |
So I guess this amounts to changing
to
and adding tests I suppose |
For consistency with other interface objects, own prop seems more judicious. |
See also whatwg/dom#186 and #83. |
* Extract legacy callback interface objects out of interface objects. Closes whatwg#78. * Clarify that legacy callback interfaces are function objects. * Give them a length property. Closes whatwg#279. Closes whatwg#83. * Require new for Named Constructors. Closes whatwg#275. * Rely on ES abstract operations for defining, named constructors, interface objects, and legacy callback interface objects. * Disallow using the [NoInterfaceObject] on callback interfaces with constants.
* Extract legacy callback interface objects out of interface objects. Closes whatwg#78. * Clarify that legacy callback interfaces are function objects. * Give them a length property. Closes whatwg#279. Closes whatwg#83. * Require new for Named Constructors. Closes whatwg#275. * Rely on ES abstract operations for defining, named constructors, interface objects, and legacy callback interface objects. * Disallow using the [NoInterfaceObject] on callback interfaces with constants.
* Extract legacy callback interface objects out of interface objects. Closes whatwg#78. * Clarify that legacy callback interfaces are function objects. * Give them a length property. Closes whatwg#279. Closes whatwg#83. * Require new for Named Constructors. Closes whatwg#275. * Rely on ES abstract operations for defining, named constructors, interface objects, and legacy callback interface objects. * Disallow using the [NoInterfaceObject] on callback interfaces with constants.
* Extract legacy callback interface objects out of interface objects. Closes whatwg#78. * Clarify that legacy callback interfaces are function objects. * Give them a length property. Closes whatwg#279. Closes whatwg#83. * Require new for Named Constructors. Closes whatwg#275. * Rely on ES abstract operations for defining, named constructors, interface objects, and legacy callback interface objects. * Disallow using the [NoInterfaceObject] on callback interfaces with constants.
* Extract legacy callback interface objects out of interface objects. Closes whatwg#78. * Clarify that legacy callback interfaces are function objects. * Give them a length property. Closes whatwg#279. Closes whatwg#83. * Require new for Named Constructors. Closes whatwg#275. * Rely on ES abstract operations for defining, named constructors, interface objects, and legacy callback interface objects. * Disallow using the [NoInterfaceObject] on callback interfaces with constants.
* Extract legacy callback interface objects out of interface objects. Closes #78. * Clarify that legacy callback interfaces are function objects. * Give them a length property. Closes #279. Closes #83. * Require new for Named Constructors. Closes #275. * Rely on ES abstract operations for defining named constructors, interface objects, and legacy callback interface objects. * Disallow using [NoInterfaceObject] on callback interfaces with constants. * Don't require an interface prototype object for constants. Callback interfaces do not have an interface prototype object. Their constants sit on the legacy callback interface object itself. Closes #281. Closes #283.
Callback interface objects already have a "name" property (when exposed due to the presence of constants) . The omission of a "length" prop (with value
0
) in the spec seems more accidental than deliberate. Chrome, Safari and Firefox all implement it, e.g.:The text was updated successfully, but these errors were encountered: