diff --git a/README.md b/README.md index 5dbb2a2..5813733 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Sysend.js logo

-[![npm](https://img.shields.io/badge/npm-1.10.0-blue.svg)](https://www.npmjs.com/package/sysend) -![bower](https://img.shields.io/badge/bower-1.10.0-yellow.svg) +[![npm](https://img.shields.io/badge/npm-1.11.0-blue.svg)](https://www.npmjs.com/package/sysend) +![bower](https://img.shields.io/badge/bower-1.11.0-yellow.svg) ![downloads](https://img.shields.io/npm/dt/sysend.svg) [![jsdelivr](https://img.shields.io/jsdelivr/npm/hm/sysend)](https://www.jsdelivr.com/package/npm/sysend) @@ -114,7 +114,7 @@ sysend object: | `on(name, callback)` | add event handler for specified name | name - `string` - The name of the event
callback - function `(object, name) => void` | 1.0.0 | | `off(name [, callback])` | remove event handler for given name, if callback is not specified it will remove all callbacks for given name | name - `string` - The name of the event
callback - optional function `(object, name) => void` | 1.0.0 | | `broadcast(name [, object])` | send any object and fire all events with specified name (in different pages that register callback using on). You can also just send notification without an object | name - string - The name of the event
object - optional any data | 1.0.0 | -| `proxy(url)` | create iframe proxy for different domain, the target domain/URL should have [proxy.html](https://github.com/jcubic/sysend.js/blob/master/proxy.html)
file. If url domain is the same as page domain, it's ignored. So you can put both proxy calls on both | url - string | 1.3.0 | +| `proxy()` | create iframe proxy for different domain, the target domain/URL should have [proxy.html](https://github.com/jcubic/sysend.js/blob/master/proxy.html)
file. If url domain is the same as page domain, it's ignored. So you can put both proxy calls on both | url - string | 1.3.0 | | `serializer(to_string, from_string)` | add serializer and deserializer functions | both arguments are functions (data: any) => string | 1.4.0 | | `emit(name, [, object])` | same as `broadcast()` but also invoke the even on same page | name - string - The name of the event
object - optional any data | 1.5.0 | | `post(, [, object])` | send any data to other window | window_id - string of the target window
object - any data | 1.6.0 | diff --git a/sysend.d.ts b/sysend.d.ts index a369b30..b3d65f5 100644 --- a/sysend.d.ts +++ b/sysend.d.ts @@ -1,5 +1,5 @@ /**@license - * sysend.js - send messages between browser windows/tabs version 1.10.0 + * sysend.js - send messages between browser windows/tabs version 1.11.0 * * Copyright (C) 2014-2022 Jakub T. Jankiewicz * Released under the MIT license @@ -13,7 +13,7 @@ interface Sysend { emit(event: string, data?: any): void; on(event: string, callback: callback): void; off(event: string, callback?: callback): void; - proxy(url: string): void; + proxy(args?: string[]): void; serializer(to: (data: any) => string, from: (data: string) => any): void; track(event: 'open', callback: (data: {id: string, count: number, primary: boolean}) => void): void; track(event: 'close', callback: (data: {id: string, count: number, primary: boolean, self: boolean}) => void): void; diff --git a/sysend.js b/sysend.js index cfb3fc9..abe1502 100644 --- a/sysend.js +++ b/sysend.js @@ -1,5 +1,5 @@ /**@license - * sysend.js - send messages between browser windows/tabs version 1.10.0 + * sysend.js - send messages between browser windows/tabs version 1.11.0 * * Copyright (C) 2014-2022 Jakub T. Jankiewicz * Released under the MIT license