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

Unified Diff: Source/core/dom/NonElementParentNode.h

Issue 967753003: Add the NonElementParentNode interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 10 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
« no previous file with comments | « Source/core/dom/DocumentFragment.idl ('k') | Source/core/dom/NonElementParentNode.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NonElementParentNode.h
diff --git a/Source/core/dom/NonElementParentNode.h b/Source/core/dom/NonElementParentNode.h
new file mode 100644
index 0000000000000000000000000000000000000000..f9989642a476480602f171da8d75c45490423423
--- /dev/null
+++ b/Source/core/dom/NonElementParentNode.h
@@ -0,0 +1,28 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NonElementParentNode_h
+#define NonElementParentNode_h
+
+#include "core/dom/Document.h"
+#include "core/dom/DocumentFragment.h"
+
+namespace blink {
+
+class NonElementParentNode {
+public:
+ static Element* getElementById(Document& document, const AtomicString& id)
+ {
+ return document.getElementById(id);
+ }
+
+ static Element* getElementById(DocumentFragment& fragment, const AtomicString& id)
+ {
+ return fragment.getElementById(id);
+ }
+};
+
+} // namespace blink
+
+#endif // NonElementParentNode_h
« no previous file with comments | « Source/core/dom/DocumentFragment.idl ('k') | Source/core/dom/NonElementParentNode.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698