This is purely semantics but I think it's important. The primary description for this library is "A small library enabling you to display a modal before a user leaves your website." This is not what this library does--the actual definition of what the library does is found in the Sensitivity section: "fires when the mouse cursor moves close to (or passes) the top of the viewport".
Semantically this is a significant difference. A user moving their mouse out of the viewport is in no way synonymous with intent to leave the current page, much less leave the website.
I'm curious why you didn't use window.beforeunload rather than mouseleave.
This is purely semantics but I think it's important. The primary description for this library is "A small library enabling you to display a modal before a user leaves your website." This is not what this library does--the actual definition of what the library does is found in the Sensitivity section: "fires when the mouse cursor moves close to (or passes) the top of the viewport".
Semantically this is a significant difference. A user moving their mouse out of the viewport is in no way synonymous with intent to leave the current page, much less leave the website.
I'm curious why you didn't use
window.beforeunload
rather thanmouseleave
.