diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/dom/Event.idl | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/dom/Event.idl')
-rw-r--r-- | Source/WebCore/dom/Event.idl | 85 |
1 files changed, 29 insertions, 56 deletions
diff --git a/Source/WebCore/dom/Event.idl b/Source/WebCore/dom/Event.idl index bfb221e03..70f9bfeb3 100644 --- a/Source/WebCore/dom/Event.idl +++ b/Source/WebCore/dom/Event.idl @@ -18,72 +18,45 @@ * Boston, MA 02110-1301, USA. */ -// Introduced in DOM Level 2: +// FIXME: This should be an implementation provided typedef +// https://heycam.github.io/webidl/#DOMTimeStamp +typedef unsigned long long DOMTimeStamp; + [ + Constructor(DOMString type, optional EventInit eventInitDict), CustomToJSObject, - ConstructorTemplate=Event, - JSNoStaticTables, - ObjCPolymorphic, + ExportToWrappedFunction, + Exposed=(Window,Worker), + JSCustomHeader, ] interface Event { + // PhaseType + const unsigned short NONE = 0; + const unsigned short CAPTURING_PHASE = 1; + const unsigned short AT_TARGET = 2; + const unsigned short BUBBLING_PHASE = 3; - // DOM PhaseType - const unsigned short NONE = 0; - const unsigned short CAPTURING_PHASE = 1; - const unsigned short AT_TARGET = 2; - const unsigned short BUBBLING_PHASE = 3; + readonly attribute DOMString type; + readonly attribute EventTarget target; + readonly attribute EventTarget currentTarget; + readonly attribute unsigned short eventPhase; + readonly attribute boolean bubbles; + readonly attribute boolean cancelable; + [EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed; + readonly attribute DOMTimeStamp timeStamp; -#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C - // Reverse-engineered from Netscape - const unsigned short MOUSEDOWN = 1; - const unsigned short MOUSEUP = 2; - const unsigned short MOUSEOVER = 4; - const unsigned short MOUSEOUT = 8; - const unsigned short MOUSEMOVE = 16; - const unsigned short MOUSEDRAG = 32; - const unsigned short CLICK = 64; - const unsigned short DBLCLICK = 128; - const unsigned short KEYDOWN = 256; - const unsigned short KEYUP = 512; - const unsigned short KEYPRESS = 1024; - const unsigned short DRAGDROP = 2048; - const unsigned short FOCUS = 4096; - const unsigned short BLUR = 8192; - const unsigned short SELECT = 16384; - const unsigned short CHANGE = 32768; -#endif + [EnabledAtRuntime=ShadowDOM] sequence<Node> composedPath(); - readonly attribute DOMString type; - readonly attribute EventTarget target; - readonly attribute EventTarget currentTarget; - readonly attribute unsigned short eventPhase; - [InitializedByEventConstructor] readonly attribute boolean bubbles; - [InitializedByEventConstructor] readonly attribute boolean cancelable; - readonly attribute DOMTimeStamp timeStamp; + void stopPropagation(); + void preventDefault(); - void stopPropagation(); - void preventDefault(); - [ObjCLegacyUnnamedParameters] void initEvent([Default=Undefined] optional DOMString eventTypeArg, - [Default=Undefined] optional boolean canBubbleArg, - [Default=Undefined] optional boolean cancelableArg); + void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); - // DOM Level 3 Additions. readonly attribute boolean defaultPrevented; void stopImmediatePropagation(); - // IE Extensions - readonly attribute EventTarget srcElement; - [ImplementedAs=legacyReturnValue] attribute boolean returnValue; - attribute boolean cancelBubble; - -#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - [Custom] readonly attribute Clipboard clipboardData; -#endif - -#if defined(LANGUAGE_CPP) && LANGUAGE_CPP - // Extra WebCore methods exposed to allow compile-time casting in C++ - boolean isMouseEvent(); - boolean isUIEvent(); -#endif + [Unforgeable] readonly attribute boolean isTrusted; + readonly attribute EventTarget srcElement; + [ImplementedAs=legacyReturnValue] attribute boolean returnValue; + attribute boolean cancelBubble; }; - |