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

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

Issue 14852011: Implement document.currentScript (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 84cf458a4a71e21e4ebaf58b049515a5fd6f0599..3642237ba2220009f240367db21f28aef5e4894d 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,16 @@ KURL Document::openSearchDescriptionURL()
return KURL();
}
+void Document::setCurrentScript(PassRefPtr<HTMLScriptElement> newCurrentScript)
+{
+ if (!newCurrentScript) {
+ m_currentScript.clear();
esprehn 2013/05/14 22:50:09 We usually prefer to do these in separate methods
+ return;
+ }
+
+ m_currentScript = newCurrentScript;
+}
+
void Document::applyXSLTransform(ProcessingInstruction* pi)
{
RefPtr<XSLTProcessor> processor = XSLTProcessor::create();

Powered by Google App Engine
This is Rietveld 408576698