tor-browser

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

emulates-undefined.js (986B)


      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-equality-operators-runtime-semantics-evaluation
      5 description: >
      6  Strict Equality Comparison doesn't special-case [[IsHTMLDDA]] objects.
      7 info: |
      8  EqualityExpression : EqualityExpression !== RelationalExpression 
      9 
     10  [...]
     11  5. Let r be the result of performing Strict Equality Comparison rval === lval.
     12  6. Assert: r is a normal completion.
     13  7. If r.[[Value]] is true, return false. Otherwise, return true.
     14 
     15  Strict Equality Comparison
     16 
     17  1. If Type(x) is different from Type(y), return false.
     18 features: [IsHTMLDDA]
     19 ---*/
     20 
     21 var IsHTMLDDA = $262.IsHTMLDDA;
     22 
     23 assert(IsHTMLDDA !== undefined, "!== with `undefined`");
     24 assert(undefined !== IsHTMLDDA, "!== with `undefined`");
     25 
     26 assert(IsHTMLDDA !== null, "!== with `null`");
     27 assert(null !== IsHTMLDDA, "!== with `null`");
     28 
     29 assert.sameValue(IsHTMLDDA !== IsHTMLDDA, false);
     30 
     31 reportCompare(0, 0);