|
@@ -282,8 +282,23 @@ module.exports = {
|
|
|
return binding.showErrorBox(...args)
|
|
|
},
|
|
|
|
|
|
- showCertificateTrustDialog: function (...args) {
|
|
|
- return binding.showCertificateTrustDialog(...args)
|
|
|
+ showCertificateTrustDialog: function (window, options, callback) {
|
|
|
+ if (options == null || typeof options !== 'object') {
|
|
|
+ throw new TypeError('options must be an object')
|
|
|
+ }
|
|
|
+
|
|
|
+ let {certificate, message} = options
|
|
|
+ if (certificate == null || typeof options !== 'object') {
|
|
|
+ throw new TypeError('certificate must be an object')
|
|
|
+ }
|
|
|
+
|
|
|
+ if (message == null) {
|
|
|
+ message = ''
|
|
|
+ } else if (typeof message !== 'string') {
|
|
|
+ throw new TypeError('message must be a string')
|
|
|
+ }
|
|
|
+
|
|
|
+ return binding.showCertificateTrustDialog(window, certificate, message, callback)
|
|
|
}
|
|
|
}
|
|
|
|