window.onbeforeunload = function()

in src/Popout.tsx [31:44]


            window.onbeforeunload = function(e) {
                var result = window.opener.${
                    globalContext.id
                }.onBeforeUnload.call(window, '${id}', e);

                if (result) {
                    window.opener.${globalContext.id}.startMonitor.call(window.opener, '${id}');

                    e.returnValue = result;
                    return result;
                } else {
                    window.opener.${globalContext.id}.onChildClose.call(window.opener, '${id}');
                }
            }`;