blob: 75cf471b02e6a2adada55066624a38416bd287a5 (
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
|
---
title: Node.ownerDocument
slug: Web/API/Node/ownerDocument
tags:
- プロパティ
- リファレンス
- 読み取り専用
browser-compat: api.Node.ownerDocument
translation_of: Web/API/Node/ownerDocument
---
{{APIRef("DOM")}}
**`ownerDocument`** は {{domxref("Node")}} インターフェイスの読み取り専用プロパティで、このノードの最上位の文書オブジェクトを返します。
## 値
すべての子ノードが作成された最上位の {{domxref("Document")}} オブジェクトです。
このプロパティが文書自身のノードで使用された場合、値は `null` になります。
## 例
```js
// 指定された "p" から、文書オブジェクトの子である最上位の HTML を取得します。
const d = p.ownerDocument;
const html = d.documentElement;
```
## 仕様書
{{Specifications}}
## ブラウザーの互換性
{{Compat}}
|