Last active
October 14, 2020 20:33
-
-
Save ljmotta/f3f2c3cedf7cdd9c4df2f56973f6cba7 to your computer and use it in GitHub Desktop.
PingPong Envelope Init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EnvelopeBusMessage } from "@kogito-tooling/envelope-bus/dist/api"; | |
import { init } from "ping-pong-view/dist/envelope"; | |
import { PingPongReactImplFactory } from "ping-pong-view-react"; | |
init({ | |
container: document.getElementById("envelope-app")!, | |
bus: { | |
postMessage<D, Type>(message: EnvelopeBusMessage<D, Type>, targetOrigin?: string, transfer?: any) { | |
window.parent.postMessage(message, "*", transfer); | |
}, | |
}, | |
pingPongViewFactory: new PingPongReactImplFactory(), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment