1.0.0 • Published 7 years ago

pull-postmsg v1.0.0

Weekly downloads
1
License
Fair
Repository
-
Last release
7 years ago

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 between win and the current window
  • win: 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 to win 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

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.