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
The JS function specified by on-jsload is called right after the code is reloaded. It would be useful to have a similar handle allowing to define a JS function called right before the code is reloaded, in the previous context.
A concrete use-case is to be able to close AudioContext. AudioContext leak system resources if not properly closed. After a couple of reload (6 with current chrome) you can't create new AudioContext if they have not been closed.
The text was updated successfully, but these errors were encountered:
Leaving this up to the app also allows app to handle more complex cases like when closing something is a async operation and has to be completed before new connection or such is opened. This is possible to implement by using core.async in init!.
I'd rather not have too much development specific logic in my production code. It can become messy pretty quick and would prefer to keep both separated.
The scenario you describe makes sens. If such requirement arise it could be supported in the boot-reload counterpart. For instance the function hook could receive a function parameter that would need to be called by the user to let the reload happen.
The JS function specified by
on-jsload
is called right after the code is reloaded. It would be useful to have a similar handle allowing to define a JS function called right before the code is reloaded, in the previous context.A concrete use-case is to be able to
close
AudioContext.AudioContext
leak system resources if not properly closed. After a couple of reload (6 with current chrome) you can't create newAudioContext
if they have not been closed.The text was updated successfully, but these errors were encountered: