mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Make all arguments to init*Event() optional except the first
This resolves #810.
This commit is contained in:
parent
c582c801da
commit
faa1c5c0af
20 changed files with 175 additions and 169 deletions
|
|
@ -8,7 +8,7 @@ interface CommandEvent : Event {
|
|||
readonly attribute DOMString? command;
|
||||
|
||||
void initCommandEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
DOMString? command);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional DOMString? command = null);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ interface CompositionEvent : UIEvent
|
|||
partial interface CompositionEvent
|
||||
{
|
||||
void initCompositionEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
Window? viewArg,
|
||||
DOMString? dataArg,
|
||||
DOMString localeArg);
|
||||
optional boolean canBubbleArg = false,
|
||||
optional boolean cancelableArg = false,
|
||||
optional Window? viewArg = null,
|
||||
optional DOMString? dataArg = null,
|
||||
optional DOMString localeArg = "");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ interface CustomEvent : Event
|
|||
// initCustomEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initCustomEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
any detail);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional any detail = null);
|
||||
};
|
||||
|
||||
dictionary CustomEventInit : EventInit
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ dictionary DeviceMotionEventInit : EventInit {
|
|||
// Mozilla extensions.
|
||||
partial interface DeviceMotionEvent {
|
||||
void initDeviceMotionEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
DeviceAccelerationInit acceleration,
|
||||
DeviceAccelerationInit accelerationIncludingGravity,
|
||||
DeviceRotationRateInit rotationRate,
|
||||
double? interval);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional DeviceAccelerationInit acceleration,
|
||||
optional DeviceAccelerationInit accelerationIncludingGravity,
|
||||
optional DeviceRotationRateInit rotationRate,
|
||||
optional double? interval = null);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ interface DeviceOrientationEvent : Event
|
|||
|
||||
// initDeviceOrientationEvent is a Gecko specific deprecated method.
|
||||
void initDeviceOrientationEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
double? alpha,
|
||||
double? beta,
|
||||
double? gamma,
|
||||
boolean absolute);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional double? alpha = null,
|
||||
optional double? beta = null,
|
||||
optional double? gamma = null,
|
||||
optional boolean absolute = false);
|
||||
};
|
||||
|
||||
dictionary DeviceOrientationEventInit : EventInit
|
||||
|
|
|
|||
|
|
@ -10,21 +10,21 @@ interface DragEvent : MouseEvent
|
|||
readonly attribute DataTransfer? dataTransfer;
|
||||
|
||||
void initDragEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? aView,
|
||||
long aDetail,
|
||||
long aScreenX,
|
||||
long aScreenY,
|
||||
long aClientX,
|
||||
long aClientY,
|
||||
boolean aCtrlKey,
|
||||
boolean aAltKey,
|
||||
boolean aShiftKey,
|
||||
boolean aMetaKey,
|
||||
unsigned short aButton,
|
||||
EventTarget? aRelatedTarget,
|
||||
DataTransfer? aDataTransfer);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Window? aView = null,
|
||||
optional long aDetail = 0,
|
||||
optional long aScreenX = 0,
|
||||
optional long aScreenY = 0,
|
||||
optional long aClientX = 0,
|
||||
optional long aClientY = 0,
|
||||
optional boolean aCtrlKey = false,
|
||||
optional boolean aAltKey = false,
|
||||
optional boolean aShiftKey = false,
|
||||
optional boolean aMetaKey = false,
|
||||
optional unsigned short aButton = 0,
|
||||
optional EventTarget? aRelatedTarget = null,
|
||||
optional DataTransfer? aDataTransfer = null);
|
||||
};
|
||||
|
||||
dictionary DragEventInit : MouseEventInit
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@ interface Event {
|
|||
[Pure]
|
||||
readonly attribute DOMHighResTimeStamp timeStamp;
|
||||
|
||||
void initEvent(DOMString type, boolean bubbles, boolean cancelable);
|
||||
void initEvent(DOMString type,
|
||||
optional boolean bubbles = false,
|
||||
optional boolean cancelable = false);
|
||||
attribute boolean cancelBubble;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ interface HashChangeEvent : Event
|
|||
readonly attribute DOMString newURL;
|
||||
|
||||
void initHashChangeEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
DOMString oldURLArg,
|
||||
DOMString newURLArg);
|
||||
optional boolean canBubbleArg = false,
|
||||
optional boolean cancelableArg = false,
|
||||
optional DOMString oldURLArg = "",
|
||||
optional DOMString newURLArg = "");
|
||||
};
|
||||
|
||||
dictionary HashChangeEventInit : EventInit
|
||||
|
|
|
|||
|
|
@ -225,13 +225,13 @@ interface KeyEvent
|
|||
const unsigned long DOM_VK_WIN_OEM_CLEAR = 0xFE;
|
||||
|
||||
void initKeyEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? view,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
boolean shiftKey,
|
||||
boolean metaKey,
|
||||
unsigned long keyCode,
|
||||
unsigned long charCode);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Window? view = null,
|
||||
optional boolean ctrlKey = false,
|
||||
optional boolean altKey = false,
|
||||
optional boolean shiftKey = false,
|
||||
optional boolean metaKey = false,
|
||||
optional unsigned long keyCode = 0,
|
||||
optional unsigned long charCode = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,10 +43,14 @@ interface MessageEvent : Event {
|
|||
[Pure, Cached, Frozen]
|
||||
readonly attribute sequence<MessagePort> ports;
|
||||
|
||||
void initMessageEvent(DOMString type, boolean bubbles, boolean cancelable,
|
||||
any data, DOMString origin, DOMString lastEventId,
|
||||
(WindowProxy or MessagePort)? source,
|
||||
sequence<MessagePort> ports);
|
||||
void initMessageEvent(DOMString type,
|
||||
optional boolean bubbles = false,
|
||||
optional boolean cancelable = false,
|
||||
optional any data = null,
|
||||
optional DOMString origin = "",
|
||||
optional DOMString lastEventId = "",
|
||||
optional (WindowProxy or MessagePort)? source = null,
|
||||
optional sequence<MessagePort> ports = []);
|
||||
};
|
||||
|
||||
dictionary MessageEventInit : EventInit {
|
||||
|
|
|
|||
|
|
@ -32,21 +32,21 @@ interface MouseEvent : UIEvent {
|
|||
readonly attribute long movementY;
|
||||
|
||||
// Deprecated in DOM Level 3:
|
||||
void initMouseEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
Window? viewArg,
|
||||
long detailArg,
|
||||
long screenXArg,
|
||||
long screenYArg,
|
||||
long clientXArg,
|
||||
long clientYArg,
|
||||
boolean ctrlKeyArg,
|
||||
boolean altKeyArg,
|
||||
boolean shiftKeyArg,
|
||||
boolean metaKeyArg,
|
||||
short buttonArg,
|
||||
EventTarget? relatedTargetArg);
|
||||
void initMouseEvent(DOMString typeArg,
|
||||
optional boolean canBubbleArg = false,
|
||||
optional boolean cancelableArg = false,
|
||||
optional Window? viewArg = null,
|
||||
optional long detailArg = 0,
|
||||
optional long screenXArg = 0,
|
||||
optional long screenYArg = 0,
|
||||
optional long clientXArg = 0,
|
||||
optional long clientYArg = 0,
|
||||
optional boolean ctrlKeyArg = false,
|
||||
optional boolean altKeyArg = false,
|
||||
optional boolean shiftKeyArg = false,
|
||||
optional boolean metaKeyArg = false,
|
||||
optional short buttonArg = 0,
|
||||
optional EventTarget? relatedTargetArg = null);
|
||||
// Introduced in DOM Level 3:
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
};
|
||||
|
|
@ -90,23 +90,23 @@ partial interface MouseEvent
|
|||
|
||||
readonly attribute unsigned short mozInputSource;
|
||||
|
||||
void initNSMouseEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
Window? viewArg,
|
||||
long detailArg,
|
||||
long screenXArg,
|
||||
long screenYArg,
|
||||
long clientXArg,
|
||||
long clientYArg,
|
||||
boolean ctrlKeyArg,
|
||||
boolean altKeyArg,
|
||||
boolean shiftKeyArg,
|
||||
boolean metaKeyArg,
|
||||
short buttonArg,
|
||||
EventTarget? relatedTargetArg,
|
||||
float pressure,
|
||||
unsigned short inputSourceArg);
|
||||
void initNSMouseEvent(DOMString typeArg,
|
||||
optional boolean canBubbleArg = false,
|
||||
optional boolean cancelableArg = false,
|
||||
optional Window? viewArg = null,
|
||||
optional long detailArg = 0,
|
||||
optional long screenXArg = 0,
|
||||
optional long screenYArg = 0,
|
||||
optional long clientXArg = 0,
|
||||
optional long clientYArg = 0,
|
||||
optional boolean ctrlKeyArg = false,
|
||||
optional boolean altKeyArg = false,
|
||||
optional boolean shiftKeyArg = false,
|
||||
optional boolean metaKeyArg = false,
|
||||
optional short buttonArg = 0,
|
||||
optional EventTarget? relatedTargetArg = null,
|
||||
optional float pressure = 0,
|
||||
optional unsigned short inputSourceArg = 0);
|
||||
[ChromeOnly]
|
||||
readonly attribute boolean hitCluster; // True when touch occurs in a cluster of links
|
||||
|
||||
|
|
|
|||
|
|
@ -12,19 +12,19 @@ interface MouseScrollEvent : MouseEvent
|
|||
readonly attribute long axis;
|
||||
|
||||
void initMouseScrollEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? view,
|
||||
long detail,
|
||||
long screenX,
|
||||
long screenY,
|
||||
long clientX,
|
||||
long clientY,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
boolean shiftKey,
|
||||
boolean metaKey,
|
||||
unsigned short button,
|
||||
EventTarget? relatedTarget,
|
||||
long axis);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Window? view = null,
|
||||
optional long detail = 0,
|
||||
optional long screenX = 0,
|
||||
optional long screenY = 0,
|
||||
optional long clientX = 0,
|
||||
optional long clientY = 0,
|
||||
optional boolean ctrlKey = false,
|
||||
optional boolean altKey = false,
|
||||
optional boolean shiftKey = false,
|
||||
optional boolean metaKey = false,
|
||||
optional short button = 0,
|
||||
optional EventTarget? relatedTarget = null,
|
||||
optional long axis = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ interface MutationEvent : Event
|
|||
|
||||
[Throws]
|
||||
void initMutationEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Node? relatedNode,
|
||||
DOMString prevValue,
|
||||
DOMString newValue,
|
||||
DOMString attrName,
|
||||
unsigned short attrChange);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Node? relatedNode = null,
|
||||
optional DOMString prevValue = "",
|
||||
optional DOMString newValue = "",
|
||||
optional DOMString attrName = "",
|
||||
optional unsigned short attrChange = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ interface ScrollAreaEvent : UIEvent
|
|||
readonly attribute float height;
|
||||
|
||||
void initScrollAreaEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? view,
|
||||
long detail,
|
||||
float x,
|
||||
float y,
|
||||
float width,
|
||||
float height);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Window? view = null,
|
||||
optional long detail = 0,
|
||||
optional float x = 0,
|
||||
optional float y = 0,
|
||||
optional float width = 0,
|
||||
optional float height = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,22 +25,22 @@ interface SimpleGestureEvent : MouseEvent
|
|||
readonly attribute unsigned long clickCount;
|
||||
|
||||
void initSimpleGestureEvent(DOMString typeArg,
|
||||
boolean canBubbleArg,
|
||||
boolean cancelableArg,
|
||||
Window? viewArg,
|
||||
long detailArg,
|
||||
long screenXArg,
|
||||
long screenYArg,
|
||||
long clientXArg,
|
||||
long clientYArg,
|
||||
boolean ctrlKeyArg,
|
||||
boolean altKeyArg,
|
||||
boolean shiftKeyArg,
|
||||
boolean metaKeyArg,
|
||||
unsigned short buttonArg,
|
||||
EventTarget? relatedTargetArg,
|
||||
unsigned long allowedDirectionsArg,
|
||||
unsigned long directionArg,
|
||||
double deltaArg,
|
||||
unsigned long clickCount);
|
||||
optional boolean canBubbleArg = false,
|
||||
optional boolean cancelableArg = false,
|
||||
optional Window? viewArg = null,
|
||||
optional long detailArg = 0,
|
||||
optional long screenXArg = 0,
|
||||
optional long screenYArg = 0,
|
||||
optional long clientXArg = 0,
|
||||
optional long clientYArg = 0,
|
||||
optional boolean ctrlKeyArg = false,
|
||||
optional boolean altKeyArg = false,
|
||||
optional boolean shiftKeyArg = false,
|
||||
optional boolean metaKeyArg = false,
|
||||
optional short buttonArg = 0,
|
||||
optional EventTarget? relatedTargetArg = null,
|
||||
optional unsigned long allowedDirectionsArg = 0,
|
||||
optional unsigned long directionArg = 0,
|
||||
optional double deltaArg = 0,
|
||||
optional unsigned long clickCount = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ interface StorageEvent : Event
|
|||
|
||||
// Bug 1016053 - This is not spec compliant.
|
||||
void initStorageEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
DOMString? key,
|
||||
DOMString? oldValue,
|
||||
DOMString? newValue,
|
||||
DOMString? url,
|
||||
Storage? storageArea);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional DOMString? key = null,
|
||||
optional DOMString? oldValue = null,
|
||||
optional DOMString? newValue = null,
|
||||
optional DOMString? url = null,
|
||||
optional Storage? storageArea = null);
|
||||
};
|
||||
|
||||
dictionary StorageEventInit : EventInit
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@ interface TimeEvent : Event
|
|||
readonly attribute long detail;
|
||||
readonly attribute WindowProxy? view;
|
||||
void initTimeEvent(DOMString aType,
|
||||
Window? aView,
|
||||
long aDetail);
|
||||
optional Window? aView = null,
|
||||
optional long aDetail = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,15 +23,15 @@ interface TouchEvent : UIEvent {
|
|||
readonly attribute boolean shiftKey;
|
||||
|
||||
void initTouchEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? view,
|
||||
long detail,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
boolean shiftKey,
|
||||
boolean metaKey,
|
||||
TouchList? touches,
|
||||
TouchList? targetTouches,
|
||||
TouchList? changedTouches);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Window? view = null,
|
||||
optional long detail = 0,
|
||||
optional boolean ctrlKey = false,
|
||||
optional boolean altKey = false,
|
||||
optional boolean shiftKey = false,
|
||||
optional boolean metaKey = false,
|
||||
optional TouchList? touches = null,
|
||||
optional TouchList? targetTouches = null,
|
||||
optional TouchList? changedTouches = null);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ interface UIEvent : Event
|
|||
readonly attribute WindowProxy? view;
|
||||
readonly attribute long detail;
|
||||
void initUIEvent(DOMString aType,
|
||||
boolean aCanBubble,
|
||||
boolean aCancelable,
|
||||
Window? aView,
|
||||
long aDetail);
|
||||
optional boolean aCanBubble = false,
|
||||
optional boolean aCancelable = false,
|
||||
optional Window? aView = null,
|
||||
optional long aDetail = 0);
|
||||
};
|
||||
|
||||
// Additional DOM0 properties.
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@ interface XULCommandEvent : UIEvent
|
|||
readonly attribute Event? sourceEvent;
|
||||
|
||||
void initCommandEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? view,
|
||||
long detail,
|
||||
boolean ctrlKey,
|
||||
boolean altKey,
|
||||
boolean shiftKey,
|
||||
boolean metaKey,
|
||||
Event? sourceEvent);
|
||||
optional boolean canBubble = false,
|
||||
optional boolean cancelable = false,
|
||||
optional Window? view = null,
|
||||
optional long detail = 0,
|
||||
optional boolean ctrlKey = false,
|
||||
optional boolean altKey = false,
|
||||
optional boolean shiftKey = false,
|
||||
optional boolean metaKey = false,
|
||||
optional Event? sourceEvent = null);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue