source: imaps-frontend/node_modules/core-js/internals/object-get-own-property-names-external.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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