이 번역은 완료되지 않았습니다. 이 문서를 번역해 주세요.

Node.ownerDocument 읽기 전용 속성은 이 node 의 최상위 document 객체를 반환합니다.

Syntax

document = element.ownerDocument
  • document 는 element 의 부모 document 객체입니다.

Example

// given a node "p", get the top-level HTML child 
// of the document object

var d = p.ownerDocument; 
var html = d.documentElement;

Notes

이 속성에 의해 반환된document 객체는 실제 HTML 문서의 모든 child 노드들이 생성되는 메인 객체입니다. 이 속성이 document 그 자체 노드에서 사용될 경우, 결과는 null 이 됩니다. 

Specifications

Specification Status Comment
DOM4
The definition of 'Node.ownerDocument' in that specification.
Obsolete  
Document Object Model (DOM) Level 3 Core Specification
The definition of 'Node.ownerDocument' in that specification.
Obsolete No change
Document Object Model (DOM) Level 2 Core Specification
The definition of 'Node.ownerDocument' in that specification.
Obsolete Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support YesEdge Full support 12Firefox Full support Yes
Full support Yes
Full support 9
Notes
Notes The ownerDocument of doctype nodes (that is, nodes for which Node.nodeType is Node.DOCUMENT_TYPE_NODE or 10) is no longer null. Instead, the ownerDocument is the document on which document.implementation.createDocumentType() was called.
IE Full support 6
Notes
Full support 6
Notes
Notes See MSDN.
Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support Yes
Full support Yes
Full support 9
Notes
Notes The ownerDocument of doctype nodes (that is, nodes for which Node.nodeType is Node.DOCUMENT_TYPE_NODE or 10) is no longer null. Instead, the ownerDocument is the document on which document.implementation.createDocumentType() was called.
Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

문서 태그 및 공헌자

이 페이지의 공헌자: dragmove
최종 변경자: dragmove,