Skip to content

Commit 452e8bd

Browse files
committed
Allow constants on namespaces
Closes #440.
1 parent dd6cccb commit 452e8bd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

index.bs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4717,9 +4717,9 @@ associated behaviors.
47174717
A namespace is a specification of a set of
47184718
<dfn id="dfn-namespace-member" export lt="namespace member">namespace members</dfn>
47194719
(matching <emu-nt><a href="#prod-NamespaceMembers">NamespaceMembers</a></emu-nt>), which are the
4720-
[=regular operations=] and [=read only=] [=regular attributes=] that appear between the braces in
4721-
the namespace declaration. These operations and attributes describe the behaviors packaged into the
4722-
namespace.
4720+
[=regular operations=], [=read only=] [=regular attributes=], and [=constants=] that appear between
4721+
the braces in the namespace declaration. These operations and attributes describe the behaviors
4722+
packaged into the namespace.
47234723

47244724
As with interfaces, the IDL for namespaces can be split into multiple parts by using
47254725
<dfn id="dfn-partial-namespace" export>partial namespace</dfn> definitions
@@ -4769,6 +4769,7 @@ Of the extended attributes defined in this specification, only the [{{CrossOrigi
47694769
NamespaceMember :
47704770
RegularOperation
47714771
"readonly" AttributeRest
4772+
Const
47724773
</pre>
47734774

47744775
<div class="example" id="example-namespace">
@@ -11681,8 +11682,8 @@ on the single object that [=implements=] the interface,
1168111682
when an interface is declared with the [{{Global}}] [=extended attribute=].
1168211683

1168311684
<div algorithm>
11684-
To <dfn>define the constants</dfn> of [=interface=] or [=callback interface=] |definition| on
11685-
|target|, given [=Realm=] |realm|, run the following steps:
11685+
To <dfn>define the constants</dfn> of [=interface=], [=callback interface=], or [=namespace=]
11686+
|definition| on |target|, given [=Realm=] |realm|, run the following steps:
1168611687

1168711688
1. [=list/For each=] [=constant=] |const| that is a [=member=] of |definition|:
1168811689
1. If |const| is not [=exposed=] in |realm|, then [=iteration/continue=].
@@ -14245,6 +14246,7 @@ The characteristics of a namespace object are described in [[#namespace-object]]
1424514246
1. Let |namespaceObject| be [=!=] [$OrdinaryObjectCreate$](|realm|.\[[Intrinsics]].[[{{%Object.prototype%}}]]).
1424614247
1. [=Define the regular attributes=] of |namespace| on |namespaceObject| given |realm|.
1424714248
1. [=Define the regular operations=] of |namespace| on |namespaceObject| given |realm|.
14249+
1. [=Define the constants=] of |namespace| on |namespaceObject| given |realm|.
1424814250
1. For each [=exposed=] [=interface=] |interface| which has the [{{LegacyNamespace}}] extended
1424914251
attribute with the identifier of |namespace| as its argument,
1425014252
1. Let |id| be |interface|'s [=identifier=].

0 commit comments

Comments
 (0)