Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom-view] Add 'onmove' event handler for the Window object #9664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 32 additions & 1 deletion cssom-view-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,6 @@ The <dfn attribute for=Window caniuse=devicepixelratio>devicePixelRatio</dfn> at
1. Let <var>device pixel size</var> be the vertical size of a device pixel of the output device.
1. Return the result of dividing <var>CSS pixel size</var> by <var>device pixel size</var>.


<h3 id=the-features-argument-to-the-open()-method>The <var ignore>features</var> argument to the {{Window/open()}} method</h3>

HTML defines the {{Window/open()}} method. This section defines behavior for position and size given
Expand Down Expand Up @@ -1004,6 +1003,16 @@ compatibility reasons.

Note: Some non-conforming implementations are known to return 32 instead of 24.

<h2 id=extensions-to-the-windoweventhandlers-interface>Extensions to the {{WindowEventHandlers}} Interface</h3>

<pre class=idl>
partial interface WindowEventHandlers {
attribute EventHandler onmove;
};
</pre>

<dfn attribute for=Window>onmove</dfn> is the <a>event handler IDL attribute</a> for the <a event>move</a> event.


<h2 id=extensions-to-the-document-interface>Extensions to the {{Document}} Interface</h2>

Expand Down Expand Up @@ -1933,6 +1942,22 @@ Issue: In what order are scrollend events dispatched? Ordered based on scroll st
1. Otherwise, <a>fire an event</a> named <a event>scrollend</a> at <var>target</var>.
1. Empty <var>doc</var>'s <a>pending scrollend event targets</a>.

<h3 id=moving-viewports>Moving viewports</h3>

This section integrates with the <a for=/>event loop</a> defined in HTML. [[!HTML]]

When <a for=/>updating the rendering</a>, after running the scroll steps:

1. For each fully active Document in docs, <dfn export for=Document>run the move steps</dfn> for that Document.

When asked to <a>run the move steps</a> for a {{Document}} <var>doc</var>, run these steps:

1. If <var>doc</var>'s client window has had its position relative to the <a>Web-exposed screen area</a> changed
(e.g. as a result of the user moving the browser window)
since the last time these steps were run,
<a>fire an event</a> named <a event>move</a>
at the {{Window}} object associated with <var>doc</var>.

<h3 id=event-summary>Event summary</h3>

<i>This section is non-normative.</i>
Expand Down Expand Up @@ -1963,6 +1988,12 @@ Issue: In what order are scrollend events dispatched? Ordered based on scroll st
<td>Fired at the {{VisualViewport}}, {{Document}}, or element when a scroll is <a lt="scroll completed">completed</a>: the
{{VisualViewport}}, <a>viewport</a>, or element has been scrolled, the scroll sequence has ended and any scroll offset changes have
been applied.
<tr>
<td><dfn event for="Window">move</dfn>
<td>{{Event}}
<td>{{Window}}
<td>Fired at the {{Window}} when the client window is moved relative to the <a>Web-exposed screen area</a>.
<tr>
</table>


Expand Down