After you get problems with unavailable references then get rid of the async or defer from this example and spend some minutes later on to find out how you could appropriately load js assets asynchronously now. Callbacks activated if the window is closing. The key word this In the callback https://jaredggkmn.dreamyblogs.com/37392779/5-simple-techniques-for-winbox-h5