Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Element.createShadowRoot()

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

Draft
This page is not complete.

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

Use Element.createShadowRoot to create an instance of shadow DOM. When shadow DOM is created, it is always attached to an existing element. After the shadow DOM is created, the element that it is attached to is called the shadow root.

This method has been deprecated in favor of attachShadow.

Syntax

var shadowroot = element.createShadowRoot(); 

Parameters

No parameters.

Result value

Returns a ShadowRoot.

Specifications

Specification Status Comment
Shadow DOM Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 35.0 No support No support 22 No support
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support ? ? ? ? ? ? (Yes)

In Chrome 45, the ability to have multiple shadow roots was deprecated.

문서 태그 및 공헌자

 이 페이지의 공헌자: Keysox, japacible, jpmedley, markg, Sebastianz
 최종 변경: Keysox,