layout | tags |
---|---|
doc-api.html |
argument-list, shadow-dom |
Determines if an element is the descendant of a ShadowRoot
.
var element = document.getElementById('victim');
var isShadowed = ally.is.shadowed(element);
Name | Type | Default | Description |
---|---|---|---|
element | HTMLElement |
required | The Element to test. |
Boolean, true
if the element is hosted in a ShadowRoot
.
TypeError
if element
argument is not of type HTMLElement
.
:::note Requires ShadowDOM support. :::