nl_tokens: === derived traps === If name denotes a fixed property check whether the trap returns true . If name denotes a new property on a non - extensible proxy check whether the trap returns false .
pl_tokens: function ( name ) { "use strict" ; var trap = this . getTrap ( "hasOwn" ) ; if ( trap === undefined ) { // default forwarding behavior return Reflect . hasOwn ( this . target , name ) ; } name = String ( name ) ; var res = trap . call ( this . handler , this . target , name ) ; <mask> = ! ! res ; // coerce to Boolean if ( res === false ) { if ( isSealed ( name , this . target ) ) { throw new TypeError ( "cannot report existing non-configurable own " + "property '" + name + "' as a non-existent own " + "property" ) ; } if ( ! Object . isExtensible ( this . target ) && isFixed ( name , this . target ) ) { // if handler is allowed to return false, we cannot guarantee // that it will return true for this property later. // Once a property has been reported as non-existent on a non-extensible // object, it should forever be reported as non-existent throw new TypeError ( "cannot report existing own property '" + name + "' as non-existent on a non-extensible object" ) ; } } else { // res === true, if the proxy is non-extensible, // check that name is no new property if ( ! Object . isExtensible ( this . target ) ) { if ( ! isFixed ( name , this . target ) ) { throw new TypeError ( "cannot report a new own property '" + name + "' on a non-extensible object" ) ; } } } return res ; }