Похожие чаты

Ay pals, so will this function be passed the way

i want functs to execute?
implementation:
acInit([
onAvatarChangeEvent,
async () => {
await loadavatarDdl();
await fetchDetails();
},
() => acFormHandler('basicInfoForm', submitDetails),
() => acFormHandler('passForm', submitPass)
]);
defn in global functions' file
function acInit(functions: (() => void)[]): void {
if (document.readyState === "complete") {
functions.forEach(func => func());
} else {
document.addEventListener('DOMContentLoaded', () => {
functions.forEach(func => func());
});
}
}

2 ответов

25 просмотров

onAvatarChangeEvent, acFormHandler both return void?

await Promise.all([ onAvatarChangeEvent, async () => { await loadavatarDdl(); await fetchDetails(); }, () => acFormHandler('basicInfoForm', submitDetails), () => acFormHandler('passForm', submitPass), ]);

Похожие вопросы

Обсуждают сегодня

Карта сайта