From c6b3f792bc907268658e6e700bbafd70fc75e029 Mon Sep 17 00:00:00 2001 From: Steven Sherry Date: Tue, 5 Jul 2022 12:58:14 -0500 Subject: [PATCH] feat(ios): Add overrideable router var for CAPWebView. --- ios/Capacitor/Capacitor/CAPWebView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Capacitor/Capacitor/CAPWebView.swift b/ios/Capacitor/Capacitor/CAPWebView.swift index f7d3784f62..a0a27cbe58 100644 --- a/ios/Capacitor/Capacitor/CAPWebView.swift +++ b/ios/Capacitor/Capacitor/CAPWebView.swift @@ -25,13 +25,15 @@ open class CAPWebView: UIView { private lazy var configuration = InstanceConfiguration(with: configDescriptor, isDebug: CapacitorBridge.isDevEnvironment) private lazy var assetHandler: WebViewAssetHandler = { - let handler = WebViewAssetHandler(router: _Router()) + let handler = WebViewAssetHandler(router: router) handler.setAssetPath(configuration.appLocation.path) return handler }() private lazy var delegationHandler = WebViewDelegationHandler() + open var router: Router { _Router() } + public required init?(coder: NSCoder) { super.init(coder: coder) setup()