Skip to content

Commit

Permalink
Add origin to WidgetAPI constructor (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegirardi authored Jan 3, 2025
1 parent d9e86b5 commit fa13505
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/widget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@
const qs = parseFragment();
const widgetId = assertParam(qs, 'widgetId');
const userId = assertParam(qs, 'userId');
// Allow all origins
const targetOrigin = '*';
let isSticky = false;

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

widgetApi.on("ready", function() {
Expand Down

0 comments on commit fa13505

Please sign in to comment.