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

Unified Diff: core/events/Event.idl

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 11 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 | « core/events/ErrorEventInit.idl ('k') | core/events/EventInit.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/events/Event.idl
diff --git a/core/events/Event.idl b/core/events/Event.idl
index 58a832a3a62598adba2dbea923183845ada2cb0f..0a40ba6635cb58d72e994a51b97c9802e4ba2847 100644
--- a/core/events/Event.idl
+++ b/core/events/Event.idl
@@ -18,59 +18,62 @@
* Boston, MA 02110-1301, USA.
*/
-// Introduced in DOM Level 2:
+// https://dom.spec.whatwg.org/#interface-event
+
[
+ Constructor(DOMString type, optional EventInit eventInitDict),
+ Exposed=(Window,Worker),
WillBeGarbageCollected,
- Custom=Wrap,
- EventConstructor,
] interface Event {
+ readonly attribute DOMString type;
+ readonly attribute EventTarget? target;
+ readonly attribute EventTarget? currentTarget;
+
+ 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;
- // 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;
+ void stopPropagation();
+ void stopImmediatePropagation();
- // 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;
+ readonly attribute boolean bubbles;
+ readonly attribute boolean cancelable;
+ void preventDefault();
+ readonly attribute boolean defaultPrevented;
- 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;
+ // FIXME: Implement the isTrusted attribute. crbug.com/334015
+ // [Unforgeable] readonly attribute boolean isTrusted;
+ readonly attribute DOMTimeStamp timeStamp;
- void stopPropagation();
- void preventDefault();
- void initEvent([Default=Undefined] optional DOMString eventTypeArg,
- [Default=Undefined] optional boolean canBubbleArg,
- [Default=Undefined] optional boolean cancelableArg);
+ // FIXME: initEvent()'s arguments should not be optional.
+ [Measure] void initEvent([Default=Undefined] optional DOMString type,
+ [Default=Undefined] optional boolean bubbles,
+ [Default=Undefined] optional boolean cancelable);
- // DOM Level 3 Additions.
- readonly attribute boolean defaultPrevented;
- void stopImmediatePropagation();
+ // Shadow DOM
+ // https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event-interface
+ [MeasureAs=EventPath, CallWith=ScriptState] readonly attribute EventTarget[] path;
- // 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 NodeList path;
- [Custom=Getter, MeasureAs=EventClipboardData] readonly attribute DataTransfer clipboardData;
};
« no previous file with comments | « core/events/ErrorEventInit.idl ('k') | core/events/EventInit.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698