remove script from parentNode since $document.body may have changed
This commit is contained in:
parent
d418423eec
commit
e0855cce65
1 changed files with 2 additions and 2 deletions
|
|
@ -874,7 +874,7 @@ var m = (function app(window, undefined) {
|
||||||
var script = $document.createElement("script");
|
var script = $document.createElement("script");
|
||||||
|
|
||||||
window[callbackKey] = function(resp) {
|
window[callbackKey] = function(resp) {
|
||||||
$document.body.removeChild(script);
|
script.parentNode.removeChild(script);
|
||||||
options.onload({
|
options.onload({
|
||||||
type: "load",
|
type: "load",
|
||||||
target: {
|
target: {
|
||||||
|
|
@ -885,7 +885,7 @@ var m = (function app(window, undefined) {
|
||||||
};
|
};
|
||||||
|
|
||||||
script.onerror = function(e) {
|
script.onerror = function(e) {
|
||||||
$document.body.removeChild(script);
|
script.parentNode.removeChild(script);
|
||||||
|
|
||||||
options.onerror({
|
options.onerror({
|
||||||
type: "error",
|
type: "error",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue