source: trip-planner-front/node_modules/core-js/internals/object-get-own-property-names-external.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 784 bytes
Line 
1/* eslint-disable es/no-object-getownpropertynames -- safe */
2var toIndexedObject = require('../internals/to-indexed-object');
3var $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
4
5var toString = {}.toString;
6
7var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
8 ? Object.getOwnPropertyNames(window) : [];
9
10var getWindowNames = function (it) {
11 try {
12 return $getOwnPropertyNames(it);
13 } catch (error) {
14 return windowNames.slice();
15 }
16};
17
18// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
19module.exports.f = function getOwnPropertyNames(it) {
20 return windowNames && toString.call(it) == '[object Window]'
21 ? getWindowNames(it)
22 : $getOwnPropertyNames(toIndexedObject(it));
23};
Note: See TracBrowser for help on using the repository browser.