Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Convenience initializer to not expose Session
Browse files Browse the repository at this point in the history
  • Loading branch information
joemasilotti committed Nov 7, 2023
1 parent 74124a0 commit ee81553
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/TurboNavigator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public class TurboNavigator: TurboNavigationHierarchyControllerDelegate {
defer { self.webkitUIDelegate = TurboWKUIController(delegate: self) }
}

public convenience init(pathConfiguration: PathConfiguration, delegate: TurboNavigatorDelegate? = nil) {
let session = Session()
session.pathConfiguration = pathConfiguration

let modalSession = Session()
session.pathConfiguration = pathConfiguration

self.init(session: session, modalSession: modalSession, delegate: delegate)
}

/// Transforms `URL` -> `VisitProposal` -> `UIViewController`.
/// Given the `VisitProposal`'s properties, push or present this view controller.
///
Expand Down

0 comments on commit ee81553

Please sign in to comment.