Skip to content

Commit

Permalink
Normative: make String.prototype.matchAll throw for non-global regu…
Browse files Browse the repository at this point in the history
…lar expressions (#1716)
  • Loading branch information
mathiasbynens authored and ljharb committed Oct 3, 2019
1 parent ad1adc8 commit 1d0fe7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec.html
Expand Up @@ -29725,6 +29725,11 @@ <h1>String.prototype.matchAll ( _regexp_ )</h1>
<emu-alg>
1. Let _O_ be ? RequireObjectCoercible(*this* value).
1. If _regexp_ is neither *undefined* nor *null*, then
1. Let _isRegExp_ be ? IsRegExp(_regexp_).
1. If _isRegExp_ is true, then
1. Let _flags_ be ? Get(_regexp_, *"flags"*).
1. Perform ? RequireObjectCoercible(_flags_).
1. If ? ToString(_flags_) does not contain *"g"*, throw a *TypeError* exception.
1. Let _matcher_ be ? GetMethod(_regexp_, @@matchAll).
1. If _matcher_ is not *undefined*, then
1. Return ? Call(_matcher_, _regexp_, &laquo; _O_ &raquo;).
Expand Down

0 comments on commit 1d0fe7c

Please sign in to comment.