|||

Make Alpine 3 support legacy browsers

Today I learned that AlpineJS 3.x uses queueMicrotask — and that that’s an API not supported in Firefox < 69 and Safari < 12.1 (see caniuse for full support information).

Luckily, this can easily be polyfilled:

if (typeof window.queueMicrotask !== "function") {
    window.queueMicrotask = function (callback) {
      Promise.resolve()
        .then(callback)
        .catch(e => setTimeout(() => { throw e; }));
    };
}

Polyfilling queueMicrotask

Up next Setup Statamic Static Caching
Latest posts Pros and Cons of Reflect Notes App A Love Letter to Sublime Internet Lazy.so is an amazing tool. Here's why I don't keep it Look Around You Don’t ask what the world needs Carl Sagan has shown the absurdity of not acting against climate change back in 1990 On the plus sides of being a web designer Friday Deployment A success message that communicates the opposite of success Do not demand to be appreciated Craft Docs vs Bear Notes Figma AI Rant Epomaker TH80 Pro Polyamor, aber mit PKM apps 🫣 Ironie, die Fabi Rommel Helft der Natur Stimmen im Kopf - Flohmarkt croox website online Tiny Garden Paradise Oktober in Europa Figma Rant: forever assembling iCloud Drive Rant Schwiegerfuchs Same Vibe Tailwind and Web Craftsmanship Buttons with CSS Expand Basic Markdown Formatting in Apple Notes Cannot Divide by Zero in Peak Picture Partial Applying a Growth Mindset (Doodle) When Gmail Messages deleted in Apple Mail keep coming back