我在測試JQuery時看到了Chrome的自動填充建議,並且看到$$
和$x
被定義。他們是什麼,他們來自哪裏?我看到What is the variable $x used for in Chrome?,但$$
是什麼?
> $
function (selector, context) {
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init(selector, context, rootjQuery);
} jquery.js?body=1:62
> $$
function $$() { [Command Line API] }
> $x
function $x() { [Command Line API] }
這是ogooglebar的東西。
https://developers.google.com/chrome-developer-tools/docs/commandline-api#selector_1 –
對不起,在近距離投票中跳了一下槍,那個只覆蓋'$ x()'。 symbolhound是一個開始尋找像這樣的東西的好地方:http://symbolhound.com/?q=webkit+%24%24 –