diff options
author | alattalatta <urty5656@gmail.com> | 2021-07-26 22:51:29 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 22:51:29 +0900 |
commit | 91bca910871ea185e7970937a9739dbbf3d223a9 (patch) | |
tree | fa4ca739b9600da9c3135a70a834ebd3cd9d94fa /files/ko/web/javascript/reference/global_objects/promise | |
parent | 170ee25aa30bde456c637f08f0315763e21193cd (diff) | |
download | translated-content-91bca910871ea185e7970937a9739dbbf3d223a9.tar.gz translated-content-91bca910871ea185e7970937a9739dbbf3d223a9.tar.bz2 translated-content-91bca910871ea185e7970937a9739dbbf3d223a9.zip |
Remove hidden/noinclude from JS docs (#1583)
Diffstat (limited to 'files/ko/web/javascript/reference/global_objects/promise')
6 files changed, 11 insertions, 23 deletions
diff --git a/files/ko/web/javascript/reference/global_objects/promise/all/index.html b/files/ko/web/javascript/reference/global_objects/promise/all/index.html index 6fe82003e0..e26a13dcfc 100644 --- a/files/ko/web/javascript/reference/global_objects/promise/all/index.html +++ b/files/ko/web/javascript/reference/global_objects/promise/all/index.html @@ -14,8 +14,6 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/all <div>{{EmbedInteractiveExample("pages/js/promise-all.html")}}</div> -<p class="hidden">해당 예제의 소스 코드는 GitHub 리포지토리에 저장되어 있습니다. 인터랙티브 데모 프로젝트에 기여하고 싶다면 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> 를 클론하고 pull request를 보내 주세요.</p> - <h2 id="구문">구문</h2> <pre class="syntaxbox">Promise.all(<var>iterable</var>); diff --git a/files/ko/web/javascript/reference/global_objects/promise/index.html b/files/ko/web/javascript/reference/global_objects/promise/index.html index a06ff3cc40..cc9c9bc427 100644 --- a/files/ko/web/javascript/reference/global_objects/promise/index.html +++ b/files/ko/web/javascript/reference/global_objects/promise/index.html @@ -107,16 +107,18 @@ myFirstPromise.then((successMessage) => { <h3 id="고급_예제">고급 예제</h3> -<div class="hidden"> -<pre class="brush: html notranslate"><button id="btn">프로미스 만들기!</button> -<div id="log"></div></pre> -</div> - <p>다음의 작은 예제는 <code>Promise</code>의 동작 방식을 보여줍니다. <code>testPromise()</code> 함수는 {{HTMLElement("button")}}을 클릭할 때마다 호출되며, {{domxref("window.setTimeout()")}}을 사용해 1~3초의 무작위 간격 이후 프로미스 횟수(1부터 시작하는 숫자)로 이행하는 프로미스를 생성합니다. <code>Promise()</code> 생성자는 프로미스를 만드는 데 쓰입니다.</p> <p>프로미스 이행은 {{jsxref("Promise.prototype.then()","p1.then()")}}을 사용하는 이행 콜백 세트를 통해 단순히 로그에 남습니다. 약간의 로그를 통해, 함수의 동기 부분이 비동기적 프로미스의 완료와 어떻게 분리되어 있는지 확인할 수 있습니다.</p> -<pre class="brush: js notranslate">'use strict'; +<h4>HTML</h4> + +<pre class="brush: html"><button id="btn">프로미스 만들기!</button> +<div id="log"></div></pre> + +<h4>JavaScript</h4> + +<pre class="brush: js">'use strict'; var promiseCount = 0; function testPromise() { @@ -159,17 +161,15 @@ function testPromise() { log.insertAdjacentHTML('beforeend', thisPromiseCount + ') 프로미스 생성 (<small>동기적 코드 종료</small>)<br/>'); } -</pre> -<div class="hidden"> -<pre class="brush: js notranslate">if ("Promise" in window) { +if ("Promise" in window) { var btn = document.getElementById("btn"); btn.addEventListener("click", testPromise); } else { log = document.getElementById('log'); log.innerHTML = "Live example not available as your browser doesn't support the <code>Promise<code> interface."; -}</pre> -</div> +} +</pre> <p>이 예제는 버튼을 클릭하면 실행됩니다. <code>Promise</code>를 지원하는 브라우저가 필요합니다. 짧은 시간 안에 버튼을 여러 번 클릭하여, 서로 다른 프로미스가 번갈아 이행되는 것을 볼 수도 있습니다.</p> diff --git a/files/ko/web/javascript/reference/global_objects/promise/promise/index.html b/files/ko/web/javascript/reference/global_objects/promise/promise/index.html index 3d5a5c9bea..934cae2e7f 100644 --- a/files/ko/web/javascript/reference/global_objects/promise/promise/index.html +++ b/files/ko/web/javascript/reference/global_objects/promise/promise/index.html @@ -14,8 +14,6 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/Promise <div>{{EmbedInteractiveExample("pages/js/promise-constructor.html")}}</div> -<p class="hidden">The source for this interactive demo is stored in a GitHub repository. If you'd like to contribute to the interactive demo project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> and send us a pull request.</p> - <h2 id="구문">구문</h2> <pre class="syntaxbox">new Promise(<var>executor</var>)</pre> diff --git a/files/ko/web/javascript/reference/global_objects/promise/race/index.html b/files/ko/web/javascript/reference/global_objects/promise/race/index.html index a6a90b0bed..618ae4ccb5 100644 --- a/files/ko/web/javascript/reference/global_objects/promise/race/index.html +++ b/files/ko/web/javascript/reference/global_objects/promise/race/index.html @@ -15,8 +15,6 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/race <div>{{EmbedInteractiveExample("pages/js/promise-race.html")}}</div> -<p class="hidden">해당 예제의 소스 코드는 GitHub 리포지토리에 저장되어 있습니다. 인터랙티브 데모 프로젝트에 기여하고 싶다면 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> 를 클론하고 pull request를 보내 주세요.</p> - <h2 id="구문">구문</h2> <pre class="syntaxbox">Promise.race(<em>iterable</em>);</pre> diff --git a/files/ko/web/javascript/reference/global_objects/promise/resolve/index.html b/files/ko/web/javascript/reference/global_objects/promise/resolve/index.html index e5015b9d34..4dca16fe8a 100644 --- a/files/ko/web/javascript/reference/global_objects/promise/resolve/index.html +++ b/files/ko/web/javascript/reference/global_objects/promise/resolve/index.html @@ -19,10 +19,6 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/resolve <div>{{EmbedInteractiveExample("pages/js/promise-resolve.html")}}</div> -<div class="hidden"> -<p>The source for this interactive demo is stored in a GitHub repository. If you'd like to contribute to the interactive demo project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> and send us a pull request.</p> -</div> - <h2 id="구문">구문</h2> <pre class="syntaxbox"><var>Promise.resolve(value)</var>; diff --git a/files/ko/web/javascript/reference/global_objects/promise/then/index.html b/files/ko/web/javascript/reference/global_objects/promise/then/index.html index 7fa23363cb..989b17b846 100644 --- a/files/ko/web/javascript/reference/global_objects/promise/then/index.html +++ b/files/ko/web/javascript/reference/global_objects/promise/then/index.html @@ -15,8 +15,6 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/then <div>{{EmbedInteractiveExample("pages/js/promise-then.html")}}</div> -<p class="hidden">해당 예제의 소스 코드는 GitHub 리포지토리에 저장되어 있습니다. 인터랙티브 데모 프로젝트에 기여하고 싶다면 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> 를 클론하고 pull request를 보내 주세요.</p> - <div class="note"> <p>매개변수 중 하나 이상을 생략했거나 함수가 아닌 값을 전달한 경우, <code>then</code>은 핸들러가 없는 것이 되지만 오류를 발생하지는 않습니다. <code>then</code> 바로 이전의 <code>Promise</code>가 <code>then</code>에 핸들러가 없는 상태로 완료(이행이나 거부)했을 경우, 추가 핸들러가 없는 <code>Promise</code>가 생성되며, 원래 <code>Promise</code>의 마지막 상태를 그대로 물려받습니다.</p> </div> |