回答編集履歴
3
Console Standard
answer
CHANGED
@@ -22,4 +22,11 @@
|
|
22
22
|
- 当該要素ノードが存在すれば、**HTMLElement のインスタンス** (nodeTypeは `ELEMENT_NODE`)
|
23
23
|
- 当該要素ノードが存在しなければ、**null**
|
24
24
|
|
25
|
+
---
|
26
|
+
|
27
|
+
コンソールにおける `$()` は2020-09-20現在、**Console Standardで定義されていません**。
|
28
|
+
従って、ブラウザの独自拡張の域を出ていません。
|
29
|
+
|
30
|
+
- [Console Standard](https://console.spec.whatwg.org/)
|
31
|
+
|
25
32
|
Re: colette さん
|
2
document.querySelector() の返り値
answer
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
### jQuery( selector [, context ] )
|
2
2
|
|
3
3
|
`$()` は非標準APIですが、質問のタグとコードからjQueryと仮定します。
|
4
|
-
第一引数にセレクタ文字列を指定する呼び出し方なら、公式には
|
4
|
+
第一引数にセレクタ文字列を指定する呼び出し方なら、公式には**jQuery object**と呼称しています。
|
5
5
|
|
6
6
|
- [jQuery() | jQuery API Documentation](https://api.jquery.com/jQuery/#jQuery1)
|
7
7
|
- [Types | jQuery API Documentation](https://api.jquery.com/Types/#jQuery)
|
@@ -12,4 +12,14 @@
|
|
12
12
|
|
13
13
|
- [Console Utilities API Reference | Chrome DevTools | Google Developers](https://developers.google.com/web/tools/chrome-devtools/console/utilities?hl=ja#queryselector)
|
14
14
|
|
15
|
+
`document.querySelector()` を調べると、
|
16
|
+
|
17
|
+
- [Document.querySelector() - Web API | MDN](https://developer.mozilla.org/ja/docs/Web/API/Document/querySelector)
|
18
|
+
- [Node.nodeType - Web API | MDN](https://developer.mozilla.org/ja/docs/Web/API/Node/nodeType)
|
19
|
+
|
20
|
+
返り値は、下記になります。
|
21
|
+
|
22
|
+
- 当該要素ノードが存在すれば、**HTMLElement のインスタンス** (nodeTypeは `ELEMENT_NODE`)
|
23
|
+
- 当該要素ノードが存在しなければ、**null**
|
24
|
+
|
15
25
|
Re: colette さん
|
1
返り値
answer
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
### jQuery( selector [, context ] )
|
2
2
|
|
3
3
|
`$()` は非標準APIですが、質問のタグとコードからjQueryと仮定します。
|
4
|
-
第一引数にセレクタ文字列を指定する呼び出し方なら、公式には**jQuery object**と呼称しています。
|
4
|
+
第一引数にセレクタ文字列を指定する呼び出し方なら、公式には「返り値」を**jQuery object**と呼称しています。
|
5
5
|
|
6
6
|
- [jQuery() | jQuery API Documentation](https://api.jquery.com/jQuery/#jQuery1)
|
7
7
|
- [Types | jQuery API Documentation](https://api.jquery.com/Types/#jQuery)
|