-
Notifications
You must be signed in to change notification settings - Fork 429
/
index.ts
42 lines (33 loc) · 1.03 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { Adapter } from "./native/adapter"
import { Session } from "./session"
import { Locatable } from "./url"
import { StreamMessage } from "./streams/stream_message"
import { StreamSource } from "./types"
import { VisitOptions } from "./drive/visit"
const session = new Session
const { navigator } = session
export { navigator }
export function start() {
session.start()
}
export function registerAdapter(adapter: Adapter) {
session.registerAdapter(adapter)
}
export function visit(location: Locatable, options?: Partial<VisitOptions>) {
session.visit(location, options)
}
export function connectStreamSource(source: StreamSource) {
session.connectStreamSource(source)
}
export function disconnectStreamSource(source: StreamSource) {
session.disconnectStreamSource(source)
}
export function renderStreamMessage(message: StreamMessage | string) {
session.renderStreamMessage(message)
}
export function clearCache() {
session.clearCache()
}
export function setProgressBarDelay(delay: number) {
session.setProgressBarDelay(delay)
}