offliner
offliner copied to clipboard
When connected from an offliner-client, make offliner to dispatch the activationPending event if proceeds.
If for some reason, in the last activationPending
event, the new version did not get activated, the event won't be dispatched again unless the developer makes a explicit call to offlinerClient.update()
.
This could be problematic in the scenario where the worker file is modified at byte level and the strategy is to update on modification only. To do that, the strategy must check if isCalledFromInstall
flag is set and if it is, return true
. When calling update()
from the offline client, the flag is not set and it's not possible to distinguish there were a byte level change.
Of course, the strategy could set a custom flag for it and keep track of it but as there is no way to for the update strategy to be notified when an activation is done, this flag could not be unset safely.
Allowing offliner
to dispatch the activationPending
event in case of a client connecting to it sounds totally reasonable and cover most of the cases.