iframe-stream
Create a stream around an iframe via post-message-stream
const IframeStream = IframeStream var iframe = var iframeStream =
Note
- Setup the stream immediately, so we don't miss the iframe's
load
event. - The IframeStream will buffer all input until the childstream is ready.
- This is an object stream, and buffers will not be handled gracefully.
Example
Here is an example using dnode to create a callback based API with a javascript context inside an iframe.
Parent:
const IframeStream = IframeStreamconst Dnode = var iframe = var iframeStream = var dnode = dnode dnode
Child:
const ParentStream = ParentStreamconst Dnode = var parentStream = var dnode = dnode