我看到这个错误:"[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.",在这段代码中:
var request;
if(window.XMLHttpRequest){
request = new XMLHttpRequest();
}else{
request = new ActiveXObject("Microsoft.XMLHTTP");
}
request.open('GET', 'http://www.mywebsite.com', false);
request.send();
因为它们已经过时,我应该用什么替换这些指令呢?
false
翻译成中文是假
,而true
则是真
。 - Jaromanda X