Skip to content

Commit fa13505

Browse files
Add origin to WidgetAPI constructor (#101)
1 parent d9e86b5 commit fa13505

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: examples/widget/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@
5959
const qs = parseFragment();
6060
const widgetId = assertParam(qs, 'widgetId');
6161
const userId = assertParam(qs, 'userId');
62+
// Allow all origins
63+
const targetOrigin = '*';
6264
let isSticky = false;
6365

6466
// Set up the widget API as soon as possible to avoid problems with the client
65-
const widgetApi = new mxwidgets.WidgetApi(widgetId);
67+
const widgetApi = new mxwidgets.WidgetApi(widgetId, targetOrigin);
6668
widgetApi.requestCapability(mxwidgets.MatrixCapabilities.AlwaysOnScreen);
6769

6870
widgetApi.on("ready", function() {

0 commit comments

Comments
 (0)