all crud ops
This commit is contained in:
1 parent
741979aee5
commit
99b78c9bd1
7 files changed
+185
-55
No files matched your search
@@ -0,0 +1,19 @@
|
||||
document.addEventListener('DOMContentLoaded', documentReady, false);
|
||||
window.onmessage = (event) => {
|
||||
if (event.data == "close") {
|
||||
document.querySelector("dialog[open]").close();
|
||||
}
|
||||
}
|
||||
|
||||
function documentReady() {
|
||||
const iframe = document.querySelector("iframe");
|
||||
iframe.onload=(event) => {
|
||||
const openDialog = document.querySelector("dialog[open]");
|
||||
if (openDialog) {
|
||||
openDialog.close();
|
||||
window.location.reload();
|
||||
} else {
|
||||
document.querySelector("dialog").showModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user