@@ -37,7 +37,7 @@ import * as Loader from "../elements/loader";
3737import * as KeyConverter from "../utils/key-converter" ;
3838import {
3939 findSingleActiveFunboxWithFunction ,
40- getFunctionsFromActiveFunboxes ,
40+ getActiveFunboxesWithFunction ,
4141 isFunboxActiveWithProperty ,
4242} from "../test/funbox/list" ;
4343
@@ -198,8 +198,8 @@ async function handleSpace(): Promise<void> {
198198
199199 const currentWord : string = TestWords . words . getCurrent ( ) ;
200200
201- for ( const handleSpace of getFunctionsFromActiveFunboxes ( "handleSpace" ) ) {
202- handleSpace ( ) ;
201+ for ( const fb of getActiveFunboxesWithFunction ( "handleSpace" ) ) {
202+ fb . functions . handleSpace ( ) ;
203203 }
204204
205205 dontInsertSpace = true ;
@@ -494,8 +494,8 @@ function handleChar(
494494
495495 const isCharKorean : boolean = TestInput . input . getKoreanStatus ( ) ;
496496
497- for ( const handleChar of getFunctionsFromActiveFunboxes ( "handleChar" ) ) {
498- char = handleChar ( char ) ;
497+ for ( const fb of getActiveFunboxesWithFunction ( "handleChar" ) ) {
498+ char = fb . functions . handleChar ( char ) ;
499499 }
500500
501501 const nospace = isFunboxActiveWithProperty ( "nospace" ) ;
@@ -902,8 +902,8 @@ $(document).on("keydown", async (event) => {
902902 return ;
903903 }
904904
905- for ( const handleKeydown of getFunctionsFromActiveFunboxes ( "handleKeydown" ) ) {
906- void handleKeydown ( event ) ;
905+ for ( const fb of getActiveFunboxesWithFunction ( "handleKeydown" ) ) {
906+ void fb . functions . handleKeydown ( event ) ;
907907 }
908908
909909 //autofocus
@@ -1153,11 +1153,9 @@ $(document).on("keydown", async (event) => {
11531153 }
11541154 }
11551155
1156- for ( const preventDefaultEvent of getFunctionsFromActiveFunboxes (
1157- "preventDefaultEvent"
1158- ) ) {
1156+ for ( const fb of getActiveFunboxesWithFunction ( "preventDefaultEvent" ) ) {
11591157 if (
1160- await preventDefaultEvent (
1158+ await fb . functions . preventDefaultEvent (
11611159 //i cant figure this type out, but it works fine
11621160 // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
11631161 event as JQuery . KeyDownEvent
0 commit comments