Commit 3cb1ac27 authored by Jannik Lehmann's avatar Jannik Lehmann Committed by Enrique Alcántara

Remove DOMContentLoaded Eventlisteners

Removing DOMContentLoaded Eventlisteners from
index files since the scripts
are embedded using the defer tag.
parent 3af7048f
import initProductivityAnalyticsApp from 'ee/analytics/productivity_analytics';
document.addEventListener('DOMContentLoaded', () => {
initProductivityAnalyticsApp();
});
initProductivityAnalyticsApp();
......@@ -5,9 +5,7 @@ import GroupPathValidator from '~/pages/groups/new/group_path_validator';
import BindInOut from '~/behaviors/bind_in_out';
import Group from '~/group';
document.addEventListener('DOMContentLoaded', () => {
mountComponents();
new GroupPathValidator();
BindInOut.initAll();
new Group();
});
mountComponents();
new GroupPathValidator();
BindInOut.initAll();
new Group();
......@@ -2,8 +2,6 @@ import mountProgressBar from 'ee/registrations/projects/new';
import initProjectVisibilitySelector from '~/project_visibility';
import initProjectNew from '~/projects/project_new';
document.addEventListener('DOMContentLoaded', () => {
mountProgressBar();
initProjectVisibilitySelector();
initProjectNew.bindEvents();
});
mountProgressBar();
initProjectVisibilitySelector();
initProjectNew.bindEvents();
import mountProgressBar from 'ee/registrations/welcome';
document.addEventListener('DOMContentLoaded', () => {
mountProgressBar();
});
mountProgressBar();
import mountProgressBar from 'ee/registrations/welcome';
document.addEventListener('DOMContentLoaded', () => {
mountProgressBar();
mountProgressBar();
const emailUpdatesForm = document.querySelector('.js-email-opt-in');
const setupForCompany = document.querySelector('.js-setup-for-company');
const setupForMe = document.querySelector('.js-setup-for-me');
const emailUpdatesForm = document.querySelector('.js-email-opt-in');
const setupForCompany = document.querySelector('.js-setup-for-company');
const setupForMe = document.querySelector('.js-setup-for-me');
setupForCompany.addEventListener('change', () => {
setupForCompany.addEventListener('change', () => {
emailUpdatesForm.classList.add('hidden');
});
});
setupForMe.addEventListener('change', () => {
setupForMe.addEventListener('change', () => {
emailUpdatesForm.classList.remove('hidden');
});
});
---
title: Remove DOMContentLoaded Eventlistener
merge_request: 47619
author:
type: performance
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