Use JavaScript to prevent a later `[removed]` tag from being evaluated?

前端 未结 7 728
北海茫月
北海茫月 2020-12-13 04:24

This is a bit of an oddball use case, but I have my reasons:

I\'d like to be able to write



        
7条回答
  •  误落风尘
    2020-12-13 04:59

    Just to see if this was possible, I had first.js send a synchronous XHR to a PHP file, and had the PHP file delete second.js. When the readyState reached '4', I had the JS alert something, to stop the thread. Then I went and checked the server... Yeah, second.js was deleted. And yet, it wouldn't work. I'd close the alert box, and the code that was in second.js would still be executed, despite the fact that the file was gone.

    I don't really know what this means, but the answer to your question is probably, "No, it's not possible."

提交回复
热议问题