Skip to content

Commit

Permalink
fixup! Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Apr 5, 2019
1 parent 9e77280 commit 14be04c
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4430,7 +4430,7 @@ A module has a [=list=] of
<dfn id="dfn-module-member" export lt="module member" for=module>module members</dfn> which are
[=interfaces=], [=read only=] [=regular attributes=], and [=regular operations=].

The [=module members=] of a [=module=] |module| are given by the following steps:
The [=module/module members=] of a [=module=] |module| are given by the following steps:

1. Let |result| be « ».
1. Let |specifier| be |module|'s [=module/specifier=].
Expand Down Expand Up @@ -4459,8 +4459,8 @@ Note: The order that members appear in this list has significance for property e
Issue: Exclude [=partial interfaces=]?
</div>

For all [=modules=] |module|, all [=interfaces=] that are in |module|'s [=module/module members=]
have their [=interface/enclosing module=] set to |module|.
For all [=modules=] |module|, all [=interfaces=] and [=partial interfaces=] that are in |module|'s
[=module/module members=] have their [=interface/enclosing module=] set to |module|.

<div algorithm>
The <dfn for=module>url</dfn> of a [=module=] |module| is given by the following steps:
Expand Down Expand Up @@ -4556,6 +4556,8 @@ Of the [=extended attributes=] defined in this specification, only [{{Exposed}}]

For each [=module declaration=] |declaration|, there must exist a [=module=] whose
[=module/specifier=] is given by |declaration|'s [=module declaration/specifier=].
This [=module=] is considered to have the [=extended attributes=] that are specified on
|declaration|.

A <dfn>partial module declaration</dfn> is a [=definition=] matching the <emu-nt><a
href="#prod-PartialModule">PartialModule</a></emu-nt> nonterminal symbol.
Expand All @@ -4574,9 +4576,9 @@ whose [=module declaration/specifier=] is |declaration|'s
The [=partial module declaration/partial module declaration members|members=] of a
[=partial module declaration=] must not be [=list/is empty|empty=].

[=Module members=] and [=interface members=] of [=interfaces=] whose
[=interface/enclosing module=] is not null must not
be annotated with the [{{Exposed}}] or [{{SecureContext}}] [=extended attributes=].
[=Module members=] and [=interface members|members=] of [=interfaces=] whose
[=interface/enclosing module=] is not null must not be annotated with the [{{Exposed}}] or
[{{SecureContext}}] [=extended attributes=].

Note: The restrictions on the [{{Exposed}}] and [{{SecureContext}}] [=extended attributes=] in
this section could be relaxed if there is a sufficient use case;
Expand Down Expand Up @@ -13284,7 +13286,7 @@ The characteristics of a namespace object are described in [[#namespace-object]]
1. [=Define the regular attributes=] of |namespace| on |namespaceObject| given |realm|.
1. [=Define the regular operations=] of |namespace| on |namespaceObject| given |realm|.
1. For each [=exposed=] [=interface=] |interface| which has the [{{LegacyNamespace}}] extended
attribute with the identifier of |namespace| as its argument:
attribute with the identifier of |namespace| as its argument,
1. Let |id| be |interface|'s [=identifier=].
1. Let |interfaceObject| be the result of [=create an interface object|creating an
interface object=] for |interface| with |id| in |realm|.
Expand All @@ -13295,8 +13297,8 @@ The characteristics of a namespace object are described in [[#namespace-object]]

<h3 id="es-modules">Modules</h3>

Modules are reified as entries in the [=module map=] as [=Synthetic Module
Records=], allowing them to be imported as ECMAScript modules.
Modules are reified as entries in the [=module map=] as [=Synthetic Module Records=], allowing
them to be imported as ECMAScript modules.

<div algorithm>
To <dfn>create a synthetic module record</dfn> for a [=module=] |module| in a [=Realm=] |realm|,
Expand All @@ -13305,8 +13307,8 @@ Records=], allowing them to be imported as ECMAScript modules.
1. Assert: |module| is [=exposed=] in |realm|.
1. Let |exports| be « ».
1. [=list/For each=] |member| of |module|'s [=module/module members|members=]:
1. Assert: |member| is not annotated with either the [{{Exposed}}]
or [{{SecureContext}}] extended attributes.
1. Assert: |member| is not annotated with either the [{{Exposed}}] or [{{SecureContext}}]
[=extended attributes=].
1. Append the [=identifier=] of |member| to |exports|.
1. Let |moduleRecord| be [=!=] [=CreateSyntheticModule=](|exports|, the following steps,
|realm|, undefined), with the following steps:
Expand All @@ -13322,10 +13324,10 @@ Records=], allowing them to be imported as ECMAScript modules.
|member|, |module|, and |realm|.
1. Perform [=!=] [=SetSyntheticModuleExport=](|moduleRecord|, |id|, |method|).
1. Otherwise:
1. Assert: |member| is an [=attribute=].
1. Assert: The [=module/evaluation steps=] will set each attribute.
1. Assert: |member| is an [=attribute=] or a [=partial interface=].
1. Run the [=module/evaluation steps=] with |module| as <b>[=this module=]</b> in
|realm|, if any are present.
1. Assert: All [=attributes=] have been set to an IDL value of the appropriate type.
1. Return |moduleRecord|.
</div>

Expand All @@ -13335,8 +13337,8 @@ Records=], allowing them to be imported as ECMAScript modules.
1. Let |map| be the [=module map=] associated with |realm|'s [=relevant settings object=].
1. For each [=module=] |module| that is [=exposed=] in |realm|:
1. Let |url| be |module|'s [=module/url=].
1. Let |record| be the result of [=create a synthetic module record=] for |module| in
|realm|.
1. Let |record| be the result of [=create a synthetic module record|creating a synthetic
module record=] for |module| in |realm|.
1. [=map/Set=] |map|[|url|] to |record|.
</div>

Expand All @@ -13349,13 +13351,12 @@ Records=], allowing them to be imported as ECMAScript modules.
Issue(heycam/webidl#674): Relax this requirement.
1. Let |url| be |module|'s [=module/url=].
1. Let |esValue| be |value| [=converted to an ECMAScript value=].
1. If |realm| is not provided, let |realm| be the [=current Realm=].
1. Let |map| be the [=module map=] associated with |realm|'s [=relevant settings object=].
1. Assert: |map|[|url|] [=map/exists=].
1. Let |moduleRecord| be |map|[|url|].
1. Let |identifier| be |attribute|'s [=identifier=].
1. Assert: |moduleRecord|.\[[ExportNames]] [=list/contains=] |identifier|.
1. Perform ! [=SetSyntheticModuleExport=](|moduleRecord|, |identifier|, |esValue|).
1. Perform [=!=] [=SetSyntheticModuleExport=](|moduleRecord|, |identifier|, |esValue|).
</div>


Expand Down

0 comments on commit 14be04c

Please sign in to comment.