diff options
Diffstat (limited to 'files/ko/web/html/global_attributes/is/index.html')
-rw-r--r-- | files/ko/web/html/global_attributes/is/index.html | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/files/ko/web/html/global_attributes/is/index.html b/files/ko/web/html/global_attributes/is/index.html new file mode 100644 index 0000000000..99e72adade --- /dev/null +++ b/files/ko/web/html/global_attributes/is/index.html @@ -0,0 +1,64 @@ +--- +title: is +slug: Web/HTML/Global_attributes/is +tags: + - Global attributes + - HTML + - Reference +translation_of: Web/HTML/Global_attributes/is +--- +<div>{{HTMLSidebar("Global_attributes")}}</div> + +<p><strong><code>is</code></strong> <a href="/ko/docs/Web/HTML/Global_attributes">전역 특성</a>은 표준 HTML 요소가 사용자 지정 요소처럼 행동하도록 지정합니다. <a href="/ko/docs/Web/Web_Components/Using_custom_elements">사용자 지정 요소 사용하기</a>를 방문해 더 자세한 정보를 알아보세요.</p> + +<p>이 특성은 주어진 사용자 지정 요소의 이름을 현재 문서에 성공적으로 <a href="/ko/docs/Web/API/CustomElementRegistry/define">정의</a>했고, <code>is</code> 특성을 적용하려는 요소를 확장하는 경우에만 사용할 수 있습니다.</p> + +<h2 id="예제">예제</h2> + +<p>다음 코드는 <a href="https://github.com/mdn/web-components-examples/tree/master/word-count-web-component">word-count-web-component</a> 예제에서 발췌한 것입니다. (<a href="https://mdn.github.io/web-components-examples/word-count-web-component/">실제 동작 보기</a>)</p> + +<pre class="brush: js notranslate">// Create a class for the element +class WordCount extends HTMLParagraphElement { + constructor() { + // Always call super first in constructor + super(); + + // Constructor contents ommitted for brevity + ... + + } +} + +// Define the new element +customElements.define('word-count', WordCount, { extends: 'p' });</pre> + +<pre class="brush: html notranslate"><<span class="pl-ent">p</span> <span class="pl-e">is</span>=<span class="pl-s"><span class="pl-pds">"</span>word-count<span class="pl-pds">"</span></span>></<span class="pl-ent">p</span>></pre> + +<h2 id="명세">명세</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', "custom-elements.html#attr-is", "is")}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="브라우저_호환성">브라우저 호환성</h2> + + + +<p>{{Compat("html.global_attributes.is")}}</p> + +<h2 id="같이_보기">같이 보기</h2> + +<ul> + <li>모든 <a href="/ko/docs/Web/HTML/Global_attributes">전역 특성</a>.</li> +</ul> |