Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 1x 1x | /** * Copyright (c) Siemens 2016 - 2025 * SPDX-License-Identifier: MIT */ // global Object in a NodeJS context, which we have when building types for web-components or building with angular SSR declare const global: any; /** * This var provides access to the global scope object based on the current runtime. * On Browser its is the window, on Node.js it is global. * * Whenever possible, inject(DOCUMENT) is preferred over this approach. */ let globalScope: any; // we are either running Browser or on NodeJS if (typeof window !== 'undefined') { globalScope = window; } else IEif (typeof global !== 'undefined') { globalScope = global; } export { globalScope }; |