fune/dom/chrome-webidl/StyleSheetApplicableStateChangeEvent.webidl
Nicolas Chevobbe f086602a6f 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

22 lines
718 B
Text

/* -*- 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 StyleSheetApplicableStateChangeEvent : Event
{
constructor(DOMString type,
optional StyleSheetApplicableStateChangeEventInit eventInitDict = {});
readonly attribute CSSStyleSheet? stylesheet;
readonly attribute boolean applicable;
};
dictionary StyleSheetApplicableStateChangeEventInit : EventInit
{
CSSStyleSheet? stylesheet = null;
boolean applicable = false;
};