mr-crocs-adventures/tilorswift/js/dialog/DialogNotification.js

18 lines
433 B
JavaScript
Raw Permalink Normal View History

2020-02-09 00:23:58 +01:00
import Dialog from "./Dialog.js";
export default class DialogNotification extends Dialog
{
constructor(message, callback = function () {})
{
super();
this.buttonOk = this.createButton('OK');
this.buttonOk.addEventListener(
'click',
() => {
callback();
this.htmlElement.remove();
}
);
this.setMessage(message)
}
}