回答編集履歴

3

追記

2017/10/21 13:20

投稿

退会済みユーザー
test CHANGED
@@ -45,3 +45,13 @@
45
45
 
46
46
 
47
47
  英語がよくわからないので詳細は不明ですが、意訳すると、なにかいい感じに出力するよ、と書いてあるように読みました。
48
+
49
+
50
+
51
+ Console Standard (日本語訳)
52
+
53
+ [https://triple-underscore.github.io/console-ja.html#object-formats](https://triple-underscore.github.io/console-ja.html#object-formats)
54
+
55
+
56
+
57
+ 日本語訳もあるようでしたが、やっぱりよくわかりませんでした。

2

追記:

2017/10/21 13:20

投稿

退会済みユーザー
test CHANGED
@@ -27,3 +27,21 @@
27
27
  出力の差はtoStringの定義の違いかと思いましたが、定義からはそのような違いをすぐには見つけられませんでした。
28
28
 
29
29
  おそらく、HTMLElementについてはHTML要素としての文字列表現を返すような実装となるようにブラウザ側で対応しているのではないかと思いますが、それがわかる資料は見つけられていません。
30
+
31
+
32
+
33
+ ----
34
+
35
+ 再追記:
36
+
37
+
38
+
39
+ Console Standard
40
+
41
+ [https://console.spec.whatwg.org/#object-formats](https://console.spec.whatwg.org/#object-formats)
42
+
43
+ > An object with **generic JavaScript object formatting** is a potentially expandable representation of a generic JavaScript object. An object with **optimally useful formatting** is an implementation-specific, potentially-interactive representation of an object judged to be maximally useful and informative.
44
+
45
+
46
+
47
+ 英語がよくわからないので詳細は不明ですが、意訳すると、なにかいい感じに出力するよ、と書いてあるように読みました。

1

追記

2017/10/21 13:15

投稿

退会済みユーザー
test CHANGED
@@ -9,3 +9,21 @@
9
9
  console.log(img.__proto__);
10
10
 
11
11
  ```
12
+
13
+
14
+
15
+ ----
16
+
17
+ 追記:
18
+
19
+
20
+
21
+ [console.log - Web API インターフェイス | MDN](https://developer.mozilla.org/ja/docs/Web/API/Console/log)
22
+
23
+
24
+
25
+ console.logにオブジェクトを引数として指定すると、そのオブジェクトの文字列表現を出力します。
26
+
27
+ 出力の差はtoStringの定義の違いかと思いましたが、定義からはそのような違いをすぐには見つけられませんでした。
28
+
29
+ おそらく、HTMLElementについてはHTML要素としての文字列表現を返すような実装となるようにブラウザ側で対応しているのではないかと思いますが、それがわかる資料は見つけられていません。