CommandEvent.webidl (838B)
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 7 // https://html.spec.whatwg.org/multipage/interaction.html#the-commandevent-interface 8 [Exposed=Window,Func="mozilla::dom::CommandEvent::IsCallerChromeOrCommandForEnabled"] 9 interface CommandEvent : Event { 10 [Pref="dom.element.commandfor.enabled"] 11 constructor(DOMString type, optional CommandEventInit eventInitDict = {}); 12 13 readonly attribute DOMString command; 14 15 [Pref="dom.element.commandfor.enabled"] 16 readonly attribute Element? source; 17 }; 18 19 dictionary CommandEventInit : EventInit { 20 Element? source = null; 21 DOMString command = ""; 22 };