     }
 }
 
-extension ZHWebViewContentController: UIWebViewDelegate {
-    // update js contenxt
-    func webViewDidFinishLoad(_ webView: UIWebView) {
-        updateJsContextIfNeeded()
-    }
-    
-    func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -> Bool {
-        if let handled = handleRequestBlock?(webView, request) {
-            return !handled
-        }
-        return true
-    }
-}
-
-open class ZHWebViewBridge {
+open class ZHWebViewBridge: ZHRequestHandler {
     fileprivate var handlerMapper:[String: (([Any]) -> (Bool, [Any]?))] = [:]
 
     fileprivate(set) weak var bridge:ZHWebViewBridgeProtocol?

        let contentController = ZHWebViewContentController.init(webView: webView, proxyDelegate: proxyDelegate)
        contentController.addUserPlugin(ZHWebViewBridgeJS)
        contentController.addScriptMessageHandler(ZHBridgeWBScriptMessageHandler.init(bridge: bridge), name: ZHBridgeName)
        contentController.handleRequestBlock = { (wb:UIWebView, request:URLRequest) -> Bool in
            return bridge.handleRequest(request)
        }
        bridge.contentController = contentController
        
        return bridge

    
    /// update js contentx if needed
    func updateJsContextIfNeeded() {
        guard let context = webView?.value(forKeyPath: jsContextPath) as? JSContext else {
            return
        }
        
