Skip to content

Commit 7cd0f79

Browse files
committed
add window id property
1 parent 05770ed commit 7cd0f79

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<img src="https://github.com/jcubic/sysend.js/blob/master/assets/logo.svg?raw=true" alt="Sysend.js logo"/>
33
</p>
44

5-
[![npm](https://img.shields.io/badge/npm-1.7.1-blue.svg)](https://www.npmjs.com/package/sysend)
6-
![bower](https://img.shields.io/badge/bower-1.7.1-yellow.svg)
5+
[![npm](https://img.shields.io/badge/npm-1.8.0-blue.svg)](https://www.npmjs.com/package/sysend)
6+
![bower](https://img.shields.io/badge/bower-1.8.0-yellow.svg)
77
![downloads](https://img.shields.io/npm/dt/sysend.svg)
88
[![jsdelivr](https://img.shields.io/jsdelivr/npm/hm/sysend)](https://www.jsdelivr.com/package/npm/sysend)
99

@@ -125,7 +125,7 @@ To see details of using the API, see [demo.html source code](https://github.com/
125125
126126
## License
127127
128-
Copyright (C) 2014-2021 [Jakub T. Jankiewicz](https://jakub.jankiewicz.org)<br/>
128+
Copyright (C) 2014-2021 [Jakub T. Jankiewicz](https://jcubic.pl/me)<br/>
129129
Released under the [MIT license](https://opensource.org/licenses/MIT)
130130
131131
This is free software; you are free to change and redistribute it.<br/>

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Send messages to other tabs/windows in the same origin and browser",
44
"main": "sysend.js",
55
"authors": [
6-
"Jakub T. Jankiewicz <[email protected]> (https://jcubic.pl/jakub-jankiewicz/)"
6+
"Jakub T. Jankiewicz <[email protected]> (https://jcubic.pl/me/)"
77
],
88
"license": "MIT",
99
"keywords": [

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sysend",
3-
"version": "1.7.1",
3+
"version": "1.8.0",
44
"description": "Send messages to other tabs/windows in the same browser",
55
"main": "sysend.js",
66
"typings": "sysend.d.ts",
@@ -23,7 +23,7 @@
2323
"notifications",
2424
"browser"
2525
],
26-
"author": "Jakub T. Jankiewicz <[email protected]> (https://jakub.jankiewicz.org/)",
26+
"author": "Jakub T. Jankiewicz <[email protected]> (https://jcubic.pl/me/)",
2727
"license": "MIT",
2828
"bugs": {
2929
"url": "https://github.com/jcubic/sysend.js/issues"

sysend.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/**@license
2-
* sysend.js - send messages between browser windows/tabs version 1.5.0
2+
* sysend.js - send messages between browser windows/tabs version 1.8.0
33
*
4-
* Copyright (C) 2014-2021 Jakub T. Jankiewicz <https://jakub.jankiewicz.org>
4+
* Copyright (C) 2014-2021 Jakub T. Jankiewicz <https://jcubic.pl/me>
55
* Released under the MIT license
66
*
77
*/
88
type callback = (message: any, event: string) => void;
99

1010
interface Sysend {
11+
id: string;
1112
broadcast(event: string, data?: any): void;
1213
emit(event: string, data?: any): void;
1314
on(event: string, callback: callback): void;

sysend.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**@license
2-
* sysend.js - send messages between browser windows/tabs version 1.7.1
2+
* sysend.js - send messages between browser windows/tabs version 1.8.0
33
*
4-
* Copyright (C) 2014-2021 Jakub T. Jankiewicz <https://jakub.jankiewicz.org>
4+
* Copyright (C) 2014-2021 Jakub T. Jankiewicz <https://jcubic.pl/me>
55
* Released under the MIT license
66
*
77
* The idea for localStorage implementation came from this StackOverflow question:
@@ -56,6 +56,7 @@
5656
var unserialize = make_process(serializer, 'from');
5757
// -------------------------------------------------------------------------
5858
var sysend = {
59+
id: target_id,
5960
broadcast: function(event, data) {
6061
if (channel) {
6162
channel.postMessage({name: event, data: serialize(data)});

0 commit comments

Comments
 (0)