X 归档 2019-04-21
🔥 `globalThis` makes it easy to access the global `this` value in any JavaScript environment.
🤔 Surprisingly, polyfilling it correctly requires some arcane JavaScript wizardry.
🧙♀️ A horrifying globalThis polyfill in 100% universal JavaScript: https://mths.be/globalthis
🤔 Surprisingly, polyfilling it correctly requires some arcane JavaScript wizardry.
🧙♀️ A horrifying globalThis polyfill in 100% universal JavaScript: https://mths.be/globalthis
🔥 `globalThis` 让你在任何 JavaScript 环境中都能轻松拿到全局 `this` 值。
🤔 出人意料的是,要正确地给它做 polyfill,需要一些晦涩的 JavaScript 魔法。
🧙♀️ 一个 100% 通用 JavaScript 写成的吓人 globalThis polyfill:https://mths.be/globalthis
🤔 出人意料的是,要正确地给它做 polyfill,需要一些晦涩的 JavaScript 魔法。
🧙♀️ 一个 100% 通用 JavaScript 写成的吓人 globalThis polyfill:https://mths.be/globalthis


