On Fri Feb 24 13:17:19 2023 +0000, Jacek Caban wrote:
The way it's implemented, nested sync XHR will not block other sync XHR's events, is it intentional?
Nope, I just didn't find it necessary, but now that I think about it, you are right that it's theoretically possible to end up with wrong dispatches here, so I'll have to fix this. Thanks for the catch.
Checking for it should be easy now with the latest changes, I'll just store pointer to the blocking sync XHR instead of the depth, and check it for NULL instead of checking the depth. I can use the pointer to compare here, then.
The issue is I'll have to somehow queue up these events and dispatch them later, but not like async XHR events, rather when the blocking loop is that of the sync XHR. Let me think about it.