diff --git a/README.md b/README.md index 609976db..2e169576 100644 --- a/README.md +++ b/README.md @@ -42,36 +42,74 @@ You can view a more complete demo [here](https://anchor-polyfill.netlify.app/). ## Configuration -The polyfill accepts one argument (type: `boolean`, default: `false`), which -determines whether anchor calculations should [update on every animation -frame](https://floating-ui.com/docs/autoUpdate#animationframe) (e.g. when the -anchor element is animated using `transform`s), in addition to always updating -on scroll/resize. While this option is optimized for performance, it should be -used sparingly. +The polyfill supports a small number of options. When using the default version +of the polyfill that executes automatically, options can be set by setting the +value of `window.ANCHOR_POSITIONING_POLYFILL_OPTIONS`. ```js ``` -When using the default version of the polyfill that executes automatically, this -option can be set by setting the value of -`window.UPDATE_ANCHOR_ON_ANIMATION_FRAME`. +When manually applying the polyfill, options can be set by passing an object as +an argument. ```js ``` +### elements + +type: `HTMLElements[]`, default: `undefined` + +If set, the polyfill will only be applied to the specified elements instead of +to all styles. Any specified `` and `