Window:dump() 方法

非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!

Window.dump() 方法将消息输出到浏览器的标准输出(stdout)。如果浏览器是从终端启动的,通过 dump() 发送的输出将出现在该终端中。

dump() 输出的内容不会被发送到浏览器的开发者工具控制台。要向开发者工具控制台输出日志,请使用 console.log()

语法

js
dump(message)

参数

message

包含要输出信息的字符串。

返回值

无(undefined)。

规范

不属于任何规范。

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
dump
Non-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Non-standard. Check cross-browser support before using.
User must explicitly enable this feature.
Has more compatibility info.