MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / findNode

Function findNode

src/test/resources/libraries/ExtJS/2.2/ext-all-debug.js:35245–35265  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

35243 var styleRe = /\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;
35244
35245 function findNode(n){
35246 if(!n || n.nodeType != 1 || n == document.body || n == document){
35247 return false;
35248 }
35249 var pn = [n], p = n;
35250 while((p = p.parentNode) && p.nodeType == 1 && p.tagName.toUpperCase() != 'HTML'){
35251 pn.unshift(p);
35252 }
35253 var cn = hnode;
35254 for(var i = 0, len = pn.length; i < len; i++){
35255 cn.expand();
35256 cn = cn.findChild('htmlNode', pn[i]);
35257 if(!cn){ return false;
35258 }
35259 }
35260 cn.select();
35261 var a = cn.ui.anchor;
35262 treeEl.dom.scrollTop = Math.max(0 ,a.offsetTop-10);
35263 cn.highlight();
35264 return true;
35265 }
35266
35267 function nodeTitle(n){
35268 var s = n.tagName;

Callers

nothing calls this directly

Calls 4

unshiftMethod · 0.80
maxMethod · 0.80
selectMethod · 0.65
highlightMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…