- are promises are native and spawn additional threads like ajax?
JavaScript is single threaded so ajax doesn't spawn additional threads and neither do promises. The code executes once the system that's running your code, calls the callback/handler code.
If you want to do actual multi-threading in JS, check out Service Workers
- there are lots of libraries like q , deferred are there. are they all wrappers for native JavaScript promise API?
Very broad question, but considering Promises are pretty much widely available now, chances are most libraries use them. Some, like BlueBird, do not use them and actually outperform native promises.
- If a browser vendor does not implement native asynchronous promises, how these libraries can spawn thread?
There are no threads spawn and these libraries (in the simplest most general manner) used to wrap standard XHR request and make it a thenable and give it other API structure to resemble promises.
This article helped me the most when I started with Promises.