Use className instead of classList for initialization.
This commit is contained in:
parent
5461d49cb4
commit
2dc1603d5e
1 changed files with 3 additions and 3 deletions
|
@ -276,13 +276,12 @@ function init_button_with_confirm(button)
|
||||||
button.parentElement.removeChild(button);
|
button.parentElement.removeChild(button);
|
||||||
|
|
||||||
let holder_stage1 = document.createElement("span");
|
let holder_stage1 = document.createElement("span");
|
||||||
holder_stage1.classList.add("confirm_holder_stage1");
|
holder_stage1.className = "confirm_holder_stage1";
|
||||||
holder_stage1.appendChild(button);
|
holder_stage1.appendChild(button);
|
||||||
holder.appendChild(holder_stage1);
|
holder.appendChild(holder_stage1);
|
||||||
|
|
||||||
let holder_stage2 = document.createElement("span");
|
let holder_stage2 = document.createElement("span");
|
||||||
holder_stage2.classList.add("confirm_holder_stage2");
|
holder_stage2.className = "confirm_holder_stage2 hidden";
|
||||||
holder_stage2.classList.add("hidden");
|
|
||||||
holder.appendChild(holder_stage2);
|
holder.appendChild(holder_stage2);
|
||||||
|
|
||||||
let prompt;
|
let prompt;
|
||||||
|
@ -340,6 +339,7 @@ function init_button_with_confirm(button)
|
||||||
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.add("hidden");
|
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.add("hidden");
|
||||||
` + button.dataset.onclick;
|
` + button.dataset.onclick;
|
||||||
button_confirm.onclick = Function(confirm_onclick);
|
button_confirm.onclick = Function(confirm_onclick);
|
||||||
|
|
||||||
button.removeAttribute("onclick");
|
button.removeAttribute("onclick");
|
||||||
button.onclick = function(event)
|
button.onclick = function(event)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue