Skip to content

Commit

Permalink
non-normative host hook alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 7, 2024
1 parent 927da3e commit cbf5b65
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,15 @@ contributors: Luca Casonato, Guy Bedford, Nicolò Ribaudo
<p><ins>For Module Records that do not have a source representation, GetModuleSource() must always return a throw completion whose [[Value]] is a *ReferenceError*.</ins></p>
</td>
</tr>
<tr>
<td>
<ins>GetModuleSourceName()</ins>
</td>
<td>
<p><ins>For Module Records that implement a normal completion for GetModuleSource(), returns a String corresponding to the source record type to be used as the strongly branded return value of the @@toStringTag getter on %AbstractModuleSource%.</ins></p>
<p><ins>For Module Records that do not have a source representation, GetModuleSourceName() is never called.</ins></p>
</td>
</tr>
</table>
</emu-table>
</emu-clause>
Expand Down Expand Up @@ -2024,6 +2033,23 @@ contributors: Luca Casonato, Guy Bedford, Nicolò Ribaudo
<h1>%AbstractModuleSource%.prototype.constructor</h1>
<p>The initial value of %AbstractModuleSource%`.prototype.constructor` is %AbstractModuleSource%.</p>
</emu-clause>

<emu-clause id="sec-get-%abstractmodulesource%.prototype.@@tostringtag">
<h1>get %AbstractModuleSource%.prototype [ @@toStringTag ]</h1>
<p>%AbstractModuleSource%.prototype `[@@toStringTag]` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:</p>
<emu-alg>
1. Let _O_ be the *this* value.
1. If _O_ is not an Object, return *undefined*.
1. Let _sourceRecordResult_ be Completion(HostGetModuleSourceRecord(_O_)).
1. If _sourceRecordResult_ is an abrupt completion, return *undefined*.
1. Let _sourceRecord_ be ! _sourceRecordResult_.
1. Let _name_ be ! _sourceRecordResult_.getModuleSourceName().
1. Assert: _name_ is a String.
1. Return _name_.
</emu-alg>
<p>This property has the attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>The initial value of the *"name"* property of this function is *"get [Symbol.toStringTag]"*.</p>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
Expand Down

0 comments on commit cbf5b65

Please sign in to comment.