Reputation: 123
I have one jQuery function in my code for which I think it might be asynchronous but I couldn't find out if that's true. I have a guess that, if a function has a callback then it is asynchronous ; otherwise it is synchronous.
In my case it is the function .unwrap(). Using the logic from above I guess it is synchronous.
Upvotes: 0
Views: 54
Reputation: 34489
There are a few ways you can try to do this:
Promise
it's asynchronous)The particular function you're looking at, there's nothing to indicate that it's asynchronous in the docs/return type. It's just making a DOM manipulation I believe which has to be done on the main thread anyway, there's no slow code in there that could be done async.
The function itself I believe is unwrap (maybe not the exact version) but you can see there's nothing in there that looks async.
Upvotes: 1