| // Copyright 2017 The Cobalt Authors. All Rights Reserved. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // https://www.w3.org/TR/2016/WD-uievents-20160804/#interface-mouseevent |
| // https://www.w3.org/TR/2016/WD-uievents-20160804/#idl-interface-MouseEvent-initializers |
| // https://www.w3.org/TR/2013/WD-cssom-view-20131217/#extensions-to-the-mouseevent-interface |
| |
| [Constructor(DOMString type, optional MouseEventInit eventInitDict)] |
| interface MouseEvent : UIEvent { |
| readonly attribute double screenX; |
| readonly attribute double screenY; |
| readonly attribute double clientX; |
| readonly attribute double clientY; |
| |
| readonly attribute boolean ctrlKey; |
| readonly attribute boolean shiftKey; |
| readonly attribute boolean altKey; |
| readonly attribute boolean metaKey; |
| |
| readonly attribute short button; |
| readonly attribute unsigned short buttons; |
| |
| readonly attribute EventTarget? relatedTarget; |
| |
| boolean getModifierState(DOMString keyArg); |
| |
| void initMouseEvent(DOMString type, |
| optional boolean bubbles = false, |
| optional boolean cancelable = false, |
| optional Window? view = null, |
| optional long detail = 0, |
| optional long screenX = 0, |
| optional long screenY = 0, |
| optional long clientX = 0, |
| optional long clientY = 0, |
| optional boolean ctrlKey = false, |
| optional boolean altKey = false, |
| optional boolean shiftKey = false, |
| optional boolean metaKey = false, |
| optional unsigned short button = 0, |
| optional EventTarget? relatedTarget = null); |
| }; |