mr-crocs-adventures/tilorswift/js/dialog/DialogNotification.js
2020-02-09 00:23:58 +01:00

18 lines
433 B
JavaScript

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)
}
}