matrix-widget-api
matrix-widget-api copied to clipboard
mxwidgets is a function, not an object (dist/api.min.js)
Describe the bug
I cannot create my WidgetApi using new mxwidgets.WidgetApi(widgetId);
because mxwidgets
is a function.
To Reproduce Steps to reproduce the behavior:
- Copy the example.
- Change the import of the api
<script src="https://unpkg.com/[email protected]/dist/api.min.js"></script>
. - Host it on a https endpoint
- Post this in a room
/addwidget https://localhost:8080/#/?widgetId=$matrix_widget_id&userId=$matrix_user_id
(adapt it to your address) - See the error in the JS terminal of your browser.
Expected behavior
mxwidgets
should be an object, containing at least WidgetApi
and MatrixCapabilities
.
Screenshots
Desktop (please complete the following information):
- OS: Manjaro Linux
- Browser Firefox Dev
- Version 84b