Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Last active October 14, 2020 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljmotta/f3f2c3cedf7cdd9c4df2f56973f6cba7 to your computer and use it in GitHub Desktop.
Save ljmotta/f3f2c3cedf7cdd9c4df2f56973f6cba7 to your computer and use it in GitHub Desktop.
PingPong Envelope Init
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