diff options
Diffstat (limited to 'app/assets/javascripts/behaviors/load_startup_css.js')
-rw-r--r-- | app/assets/javascripts/behaviors/load_startup_css.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/app/assets/javascripts/behaviors/load_startup_css.js b/app/assets/javascripts/behaviors/load_startup_css.js deleted file mode 100644 index dbe9ff8b6e7..00000000000 --- a/app/assets/javascripts/behaviors/load_startup_css.js +++ /dev/null @@ -1,15 +0,0 @@ -export const loadStartupCSS = () => { - // We need to fallback to dispatching `load` in case our event listener was added too late - // or the browser environment doesn't load media=print. - // Do this on `window.load` so that the default deferred behavior takes precedence. - // https://gitlab.com/gitlab-org/gitlab/-/issues/239357 - window.addEventListener( - 'load', - () => { - document - .querySelectorAll('link[media=print]') - .forEach((x) => x.dispatchEvent(new Event('load'))); - }, - { once: true }, - ); -}; |