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"
17 class HTMLTemplateElement final
: public nsGenericHTMLElement
{
19 explicit HTMLTemplateElement(
20 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
23 NS_DECL_ISUPPORTS_INHERITED
25 NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLTemplateElement
, _template
);
27 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLTemplateElement
,
30 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
32 DocumentFragment
* Content() { return mContent
; }
35 virtual ~HTMLTemplateElement();
37 virtual JSObject
* WrapNode(JSContext
* aCx
,
38 JS::Handle
<JSObject
*> aGivenProto
) override
;
40 RefPtr
<DocumentFragment
> mContent
;
44 } // namespace mozilla
46 #endif // mozilla_dom_HTMLTemplateElement_h