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