From c4280612c12bae2aad75dbb748af7c816388a1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Herrmann?= Date: Wed, 22 Feb 2017 11:49:14 +0100 Subject: [PATCH] update setCertificateVerifyProc example setCertificateVerifyProc example should reflect new api --- docs/api/session.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/api/session.md b/docs/api/session.md index f04d45195f9..aeda16d38b0 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -274,8 +274,13 @@ verify proc. const {BrowserWindow} = require('electron') let win = new BrowserWindow() -win.webContents.session.setCertificateVerifyProc((hostname, cert, callback) => { - callback(hostname === 'github.com') +win.webContents.session.setCertificateVerifyProc((request, callback) => { + const {hostname} = request + if(hostname === 'github.com') { + callback(0) + } else { + callback(-2) + } }) ```