Skip to content

Commit

Permalink
Fix #135: Add definitions for MouseEvent layerX|Y
Browse files Browse the repository at this point in the history
  • Loading branch information
garykac committed Sep 15, 2023
1 parent 03864ba commit e47b95e
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ url: https://html.spec.whatwg.org/multipage/forms.html#context-menus; type: dfn;
text: contextmenu
url: https://www.w3.org/TR/pointerevents3/#pointerevent-interface; type: interface; spec: pointerevents3
text: PointerEvent
url: https://dom.spec.whatwg.org/#concept-tree-ancestor; type: dfn;
text: ancestor
url: https://www.w3.org/TR/CSS21/visuren.html#x43; type: dfn;
text: stacking context
url: https://drafts.csswg.org/css-position-3/#positioned-box; type: dfn;
text: positioned
url: https://drafts.csswg.org/css-position-4/#paint-a-stacking-context; type: dfn;
text: painting a stacking context
</pre>

<pre class="link-defaults">
Expand Down
66 changes: 66 additions & 0 deletions sections/event-types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ events.
readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
readonly attribute long layerX;
readonly attribute long layerY;

readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
Expand Down Expand Up @@ -604,6 +606,26 @@ events.
<code>0</code>.
</dd>

<dt><dfn attribute>layerX</dfn></dt>
<dd>
The horizontal offset from the nearest <a>ancestor</a> element which
is a <a>stacking context</a>, is <a>positioned</a>, or paints in the
positioned phase when <a>painting a stacking context</a>.

The <a>un-initialized value</a> of this attribute MUST be
<code>0</code>.
</dd>

<dt><dfn attribute>layerY</dfn></dt>
<dd>
The vertical offset from the nearest <a>ancestor</a> element which
is a <a>stacking context</a>, is <a>positioned</a>, or paints in the
positioned phase when <a>painting a stacking context</a>.

The <a>un-initialized value</a> of this attribute MUST be
<code>0</code>.
</dd>

<dt><dfn attribute>ctrlKey</dfn></dt>
<dd>
Refer to the {{KeyboardEvent}}'s {{KeyboardEvent/ctrlKey}} attribute.
Expand Down Expand Up @@ -1246,6 +1268,10 @@ events.
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1363,6 +1389,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1470,6 +1500,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1521,6 +1555,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1590,6 +1628,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1644,6 +1686,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1701,6 +1747,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1758,6 +1808,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1820,6 +1874,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1872,6 +1930,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down Expand Up @@ -1926,6 +1988,10 @@ myDiv.addEventListener("auxclick", function(e) {
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/clientY}} : value based on the pointer position |
| | within the viewport</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerX}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/layerY}} : value based on the pointer position |
| | within the containing element</li> |
| | <li>{{MouseEvent}}.{{MouseEvent/altKey}} : <code>true</code> if KEYCAP{Alt} |
| | modifier was active, otherwise <code>false</code></li> |
| | <li>{{MouseEvent}}.{{MouseEvent/ctrlKey}} : <code>true</code> if KEYCAP{Control} |
Expand Down

0 comments on commit e47b95e

Please sign in to comment.