Commit d10e0be3 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 b53f0806
import ClustersBundle from '~/clusters/clusters_bundle'; import ClustersBundle from '~/clusters/clusters_bundle';
document.addEventListener('DOMContentLoaded', () => { new ClustersBundle(); // eslint-disable-line no-new
new ClustersBundle(); // eslint-disable-line no-new
});
import ClustersBundle from '~/clusters/clusters_bundle'; import ClustersBundle from '~/clusters/clusters_bundle';
document.addEventListener('DOMContentLoaded', () => { new ClustersBundle(); // eslint-disable-line no-new
new ClustersBundle(); // eslint-disable-line no-new
});
import initCreateCluster from '~/create_cluster/init_create_cluster'; import initCreateCluster from '~/create_cluster/init_create_cluster';
import initIntegrationForm from '~/clusters/forms/show/index'; import initIntegrationForm from '~/clusters/forms/show/index';
document.addEventListener('DOMContentLoaded', () => { initCreateCluster(document, gon);
initCreateCluster(document, gon); initIntegrationForm();
initIntegrationForm();
});
import PersistentUserCallout from '~/persistent_user_callout'; import PersistentUserCallout from '~/persistent_user_callout';
import initClustersListApp from '~/clusters_list'; import initClustersListApp from '~/clusters_list';
document.addEventListener('DOMContentLoaded', () => { const callout = document.querySelector('.gcp-signup-offer');
const callout = document.querySelector('.gcp-signup-offer'); PersistentUserCallout.factory(callout);
PersistentUserCallout.factory(callout); initClustersListApp();
initClustersListApp();
});
import initNewCluster from '~/clusters/new_cluster'; import initNewCluster from '~/clusters/new_cluster';
document.addEventListener('DOMContentLoaded', () => { initNewCluster();
initNewCluster();
});
import ClustersBundle from '~/clusters/clusters_bundle'; import ClustersBundle from '~/clusters/clusters_bundle';
import initClusterHealth from '~/pages/projects/clusters/show/cluster_health'; import initClusterHealth from '~/pages/projects/clusters/show/cluster_health';
document.addEventListener('DOMContentLoaded', () => { new ClustersBundle(); // eslint-disable-line no-new
new ClustersBundle(); // eslint-disable-line no-new initClusterHealth();
initClusterHealth();
});
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