dispatchEvent(new CustomEvent(...)) to fireEvent(...)

This commit is contained in:
the-djmaze 2022-02-11 12:21:16 +01:00
parent 2d46eaa783
commit 44ee236709
9 changed files with 25 additions and 21 deletions

View file

@ -1,6 +1,6 @@
import ko from 'ko';
import { koComputable } from 'External/ko';
import { doc, $htmlCL, elementById } from 'Common/Globals';
import { doc, $htmlCL, elementById, fireEvent } from 'Common/Globals';
import { isFunction, forEachObjectValue, forEachObjectEntry } from 'Common/Utils';
let
@ -137,7 +137,7 @@ const
vm.registerPopupKeyDown();
}
dispatchEvent(new CustomEvent('rl-view-model', {detail:vm}));
fireEvent('rl-view-model', vm);
} else {
console.log('Cannot find view model position: ' + position);
}