diff --git a/files/en-us/web/api/window/beforeunload_event/index.md b/files/en-us/web/api/window/beforeunload_event/index.md index eb8757218dc3bf0..87ee2f7d1a7dfe8 100644 --- a/files/en-us/web/api/window/beforeunload_event/index.md +++ b/files/en-us/web/api/window/beforeunload_event/index.md @@ -18,7 +18,7 @@ The dialog can be triggered in the following ways: - Setting the event object's {{domxref("BeforeUnloadEvent.returnValue", "returnValue")}} property to a non-empty string value or any other [truthy](/en-US/docs/Glossary/Truthy) value. - Returning any truthy value from the event handler function, e.g. `return "string"`. Note that this only works when the function is attached via the `onbeforeunload` property, not the {{domxref("EventTarget.addEventListener", "addEventListener()")}} method. This behavior is consistent across modern versions of Firefox, Safari, and Chrome. -The last two machanisms are legacy features; best practice is to trigger the dialog by invoking `preventDefault()` on the event object, while also setting `returnValue` to support legacy cases. +The last two mechanisms are legacy features; best practice is to trigger the dialog by invoking `preventDefault()` on the event object, while also setting `returnValue` to support legacy cases. ## Syntax