File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/scramjet/packages/controller/src Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import type * as ScramjetGlobal from "@mercuryworkshop/scramjet";
33
44declare const $scramjet : typeof ScramjetGlobal ;
55
6+ export let Plugin = $scramjet . Plugin ;
7+
68import {
79 type TransportToController ,
810 type Controllerbound ,
@@ -345,11 +347,15 @@ function yieldGetInjectScripts(
345347 return getInjectScripts ;
346348}
347349
348- class Frame {
350+ export class Frame {
349351 fetchHandler : ScramjetGlobal . ScramjetFetchHandler ;
350352 id : string ;
351353 prefix : string ;
352354
355+ hooks : {
356+ fetch : ScramjetGlobal . FetchTap ;
357+ } ;
358+
353359 get context ( ) : ScramjetGlobal . ScramjetContext {
354360 let sjcfg = {
355361 ...$scramjet . defaultConfig ,
@@ -433,6 +439,10 @@ class Frame {
433439 return BareResponse . fromNativeResponse ( await fetch ( url ) ) ;
434440 } ,
435441 } ) ;
442+
443+ this . hooks = {
444+ fetch : this . fetchHandler . hooks . fetch ,
445+ } ;
436446 }
437447
438448 go ( url : string ) {
You can’t perform that action at this time.
0 commit comments