forked from mirrors/bookwyrm
Documentation
This commit is contained in:
parent
9ec4ad6b31
commit
84b5c2da4e
1 changed files with 10 additions and 2 deletions
|
@ -375,8 +375,16 @@ let BookWyrm = new class {
|
|||
}
|
||||
}
|
||||
|
||||
handleModalButton(element) {
|
||||
const modalButton = element.currentTarget;
|
||||
/**
|
||||
* Handle the modal component.
|
||||
*
|
||||
* @param {Event} event - Event fired by an element
|
||||
* with the `data-modal-open` attribute
|
||||
* pointing to a modal by its id.
|
||||
* @return {undefined}
|
||||
*/
|
||||
handleModalButton(event) {
|
||||
const modalButton = event.currentTarget;
|
||||
const targetModalId = modalButton.dataset.modalOpen;
|
||||
const htmlElement = document.querySelector('html');
|
||||
const modal = document.getElementById(targetModalId);
|
||||
|
|
Loading…
Reference in a new issue