author Emilio Cobos Álvarez <>
Fri, 22 Jun 2018 21:47:29 +0200
changeset 423850 65df1f8bb3cb7c95cadc91b542c1a8b9c11309ac
parent 410522 ad610b422f26f43d9d61a46f806ea2271b6ebe0e
child 429532 2442b01a0d0603080476b3dcdacf010065ec9d0b
permissions -rw-r--r--
Bug 1470545: Add chromeonly "shadowrootattached" event for devtools. r=smaug Summary: document.addEventListener("shadowrootattached", e => { // Do stuff with composedTarget. }); I didn't bother to add tests for the event itself since this is going to get tested in bug 1449333, but I can look into writing a chrome mochitest if you want. Test Plan: See above. Reviewers: smaug Bug #: 1470545 Differential Revision: MozReview-Commit-ID: 55cVMSsznMS

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef mozilla_dom_HTMLTITLEElement_h_
#define mozilla_dom_HTMLTITLEElement_h_

#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsStubMutationObserver.h"

namespace mozilla {
class ErrorResult;

namespace dom {

class HTMLTitleElement final : public nsGenericHTMLElement,
                               public nsStubMutationObserver
  using Element::GetText;

  explicit HTMLTitleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);

  // nsISupports

  void GetText(DOMString& aText, ErrorResult& aError);
  void SetText(const nsAString& aText, ErrorResult& aError);

  // nsIMutationObserver

  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                         bool aPreallocateChildren) const override;

  virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent,
                              nsIContent *aBindingParent,
                              bool aCompileEventHandlers) override;

  virtual void UnbindFromTree(bool aDeep = true,
                              bool aNullParent = true) override;

  virtual void DoneAddingChildren(bool aHaveNotified) override;

  virtual ~HTMLTitleElement();

  JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;

  void SendTitleChangeEvent(bool aBound);

} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_HTMLTitleElement_h_