Villy21 / JsWidget

How to make JS-Widget for iOS WidgetWeb App
https://apps.apple.com/app/widget-web/id1522169352
MIT License
2 stars 0 forks source link

API calls on button/anchor click don't work from widgets #1

Open danielannan17 opened 1 month ago

danielannan17 commented 1 month ago

I created a page which makes an api call on load to get data. When the user presses a button it should make another api call to update the data. The initial api call on load works and the data is fetched but when I press the button the update call isn't made. I've confirmed this with my server, its not receiving any call. The api call does work when the you're previewing the page for cropping though.

Villy21 commented 1 month ago

@danielannan17 Did you solve the problem?

danielannan17 commented 1 month ago

Nope, I tested many ways around it. Couldn't get passed. Clicking a button or anchor that makes a call doesn't work. Based on my server logs, it just reloaded the page even with the preventDefault()

Villy21 commented 1 month ago

@danielannan17 I have a plan to add debug logs in the next version. Right now you can click on the buttons in widget and next write to support from the app menu. I will receive the logs and can help you.

Villy21 commented 1 month ago

In WidgetWeb v7.1 I added Developer Mode. You can use __wweb2Log("message") function to send to log from js code.