beautify_js
This commit is contained in:
parent
0febe4f5fd
commit
5c2f32e184
208 changed files with 3891 additions and 1474 deletions
|
@ -6,15 +6,15 @@ function iframeActiveXGet(url, onSuccess, onError) {
|
|||
|
||||
var iframeName = Math.random();
|
||||
var iframe = createActiveXFrame(iframeName, url);
|
||||
|
||||
|
||||
CallbackRegistry[iframeName] = function(data) {
|
||||
iframeOk = true;
|
||||
iframeOk = true;
|
||||
onSuccess(data);
|
||||
}
|
||||
|
||||
iframe.onload = function() {
|
||||
iframe.onload = function() {
|
||||
iframe.parentNode.removeChild(iframe); // очистка
|
||||
delete CallbackRegistry[iframeName];
|
||||
delete CallbackRegistry[iframeName];
|
||||
if (!iframeOk) onError(); // если коллбэк не вызвался - что-то не так
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,6 @@ function createActiveXFrame(name, src) {
|
|||
}
|
||||
|
||||
src = src || 'javascript:false'; // пустой src
|
||||
htmlfile.body.insertAdjacentHTML('beforeEnd', "<iframe name='"+name+"' src='"+src+"'></iframe>");
|
||||
htmlfile.body.insertAdjacentHTML('beforeEnd', "<iframe name='" + name + "' src='" + src + "'></iframe>");
|
||||
return htmlfile.body.lastChild; // window in .document.parentWindow
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue