What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-08-26 22:27:01
preventdefault on back in vuejs
<script>export default { // ... beforeMount() { window.addEventListener("beforeunload", event => { if (!this.isEditing) return event.preventDefault() // Chrome requires returnValue to be set. event.returnValue =... Add solution -
Best helpers
Mikemay
+5
Stobor
+5
Tilak De
+5
John wilson
+5
Vishnu Nair
+5
Martinako
+5
Jay Cossey
+5
Panky1986
+5
Thiagoh
+5