From 1e244bfea8a30e4c7d9fd43ea76ea68739a1dd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Thu, 5 Jul 2018 16:19:49 +0200 Subject: [PATCH] refactor(templates): Remove event listener in JavaScript template --- scripts/__snapshots__/e2e-templates.test.js.snap | 4 +--- src/templates/JavaScript Client/src/app.js.hbs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/__snapshots__/e2e-templates.test.js.snap b/scripts/__snapshots__/e2e-templates.test.js.snap index 03d7f8091..1ba4f37a6 100644 --- a/scripts/__snapshots__/e2e-templates.test.js.snap +++ b/scripts/__snapshots__/e2e-templates.test.js.snap @@ -3277,9 +3277,7 @@ $searchBox.addEventListener('input', event => { renderHits(query); }); -document.addEventListener('DOMContentLoaded', () => { - renderHits(''); -});" +renderHits('');" `; exports[`Templates JavaScript Client File content: src/index.css 1`] = ` diff --git a/src/templates/JavaScript Client/src/app.js.hbs b/src/templates/JavaScript Client/src/app.js.hbs index 28c1124d7..cc13f8596 100644 --- a/src/templates/JavaScript Client/src/app.js.hbs +++ b/src/templates/JavaScript Client/src/app.js.hbs @@ -24,6 +24,4 @@ $searchBox.addEventListener('input', event => { renderHits(query); }); -document.addEventListener('DOMContentLoaded', () => { - renderHits(''); -}); +renderHits('');