Comparing version 1.6.1 to 1.6.2
{ | ||
"name": "sysend", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "Send messages to other tabs/windows in the same browser", | ||
@@ -5,0 +5,0 @@ "main": "sysend.js", |
@@ -5,4 +5,4 @@ <p align="center"> | ||
[![npm](https://img.shields.io/badge/npm-1.6.1-blue.svg)](https://www.npmjs.com/package/sysend) | ||
![bower](https://img.shields.io/badge/bower-1.6.1-yellow.svg) | ||
[![npm](https://img.shields.io/badge/npm-1.6.2-blue.svg)](https://www.npmjs.com/package/sysend) | ||
![bower](https://img.shields.io/badge/bower-1.6.2-yellow.svg) | ||
![downloads](https://img.shields.io/npm/dt/sysend.svg) | ||
@@ -9,0 +9,0 @@ [![jsdelivr](https://img.shields.io/jsdelivr/npm/hm/sysend)](https://www.jsdelivr.com/package/npm/sysend) |
/**@license | ||
* sysend.js - send messages between browser windows/tabs version 1.6.1 | ||
* sysend.js - send messages between browser windows/tabs version 1.6.2 | ||
* | ||
@@ -158,5 +158,7 @@ * Copyright (C) 2014-2021 Jakub T. Jankiewicz <https://jakub.jankiewicz.org> | ||
sysend.on('__window_ack__', function(data) { | ||
ids.push(data.id); | ||
if (data.origin === target_id) { | ||
ids.push(data.id); | ||
} | ||
}); | ||
sysend.broadcast('__window__'); | ||
sysend.broadcast('__window__', { id: target_id }); | ||
setTimeout(function() { | ||
@@ -391,4 +393,4 @@ sysend.off('__window_ack__'); | ||
sysend.on('__window__', function() { | ||
sysend.broadcast('__window_ack__', { id: target_id }); | ||
sysend.on('__window__', function(data) { | ||
sysend.broadcast('__window_ack__', { id: target_id, origin: data.id }); | ||
}); | ||
@@ -395,0 +397,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24807
450