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: I36a73106d451672c51c3aebbd1ecb92a25be3c02
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
+}