The goog.cssom.iframe.style.CssSelector_ Class

.matchElementAncestry(elementAncestry)

Tests to see what part of a DOM element hierarchy would be matched by this selector, and returns the indexes of the matching element and matching selector part.

For example, given this hierarchy: document > html > body > div.content > div.sidebar > p and this CSS selector: body div.sidebar h1 This would return {elementIndex: 4, selectorPartIndex: 1}, indicating that the element at index 4 matched the css selector at index 1.

elementAncestry {goog.cssom.iframe.style.NodeAncestry_}
Object representing an element and its ancestors.
returns {Object}
Object with the properties elementIndex and selectorPartIndex, or null if there was no match.