Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jaller94 opened this issue Dec 16, 2020 · 2 comments
Open

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

jaller94 opened this issue Dec 16, 2020 · 2 comments

Comments

@jaller94
Copy link
Contributor

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/matrix-widget-api@0.1.0-beta.10/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
Copy link
Contributor Author

Seems to be fixed in 0.1.0-beta.11.
I can't reproduce this.

@jaller94
Copy link
Contributor Author

jaller94 commented Feb 1, 2021

This is still an issue in 0.1.0-beta.12.

Importing ./dist/api.js works fine, but api.min.js causes the issue described.

@jaller94 jaller94 reopened this Feb 1, 2021
@jaller94 jaller94 changed the title mxwidgets is a function, not an object mxwidgets is a function, not an object (dist/api.min.js) Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant