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