layout | tags |
---|---|
doc-api.html |
argument-options |
Identifies all the branches of the DOM that do not contain any of the target elements
The insignificant branches contain all highest level nodes (looking from the root context
) that do not contain any target elements (specified in filter
). For the following HTML, the insignificant branches of #target
are [#sibling, #uncle-1, #uncle-2]
. The insignificant branches of [#target, #target-2]
are [#sibling, #uncle-1, #cousin-2]
:
<div id="uncle-1">
<div id="cousin-1"></div>
</div>
<div id="parent">
<div id="target"></div>
<div id="sibling"></div>
</div>
<div id="uncle-2">
<div id="cousin-2"></div>
<div id="target-2"></div>
</div>
var elements = ally.get.insignificantBranches({
filter: '#target',
});
Name | Type | Default | Description |
---|---|---|---|
context | <selector> |
documentElement |
The scope of the DOM in which to search. The first element of a collection is used. |
filter | <selector> |
required | The significant elements to exclude from the search. |
Array of HTMLElement
.
TypeError
if filter
option is not specified.
- Since
v1.1.0
thecontext
option can point to another document (e.g.<body>
in an iframe)
ally.maintain.hidden
is a service hiding insignificant branches from the Accessibility Tree