tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

no-indices-array.js (629B)


      1 // Copyright 2019 Ron Buckton. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: The "indices" property is an Array.
      6 esid: sec-regexpbuiltinexec
      7 features: [regexp-match-indices]
      8 info: |
      9  RegExpBuiltinExec ( R, S )
     10    
     11    8. If _flags_ contains `"d"`, let _hasIndices_ be *true*, else let _hasIndices_ be *false*.
     12    36. If _hasIndices_ is *true*, then
     13      b. Perform ! CreateDataProperty(_A_, `"indices"`, _indicesArray_).
     14 ---*/
     15 
     16 let match = /a/.exec("a");
     17 
     18 // `indices` is not defined by default
     19 assert(!match.hasOwnProperty("indices"));
     20 
     21 reportCompare(0, 0);