문제

I'm tried make an http request with synchronous as false in GM_xmlhttpRequest but does not seem to work.

how do this? my code:

GM_xmlhttpRequest({
        method: "GET",
        url: "http://www.google.com/",
        synchronous:false,
        onload: function(xhr) 
            {
                if(xhr.readyState == 4) {
                    r = xhr.responseText;
                }   
            }

    });

Thanks in advance!

도움이 되었습니까?

해결책

GM_xmlhttpRequest is asynchronous by default.

http://wiki.greasespot.net/GM_xmlhttpRequest

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top