In the chrome developer console, type $x.toString() ($x is one of the built-in functions of the dev tools console). The output looks like this:
"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;
}
}"
What is the meaning of “bound: “, in the first line?
$xis a builtin function in webkit Developer Tools’ console, like$,$$and others. TheCommandLineAPI(used for console script evaluation) overwrites all the console methods’toStringfunctions to include the"bound: "prefix:A full list of console functions wrapped this way can be found here.