18 lines
669 B
JavaScript
18 lines
669 B
JavaScript
|
'use strict';
|
||
|
var $export = require('./_export')
|
||
|
, toObject = require('./_to-object')
|
||
|
, toPrimitive = require('./_to-primitive')
|
||
|
, getPrototypeOf = require('./_object-gpo')
|
||
|
, getOwnPropertyDescriptor = require('./_object-gopd').f;
|
||
|
|
||
|
// B.2.2.4 Object.prototype.__lookupGetter__(P)
|
||
|
require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
|
||
|
__lookupGetter__: function __lookupGetter__(P){
|
||
|
var O = toObject(this)
|
||
|
, K = toPrimitive(P, true)
|
||
|
, D;
|
||
|
do {
|
||
|
if(D = getOwnPropertyDescriptor(O, K))return D.get;
|
||
|
} while(O = getPrototypeOf(O));
|
||
|
}
|
||
|
});
|