Skip to content

Commit 6ba286d

Browse files
authored
feat(ios): Add overrideable router var for CAPWebView. (#5743) (#5760)
1 parent 9c25aad commit 6ba286d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ios/Capacitor/Capacitor/CAPWebView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ open class CAPWebView: UIView {
2525
private lazy var configuration = InstanceConfiguration(with: configDescriptor, isDebug: CapacitorBridge.isDevEnvironment)
2626

2727
private lazy var assetHandler: WebViewAssetHandler = {
28-
let handler = WebViewAssetHandler(router: _Router())
28+
let handler = WebViewAssetHandler(router: router)
2929
handler.setAssetPath(configuration.appLocation.path)
3030
return handler
3131
}()
3232

3333
private lazy var delegationHandler = WebViewDelegationHandler()
3434

35+
open var router: Router { _Router() }
36+
3537
public required init?(coder: NSCoder) {
3638
super.init(coder: coder)
3739
setup()

0 commit comments

Comments
 (0)