tor-browser

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

emulates-undefined-coalesce.js (746B)


      1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-assignment-operators-runtime-semantics-evaluation
      5 description: >
      6  ??= doesn't special-case [[IsHTMLDDA]] object; rval is not evaluated.
      7 info: |
      8  AssignmentExpression : LeftHandSideExpression ??= AssignmentExpression
      9 
     10  1. Let lref be the result of evaluating LeftHandSideExpression.
     11  2. Let lval be ? GetValue(lref).
     12  3. If lval is neither undefined nor null, return lval.
     13 features: [IsHTMLDDA, logical-assignment-operators]
     14 ---*/
     15 
     16 var IsHTMLDDA = $262.IsHTMLDDA;
     17 var value = IsHTMLDDA;
     18 assert.sameValue(value ??= unresolved, IsHTMLDDA);
     19 assert.sameValue(value, IsHTMLDDA);
     20 
     21 reportCompare(0, 0);