Line data Source code
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_HTMLModElement_h
8 : #define mozilla_dom_HTMLModElement_h
9 :
10 : #include "mozilla/Attributes.h"
11 : #include "nsGenericHTMLElement.h"
12 : #include "nsGkAtoms.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : class HTMLModElement final : public nsGenericHTMLElement
18 : {
19 : public:
20 : explicit HTMLModElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
21 :
22 : virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
23 : bool aPreallocateChildren) const override;
24 :
25 0 : void GetCite(nsString& aCite)
26 : {
27 0 : GetHTMLURIAttr(nsGkAtoms::cite, aCite);
28 0 : }
29 0 : void SetCite(const nsAString& aCite, ErrorResult& aRv)
30 : {
31 0 : SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
32 0 : }
33 0 : void GetDateTime(DOMString& aDateTime)
34 : {
35 0 : GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
36 0 : }
37 0 : void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv)
38 : {
39 0 : SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);
40 0 : }
41 :
42 : protected:
43 : virtual ~HTMLModElement();
44 :
45 : virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
46 : };
47 :
48 : } // namespace dom
49 : } // namespace mozilla
50 :
51 : #endif // mozilla_dom_HTMLModElement_h
|