Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue that some applications cannot be rendered #61

Open
wants to merge 1 commit into
base: nw19
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion extensions/renderer/resources/app_window_custom_bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ appWindow.registerCustomHook(function(bindingsAPI) {
apiFunctions.setHandleRequest('getAll', function() {
var views = runtimeNatives.GetExtensionViews(-1, -1, 'APP_WINDOW');
return $Array.map(views, function(win) {
try_nw(win).nw.Window.get(); //construct the window object for NWJS#5294
if (win.nw) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are replacing try_nw() with your own logic, which is incorrect ... in some cases 'nw' is defined in privates(win).

Please do not use your own version. Keep the try_nw() function and test 'nw' here.

try_nw(win).nw.Window.get(); //construct the window object for NWJS#5294
}
return try_hidden(win).chrome.app.window.current();
});
});
Expand Down