// Whether the active focused element is under the article container. varisFocused = dom.testDescendant(document.activeElement, document.querySelector('.article'));
Parameters
element: HTMLElement
The child element
parentElement: HTMLElement
The possible parent element
Returns boolean
Whether element is a descendant of the provided parent element.
Tests whether a given element is a descendant of another elemenet.
Examples: