File size: 654 Bytes
bee6636 |
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 |
import { ScramjetClient } from "./client";
export type ScramjetEvent =
| NavigateEvent
| UrlChangeEvent
| ScramjetContextEvent;
export type ScramjetEvents = {
navigate: NavigateEvent;
urlchange: UrlChangeEvent;
contextInit: ScramjetContextEvent;
};
export class NavigateEvent extends Event {
constructor(public url: string) {
super("navigate");
}
}
export class UrlChangeEvent extends Event {
constructor(public url: string) {
super("urlchange");
}
}
export class ScramjetContextEvent extends Event {
constructor(
public window: Self,
public client: ScramjetClient
) {
super("contextInit");
}
}
|