Merge pull request #421 from dudeman/next
remove script from parentNode since $document.body may have changed
This commit is contained in:
commit
509ecbe3d9
1 changed files with 2 additions and 2 deletions
|
|
@ -877,7 +877,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: {
|
||||||
|
|
@ -888,7 +888,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