Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / html / HTMLModElement.h
blobaa1a395c918aaf046bf42d5a1f5cd8dbc7d95845
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_HTMLModElement_h
8 #define mozilla_dom_HTMLModElement_h
10 #include "mozilla/Attributes.h"
11 #include "nsGenericHTMLElement.h"
12 #include "nsGkAtoms.h"
14 namespace mozilla::dom {
16 class HTMLModElement final : public nsGenericHTMLElement {
17 public:
18 explicit HTMLModElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
20 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
22 void GetCite(nsString& aCite) { GetHTMLURIAttr(nsGkAtoms::cite, aCite); }
23 void SetCite(const nsAString& aCite, ErrorResult& aRv) {
24 SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
26 void GetDateTime(DOMString& aDateTime) {
27 GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
29 void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv) {
30 SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);
33 protected:
34 virtual ~HTMLModElement();
36 virtual JSObject* WrapNode(JSContext* aCx,
37 JS::Handle<JSObject*> aGivenProto) override;
40 } // namespace mozilla::dom
42 #endif // mozilla_dom_HTMLModElement_h