So I’m trying to execute a command with the help of ‘https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload’ or onbeforeunload.
I’ve added an event listener to a js node in the setup part and it seems to at least do a console.log on refresh/close of browser window. The part that I’m missing is actually passing some values to the listener. I guess this is more a general js question rather than noodl. If I create the event listener in the setup part of the JS node, how do I change values within the listener function later?
What I’m hoping to achieve is to ‘remove id’ from a collection node at closing/refresh time of a client window. And so on ‘setup’ I might not have the ID ready yet.
Thanks for helping!