matrix-widget-api icon indicating copy to clipboard operation
matrix-widget-api copied to clipboard

mxwidgets is a function, not an object (dist/api.min.js)

Open jaller94 opened this issue 4 years ago • 2 comments

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:

  1. Copy the example.
  2. Change the import of the api <script src="https://unpkg.com/[email protected]/dist/api.min.js"></script>.
  3. Host it on a https endpoint
  4. Post this in a room /addwidget https://localhost:8080/#/?widgetId=$matrix_widget_id&userId=$matrix_user_id (adapt it to your address)
  5. See the error in the JS terminal of your browser.

Expected behavior mxwidgets should be an object, containing at least WidgetApi and MatrixCapabilities.

Peek 2020-12-16 18-41

Screenshots Screenshot_2020-12-16_18-40-11

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • Browser Firefox Dev
  • Version 84b

jaller94 avatar Dec 16 '20 17:12 jaller94