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_HTMLTITLEElement_h_
8 #define mozilla_dom_HTMLTITLEElement_h_
10 #include "mozilla/Attributes.h"
11 #include "nsGenericHTMLElement.h"
12 #include "nsStubMutationObserver.h"
19 class HTMLTitleElement final
: public nsGenericHTMLElement
,
20 public nsStubMutationObserver
{
22 using Element::GetText
;
24 explicit HTMLTitleElement(
25 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
28 NS_DECL_ISUPPORTS_INHERITED
31 void GetText(DOMString
& aText
, ErrorResult
& aError
) const;
32 void SetText(const nsAString
& aText
, ErrorResult
& aError
);
34 // nsIMutationObserver
35 NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
36 NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
37 NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
38 NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
40 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
42 virtual nsresult
BindToTree(BindContext
&, nsINode
& aParent
) override
;
44 virtual void UnbindFromTree(bool aNullParent
= true) override
;
46 virtual void DoneAddingChildren(bool aHaveNotified
) override
;
49 virtual ~HTMLTitleElement();
51 JSObject
* WrapNode(JSContext
* cx
, JS::Handle
<JSObject
*> aGivenProto
) final
;
54 void SendTitleChangeEvent(bool aBound
);
58 } // namespace mozilla
60 #endif // mozilla_dom_HTMLTitleElement_h_