You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If someone wants to PR this or make it better, that'd be cool
constOnLine=resource(({ on })=>{letonline=cell(navigator.onLine);letcleanup=newAbortController();letsignal=cleanup.signal;window.addEventListener("offline",(e)=>online.current='you are offline',{ signal });window.addEventListener("online",(e)=>online.current='you are online',{ signal });on.cleanup(()=>signal.abort());return()=>online.current;});
Usage:
{{OnLine}}
or
classFoo{
@useonline=OnLine;}
The text was updated successfully, but these errors were encountered:
If someone wants to PR this or make it better, that'd be cool
Usage:
or
The text was updated successfully, but these errors were encountered: