aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/node/ownerdocument/index.html
blob: b3aced6728c863043754d2628b6384a04292d31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: Node.ownerDocument
slug: Web/API/Node/ownerDocument
translation_of: Web/API/Node/ownerDocument
---
<div>{{APIRef("DOM")}}</div>

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

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox"><var>document</var> = <var>element</var>.ownerDocument
</pre>

<ul>
 <li><code>document</code> 는 element 의 부모 <a href="/en-US/docs/DOM/document"><code>document</code></a> 객체입니다.</li>
</ul>

<h2 id="Example">Example</h2>

<pre class="brush:js">// given a node "p", get the top-level HTML child
// of the document object

var d = p.ownerDocument;
var html = d.documentElement;
</pre>

<h2 id="Notes">Notes</h2>

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

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th>Specification</th>
   <th>Status</th>
   <th>Comment</th>
  </tr>
  <tr>
   <td>{{SpecName("DOM4", "#dom-node-ownerdocument", "Node.ownerDocument")}}</td>
   <td>{{Spec2("DOM4")}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName("DOM3 Core", "core.html#node-ownerDoc", "Node.ownerDocument")}}</td>
   <td>{{Spec2("DOM3 Core")}}</td>
   <td>No change</td>
  </tr>
  <tr>
   <td>{{SpecName("DOM2 Core", "core.html#node-ownerDoc", "Node.ownerDocument")}}</td>
   <td>{{Spec2("DOM2 Core")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("api.Node.ownerDocument")}}</p>