🔗ally.is.activeElement
Determines if an element is the activeElement of its host context, i.e. its document, iFrame or ShadowHost.
🔗Usage
var element = document.getElementById('victim');
var isActiveElement = ally.is.activeElement(element);
🔗Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| element | HTMLElement | required | The Element to test. |
🔗Returns
Boolean, true if the element is the activeElement of its host context.
🔗Throws
TypeError if element argument is not of type HTMLElement.
🔗Changes
- Added in
v#master.