Bug 1572460 - Refactor `selection` out of the `InspectorFront`. r=yulia
[gecko.git] / dom / html / HTMLTemplateElement.h
blob1e0de4678d35a4f24a3faa9d8313c9e310bf5692
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_HTMLTemplateElement_h
8 #define mozilla_dom_HTMLTemplateElement_h
10 #include "mozilla/Attributes.h"
11 #include "nsGenericHTMLElement.h"
12 #include "mozilla/dom/DocumentFragment.h"
14 namespace mozilla {
15 namespace dom {
17 class HTMLTemplateElement final : public nsGenericHTMLElement {
18 public:
19 explicit HTMLTemplateElement(
20 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
22 // nsISupports
23 NS_DECL_ISUPPORTS_INHERITED
25 NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLTemplateElement, _template);
27 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLTemplateElement,
28 nsGenericHTMLElement)
30 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
32 DocumentFragment* Content() { return mContent; }
34 protected:
35 virtual ~HTMLTemplateElement();
37 virtual JSObject* WrapNode(JSContext* aCx,
38 JS::Handle<JSObject*> aGivenProto) override;
40 RefPtr<DocumentFragment> mContent;
43 } // namespace dom
44 } // namespace mozilla
46 #endif // mozilla_dom_HTMLTemplateElement_h