Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ document will be implicitly polyfilled.

### roots

type: `(Document | HTMLElement)[]`, default: `[document]`
type: `(Document | HTMLElement | ShadowRoot)[]`, default: `[document]`

By default the polyfill applies to `document`, but you can configure one or more
shadow roots the polyfill should apply to using this option. See the
Expand Down
2 changes: 1 addition & 1 deletion src/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ async function position(rules: AnchorPositions, useAnimationFrame = false) {
}
}

export type AnchorPositioningRoot = Document | HTMLElement;
export type AnchorPositioningRoot = Document | HTMLElement | ShadowRoot;

export interface AnchorPositioningPolyfillOptions {
// Whether to use `requestAnimationFrame()` when updating target elements’
Expand Down
Loading