diff options
Diffstat (limited to 'files/ko/web/javascript/reference/global_objects/globalthis')
| -rw-r--r-- | files/ko/web/javascript/reference/global_objects/globalthis/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
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 <p><code>globalThis</code> 없이 현재 환경의 전역 객체를 가져오는 방법 중 유일하게 믿을만한 방법은 <code>Function('return this')()</code> 입니다. 그러나 일부 환경에서는 <a href="/ko/docs/Web/HTTP/CSP">CSP</a> 위반에 걸리는 코드이므로, <a href="https://github.com/paulmillr/es6-shim">es6-shim</a>은 대신 다음 검사를 수행합니다.</p> -<pre class="brush: js notranslate">var getGlobal = function () { +<pre class="brush: js ">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') { <p><code>globalThis</code>를 사용할 수 있으면 환경별 전역 객체 검사는 더 이상 필요하지 않습니다.</p> -<pre class="brush: js notranslate">if (typeof globalThis.setTimeout !== 'function') { +<pre class="brush: js ">if (typeof globalThis.setTimeout !== 'function') { // no setTimeout in this environment! }</pre> |
