Commit b0b2539e authored by Jannik Lehmann's avatar Jannik Lehmann

Remove DOMContentLoaded Eventlisteners

Removing DOMContentLoaded Eventlisteners from
index files since the scripts
are embedded using the defer tag.
parent 5fa9332d
import initGeoReplicable from 'ee/geo_replicable';
document.addEventListener('DOMContentLoaded', initGeoReplicable);
initGeoReplicable();
......@@ -2,10 +2,8 @@ import initVueAlerts from '~/vue_alerts';
import initConfirmModal from '~/confirm_modal';
import showToast from '~/vue_shared/plugins/global_toast';
document.addEventListener('DOMContentLoaded', () => {
initVueAlerts();
initConfirmModal();
initVueAlerts();
initConfirmModal();
const toasts = document.querySelectorAll('.js-toast-message');
toasts.forEach(toast => showToast(toast.dataset.message));
});
const toasts = document.querySelectorAll('.js-toast-message');
toasts.forEach(toast => showToast(toast.dataset.message));
import initGeoNodeForm from 'ee/geo_node_form';
document.addEventListener('DOMContentLoaded', initGeoNodeForm);
initGeoNodeForm();
import initGeoNodes from 'ee/geo_nodes';
import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', initGeoNodes);
document.addEventListener('DOMContentLoaded', () => {
const callout = document.querySelector('.user-callout');
PersistentUserCallout.factory(callout);
});
initGeoNodes();
const callout = document.querySelector('.user-callout');
PersistentUserCallout.factory(callout);
import initGeoNodeForm from 'ee/geo_node_form';
document.addEventListener('DOMContentLoaded', initGeoNodeForm);
initGeoNodeForm();
import initGeoReplicable from 'ee/geo_replicable';
document.addEventListener('DOMContentLoaded', initGeoReplicable);
initGeoReplicable();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment