Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Consistently define and connect prototypes and constructors #547

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 26 additions & 33 deletions spec/collator.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ <h1>Collator Objects</h1>

<emu-clause id="sec-the-intl-collator-constructor">
<h1>The Intl.Collator Constructor</h1>
<p>
The Intl.Collator constructor is the <dfn>%Collator%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in <emu-xref href="#sec-internal-slots"></emu-xref>.
</p>
<p>The Intl.Collator constructor:</p>
<ul>
<li>is <dfn>%Collator%</dfn>.</li>
<li>is the initial value of the *"Collator"* property of the <emu-xref href="#intl-object">Intl object</emu-xref>.</li>
<li>creates and initializes a new Collator object when called as a function rather than as a constructor. Thus the function call `Intl.Collator(&hellip;)` is equivalent to the object creation expression `new Intl.Collator(&hellip;)` with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified Collator behaviour must include a `super` call to the Intl.Collator constructor to create and initialize subclass instances with the necessary internal slots.</li>
</ul>

<emu-clause id="sec-initializecollator" aoid="InitializeCollator">
<h1>InitializeCollator ( _collator_, _locales_, _options_ )</h1>
Expand Down Expand Up @@ -84,21 +88,17 @@ <h1>Intl.Collator ( [ _locales_ [ , _options_ ] ] )</h1>

<emu-clause id="sec-properties-of-the-intl-collator-constructor">
<h1>Properties of the Intl.Collator Constructor</h1>

<p>
The Intl.Collator constructor has the following properties:
</p>
<p>The Intl.Collator constructor:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is %Function.prototype%.</li>
<li>has the internal slots common to all service constructor properties of the Intl object is specified in <emu-xref href="#sec-internal-slots"></emu-xref>.</li>
<li>has the following properties:</li>
</ul>

<emu-clause id="sec-intl.collator.prototype">
<h1>Intl.Collator.prototype</h1>

<p>
The value of `Intl.Collator.prototype` is %Collator.prototype%.
</p>

<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
</p>
<p>The value of `Intl.Collator.prototype` is the Intl.Collator prototype object.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
</emu-clause>

<emu-clause id="sec-intl.collator.supportedlocalesof">
Expand Down Expand Up @@ -135,38 +135,31 @@ <h1>Internal Slots</h1>
</p>

<ul>
<li>The first element of [[SortLocaleData]][[&lt;_locale_&gt;]].[[co]] and [[SearchLocaleData]][[&lt;_locale_&gt;]].[[co]] must be *null*.</li>
<li>The first element of [[SortLocaleData]].[[&lt;_locale_&gt;]].[[co]] and [[SearchLocaleData]].[[&lt;_locale_&gt;]].[[co]] must be *null*.</li>
<li>The values *"standard"* and *"search"* must not be used as elements in any [[SortLocaleData]].[[&lt;_locale_&gt;]].[[co]] and [[SearchLocaleData]].[[&lt;_locale_&gt;]].[[co]] list.</li>
<li>[[SearchLocaleData]][[&lt;_locale_&gt;]] must have a [[sensitivity]] field with a String value equal to *"base"*, *"accent"*, *"case"*, or *"variant"*.</li>
<li>[[SearchLocaleData]].[[&lt;_locale_&gt;]] must have a [[sensitivity]] field with a String value equal to *"base"*, *"accent"*, *"case"*, or *"variant"*.</li>
</ul>
</emu-clause>
</emu-clause>

<emu-clause id="sec-properties-of-the-intl-collator-prototype-object">
<h1>Properties of the Intl.Collator Prototype Object</h1>

<p>
The Intl.Collator prototype object is itself an ordinary object. <dfn>%Collator.prototype%</dfn> is not an Intl.Collator instance and does not have an [[InitializedCollator]] internal slot or any of the other internal slots of Intl.Collator instance objects.
</p>
<p>The <dfn>Intl.Collator prototype object</dfn>:</p>
<li>
<ul>is <dfn>%Collator.prototype%</dfn>.</ul>
<ul>is an ordinary object.</ul>
<ul>is not an Intl.Collator instance and does not have an [[InitializedCollator]] internal slot or any of the other internal slots of Intl.Collator instance objects.</ul>
</li>

<emu-clause id="sec-intl.collator.prototype.constructor">
<h1>Intl.Collator.prototype.constructor</h1>

<p>
The initial value of `Intl.Collator.prototype.constructor` is the intrinsic object %Collator%.
</p>
<p>The initial value of `Intl.Collator.prototype.constructor` is %Collator%.</p>
</emu-clause>

<emu-clause id="sec-intl.collator.prototype-@@tostringtag">
<h1>Intl.Collator.prototype [ @@toStringTag ]</h1>

<p>
The initial value of the @@toStringTag property is the String value *"Intl.Collator"*.
</p>

<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
</p>
<p>The initial value of the @@toStringTag property is the String value *"Intl.Collator"*.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
</emu-clause>

<emu-clause id="sec-intl.collator.prototype.compare">
Expand Down
54 changes: 24 additions & 30 deletions spec/datetimeformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,13 @@ <h1>UnwrapDateTimeFormat ( _dtf_ )</h1>

<emu-clause id="sec-intl-datetimeformat-constructor">
<h1>The Intl.DateTimeFormat Constructor</h1>

<p>
The Intl.DateTimeFormat constructor is the <dfn>%DateTimeFormat%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in <emu-xref href="#sec-internal-slots"></emu-xref>.
</p>
<p>The Intl.DateTimeFormat constructor:</p>
<ul>
<li>is <dfn>%DateTimeFormat%</dfn>.</li>
<li>is the initial value of the *"DateTimeFormat"* property of the <emu-xref href="#intl-object">Intl object</emu-xref>.</li>
<li>creates and initializes a new DateTimeFormat object when called as a function rather than as a constructor. Thus the function call `Intl.DateTimeFormat(&hellip;)` is equivalent to the object creation expression `new Intl.DateTimeFormat(&hellip;)` with the same arguments.</li>
<li>is designed to be subclassable. It may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified DateTimeFormat behaviour must include a `super` call to the Intl.DateTimeFormat constructor to create and initialize subclass instances with the necessary internal slots.</li>
</ul>

<emu-clause id="sec-intl.datetimeformat">
<h1>Intl.DateTimeFormat ( [ _locales_ [ , _options_ ] ] )</h1>
Expand Down Expand Up @@ -730,20 +733,18 @@ <h1>Intl.DateTimeFormat ( [ _locales_ [ , _options_ ] ] )</h1>

<emu-clause id="sec-properties-of-intl-datetimeformat-constructor">
<h1>Properties of the Intl.DateTimeFormat Constructor</h1>

<p>
The Intl.DateTimeFormat constructor has the following properties:
</p>
<p>The Intl.DateTimeFormat constructor:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is %Function.prototype%.</li>
<li>has the internal slots common to all service constructor properties of the Intl object is specified in <emu-xref href="#sec-internal-slots"></emu-xref>.</li>
<li>has the following properties:</li>
</ul>

<emu-clause id="sec-intl.datetimeformat.prototype">
<h1>Intl.DateTimeFormat.prototype</h1>

<p>
The value of `Intl.DateTimeFormat.prototype` is %DateTimeFormat.prototype%.
</p>
<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
</p>
<p>The value of `Intl.DateTimeFormat.prototype` is the Intl.DateTimeFormat prototype object.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
</emu-clause>

<emu-clause id="sec-intl.datetimeformat.supportedlocalesof">
Expand Down Expand Up @@ -992,29 +993,22 @@ <h1>Internal slots</h1>

<emu-clause id="sec-properties-of-intl-datetimeformat-prototype-object">
<h1>Properties of the Intl.DateTimeFormat Prototype Object</h1>

<p>
The Intl.DateTimeFormat prototype object is itself an ordinary object. <dfn>%DateTimeFormat.prototype%</dfn> is not an Intl.DateTimeFormat instance and does not have an [[InitializedDateTimeFormat]] internal slot or any of the other internal slots of Intl.DateTimeFormat instance objects.
</p>
<p>The <dfn>Intl.DateTimeFormat prototype object</dfn>:</p>
<ul>
<li>is <dfn>%DateTimeFormat.prototype%</dfn>.</li>
<li>is an ordinary object.</li>
<li>is not an Intl.DateTimeFormat instance and does not have an [[InitializedDateTimeFormat]] internal slot or any of the other internal slots of Intl.DateTimeFormat instance objects.</li>
</ul>

<emu-clause id="sec-intl.datetimeformat.prototype.constructor">
<h1>Intl.DateTimeFormat.prototype.constructor</h1>

<p>
The initial value of `Intl.DateTimeFormat.prototype.constructor` is the intrinsic object %DateTimeFormat%.
</p>
<p>The initial value of `Intl.DateTimeFormat.prototype.constructor` is %DateTimeFormat%.</p>
</emu-clause>

<emu-clause id="sec-intl.datetimeformat.prototype-@@tostringtag">
<h1>Intl.DateTimeFormat.prototype [ @@toStringTag ]</h1>

<p>
The initial value of the @@toStringTag property is the String value *"Intl.DateTimeFormat"*.
</p>

<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
</p>
<p>The initial value of the @@toStringTag property is the String value *"Intl.DateTimeFormat"*.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
</emu-clause>

<emu-clause id="sec-intl.datetimeformat.prototype.format">
Expand Down
56 changes: 26 additions & 30 deletions spec/displaynames.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ <h1>CanonicalCodeForDisplayNames ( _type_, _code_ )</h1>

<emu-clause id="sec-intl-displaynames-constructor">
<h1>The Intl.DisplayNames Constructor</h1>

<p>
The DisplayNames constructor is the <dfn>%DisplayNames%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in <emu-xref href="#sec-internal-slots"></emu-xref>.
</p>
<p>The Intl.DisplayNames constructor:</p>
<ul>
<li>is <dfn>%DisplayNames%</dfn>.</li>
<li>is the initial value of the *"DisplayNames"* property of the <emu-xref href="#intl-object">Intl object</emu-xref>.</li>
<li>creates and initializes a new DisplayNames object when called as a constructor.</li>
<li>is not intended to be called as a function and will throw an exception when called in that manner.</li>
<li>is designed to be subclassable. It may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified DisplayNames behaviour must include a `super` call to the Intl.DisplayNames constructor to create and initialize subclass instances with the necessary internal slots.</li>
</ul>

<emu-clause id="sec-Intl.DisplayNames">
<h1>Intl.DisplayNames ( _locales_, _options_ )</h1>
Expand Down Expand Up @@ -80,20 +84,18 @@ <h1>Intl.DisplayNames ( _locales_, _options_ )</h1>

<emu-clause id="sec-properties-of-intl-displaynames-constructor">
<h1>Properties of the Intl.DisplayNames Constructor</h1>

<p>
The Intl.DisplayNames constructor has the following properties:
</p>
<p>The Intl.DisplayNames constructor:</p>
<ul>
<li>has a [[Prototype]] internal slot whose value is %Function.prototype%.</li>
<li>has the internal slots common to all service constructor properties of the Intl object is specified in <emu-xref href="#sec-internal-slots"></emu-xref>.</li>
<li>has the following properties:</li>
</ul>

<emu-clause id="sec-Intl.DisplayNames.prototype">
<h1>Intl.DisplayNames.prototype</h1>

<p>
The value of `Intl.DisplayNames.prototype` is %DisplayNames.prototype%.
</p>
<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
</p>
<p>The value of `Intl.DisplayNames.prototype` is the Intl.DisplayNames prototype object.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
</emu-clause>

<emu-clause id="sec-Intl.DisplayNames.supportedLocalesOf">
Expand Down Expand Up @@ -142,28 +144,22 @@ <h1>Internal slots</h1>

<emu-clause id="sec-properties-of-intl-displaynames-prototype-object">
<h1>Properties of the Intl.DisplayNames Prototype Object</h1>

<p>
The Intl.DisplayNames prototype object is itself an ordinary object. <dfn>%DisplayNames.prototype%</dfn> is not an Intl.DisplayNames instance and does not have an [[InitializedDisplayNames]] internal slot or any of the other internal slots of Intl.DisplayNames instance objects.
</p>
<p>The <dfn>Intl.DisplayNames prototype object</dfn>:</p>
<ul>
<li>is <dfn>%DisplayNames.prototype%</dfn></li>
<li>is an ordinary object.</li>
<li>is not an Intl.DisplayNames instance and does not have an [[InitializedDisplayNames]] internal slot or any of the other internal slots of Intl.DisplayNames instance objects.</li>
</ul>

<emu-clause id="sec-Intl.DisplayNames.prototype.constructor">
<h1>Intl.DisplayNames.prototype.constructor</h1>

<p>
The initial value of `Intl.DisplayNames.prototype.constructor` is the intrinsic object %DisplayNames%.
</p>
<p>The initial value of `Intl.DisplayNames.prototype.constructor` is %DisplayNames%.</p>
</emu-clause>

<emu-clause id="sec-Intl.DisplayNames.prototype-@@tostringtag">
<h1>Intl.DisplayNames.prototype[ @@toStringTag ]</h1>

<p>
The initial value of the @@toStringTag property is the String value *"Intl.DisplayNames"*.
</p>
<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
</p>
<h1>Intl.DisplayNames.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value *"Intl.DisplayNames"*.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
</emu-clause>

<emu-clause id="sec-Intl.DisplayNames.prototype.of" aoid="Intl.DisplayNames.prototype.of">
Expand Down
37 changes: 14 additions & 23 deletions spec/intl.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
<emu-clause id="intl-object">
<h1>The Intl Object</h1>
<p>
The Intl object is the <dfn>%Intl%</dfn> intrinsic object and the initial value of the *"Intl"* property of the global object. The Intl object is a single ordinary object.
</p>

<p>
The value of the [[Prototype]] internal slot of the Intl object is the intrinsic object %Object.prototype%.
</p>

<p>
The Intl object is not a function object. It does not have a [[Construct]] internal method; it is not possible to use the Intl object as a constructor with the `new` operator. The Intl object does not have a [[Call]] internal method; it is not possible to invoke the Intl object as a function.
</p>

<p>
The Intl object has an internal slot, [[FallbackSymbol]], which is a new %Symbol% in the current realm with the [[Description]] *"IntlLegacyConstructedSymbol"*.
</p>
<p>The Intl object:</p>
<ul>
<li>is <dfn>%Intl%</dfn>.</li>
<li>is the initial value of the *"Intl"* property of the global object.</li>
<li>is an ordinary object.</li>
<li>has a [[Prototype]] internal slot whose value is %Object.prototype%.</li>
<li>has a [[FallbackSymbol]] internal slot whose value is a new Symbol in the current realm with the [[Description]] *"IntlLegacyConstructedSymbol"*.</li>
<li>is not a function object.</li>
<li>does not have a [[Construct]] internal method; it cannot be used as a constructor with the new operator.</li>
<li>does not have a [[Call]] internal method; it cannot be invoked as a function.</li>
</ul>

<emu-clause id="sec-value-properties-of-the-intl-object">
<h1>Value Properties of the Intl Object</h1>

<emu-clause id="sec-Intl-toStringTag">
<h1>Intl[ @@toStringTag ]</h1>

<p>
The initial value of the @@toStringTag property is the String value *"Intl"*.
</p>
<p>
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
</p>
<h1>Intl [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value *"Intl"*.</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
</emu-clause>
</emu-clause>

Expand Down
Loading