eventTarget.addEventListener("cut", event) {{ //Save button should be disable }); //Above is the code for cut event //Similarly, I tried for undo event b