問題描述
WebKit/Safari 支持控制臺對象,這類似于 Firebug 所做的.但究竟支持什么?有一個 Firebug 的控制臺文檔,但我在哪里可以找到 Safari/的控制臺文檔WebKit?
WebKit/Safari supports the console object, which is similar to what Firebug does. But what exactly is supported? There is a console documentation for Firebug, but where can I find the console documentation for Safari/WebKit?
推薦答案
支持的方法原來是:
console.log()
console.error()
console.warn()
console.info()
較新版本的 WebKit 還添加了以下方法,使 WebKit 控制臺 API 幾乎與 Firebug 的控制臺 API 相同:
Newer versions of WebKit also add the following methods making the WebKit console API almost identical to Firebug's console API:
console.count()
console.debug()
console.profileEnd()
console.trace()
console.dir()
console.dirxml()
console.assert()
console.time()
console.profile()
console.timeEnd()
console.group()
console.groupEnd()
(基于 WebKit nightly build WebKit-SVN-r37126 的新信息,在撰寫本文時這些方法在 Safari 中不可用)
(New information based on the WebKit nightly build WebKit-SVN-r37126, at the time of writing these methods aren't available in Safari)
這篇關于WebKit/Safari 的控制臺 API 在哪里?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!