Skip to content

Commit

Permalink
Restrict the extended attributes for partial interfaces
Browse files Browse the repository at this point in the history
It seems like a bad idea to allow [Global] on a partial interface.

The behavior of [Exposed] and [SecureContext] on partial interfaces is already
defined in the relevant algorithms.

The behavior of [OverrideBuiltins] is defined here with the same vague wording
used before. It might be better to disentangle the concept of an interface and
its syntactical structure.

Fixes #154.
  • Loading branch information
Ms2ger authored and domenic committed Jan 28, 2019
1 parent beda8d3 commit a93f5b6
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,28 +1037,6 @@ Note: A partial interface definition cannot specify that the interface
Inheritance must be specified on the original [=interface=]
definition.

[=Extended attributes=] can be specified on
[=partial interface=] definitions, with some
limitations. The following extended attributes must not
be specified on partial interface definitions:
[{{Constructor}}],
[{{LegacyWindowAlias}}],
[{{NamedConstructor}}],
[{{NoInterfaceObject}}].

Note: The above list of [=extended attributes=]
is all of those defined in this document that are applicable to
[=interfaces=] except for
[{{Exposed}}],
[{{Global}}],
[{{OverrideBuiltins}}], and
[{{SecureContext}}].

Any [=extended attribute=] specified
on a [=partial interface=] definition
is considered to appear on the [=interface=]
itself.

The relevant language binding determines how interfaces correspond to constructs
in the language.

Expand All @@ -1072,6 +1050,11 @@ The following extended attributes are applicable to interfaces:
[{{OverrideBuiltins}}], and
[{{SecureContext}}].

The following extended attributes are applicable to [=partial interfaces=]:
[{{Exposed}}],
[{{OverrideBuiltins}}], and
[{{SecureContext}}].

Non-callback [=interfaces=] which are not annotated
with a [{{NoInterfaceObject}}] [=extended attribute=],
and [=callback interfaces=] which declare [=constants=]
Expand Down Expand Up @@ -9563,6 +9546,10 @@ definition, then that partial interface definition must
be the part of the interface definition that defines
the [=named property getter=].

If the [{{OverrideBuiltins}}] extended attribute is specified on a
[=partial interface=] definition, it is considered to appear on the
[=interface=] itself.

See [[#es-legacy-platform-objects]]
and [[#legacy-platform-object-defineownproperty]]
for the specific requirements that the use of
Expand Down

0 comments on commit a93f5b6

Please sign in to comment.