Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(689)

Unified Diff: Source/core/dom/Document.cpp

Issue 14852011: Implement document.currentScript (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 8950dc3b2d2647704a6ae4ac86380e3a8e6bbe47..971bff175bf55a64a28d3bd6260f75b4a79a278e 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -123,6 +123,7 @@
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLMapElement.h"
#include "core/html/HTMLNameCollection.h"
+#include "core/html/HTMLScriptElement.h"
#include "core/html/HTMLStyleElement.h"
#include "core/html/HTMLTitleElement.h"
#include "core/html/PluginDocument.h"
@@ -3919,6 +3920,21 @@ KURL Document::openSearchDescriptionURL()
return KURL();
}
+void Document::setCurrentScript(PassRefPtr<HTMLScriptElement> newCurrentScript)
+{
+ if (!newCurrentScript) {
+ m_currentScript.clear();
+ return;
+ }
esprehn 2013/05/15 16:08:16 Please remove, you can add ASSERT(newCurrentScript
+
+ m_currentScript = newCurrentScript;
+}
+
+void Document::clearCurrentScript()
+{
+ m_currentScript.clear();
+}
+
void Document::applyXSLTransform(ProcessingInstruction* pi)
{
RefPtr<XSLTProcessor> processor = XSLTProcessor::create();

Powered by Google App Engine
This is Rietveld 408576698