Replies: 1 comment
-
if you call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
related to this discussion
I ask something about listening to the online / offline events.
In onlineManager.ts, The setup method of the OnlineManager class puts a callback function that receives a boolean value of online as a parameter when online / offline events of the window occur. But the callback function doesn't actually receive the online value as a parameter, so when does this.setOnline(online) statement get executed? It seems that only the this.onOnline() statement will always be executed.
For example, if onlineManager.setOnline(false) is executed 3 seconds after entering a web page where the network is online, and then the network is disconnected and reconnected, the online event will occur, but the online value of onlineManager is still false, so the api call will not run.
Isn't it correct to change onlineManager's setup function as follows?
Beta Was this translation helpful? Give feedback.
All reactions