From 58f5d3cdee67f451f3f1a8fa896b742b3986f35b Mon Sep 17 00:00:00 2001 From: Sofiane Abou Abderrahim Date: Tue, 17 Oct 2023 14:41:26 +0300 Subject: [PATCH] created PlaceFinder class in SharePlace.js and got access to the form and button in index.html from the root in dist folder --- .gitignore | 2 +- src/SharePlace.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 30bc162..3c3629e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/node_modules \ No newline at end of file +node_modules diff --git a/src/SharePlace.js b/src/SharePlace.js index e69de29..bfc965f 100644 --- a/src/SharePlace.js +++ b/src/SharePlace.js @@ -0,0 +1,13 @@ +class PlaceFinder { + constructor() { + const addressForm = document.querySelector('form'); + const locateUserBtn = document.getElementById('locate-btn'); + + locateUserBtn.addEventListener('click', this.locateUserHandler); + addressForm.addEventListener('submit', this.findAddressHandler); + } + + locateUserHandler() {} + + findAddressHandler() {} +}