要素取得判定関数まとめ

# 子要素取得系

| 関数名 | 戻型 | セレクタ | 使えるインスタンス |
| - | - | - | - |
| getElementById | [Element](https://developer.mozilla.org/ja/docs/Web/API/Element) \| null | ID属性値 | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/getElementById) ,  [DocumentFragment](https://developer.mozilla.org/ja/docs/Web/API/DocumentFragment/getElementById) | 
|  getElementsByName | 生きた [NodeList](https://developer.mozilla.org/ja/docs/Web/API/NodeList) | Name属性値 | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/getElementsByName) |
| getElementsByTagName | 生きた [HTMLCollection](https://developer.mozilla.org/ja/docs/Web/API/HTMLCollection) | タグ名 |  [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/getElementsByTagName), [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/getElementsByTagName) |
| getElementsByTagNameNS | 生きた [NodeList](https://developer.mozilla.org/ja/docs/Web/API/NodeList) | タグ名 + 名前空間URI | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/getElementsByTagNameNS), [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/getElementsByTagNameNS) |
| getElementsByClassName | 生きた [HTMLCollection](https://developer.mozilla.org/ja/docs/Web/API/HTMLCollection) | classList の要素値 | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/getElementsByClassName), [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/getElementsByClassName) |
| evaluate | [XPathResult](https://developer.mozilla.org/ja/docs/Web/API/XPathResult) | XPath | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/evaluate), [XPathExpression](https://developer.mozilla.org/ja/docs/Web/API/XPathExpression/evaluate) |
| querySelector | [Element](https://developer.mozilla.org/ja/docs/Web/API/Element) \| null | CSS セレクタ | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/querySelector), [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/querySelector), [DocumentFragment](https://developer.mozilla.org/ja/docs/Web/API/DocumentFragment/querySelector) |
| querySelectorAll | (生きてない) [NodeList](https://developer.mozilla.org/ja/docs/Web/API/NodeList) | CSS セレクタ |  [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/querySelectorAll), [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/querySelectorAll), [DocumentFragment](https://developer.mozilla.org/ja/docs/Web/API/DocumentFragment/querySelectorAll) |

# 自身から親方向に向けた要素取得系

| 関数名 | 戻型 | セレクタ | 使えるインスタンス |
| - | - | - | - |
| evaluate | [XPathResult](https://developer.mozilla.org/ja/docs/Web/API/XPathResult) | XPath | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/evaluate), [XPathExpression](https://developer.mozilla.org/ja/docs/Web/API/XPathExpression/evaluate) |
| closest | [Element](https://developer.mozilla.org/ja/docs/Web/API/Element) \| null | CSS セレクタ | [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/closest) |

# 自身判定系

| 関数名 | セレクタ | 使えるインスタンス |
| - | - | - |
| evaluate | XPath | [Document](https://developer.mozilla.org/ja/docs/Web/API/Document/evaluate), [XPathExpression](https://developer.mozilla.org/ja/docs/Web/API/XPathExpression/evaluate) |
| matches | CSS セレクタ | [Element](https://developer.mozilla.org/ja/docs/Web/API/Element/matches) |

# 感想

基本的には getElementById / querySelector / querySelectorAll / closest / matches でこと足りるかな感

evaluate はなんでもできるが IEに実装されなかったことだけが惜しい。