0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-08-06 06:47:38 +00:00

add some comments

This commit is contained in:
Gazook89
2026-04-26 10:44:52 -05:00
parent 5b11827c56
commit d368e53b30
2 changed files with 14 additions and 4 deletions
@@ -1,7 +1,14 @@
/*
This file basically checks support for Anchor Positioning API in the browser,
and then loads the Oddbird polyfill if support is lacking.
*/
let polyfillPromise;
// look for `anchorName` in the computed styles
const supportsAnchorPositioning = ()=>'anchorName' in document.documentElement.style;
// wait for initial render
const afterInitialRender = ()=>new Promise((resolve)=>{
requestAnimationFrame(()=>{
requestAnimationFrame(resolve);