Old version of Electron only had 'showMessageBox' function,
and it handled sync and async mode under binded C++ function.
Now new Electron export 'showMessageBoxSync' function separatly
and it works as sync mode of old 'showMessageBox'.
To handle both functions with one source code, this patch makes
addonapi method to use logical function fallback.
Change-Id: I97c06ebff302c7e3770166fe162c53ea251f05b0
Signed-off-by: ws29.jung <ws29.jung@samsung.com>
showMessageBox: function (winId, options) {
let window = TopLevelWindow.fromId(winId);
- dialog.showMessageBox(window, options, null);
+ let showMessageBox = (dialog.showMessageBoxSync || dialog.showMessageBox);
+ showMessageBox(window, options);
},
show: function (winId) {
let window = TopLevelWindow.fromId(winId);
window.show();
}
-}
\ No newline at end of file
+}