1
1
Bifurcation 0

Requests synchronous

synchronous requests made asynchronous
Cette révision appartient à :
Albirew 2015-05-04 23:33:53 +02:00
Parent 8164c7712f
révision e106673f70

Voir le fichier

@ -33,6 +33,7 @@ var resurrect={
if (contentDoc.documentURI.match(/^about:neterror/)) { if (contentDoc.documentURI.match(/^about:neterror/)) {
// Inject our content... // Inject our content...
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
// next must be synchronous, else, panel wont show in neterror page (TypeError: xhr.responseXML is null)
xhr.open('GET', 'chrome://resurrect/content/netError.xhtml', false); xhr.open('GET', 'chrome://resurrect/content/netError.xhtml', false);
xhr.send(null); xhr.send(null);
var resurrectFieldset = xhr.responseXML.getElementById('resurrect'); var resurrectFieldset = xhr.responseXML.getElementById('resurrect');
@ -171,7 +172,7 @@ var resurrect={
xhr.open('GET', xhr.open('GET',
'http://api.search.yahoo.com/WebSearchService/V1/'+ 'http://api.search.yahoo.com/WebSearchService/V1/'+
'webSearch?appid=firefox-resurrect&query='+encUrl+'&results=1', 'webSearch?appid=firefox-resurrect&query='+encUrl+'&results=1',
false); true);
xhr.send(null); xhr.send(null);
try { try {
@ -189,7 +190,7 @@ var resurrect={
'?AppId=FD382E93B5ABC456C5E34C238A906CAB1E6F9875'+ '?AppId=FD382E93B5ABC456C5E34C238A906CAB1E6F9875'+
'&Query=url:'+encUrl+ '&Query=url:'+encUrl+
'&Sources=web&Web.Count=1', '&Sources=web&Web.Count=1',
false); true);
xhr.send(null); xhr.send(null);
try { try {
@ -210,7 +211,7 @@ var resurrect={
].join(''); ].join('');
var xhr=new XMLHttpRequest(); var xhr=new XMLHttpRequest();
xhr.open('GET', apiUrl, false); xhr.open('GET', apiUrl, true);
xhr.send(null); xhr.send(null);
try { try {