Skip to content

Commit c53ddf4

Browse files
committed
Fix nwjs#5312: call nw.Window.get() on new DOM creation
1 parent f0ebfa8 commit c53ddf4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/resources/api_nw_window.js

+8
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,14 @@ function onClose(user_force) {
749749
dispatchEvent("nw.Window.onClose", [user_force], {instanceId: currentWidgetRoutingID});
750750
}
751751

752+
function get_nw() {
753+
try_nw(window).nw.Window.get();
754+
}
755+
756+
if (bgPage !== window) {
757+
renderFrameObserverNatives.OnDocumentElementCreated(currentRoutingID, get_nw);
758+
}
759+
752760
exports.binding = nw_binding.generate();
753761
exports.onNewWinPolicy = onNewWinPolicy;
754762
exports.onNavigation = onNavigation;

0 commit comments

Comments
 (0)