What is the principle of the "stop button" of the browser?

chrome prompts "whether to stop loading the web page".
how does it work in detail? Terminate this network request? Or stop the execution of the current JS?

also, when I was working on the upload plug-in, I found that clicking the stop button would terminate the upload. However, some upload plug-ins will not terminate the upload.
I would like to ask, can I use JS to monitor the "user clicked the stop button" event?

the above Baidu, search books have not found information, but also hope to give advice!

Mar.20,2021

although I don't think this question makes much sense, it's a novel idea. If you find something new, you can also mark
personal guesswork: it is just a button, and the implementation of the browser is estimated to be a return. After clicking, the following code will not be executed. But something that was done asynchronously before is still being executed. There is no way to stop the previous one, but you can truncate the following code


there is a compromise. You can open the F12 network panel to test loading and then click stop loading to see the request.
clipboard.png

as long as you can monitor the loading of resources on the current page, you will know if you have clicked

.
Menu