Commit dac4364e authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'remove-DOMContentLoaded-Eventlistener-On-Geo-Pages' into 'master'

Remove DOMContentLoaded Eventlistener

See merge request gitlab-org/gitlab!47663
parents 39070f5d b0b2539e
import initGeoReplicable from 'ee/geo_replicable'; import initGeoReplicable from 'ee/geo_replicable';
document.addEventListener('DOMContentLoaded', initGeoReplicable); initGeoReplicable();
...@@ -2,10 +2,8 @@ import initVueAlerts from '~/vue_alerts'; ...@@ -2,10 +2,8 @@ import initVueAlerts from '~/vue_alerts';
import initConfirmModal from '~/confirm_modal'; import initConfirmModal from '~/confirm_modal';
import showToast from '~/vue_shared/plugins/global_toast'; import showToast from '~/vue_shared/plugins/global_toast';
document.addEventListener('DOMContentLoaded', () => { initVueAlerts();
initVueAlerts(); initConfirmModal();
initConfirmModal();
const toasts = document.querySelectorAll('.js-toast-message'); const toasts = document.querySelectorAll('.js-toast-message');
toasts.forEach(toast => showToast(toast.dataset.message)); toasts.forEach(toast => showToast(toast.dataset.message));
});
import initGeoNodeForm from 'ee/geo_node_form'; import initGeoNodeForm from 'ee/geo_node_form';
document.addEventListener('DOMContentLoaded', initGeoNodeForm); initGeoNodeForm();
import initGeoNodes from 'ee/geo_nodes'; import initGeoNodes from 'ee/geo_nodes';
import PersistentUserCallout from '~/persistent_user_callout'; import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', initGeoNodes); initGeoNodes();
document.addEventListener('DOMContentLoaded', () => { const callout = document.querySelector('.user-callout');
const callout = document.querySelector('.user-callout'); PersistentUserCallout.factory(callout);
PersistentUserCallout.factory(callout);
});
import initGeoNodeForm from 'ee/geo_node_form'; import initGeoNodeForm from 'ee/geo_node_form';
document.addEventListener('DOMContentLoaded', initGeoNodeForm); initGeoNodeForm();
import initGeoReplicable from 'ee/geo_replicable'; 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