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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user