tor-browser

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

emulates-undefined.js (867B)


      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-binary-logical-operators-runtime-semantics-evaluation
      5 description: >
      6  ToBoolean returns `false` for [[IsHTMLDDA]] object; rval is evaluated.
      7 info: |
      8  LogicalORExpression : LogicalORExpression || LogicalANDExpression
      9 
     10  1. Let lref be the result of evaluating LogicalORExpression.
     11  2. Let lval be ? GetValue(lref).
     12  3. Let lbool be ! ToBoolean(lval).
     13  4. If lbool is true, return lval.
     14  5. Let rref be the result of evaluating LogicalANDExpression.
     15  6. Return ? GetValue(rref).
     16 
     17  The [[IsHTMLDDA]] Internal Slot / Changes to ToBoolean
     18 
     19  1. If argument has an [[IsHTMLDDA]] internal slot, return false.
     20  2. Return true.
     21 features: [IsHTMLDDA]
     22 ---*/
     23 
     24 assert.sameValue($262.IsHTMLDDA || 2, 2);
     25 
     26 reportCompare(0, 0);