Lines Matching refs:rng
311 var nodes=null, candidates=[], children, el, parent, rng;
314 rng=getSelectionRange();
315 if(rng) {
316 parent=getCommonAncestor(rng);
340 if(r2 && rangeContact(rng, r2))
353 var rng=null;
355 rng=win.getSelection();
356 if(rng && rng.rangeCount && rng.getRangeAt) {
357 rng=rng.getRangeAt(0);
360 rng=doc.selection.createRange();
363 return rng;
367 function getCommonAncestor(rng) { argument
368 return rng.parentElement ?
369 rng.parentElement() : rng.commonAncestorContainer;
410 var rng=null;
412 rng=doc.body.createTextRange();
413 rng.moveToElementText(el);
415 rng=doc.createRange();
416 rng.selectNodeContents(el);
418 return rng;