layout | tags |
---|---|
doc-api.html |
argument-list, shadow-dom |
Determines if an element is the activeElement of its host context, i.e. its document, iFrame or ShadowHost.
var element = document.getElementById('victim');
var isActiveElement = ally.is.activeElement(element);
Name | Type | Default | Description |
---|---|---|---|
element | HTMLElement |
required | The Element to test. |
Boolean, true
if the element is the activeElement of its host context.
TypeError
if element
argument is not of type HTMLElement
.
- Added in
v1.1.0
.