在 chrome 开发者控制台中,输入$x.toString()
($x
是开发工具控制台的内置功能之一)。输出如下所示:
"bound: function (xpath, context)
{
var doc = (context && context.ownerDocument) || inspectedWindow.document;
var result = doc.evaluate(xpath, context || doc, null, XPathResult.ANY_TYPE, null);
switch (result.resultType) {
case XPathResult.NUMBER_TYPE:
return result.numberValue;
case XPathResult.STRING_TYPE:
return result.stringValue;
case XPathResult.BOOLEAN_TYPE:
return result.booleanValue;
default:
var nodes = [];
var node;
while (node = result.iterateNext())
nodes.push(node);
return nodes;
}
}"
第一行中的“绑定:”是什么意思?