Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Unified Diff: Source/core/events/Event.idl

Issue 1005193002: Sync the Event, EventTarget and CustomEvent interfaces with the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/CustomEvent.idl ('k') | Source/core/events/EventTarget.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/Event.idl
diff --git a/Source/core/events/Event.idl b/Source/core/events/Event.idl
index 35c090fe76aaefd5b60233e4c8e655b7b30eb32d..1838855d32dda648d0c28239a2a301d6a21c9f01 100644
--- a/Source/core/events/Event.idl
+++ b/Source/core/events/Event.idl
@@ -18,58 +18,59 @@
* Boston, MA 02110-1301, USA.
*/
-// Introduced in DOM Level 2:
+// https://dom.spec.whatwg.org/#interface-event
+
[
WillBeGarbageCollected,
EventConstructor,
Exposed=(Window,Worker)
] interface Event {
+ readonly attribute DOMString type;
+ readonly attribute EventTarget? target;
+ readonly attribute EventTarget? currentTarget;
- // 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;
+ 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 unsigned short eventPhase;
- // 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;
+ void stopPropagation();
+ void stopImmediatePropagation();
- 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 preventDefault();
+ readonly attribute boolean defaultPrevented;
+
+ // FIXME: Implement the isTrusted attribute. crbug.com/334015
+ // [Unforgeable] readonly attribute boolean isTrusted;
+ readonly attribute DOMTimeStamp timeStamp;
- void stopPropagation();
- void preventDefault();
+ // FIXME: initEvent()'s arguments should not be optional.
void initEvent([Default=Undefined] optional DOMString eventTypeArg,
[Default=Undefined] optional boolean canBubbleArg,
[Default=Undefined] optional boolean cancelableArg);
- // DOM Level 3 Additions.
- readonly attribute boolean defaultPrevented;
- void stopImmediatePropagation();
-
- // IE Extensions
+ // Non-standard APIs
+ 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;
[MeasureAs=EventSrcElement] readonly attribute EventTarget srcElement;
- [CallWith=ExecutionContext, ImplementedAs=legacyReturnValue, MeasureAs=EventReturnValue] attribute boolean returnValue;
+ [MeasureAs=EventReturnValue, CallWith=ExecutionContext, ImplementedAs=legacyReturnValue] attribute boolean returnValue;
[MeasureAs=EventCancelBubble] attribute boolean cancelBubble;
[MeasureAs=EventPath] readonly attribute EventTarget[] path;
};
« no previous file with comments | « Source/core/events/CustomEvent.idl ('k') | Source/core/events/EventTarget.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698