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
Synchronous XMLHttpRequest on the main thread is deprecated #1596
Comments
Hey! @mathiasrw Will switching the asy variable, with |
Yes and no. Yes, it will solve the problem, but then we cant use this function for the sync calls expected when running the sync alasql command. |
So what would be the expected solution? To use another function like |
There is a solution to turn anything async to sync, but that involves using Sooo, yea this is truly annoying. but it's way easier in NodeJS... i made a sync blob reader just a few days ago: nodejs/undici#1830 (comment) |
anyways i don't think there should even be a way to load data inside of alasql. i think it's the developers job to load the data it needs and then Something in lines of: const res = await fetch(url)
const ab = await res.arrayBuffer()
const db = new alasql.Database(ab) const res = await fetch(url)
const ab = await res.arrayBuffer()
alasql(['ATTACH SQLITE DATABASE books(?); USE books'], ab) |
fetch don't have sync functionality |
Wrap the function in an async fn and use await inside to have it act as a sync call. |
Some test started to fail inside browsers after removing sync compatibility. running in nodejs still passes the test. |
Argf. We better get browser testing working in CICD so I dont introduce problems like this again. https://github.com/AlaSQL/alasql/blob/develop/.github/workflows/Build%20and%20test.yml#L63 |
The text was updated successfully, but these errors were encountered: