Skip to content

Commit

Permalink
Use document.documentElement.style instead of CSS.supports()
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Oct 16, 2024
1 parent e1075b0 commit d1d1285
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
<script type="module">
import polyfill from '/src/index-fn.ts';

const SUPPORTS_ANCHOR_POSITIONING = CSS.supports('anchor-name: --a');
const SUPPORTS_ANCHOR_POSITIONING =
'anchorName' in document.documentElement.style;

const btn = document.getElementById('apply-polyfill');

Expand Down

0 comments on commit d1d1285

Please sign in to comment.