mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2435 - Declare PromiseRejectionEvent WebIDL
Based-on: m-c 1338059
This commit is contained in:
parent
f059bb0a59
commit
511a9376e3
3 changed files with 24 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ def idlTypeNeedsCycleCollection(type):
|
|||
type.isObject() or
|
||||
type.isSpiderMonkeyInterface()):
|
||||
return False
|
||||
elif type.isCallback() or type.isGeckoInterface():
|
||||
elif type.isCallback() or type.isPromise() or type.isGeckoInterface():
|
||||
return True
|
||||
elif type.isUnion():
|
||||
return any(idlTypeNeedsCycleCollection(t) for t in type.flatMemberTypes)
|
||||
|
|
|
|||
22
dom/webidl/PromiseRejectionEvent.webidl
Normal file
22
dom/webidl/PromiseRejectionEvent.webidl
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* -*- 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/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* https://html.spec.whatwg.org/multipage/webappapis.html#the-promiserejectionevent-interface
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, PromiseRejectionEventInit eventInitDict),
|
||||
Exposed=(Window,Worker)]
|
||||
interface PromiseRejectionEvent : Event
|
||||
{
|
||||
[BinaryName="rejectedPromise"]
|
||||
readonly attribute Promise<any> promise;
|
||||
readonly attribute any reason;
|
||||
};
|
||||
|
||||
dictionary PromiseRejectionEventInit : EventInit {
|
||||
required Promise<any> promise;
|
||||
any reason;
|
||||
};
|
||||
|
|
@ -695,6 +695,7 @@ GENERATED_EVENTS_WEBIDL_FILES = [
|
|||
'PopStateEvent.webidl',
|
||||
'PopupBlockedEvent.webidl',
|
||||
'ProgressEvent.webidl',
|
||||
'PromiseRejectionEvent.webidl',
|
||||
'RecordErrorEvent.webidl',
|
||||
'ScrollViewChangeEvent.webidl',
|
||||
'ServiceWorkerMessageEvent.webidl',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue