File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ import { ScramjetClient } from "./client" ;
2+
13export type ScramjetEvent =
24 | NavigateEvent
35 | UrlChangeEvent
@@ -21,7 +23,10 @@ export class UrlChangeEvent extends Event {
2123}
2224
2325export class ScramjetContextEvent extends Event {
24- constructor ( public window : Self ) {
26+ constructor (
27+ public window : Self ,
28+ public client : ScramjetClient
29+ ) {
2530 super ( "contextInit" ) ;
2631 }
2732}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ if (!(SCRAMJETCLIENT in <Partial<typeof self>>self)) {
3030 runtime . hook ( ) ;
3131 }
3232
33- const contextev = new ScramjetContextEvent ( client . global . window ) ;
33+ const contextev = new ScramjetContextEvent ( client . global . window , client ) ;
3434 client . frame ?. dispatchEvent ( contextev ) ;
3535 const urlchangeev = new UrlChangeEvent ( client . url . href ) ;
3636 if ( ! client . isSubframe ) client . frame ?. dispatchEvent ( urlchangeev ) ;
You can’t perform that action at this time.
0 commit comments