Skip to content

Commit

Permalink
Fix nwjs#5312: call nw.Window.get() on new DOM creation
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Sep 19, 2016
1 parent f0ebfa8 commit c53ddf4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/resources/api_nw_window.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,14 @@ function onClose(user_force) {
dispatchEvent("nw.Window.onClose", [user_force], {instanceId: currentWidgetRoutingID});
}

function get_nw() {
try_nw(window).nw.Window.get();
}

if (bgPage !== window) {
renderFrameObserverNatives.OnDocumentElementCreated(currentRoutingID, get_nw);
}

exports.binding = nw_binding.generate();
exports.onNewWinPolicy = onNewWinPolicy;
exports.onNavigation = onNavigation;
Expand Down

0 comments on commit c53ddf4

Please sign in to comment.