Files
tubestation/dom/chrome-webidl/StyleSheetRemovedEvent.webidl
Nicolas Chevobbe 3c3448aad6 Bug 1771113 - Add chromeOnly StyleSheetRemoved event, emitted when a stylesheet is removed. r=emilio.
This new event will be consumed by DevTools to update style information.

As for `StyleSheetApplicableStateChanged`, this event is emitted from the document.
It's only enabled when `document.styleSheetChangeEventsEnabled` is set to true.

The existing test around the `StyleSheetApplicableStateChanged` is renamed and
modified to assert both events when stylesheets are added, modified and removed.

Differential Revision: https://phabricator.services.mozilla.com/D147271
2023-08-10 14:36:03 +00:00

18 lines
604 B
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 http://mozilla.org/MPL/2.0/.
*/
[ChromeOnly, Exposed=Window]
interface StyleSheetRemovedEvent : Event {
constructor(DOMString type,
optional StyleSheetRemovedEventInit eventInitDict = {});
readonly attribute CSSStyleSheet? stylesheet;
};
dictionary StyleSheetRemovedEventInit : EventInit {
CSSStyleSheet? stylesheet = null;
};