This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It would be good if HTMLPropertiesCollection weren't callable. One way to achieve that would be to make HTMLPropertiesCollection not inherit from HTMLCollection, and defined length and item explicitly on it.
I need another way. They didn't inherit before, and people asked me to make them inherit, so they could do overrides on all collections at once, etc. Is there some way I can make this happen just for implementations of HTMLCollection directly, or whatever the requirement is? Some way to override caller on a derived interface? Anything?
Maybe you can remove the callable from HTMLCollection and mint a new interface that inherits from HTMLCollection (or implements HTMLCollection?) with [NoInterfaceObject] that has callable?
Technically, you can't override any of the special operations in Web IDL. (It says that it's undefined what happens if a host object implements two interfaces with a name getter, for example.) Seems like that's needed for various interfaces in HTML5. Filed http://www.w3.org/Bugs/Public/show_bug.cgi?id=11056. (In reply to comment #2) > Maybe you can remove the callable from HTMLCollection and mint a new interface > that inherits from HTMLCollection (or implements HTMLCollection?) with > [NoInterfaceObject] that has callable? Having an HTMLCallableCollection that implements HTMLCollection wouldn't work, due to the way mixin interfaces are currently specced -- you wouldn't be able to add a property to HTMLCollection.prototype and see that reflected on objects implementing interfaces inheriting from HTMLCallableCollection. But minting a new one to place in the inheritance chain should work: interface HTMLCollection { ... } [NoInterfaceObject] interface HTMLCallableCollection : HTMLCollection { caller ... } interface HTMLAllCollection : HTMLCallableCollection { ... } interface HTMLPropertiesCollection : HTMLCollection { ... } Now, there still would exist an interface prototype object for HTMLCallableCollection. And if you didn't want that, putting [Supplemental] on it wouldn't work; you'd need a new extended attribute to mean that interfaces that inherit from it get all of its properties. Or, another way: interface HTMLCollection { ... } [NoInterfaceObject] interface HTMLCollectionCaller { caller ... } interface HTMLAllCollection : HTMLCollection { ... } HTMLAllCollection implements HTMLCollectionCaller; interface HTMLPropertiesCollection : HTMLCollection { } The interface prototype object for HTMLCollectionCaller need not even exist, since it's not accessible anywhere.
Or we could just duplicate the interface definitions (one for HTMLCollection and one for HTMLAllCollection) and tie the definitions of the members. Might be the most straightforward. Or something like a [DisableCallers] attribute on the interface.
I'm leaning towards just letting it be callable, personally.
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: no spec change Rationale: I'm just going to let it be callable, for consistency with the other collections.
mass-move component to LC1