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

Unified Diff: core/events/KeyboardEvent.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/HashChangeEventInit.idl ('k') | core/events/KeyboardEventInit.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/events/KeyboardEvent.idl
diff --git a/core/events/KeyboardEvent.idl b/core/events/KeyboardEvent.idl
index ca68d367b11da44762ffd95436da0110eaed41f0..a83b365d266ad32c0f749659f2db6e1953b39bb3 100644
--- a/core/events/KeyboardEvent.idl
+++ b/core/events/KeyboardEvent.idl
@@ -18,35 +18,47 @@
* Boston, MA 02110-1301, USA.
*/
+// https://w3c.github.io/uievents/#interface-KeyboardEvent
+
[
- EventConstructor,
+ Constructor(DOMString type, optional KeyboardEventInit eventInitDict),
+ ConstructorCallWith=ScriptState,
] interface KeyboardEvent : UIEvent {
+ // 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;
+ [RuntimeEnabled=KeyboardEventKey] readonly attribute DOMString key;
+ [RuntimeEnabled=KeyboardEventCode] 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;
+ // TODO(philipj): readonly attribute boolean isComposing;
+ boolean getModifierState(DOMString keyArg);
- [InitializedByEventConstructor] readonly attribute DOMString keyIdentifier;
- [InitializedByEventConstructor] readonly attribute unsigned long location;
- [ImplementedAs=location, DeprecateAs=KeyboardEventKeyLocation, InitializedByEventConstructor] readonly attribute unsigned long keyLocation; // Deprecated.
- [InitializedByEventConstructor] readonly attribute boolean ctrlKey;
- [InitializedByEventConstructor] readonly attribute boolean shiftKey;
- [InitializedByEventConstructor] readonly attribute boolean altKey;
- [InitializedByEventConstructor] readonly attribute boolean metaKey;
- [InitializedByEventConstructor] readonly attribute boolean repeat;
+ // https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers
+ // FIXME: this does not match the version in the spec.
+ [CallWith=ScriptState, Measure] void initKeyboardEvent([Default=Undefined] optional DOMString type,
+ [Default=Undefined] optional boolean bubbles,
+ [Default=Undefined] optional boolean cancelable,
+ [Default=Undefined] optional Window view,
+ [Default=Undefined] optional DOMString keyIdentifier,
+ [Default=Undefined] optional unsigned long location,
+ [Default=Undefined] optional boolean ctrlKey,
+ [Default=Undefined] optional boolean altKey,
+ [Default=Undefined] optional boolean shiftKey,
+ [Default=Undefined] optional boolean metaKey);
- boolean getModifierState(DOMString keyArgument);
+ // https://w3c.github.io/uievents/#KeyboardEvent-supplemental-interface
+ readonly attribute long charCode;
+ readonly attribute long keyCode;
+ readonly attribute long which;
- // FIXME: this does not match the version in the DOM spec.
- void initKeyboardEvent([Default=Undefined] optional DOMString type,
- [Default=Undefined] optional boolean canBubble,
- [Default=Undefined] optional boolean cancelable,
- [Default=Undefined] optional Window view,
- [Default=Undefined] optional DOMString keyIdentifier,
- [Default=Undefined] optional unsigned long location,
- [Default=Undefined] optional boolean ctrlKey,
- [Default=Undefined] optional boolean altKey,
- [Default=Undefined] optional boolean shiftKey,
- [Default=Undefined] optional boolean metaKey);
+ // Non-standard APIs
+ [Measure] readonly attribute DOMString keyIdentifier;
+ [ImplementedAs=location, DeprecateAs=KeyboardEventKeyLocation] readonly attribute unsigned long keyLocation;
};
-
« no previous file with comments | « core/events/HashChangeEventInit.idl ('k') | core/events/KeyboardEventInit.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698