Make Menu API accept TopLevelWindow

This commit is contained in:
Cheng Zhao 2018-04-17 17:14:49 +09:00
parent 1340b17424
commit 7473b612c5
10 changed files with 41 additions and 40 deletions

View file

@ -17,4 +17,8 @@ TopLevelWindow.prototype._init = function () {
}
}
TopLevelWindow.getFocusedWindow = () => {
return TopLevelWindow.getAllWindows().find((win) => win.isFocused())
}
module.exports = TopLevelWindow