Bug 14913 - No way to specify [OverrideBuiltins] if the getter is in a partial interface
Summary: No way to specify [OverrideBuiltins] if the getter is in a partial interface
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2011-11-23 17:38 UTC by Aryeh Gregor
Modified: 2011-12-29 16:22 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Aryeh Gregor 2011-11-23 17:38:09 UTC
HTML currently has [OverrideBuiltins] partial interface Document { ... }, which is invalid because you can't have extended attributes on a partial interface.  But DOM4 can't add [OverrideBuiltins] to the actual Document interface definition, because that defines no getter.

Suggested resolution: allow [OverrideBuiltins] on partial interfaces, and say it has the same effect as if it was specified on the original interface.  So the partial interface can add that extended attribute too, not just members.
Comment 1 Ian 'Hixie' Hickson 2011-11-23 17:58:10 UTC
By just restricting it to the interface or partial interface that has the getter, we can neatly solve the problem of it being unclear which interface should have it.
Comment 2 Cameron McCormack 2011-12-09 06:07:17 UTC
The non-localised effects of extended attributes on partial interface definitions is exactly what I was trying to avoid with the current spec restrictions.  Ian's comment 1 suggestion does neatly get around that problem.

(An alternative would be to write in HTML

  interface DocumentProperties {
    getter ...;
  Document implements DocumentProperties;

Comment 3 Cameron McCormack 2011-12-15 03:18:50 UTC
I've done comment 1.


Aryeh, let me know if this change is satisfactory, thanks.
Comment 4 Aryeh Gregor 2011-12-28 18:03:47 UTC
AFAICT, the grammar still doesn't allow extended attributes on partial interfaces, although the prose now does.
Comment 5 Cameron McCormack 2011-12-29 00:24:37 UTC
You were right.  I fixed this yesterday as part of the callback edit.
Comment 6 Aryeh Gregor 2011-12-29 16:22:15 UTC
Oh, I misread.  Never mind me.  Updated WebIDLParser.js and idlharness.js: