DocumentOrShadowRoot
Shadow DOM API 의 DocumentOrShadowRoot
믹스인(mixin)은 문서와 섀도우 루트간에 공유되는 API를 제공합니다. 다음 기능은 문서Document
와 ShadowRoot
(en-US)에 모두 포함되어 있습니다.
Properties
DocumentOrShadowRoot.activeElement
Read only- 포커스를 가지는 섀도우 루트 내의 요소
Element
를 반환합니다. DocumentOrShadowRoot.fullscreenElement
(en-US)Read only- 현재 이 문서에서 full screen mode인 요소
Element
를 반환합니다. DocumentOrShadowRoot.pointerLockElement
(en-US) Read only- 포인터가 잠겨있는 동안 마우스 이벤트의 대상으로 설정된 요소를 반환합니다. 잠금이 보류중이거나 포인터가 잠금 해제되어 있거나, 대상이 다른 문서(document)에 있으면
null
을 반환합니다. DocumentOrShadowRoot.styleSheets
Read only- 문서에 명시적으로 링크되었거나 포함하고 있는 스타일 시트의
CSSStyleSheet
객체의StyleSheetList
(en-US)를 반환합니다.
Methods
DocumentOrShadowRoot.getSelection()
- 유저가 선택한 텍스트의 범위, 또는 캐럿(caret - 텍스트 커서)의 현재 위치를 나타내는
Selection
객체를 반환합니다. DocumentOrShadowRoot.elementFromPoint()
(en-US)- 지정된 좌표의 최상위 요소를 반환합니다.
DocumentOrShadowRoot.elementsFromPoint()
(en-US)- 지정된 자표에 있는 모든 요소의 배열을 반환합니다.
DocumentOrShadowRoot.caretPositionFromPoint()
(en-US)- 캐럿을 포함한 DOM 노드와 그 노드 내에서 캐럿의 문자 오프셋을 포함한
CaretPosition
(en-US)를 반환합니다.
Specifications
Specification | Status | Comment |
---|---|---|
DOM The definition of 'DocumentOrShadowRoot' in that specification. |
Living Standard | Initial definition. |
Shadow DOM The definition of 'DocumentOrShadowRoot' in that specification. |
Obsolete | Implementation in Shadow DOM. |
Browser Compatibility
No compatibility data found for api.DocumentOrShadowRoot
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
[1] This interface's features are still implemented on the Document
object.