tor-browser

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

unscopables.js (669B)


      1 // Copyright 2015 Mike Pennisi. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es6id: 8.1.1.4.1
      6 description: >
      7    `Symbol.unscopables` is not referenced when finding bindings in global scope
      8 info: |
      9    1. Let envRec be the global Environment Record for which the method was
     10       invoked.
     11    2. Let DclRec be envRec.[[DeclarativeRecord]].
     12    3. If DclRec.HasBinding(N) is true, return true.
     13    4. Let ObjRec be envRec.[[ObjectRecord]].
     14    5. Return ObjRec.HasBinding(N).
     15 features: [Symbol.unscopables]
     16 ---*/
     17 
     18 var x = 86;
     19 this[Symbol.unscopables] = {
     20  x: true
     21 };
     22 assert.sameValue(x, 86);
     23 
     24 reportCompare(0, 0);