electron - How to reset the renderer javascript context in atom-shell -
in standard browser, loading new url reset javascript context. ie. global variables, compiled functions , events cleared, , browser start clean slate.
in atom-shell however, calling mainwindow.loadurl
load new html file, keep javascript context alive. , variables need deleted hang around. how can tell atom-shell wipe out whole javascript context on renderer side?
check out browserwindow.reload()
or webcontents.reload()
.
if on 'renderer' side, can use remote.getcurrentwindow().reload()
https://github.com/atom/atom-shell/blob/master/docs/api/browser-window.md#browserwindowreload
if want wipe 'javascript context' on browser side too, need dereference window , create new window.
Comments
Post a Comment