MCPcopy Create free account
hub / github.com/microsoft/SandDance / getChildPosition

Function getChildPosition

docs/app/js/sanddance-app.js:6739–6743  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

6737 if ((element === document.body || element === container) && activeElementInfo.childPositions.length) return activeElementInfo;
6738}
6739function getChildPosition(element) {
6740 let childPosition = 0;
6741 while(element = element.previousElementSibling)childPosition++;
6742 return childPosition;
6743}
6744function tagNamespace(tag) {
6745 //issue: this won't disambiguate certain tags which exist in both svg and html: <a>, <title> ...
6746 if (tag === "svg" || svgTagArray.indexOf(tag) >= 0 && !(htmlTagArray.indexOf(tag) >= 0)) return "http://www.w3.org/2000/svg";

Callers 1

getActiveElementInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected