Changed function setup

This commit is contained in:
Tim Zallmann 2019-01-18 13:18:36 +01:00
parent 8edfbe3d8d
commit e51a0df391

View file

@ -17,7 +17,7 @@ const frequentItemDropdowns = [
},
];
function initFrequentItemDropdowns() {
const initFrequentItemDropdowns = () => {
frequentItemDropdowns.forEach(dropdown => {
const { namespace, key } = dropdown;
const el = document.getElementById(`js-${namespace}-dropdown`);
@ -66,7 +66,7 @@ function initFrequentItemDropdowns() {
},
});
});
}
};
document.addEventListener('DOMContentLoaded', () => {
requestIdleCallback(initFrequentItemDropdowns);