uievents.idl (6872B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: UI Events (https://w3c.github.io/uievents/) 5 6 [Exposed=Window] 7 interface UIEvent : Event { 8 constructor(DOMString type, optional UIEventInit eventInitDict = {}); 9 readonly attribute Window? view; 10 readonly attribute long detail; 11 }; 12 13 dictionary UIEventInit : EventInit { 14 Window? view = null; 15 long detail = 0; 16 }; 17 18 [Exposed=Window] 19 interface FocusEvent : UIEvent { 20 constructor(DOMString type, optional FocusEventInit eventInitDict = {}); 21 readonly attribute EventTarget? relatedTarget; 22 }; 23 24 dictionary FocusEventInit : UIEventInit { 25 EventTarget? relatedTarget = null; 26 }; 27 28 [Exposed=Window] 29 interface MouseEvent : UIEvent { 30 constructor(DOMString type, optional MouseEventInit eventInitDict = {}); 31 readonly attribute long screenX; 32 readonly attribute long screenY; 33 readonly attribute long clientX; 34 readonly attribute long clientY; 35 readonly attribute long layerX; 36 readonly attribute long layerY; 37 38 readonly attribute boolean ctrlKey; 39 readonly attribute boolean shiftKey; 40 readonly attribute boolean altKey; 41 readonly attribute boolean metaKey; 42 43 readonly attribute short button; 44 readonly attribute unsigned short buttons; 45 46 readonly attribute EventTarget? relatedTarget; 47 48 boolean getModifierState(DOMString keyArg); 49 }; 50 51 dictionary MouseEventInit : EventModifierInit { 52 long screenX = 0; 53 long screenY = 0; 54 long clientX = 0; 55 long clientY = 0; 56 57 short button = 0; 58 unsigned short buttons = 0; 59 EventTarget? relatedTarget = null; 60 }; 61 62 dictionary EventModifierInit : UIEventInit { 63 boolean ctrlKey = false; 64 boolean shiftKey = false; 65 boolean altKey = false; 66 boolean metaKey = false; 67 68 boolean modifierAltGraph = false; 69 boolean modifierCapsLock = false; 70 boolean modifierFn = false; 71 boolean modifierFnLock = false; 72 boolean modifierHyper = false; 73 boolean modifierNumLock = false; 74 boolean modifierScrollLock = false; 75 boolean modifierSuper = false; 76 boolean modifierSymbol = false; 77 boolean modifierSymbolLock = false; 78 }; 79 80 [Exposed=Window] 81 interface WheelEvent : MouseEvent { 82 constructor(DOMString type, optional WheelEventInit eventInitDict = {}); 83 // DeltaModeCode 84 const unsigned long DOM_DELTA_PIXEL = 0x00; 85 const unsigned long DOM_DELTA_LINE = 0x01; 86 const unsigned long DOM_DELTA_PAGE = 0x02; 87 88 readonly attribute double deltaX; 89 readonly attribute double deltaY; 90 readonly attribute double deltaZ; 91 readonly attribute unsigned long deltaMode; 92 }; 93 94 dictionary WheelEventInit : MouseEventInit { 95 double deltaX = 0.0; 96 double deltaY = 0.0; 97 double deltaZ = 0.0; 98 unsigned long deltaMode = 0; 99 }; 100 101 [Exposed=Window] 102 interface InputEvent : UIEvent { 103 constructor(DOMString type, optional InputEventInit eventInitDict = {}); 104 readonly attribute USVString? data; 105 readonly attribute boolean isComposing; 106 readonly attribute DOMString inputType; 107 }; 108 109 dictionary InputEventInit : UIEventInit { 110 DOMString? data = null; 111 boolean isComposing = false; 112 DOMString inputType = ""; 113 }; 114 115 [Exposed=Window] 116 interface KeyboardEvent : UIEvent { 117 constructor(DOMString type, optional KeyboardEventInit eventInitDict = {}); 118 // KeyLocationCode 119 const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00; 120 const unsigned long DOM_KEY_LOCATION_LEFT = 0x01; 121 const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02; 122 const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03; 123 124 readonly attribute DOMString key; 125 readonly attribute DOMString code; 126 readonly attribute unsigned long location; 127 128 readonly attribute boolean ctrlKey; 129 readonly attribute boolean shiftKey; 130 readonly attribute boolean altKey; 131 readonly attribute boolean metaKey; 132 133 readonly attribute boolean repeat; 134 readonly attribute boolean isComposing; 135 136 boolean getModifierState(DOMString keyArg); 137 }; 138 139 dictionary KeyboardEventInit : EventModifierInit { 140 DOMString key = ""; 141 DOMString code = ""; 142 unsigned long location = 0; 143 boolean repeat = false; 144 boolean isComposing = false; 145 }; 146 147 [Exposed=Window] 148 interface CompositionEvent : UIEvent { 149 constructor(DOMString type, optional CompositionEventInit eventInitDict = {}); 150 readonly attribute USVString data; 151 }; 152 153 dictionary CompositionEventInit : UIEventInit { 154 DOMString data = ""; 155 }; 156 157 partial interface UIEvent { 158 // Deprecated in this specification 159 undefined initUIEvent(DOMString typeArg, 160 optional boolean bubblesArg = false, 161 optional boolean cancelableArg = false, 162 optional Window? viewArg = null, 163 optional long detailArg = 0); 164 }; 165 166 partial interface MouseEvent { 167 // Deprecated in this specification 168 undefined initMouseEvent(DOMString typeArg, 169 optional boolean bubblesArg = false, 170 optional boolean cancelableArg = false, 171 optional Window? viewArg = null, 172 optional long detailArg = 0, 173 optional long screenXArg = 0, 174 optional long screenYArg = 0, 175 optional long clientXArg = 0, 176 optional long clientYArg = 0, 177 optional boolean ctrlKeyArg = false, 178 optional boolean altKeyArg = false, 179 optional boolean shiftKeyArg = false, 180 optional boolean metaKeyArg = false, 181 optional short buttonArg = 0, 182 optional EventTarget? relatedTargetArg = null); 183 }; 184 185 partial interface KeyboardEvent { 186 // Originally introduced (and deprecated) in this specification 187 undefined initKeyboardEvent(DOMString typeArg, 188 optional boolean bubblesArg = false, 189 optional boolean cancelableArg = false, 190 optional Window? viewArg = null, 191 optional DOMString keyArg = "", 192 optional unsigned long locationArg = 0, 193 optional boolean ctrlKey = false, 194 optional boolean altKey = false, 195 optional boolean shiftKey = false, 196 optional boolean metaKey = false); 197 }; 198 199 partial interface CompositionEvent { 200 // Originally introduced (and deprecated) in this specification 201 undefined initCompositionEvent(DOMString typeArg, 202 optional boolean bubblesArg = false, 203 optional boolean cancelableArg = false, 204 optional WindowProxy? viewArg = null, 205 optional DOMString dataArg = ""); 206 }; 207 208 partial interface UIEvent { 209 // The following support legacy user agents 210 readonly attribute unsigned long which; 211 }; 212 213 partial dictionary UIEventInit { 214 unsigned long which = 0; 215 }; 216 217 partial interface KeyboardEvent { 218 // The following support legacy user agents 219 readonly attribute unsigned long charCode; 220 readonly attribute unsigned long keyCode; 221 }; 222 223 partial dictionary KeyboardEventInit { 224 // The following support legacy user agents 225 unsigned long charCode = 0; 226 unsigned long keyCode = 0; 227 }; 228 229 [Exposed=Window] 230 interface TextEvent : UIEvent { 231 readonly attribute DOMString data; 232 undefined initTextEvent(DOMString type, 233 optional boolean bubbles = false, 234 optional boolean cancelable = false, 235 optional Window? view = null, 236 optional DOMString data = "undefined"); 237 };