pull-postmsg
v1.0.0
Published
pull-stream for cross-domain inter-frame communication using postMessage
Downloads
3
Readme
pull-postmsg
pull-stream for bidirectional communication between frames using window.postMessage
var Postmsg = require('pull-postsg')
var duplex = Postmsg(win, origin)
duplex
: duplex-stream for communication betweenwin
and the current windowwin
: window object to post messages to. If not specified, the source window for the first message received on the current window will be used.origin
: origin URL or path. defaults to'*'
. This value is used when posting messages towin
and is used to filter messages received on the current window.
Note that the stream does not propagate backpressure or errors, so if you need those, you have to emulate them at a higher level.
See also
- mmckegg's window-stream
- https://steveliles.github.io/cross_domain_inter_frame_communication_in_javascript.html
License
Copyright (c) 2016 Charles Lehner
Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.