Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit 7e5ce8e

Browse filesBrowse files
committed
Add TouchEvent's retargeting steps
Upstream Shadow DOM's TouchEvent's retargeting to TouchEvent specification. http://w3c.github.io/webcomponents/spec/shadow/#touch-events-retargeting DOM Standard side issue is here: whatwg/dom#286. DOM Standard already defines a necessary hook, https://dom.spec.whatwg.org/#event-retargeting-steps. The test for TouchEvent retargeting was commited at web-platform-tests/wpt#3425.
1 parent 02e3731 commit 7e5ce8e
Copy full SHA for 7e5ce8e

File tree

1 file changed

+40
-0
lines changed
Filter options

1 file changed

+40
-0
lines changed

‎index.html

Copy file name to clipboardExpand all lines: index.html
+40
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,43 @@ <h3 id="event-touchcancel">The <dfn class="event"><code>touchcancel</code></dfn>
863863
</section>
864864
</section>
865865

866+
<section>
867+
<h2>Retargeting</h2>
868+
<p>
869+
The following section describes <a href="https://dom.spec.whatwg.org/#event-retargeting-steps">retargeting steps</a>,
870+
defined in [[!WHATWG-DOM]].
871+
</p>
872+
873+
<p>
874+
<code>Touch</code> object has an associated <dfn>unadjustedTarget</dfn> (null or <code>EventTarget</code>).
875+
Unless stated otherwise it is null.
876+
</p>
877+
878+
<p>
879+
<code>TouchEvent</code>'s <a href="https://dom.spec.whatwg.org/#event-retargeting-steps">retargeting steps</a>,
880+
given a <var>touchEvent</var>, must run these steps:
881+
</p>
882+
<ol>
883+
<li>
884+
<p>
885+
For each <a><code>Touch</code></a> <var>touch</var> in <var>touchEvent</var>'s <code>touches</code>,
886+
<code>targetTouches</code>, and <code>changedTouches</code> members:
887+
</p>
888+
<ol>
889+
<li>
890+
Set <van>touch</var>'s <code>unadjustedTarget</code> to <var>touch</var>'s <code>target</code>
891+
if <var>touch</var>'s <code>unadjustedTarget</code> is null.
892+
</li>
893+
<li>
894+
Set <var>touch</var>'s <code>target</code> to the result of invoking
895+
<a href="https://dom.spec.whatwg.org/#retarget">retargeting</a> <var>touch</var>'s <var>unadjustedTarget</var>
896+
againt <var>touchEvent</var>'s <code>target</code>.
897+
</li>
898+
</ol>
899+
</li>
900+
</ol>
901+
</section>
902+
866903
<section>
867904
<h2>Extensions to the <code>GlobalEventHandlers</code> interface</h2>
868905
<p>The following section describes extensions to the existing <code>GlobalEventHandlers</code> interface, defined in [[!HTML5]], to facilitate the event handler registration.</p>
@@ -1153,6 +1190,9 @@ <h2>Changes Since Last Publication</h2>
11531190
<li>
11541191
<a href="https://github.com/w3c/touch-events/pull/72">Note about avoiding conditional "touch OR mouse/keyboard" event handling</a>
11551192
</li>
1193+
<li>
1194+
Added TouchEvent's retargeting steps.
1195+
</li>
11561196
</ul>
11571197
</section>
11581198

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.