Feature: Allow webview inspection

This commit is contained in:
yicheng 2018-08-29 23:34:31 +08:00
parent c7bb2b3ffb
commit 565b2501ec
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ class ClashWebViewContoller: NSViewController {
bridge = JsBridgeHelper.initJSbridge(webview: webview, delegate: self)
webview.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled")
NotificationCenter.default.rx.notification(kConfigFileChange).bind {
[weak self] (note) in
self?.bridge?.callHandler("onConfigChange")