I'm so glad that browser APIs have finally matured to a point where we can intercept and cancel unwanted navigations. This also helps with some niche Electron use cases where navigations can be highly privileged.
Full disclosure: I'm the creator of airgap.js, which is the subject of this article.