the following figure shows the operating mechanism of the browser
have a few questions, please also advise:
1. Does DOM (document) refer to all dom related api?
document.querySelector("-sharptest")
2. If the above question is true, will it also enter the message queue (callback queue) after I look up a dom?
3. I understand that callback queue
is a callback function queue. For example, after setTimeout (fn,100)
is executed by the browser, fn will be placed in callback queue
. If the above two questions are true, document.querySelector ("- sharptest")
, which callback function is put in callback queue
?
also ask the great god to solve the doubt, thank you very much ~