Chromium Code Reviews| 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 { |
|
haraken
2015/03/01 08:53:07
Add final.
philipj_slow
2015/03/01 15:32:14
Hmm, does that do anything on a class that inherit
|
| +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 |