Skip to content

Commit

Permalink
feat(ios): Add overrideable router var for CAPWebView. (#5743) (#5760)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven0351 authored Jul 13, 2022
1 parent 9c25aad commit 6ba286d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/Capacitor/Capacitor/CAPWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6ba286d

Please sign in to comment.