webkit开发人员工具'window.console._commandLineAPI`的文档

时间:2012-12-01 18:45:43

标签: javascript google-chrome

我发现如果我退出chrome dev控制台中调用的函数,我最终会得到这个源代码:

with ((window && window.console && window.console._commandLineAPI) || {}) {
myFunction()
}

有一些与此相关的问题描述了控制台中的一些奇怪的怪癖,但它们在这里并不相关。

如果我在控制台中键入window.console._commandLineAPI,我会得到一大堆成员名称,其中一些比其他名称更有用:

$$: function () { [native code] }
$_: undefined
$x: function () { [native code] }
clear: function () { [native code] }
copy: function () { [native code] }
dir: function () { [native code] }
dirxml: function () { [native code] }
get $0: function () { [native code] }
get $1: function () { [native code] }
get $2: function () { [native code] }
get $3: function () { [native code] }
get $4: function () { [native code] }
getEventListeners: function () { [native code] }
inspect: function () { [native code] }
keys: function () { [native code] }
monitorEvents: function () { [native code] }
profile: function () { [native code] }
profileEnd: function () { [native code] }
set $0: undefined
set $1: undefined
set $2: undefined
set $3: undefined
set $4: undefined
unmonitorEvents: function () { [native code] }
values: function () { [native code] }
__proto__: CommandLineAPI

这些功能的作用是否有任何文件?

2 个答案:

答案 0 :(得分:1)

这听起来像FireBug command line API

答案 1 :(得分:0)

您可以找到文档here

相关问题