CloseWatcher.webidl (747B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this IDL file is 7 * https://whatpr.org/html/10168/interaction.html#closewatcher 8 */ 9 [Exposed=Window, Pref="dom.closewatcher.enabled"] 10 interface CloseWatcher : EventTarget { 11 [Throws] constructor(optional CloseWatcherOptions options = {}); 12 13 undefined requestClose(); 14 undefined close(); 15 undefined destroy(); 16 17 attribute EventHandler oncancel; 18 attribute EventHandler onclose; 19 }; 20 21 dictionary CloseWatcherOptions { 22 AbortSignal signal; 23 };