mirror of
https://github.com/samsonjs/gitter.git
synced 2026-03-25 09:25:45 +00:00
remove script elements used for JSONP calls
This commit is contained in:
parent
d997c74d70
commit
274b6e4802
1 changed files with 3 additions and 0 deletions
|
|
@ -388,6 +388,7 @@
|
|||
, head = oDOC.head || oDOC.getElementsByTagName("head")
|
||||
|
||||
// loading code borrowed directly from LABjs itself
|
||||
// (now removes script elem when done and nullifies its reference --sjs)
|
||||
setTimeout(function () {
|
||||
if ("item" in head) { // check if ref is still a live node list
|
||||
if (!head[0]) { // append_to node not yet ready
|
||||
|
|
@ -403,6 +404,8 @@
|
|||
return false
|
||||
}
|
||||
scriptElem.onload = scriptElem.onreadystatechange = null
|
||||
scriptElem.parentNode.removeChild(scriptElem)
|
||||
scriptElem = null
|
||||
scriptdone = true
|
||||
};
|
||||
scriptElem.src = url
|
||||
|
|
|
|||
Loading…
Reference in a new issue