With the new Navigation API, you can now show the native spinner + stop button for any asynchronous operation - all you need is a Promise.
@developit Very cool, thank you for sharing Jason ๐Ÿ’œ
@developit Whoa that's dope ๐Ÿ˜ณ
But how will I know if something is doing client side navigation or not ๐Ÿ˜‚
@sarcevic heh. you'll know because nobody will use this for another ~2 years.
@developit @sarcevic network tab from dev tool, I choose you!
@developit This is awesome ๐ŸคŒ
@developit That's rad! Didn't realize you could do that. Thanks for sharing!
@developit Woah this is so cool!
@developit This doesn't look like it stays active for the entire length of time. Am I wrong?

@developit So the user can hit the Stop button to cancel whatever is loading? It would be easy for them to accidentally hit Reload if the thing finishes (promise resolves) a moment before the user expects.

I actually think the loading indicator and reload button being reliably controlled by the browser is what makes them so great. If the site can control it, my trust goes down.

Plus the loading indicator kinda has negative connotations (this site is slow).

@royalicing these are all very much accounted for in the browser UI and spec design. Example: The refresh button is inert for a few seconds and until cursor movement when it switches from stop to refresh.
@royalicing hitting stop does cancel this, yes (you get an AbortSignal). Agreed about the negative connotation, but tbh I'd still rather this versus the existing hodgepodge of bespoke spinners and loading treatments (skeleton shimmers ๐Ÿ˜ฎโ€๐Ÿ’จ)

@developit True, itโ€™s almost a cultural thing. If the loading indicator can be used consistently and reliably then this will be better. Maybe if it had a slightly different symbol or colour then I as a user know which Loading or Stop will happen?

Yeah I agree skeleton UI is totally over used. A bandaid on top of slow responses.

@developit nice! And something similar on touch devices like phones?
@developit I've wanted this for SO LONG
@aredridel @developit for which use case(s)?
@zyklop @developit all interruptible action and activity signaling. I want modern web stuff to behave more like the web. So tired of things like stop, back, forward, reload and scroll being only 50% implemented.
@developit this is awesome!! Iโ€™m loving all the cool stuff that browsers can do natively nowadays
@developit Fascinating! Thanks for sharing. Now trying to think of scenarios I would actually like to use this for...

@developit Sweet new feature for theannoyingsite.com ๐Ÿ˜‚ (DO NOT CLICK THAT LINK)

This is an awesome API though, thanks for sharing!