htmlWindowOnClose function

void htmlWindowOnClose(
  1. Function action
)

Setup a callback action on browser unload

Implementation

void htmlWindowOnClose(Function action) {
  html.window.onBeforeUnload.listen((event) async => action());
  html.window.onUnload.listen((event) async => action());
}