tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

HTMLMapElement.h (1316B)


      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/. */
      6 
      7 #ifndef mozilla_dom_HTMLMapElement_h
      8 #define mozilla_dom_HTMLMapElement_h
      9 
     10 #include "nsGenericHTMLElement.h"
     11 #include "nsGkAtoms.h"
     12 
     13 class nsContentList;
     14 
     15 namespace mozilla::dom {
     16 
     17 class HTMLMapElement final : public nsGenericHTMLElement {
     18 public:
     19  explicit HTMLMapElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
     20 
     21  // nsISupports
     22  NS_DECL_ISUPPORTS_INHERITED
     23 
     24  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
     25 
     26  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLMapElement, nsGenericHTMLElement)
     27 
     28  void GetName(nsAString& aValue) { GetHTMLAttr(nsGkAtoms::name, aValue); }
     29  void SetName(const nsAString& aName, ErrorResult& aError) {
     30    SetHTMLAttr(nsGkAtoms::name, aName, aError);
     31  }
     32  nsIHTMLCollection* Areas();
     33 
     34  JSObject* WrapNode(JSContext*, JS::Handle<JSObject*> aGivenProto) override;
     35 
     36 protected:
     37  ~HTMLMapElement() = default;
     38 
     39  RefPtr<nsContentList> mAreas;
     40 };
     41 
     42 }  // namespace mozilla::dom
     43 
     44 #endif  // mozilla_dom_HTMLMapElement_h