Index: Source/core/svg/SVGScriptElement.cpp |
diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp |
index a9508b0147234746f1f452008b3c90c4dc792a6f..aed347235f0873f06885603424445d49e6afde42 100644 |
--- a/Source/core/svg/SVGScriptElement.cpp |
+++ b/Source/core/svg/SVGScriptElement.cpp |
@@ -27,6 +27,7 @@ |
#include "core/XLinkNames.h" |
#include "core/dom/Attribute.h" |
#include "core/dom/ScriptLoader.h" |
+#include "core/dom/ScriptRunner.h" |
#include "core/events/Event.h" |
namespace blink { |
@@ -123,6 +124,12 @@ void SVGScriptElement::childrenChanged(const ChildrenChange& change) |
m_loader->childrenChanged(); |
} |
+void SVGScriptElement::didMoveToNewDocument(Document& oldDocument) |
+{ |
+ oldDocument.scriptRunner()->movePendingAsyncScript(document().scriptRunner(), m_loader.get()); |
+ SVGElement::didMoveToNewDocument(oldDocument); |
+} |
+ |
bool SVGScriptElement::isURLAttribute(const Attribute& attribute) const |
{ |
return attribute.name() == AtomicString(sourceAttributeValue()); |