@empathyco/x-components
Version:
Empathy X Components
73 lines (34 loc) • 1.03 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [isElementEqualOrContained](./x-components.iselementequalorcontained.md)
## isElementEqualOrContained() function
Returns true if the two elements are the same, or if `b` is a child of `a`<!-- -->.
**Signature:**
```typescript
export declare function isElementEqualOrContained(a: Element, b: Element): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
a
</td><td>
Element
</td><td>
The element to check if it is equal to `b` or if it contains `b`<!-- -->.
</td></tr>
<tr><td>
b
</td><td>
Element
</td><td>
The element to check if it is equal to `a` or contained inside it.
</td></tr>
</tbody></table>
**Returns:**
boolean
True if `a` is equal to `b` or if it contains `b`<!-- -->.