Skip to content

Commit

Permalink
Merge pull request #18 from PavelUd/master
Browse files Browse the repository at this point in the history
  • Loading branch information
keksobot authored Dec 26, 2023
2 parents fbc48d7 + 96e50e1 commit e057b28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/mesages.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function hideMessage() {
}

const showMessage = (message) => {
const button = message.querySelector('button');
const buttonElement = message.querySelector('button');
document.body.append(message);
button.addEventListener('click', onButtonElementClick);
buttonElement.addEventListener('click', onButtonElementClick);
document.addEventListener('click', onDocumentClick);
document.addEventListener('keydown', onDocumentKeydown);
};
Expand Down

0 comments on commit e057b28

Please sign in to comment.