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_HTMLMapElement_h
8 #define mozilla_dom_HTMLMapElement_h
10 #include "mozilla/Attributes.h"
11 #include "nsGenericHTMLElement.h"
12 #include "nsGkAtoms.h"
16 namespace mozilla::dom
{
18 class HTMLMapElement final
: public nsGenericHTMLElement
{
20 explicit HTMLMapElement(already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
23 NS_DECL_ISUPPORTS_INHERITED
25 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
27 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLMapElement
, nsGenericHTMLElement
)
29 void GetName(nsAString
& aValue
) { GetHTMLAttr(nsGkAtoms::name
, aValue
); }
30 void SetName(const nsAString
& aName
, ErrorResult
& aError
) {
31 SetHTMLAttr(nsGkAtoms::name
, aName
, aError
);
33 nsIHTMLCollection
* Areas();
35 JSObject
* WrapNode(JSContext
*, JS::Handle
<JSObject
*> aGivenProto
) override
;
38 ~HTMLMapElement() = default;
40 RefPtr
<nsContentList
> mAreas
;
43 } // namespace mozilla::dom
45 #endif // mozilla_dom_HTMLMapElement_h