From 4289bf1fbb823f410775b4c7d0533b7abd8e5f5f Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:42:11 +0900 Subject: remove class 1 (#3922) --- .../ko/web/javascript/reference/global_objects/globalthis/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects/globalthis') diff --git a/files/ko/web/javascript/reference/global_objects/globalthis/index.html b/files/ko/web/javascript/reference/global_objects/globalthis/index.html index a06d8520dc..8a46c92c54 100644 --- a/files/ko/web/javascript/reference/global_objects/globalthis/index.html +++ b/files/ko/web/javascript/reference/global_objects/globalthis/index.html @@ -37,7 +37,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/globalThis

globalThis 없이 현재 환경의 전역 객체를 가져오는 방법 중 유일하게 믿을만한 방법은 Function('return this')() 입니다. 그러나 일부 환경에서는 CSP 위반에 걸리는 코드이므로, es6-shim은 대신 다음 검사를 수행합니다.

-
var getGlobal = function () {
+
var getGlobal = function () {
   if (typeof self !== 'undefined') { return self; }
   if (typeof window !== 'undefined') { return window; }
   if (typeof global !== 'undefined') { return global; }
@@ -53,7 +53,7 @@ if (typeof globals.setTimeout !== 'function') {
 
 

globalThis를 사용할 수 있으면 환경별 전역 객체 검사는 더 이상 필요하지 않습니다.

-
if (typeof globalThis.setTimeout !== 'function') {
+
if (typeof globalThis.setTimeout !== 'function') {
   // no setTimeout in this environment!
 }
-- cgit v1.2.3-54-g00ecf