tor-browser

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

hasown_own_getter.js (439B)


      1 // Copyright (c) 2021 Jamie Kyle.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-object.hasown
      6 description: Properties - [[HasOwnProperty]] (literal own getter property)
      7 author: Jamie Kyle
      8 features: [Object.hasOwn]
      9 ---*/
     10 
     11 var o = {
     12  get foo() {
     13    return 42;
     14  }
     15 };
     16 
     17 assert.sameValue(Object.hasOwn(o, "foo"), true, 'Object.hasOwn(o, "foo") !== true');
     18 
     19 reportCompare(0, 0);