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

[css-scroll-snap-2] Align event handler names with event names #10344

Open
wants to merge 2 commits 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions css-scroll-snap-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ Snap Events {#snap-events}
When asked to <dfn>dispatch pending scrollsnapchange events</dfn> for a {{Document}},
<var>doc</var>, run these steps:
1. For each item <var>target</var> in |doc|'s <a>pending scrollsnapchange event targets</a>:
1. Fire a {{SnapEvent}}, |snapevent|, named {{scrollsnapchange}} at <var>target</var>
and let |snapevent|'s {{SnapEvent/snapTargetBlock}} and
{{SnapEvent/snapTargetInline}} attributes be the <a>scrollsnapchangeTargetBlock</a> and the
<a>scrollsnapchangeTargetInline</a>, respectively, that are associated with <var>target</var>.
1. Fire an event named {{scrollsnapchange}} using {{SnapEvent}} at <var>target</var>
with its {{SnapEvent/snapTargetBlock}} and
{{SnapEvent/snapTargetInline}} attributes initialized respectively to the <a>scrollsnapchangeTargetBlock</a> and the
<a>scrollsnapchangeTargetInline</a> that are associated with <var>target</var>.
1. Empty <var>doc</var>'s <a>pending scrollsnapchange event targets</a>.

<h4 id="scrollsnapchanging"> scrollsnapchanging </h4>
Expand Down Expand Up @@ -457,10 +457,10 @@ Snap Events {#snap-events}
When asked to <dfn>dispatch pending scrollsnapchanging events</dfn> for a {{Document}},
<var>doc</var>, run these steps:
1. For each item <var>target</var> in |doc|'s <a>pending scrollsnapchanging event targets</a>:
1. Fire a {{SnapEvent}}, |snapevent|, named {{scrollsnapchanging}} at <var>target</var>
and let |snapevent|'s {{SnapEvent/snapTargetBlock}} and
{{SnapEvent/snapTargetInline}} attributes be the <a>scrollsnapchangingTargetBlock</a> and the
<a>scrollsnapchangingTargetInline</a>, respectively, that are associated with <var>target</var>.
1. Fire an event named {{scrollsnapchanging}} using {{SnapEvent}} at <var>target</var>
with its {{SnapEvent/snapTargetBlock}} and
{{SnapEvent/snapTargetInline}} attributes initialized respectively to the <a>scrollsnapchangingTargetBlock</a> and the
<a>scrollsnapchangingTargetInline</a> that are associated with <var>target</var>.
1. Empty <var>doc</var>'s <a>pending scrollsnapchanging event targets</a>.

<h4 id="snap-events-on-layout-changes">Snap Events due to Layout Changes </h4>
Expand Down Expand Up @@ -618,16 +618,16 @@ Event handlers on elements, Document objects and Window objects {#event-handlers
and <a>event handler IDL attributes</a>; and that must be supported by all {{Window}} objects and {{Document}} objects, as
<a>event handler IDL attributes</a>:

<table class="data" dfn-type=attribute dfn-for="Document,Element,Window">
<table class="data" dfn-type=attribute dfn-for="GlobalEventHandlers">
<tr>
<th><a>Event handler</a></th>
<th><a>Event handler event type</a></th>
<tr>
<td><dfn>onsnapchanged</dfn></td>
<td>{{snapchanged}}</td>
<td><dfn>onscrollsnapchange</dfn></td>
<td>{{scrollsnapchange}}</td>
<tr>
<td><dfn>onsnapchanging</dfn></td>
<td>{{snapchanging}}</td>
<td><dfn>onscrollsnapchanging</dfn></td>
<td>{{scrollsnapchanging}}</td>
</table>


Expand All @@ -642,7 +642,7 @@ Extensions to the <code>GlobalEventHandlers</code> Interface Mixin {#interface-g

<pre class="idl">
partial interface mixin GlobalEventHandlers {
attribute EventHandler onsnapchanged;
attribute EventHandler onsnapchanging;
attribute EventHandler onscrollsnapchange;
attribute EventHandler onscrollsnapchanging;
};
</pre>