diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-07-06 10:55:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-06 10:55:41 -0700 |
commit | f18782fb0e10e150f44719d9899a62b84ecb7adc (patch) | |
tree | f4a9add947aa9c923b49055c2a0291cd8978fecc /components/script/dom/webidls/InputEvent.webidl | |
parent | 901525c9116ee0945781811c97fd3395db7c5cf9 (diff) | |
parent | 11026600151af2ad51486a7d9ee56b8f1d7391ce (diff) | |
download | servo-f18782fb0e10e150f44719d9899a62b84ecb7adc.tar.gz servo-f18782fb0e10e150f44719d9899a62b84ecb7adc.zip |
Auto merge of #17578 - pyfisch:input-event, r=jdm
Implement the InputEvent
Add WebIDL, from UI Events working draft.
Implement script type for event.
Note that actually firing InputEvents is not part of this commit.
<!-- Please describe your changes on the following line: -->
As part of my effort to improve [keyboard handling](https://groups.google.com/forum/#!topic/mozilla.dev.servo/e6R7eBDjo4M) it is necessary to introduce the InputEvent. While I have a working prototype using the input event this still needs a lot of work before it can be merged into servo.
cc @jdm
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17578)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webidls/InputEvent.webidl')
-rw-r--r-- | components/script/dom/webidls/InputEvent.webidl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/components/script/dom/webidls/InputEvent.webidl b/components/script/dom/webidls/InputEvent.webidl new file mode 100644 index 00000000000..30e668b5e43 --- /dev/null +++ b/components/script/dom/webidls/InputEvent.webidl @@ -0,0 +1,21 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/uievents/#idl-inputevent + * + */ + +// https://w3c.github.io/uievents/#idl-inputevent +[Constructor(DOMString type, optional InputEventInit eventInitDict)] +interface InputEvent : UIEvent { + readonly attribute DOMString? data; + readonly attribute boolean isComposing; +}; + +// https://w3c.github.io/uievents/#idl-inputeventinit +dictionary InputEventInit : UIEventInit { + DOMString? data = null; + boolean isComposing = false; +}; |