-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Browser console shows XHR warning due to fengari-web using synchronous requests (?) #40
Comments
|
In general, you need a way to get your module into |
I see, thanks! The only require I'm using is
as written in the README for fengari-interop. Can I access the JS API in another way without using |
If you're using fengari-web, fengari-interop should already be loaded for you. |
I have to admit, I totally forgot to check back. After looking into it again, it appears that For what it's worth, I couldn't care less if the loading is blocking in the context of my app (which isn't a website). However, if mainstream browsers eventually remove support for this, I would have to fix it in a rush, so I'd rather get rid of the warning now and be done with it. Is there any way around it that will still allow me to access the Lua tables loaded in the typical fashion, ideally without adding unneeded complexity? I'd rather not load everything in JS and have to deal with more interoperability issues than absolutely necessary. |
I've just seen one approach, using a coroutine to wrap the promise, over here. Would either that, or relying on await/fetch, be a possible way to shift this issue? XHR has already started dying, and there's a likelihood it will continue to disappear. |
That seems very roundabout way of doing things:
|
The primary need is because I'm not saying everything here is a good idea. But something is sort of needed, before fengari-web starts to break on various browsers. Using a coroutine to work around JS' need to be async with absolutely everything, is one approach that seems viable. |
|
Displayed warning:
This occurs right after loading fengari, no matter what I do in my actual program. I'm not sure if synchronous requests are needed. I'd expect all requests to be async as that is the default value, so the warning is a bit confusing.
Don't synchronous requests reduce responsiveness? Or doesn't that apply to how fengari works? (Not that performance is a major concern for me)
The text was updated successfully, but these errors were encountered: