Skip to content

Commit

Permalink
feat(ios): Add overrideable router var for CAPWebView. (#5743)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven0351 authored Jul 12, 2022
1 parent 902e1f5 commit c1de1c0
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 c1de1c0

Please sign in to comment.