Source code
Revision control
Copy as Markdown
Other Tools
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// Source: UI Events (https://w3c.github.io/uievents/)
[Exposed=Window]
interface UIEvent : Event {
constructor(DOMString type, optional UIEventInit eventInitDict = {});
readonly attribute Window? view;
readonly attribute long detail;
};
dictionary UIEventInit : EventInit {
Window? view = null;
long detail = 0;
};
[Exposed=Window]
interface FocusEvent : UIEvent {
constructor(DOMString type, optional FocusEventInit eventInitDict = {});
readonly attribute EventTarget? relatedTarget;
};
dictionary FocusEventInit : UIEventInit {
EventTarget? relatedTarget = null;
};
[Exposed=Window]
interface InputEvent : UIEvent {
constructor(DOMString type, optional InputEventInit eventInitDict = {});
readonly attribute USVString? data;
readonly attribute boolean isComposing;
readonly attribute DOMString inputType;
};
dictionary InputEventInit : UIEventInit {
DOMString? data = null;
boolean isComposing = false;
DOMString inputType = "";
};
[Exposed=Window]
interface KeyboardEvent : UIEvent {
constructor(DOMString type, optional KeyboardEventInit eventInitDict = {});
// KeyLocationCode
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
readonly attribute DOMString key;
readonly attribute DOMString code;
readonly attribute unsigned long location;
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
readonly attribute boolean repeat;
readonly attribute boolean isComposing;
boolean getModifierState(DOMString keyArg);
};
dictionary KeyboardEventInit : EventModifierInit {
DOMString key = "";
DOMString code = "";
unsigned long location = 0;
boolean repeat = false;
boolean isComposing = false;
};
dictionary EventModifierInit : UIEventInit {
boolean ctrlKey = false;
boolean shiftKey = false;
boolean altKey = false;
boolean metaKey = false;
boolean modifierAltGraph = false;
boolean modifierCapsLock = false;
boolean modifierFn = false;
boolean modifierFnLock = false;
boolean modifierHyper = false;
boolean modifierNumLock = false;
boolean modifierScrollLock = false;
boolean modifierSuper = false;
boolean modifierSymbol = false;
boolean modifierSymbolLock = false;
};
[Exposed=Window]
interface CompositionEvent : UIEvent {
constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
readonly attribute USVString data;
};
dictionary CompositionEventInit : UIEventInit {
DOMString data = "";
};
partial interface UIEvent {
// Deprecated in this specification
undefined initUIEvent(DOMString typeArg,
optional boolean bubblesArg = false,
optional boolean cancelableArg = false,
optional Window? viewArg = null,
optional long detailArg = 0);
};
partial interface KeyboardEvent {
// Originally introduced (and deprecated) in this specification
undefined initKeyboardEvent(DOMString typeArg,
optional boolean bubblesArg = false,
optional boolean cancelableArg = false,
optional Window? viewArg = null,
optional DOMString keyArg = "",
optional unsigned long locationArg = 0,
optional boolean ctrlKey = false,
optional boolean altKey = false,
optional boolean shiftKey = false,
optional boolean metaKey = false);
};
partial interface CompositionEvent {
// Originally introduced (and deprecated) in this specification
undefined initCompositionEvent(DOMString typeArg,
optional boolean bubblesArg = false,
optional boolean cancelableArg = false,
optional WindowProxy? viewArg = null,
optional DOMString dataArg = "");
};
partial interface UIEvent {
// The following support legacy user agents
readonly attribute unsigned long which;
};
partial dictionary UIEventInit {
unsigned long which = 0;
};
partial interface KeyboardEvent {
// The following support legacy user agents
readonly attribute unsigned long charCode;
readonly attribute unsigned long keyCode;
};
partial dictionary KeyboardEventInit {
// The following support legacy user agents
unsigned long charCode = 0;
unsigned long keyCode = 0;
};
[Exposed=Window]
interface TextEvent : UIEvent {
readonly attribute DOMString data;
undefined initTextEvent(DOMString type,
optional boolean bubbles = false,
optional boolean cancelable = false,
optional Window? view = null,
optional DOMString data = "undefined");
};