New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d-before-unload

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d-before-unload - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

9

index.js

@@ -6,7 +6,4 @@ module.exports = BeforeUnload;

BeforeUnload.prototype.create = function(model, dom) {
// Don't do anything until the user makes some kind of mutation
model.root.once('all', '**', function() {
// Thereafter, stop the user from leaving the page whenever a change might be pending
dom.on('beforeunload', window, listenerFn(model));
});
// Stop the user from leaving the page whenever a change might be pending
dom.on('beforeunload', window, listenerFn(model));
};

@@ -16,3 +13,3 @@

return function beforeunloadListener(e) {
if (!model.hasPending()) return;
if (!model.hasWritePending()) return;
var confirmationMessage = model.get('message') ||

@@ -19,0 +16,0 @@ 'You have unsaved changes. Do you want to leave this page and discard your changes?';

{
"name": "d-before-unload",
"description": "Derby component to stop page from unloading when it has pending operations",
"version": "0.1.1",
"version": "0.1.2",
"main": "index.js",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc