@remote-ui/rpc
Advanced tools
Comparing version
@@ -22,3 +22,3 @@ 'use strict'; | ||
var wrappedListener = function wrappedListener(event) { | ||
if (event.target !== parent) return; | ||
if (event.source !== parent) return; | ||
listener(event); | ||
@@ -25,0 +25,0 @@ }; |
@@ -59,3 +59,3 @@ 'use strict'; | ||
var wrappedListener = function wrappedListener(event) { | ||
if (event.target !== target) return; | ||
if (event.source !== target.contentWindow) return; | ||
listener(event); | ||
@@ -62,0 +62,0 @@ }; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const wrappedListener = (event) => { | ||
if (event.target !== parent) | ||
if (event.source !== parent) | ||
return; | ||
@@ -22,0 +22,0 @@ listener(event); |
@@ -30,3 +30,3 @@ "use strict"; | ||
const wrappedListener = (event) => { | ||
if (event.target !== target) | ||
if (event.source !== target.contentWindow) | ||
return; | ||
@@ -33,0 +33,0 @@ listener(event); |
@@ -10,2 +10,6 @@ # Changelog | ||
## [1.2.1] - 2021-06-09 | ||
- Fixed an issue where `fromIframe` and `fromInsideIframe` were checking `event.target` instead of `event.source` to ensure messages were coming from the other endpoint. | ||
## [1.2.0] - 2021-06-08 | ||
@@ -12,0 +16,0 @@ |
{ | ||
"name": "@remote-ui/rpc", | ||
"description": "An RPC library with strong support for simulating the transfer of functions via postMessage", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"publishConfig": { | ||
@@ -26,3 +26,3 @@ "access": "public" | ||
}, | ||
"gitHead": "dd5749a49702b4d9b3ecb75026beaa5aab2b269f" | ||
"gitHead": "5f1f48eaf483c03c443554d725543d4597848768" | ||
} |
@@ -26,3 +26,3 @@ import type {MessageEndpoint} from '../types'; | ||
const wrappedListener = (event: MessageEvent) => { | ||
if (event.target !== parent) return; | ||
if (event.source !== parent) return; | ||
listener(event); | ||
@@ -29,0 +29,0 @@ }; |
@@ -44,3 +44,3 @@ import type {MessageEndpoint} from '../types'; | ||
const wrappedListener = (event: MessageEvent) => { | ||
if (event.target !== target) return; | ||
if (event.source !== target.contentWindow) return; | ||
listener(event); | ||
@@ -47,0 +47,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
295759
0.09%