Skip to content

ally.js

JavaScript library to help modern web applications with accessibility concerns by making accessibility simpler

# ally.get.shadowHostParents

Identifies the ShadowHost ancestry of an element

# Usage

var elements = ally.get.shadowHostParents({
  context: '#element-to-start-from',
});

# Arguments

Name Type Default Description
context <selector> required The element to start searching from. The first element of a collection is used.

# Returns

Array of HTMLElement that is sorted `[element, ShadowHost, …].

# Throws

TypeError if context option is not specified.

# Contributing