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::dom
{
16 class HTMLTemplateElement final
: public nsGenericHTMLElement
{
18 explicit HTMLTemplateElement(
19 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
22 NS_DECL_ISUPPORTS_INHERITED
24 NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLTemplateElement
, _template
);
26 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLTemplateElement
,
29 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
31 DocumentFragment
* Content() { return mContent
; }
34 virtual ~HTMLTemplateElement();
36 virtual JSObject
* WrapNode(JSContext
* aCx
,
37 JS::Handle
<JSObject
*> aGivenProto
) override
;
39 RefPtr
<DocumentFragment
> mContent
;
42 } // namespace mozilla::dom
44 #endif // mozilla_dom_HTMLTemplateElement_h