MCPcopy
hub / github.com/hoothin/UserScripts / getElementByXpath

Function getElementByXpath

Picviewer CE+/dist.user.js:13646–13650  ·  view source on GitHub ↗
(xpath,contextNode,doc)

Source from the content-addressed store, hash-verified

13644
13645 //xpath 获取单个元素
13646 function getElementByXpath(xpath,contextNode,doc){
13647 doc=doc || document;
13648 contextNode=contextNode || doc;
13649 return doc.evaluate(xpath,contextNode,null,9,null).singleNodeValue;
13650 }
13651
13652
13653 //事件支持检测.

Callers 1

getElementMixFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected