From a93f5b622437d983cb21d862fd5bb9888044c937 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 28 Jan 2019 22:17:49 +0100 Subject: [PATCH] Restrict the extended attributes for partial interfaces 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. --- index.bs | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/index.bs b/index.bs index cdf547e0..5a0343d3 100644 --- a/index.bs +++ b/index.bs @@ -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. @@ -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=] @@ -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