{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/pointerevents/pulls/comments/88778743","pull_request_review_id":9344825,"id":88778743,"diff_hunk":"@@ -0,0 +1,148 @@\n+<!DOCTYPE html>\n+<html>\n+  <head>\n+    <meta charset='utf-8'>\n+    <title>PointerEvents - Level 2 - Extensions</title>\n+    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://w3c.github.io/uievents/spec-WD.css\">\n+    <script src='https://www.w3.org/Tools/respec/respec-w3c-common.js' class='remove'></script>\n+    <script class='remove'>\n+      var respecConfig = {\n+        specStatus: \"CG-DRAFT\",\n+        edDraftURI: \"https://w3c.github.io/pointerevents/extensions.html\",\n+        editors: [{\n+          name:        \"Navid Zolghadr\",\n+          url:         \"https://github.com/NavidZ\",\n+          company:     \"Google\",\n+          companyURL:  \"https://www.google.com/\"\n+        }],\n+        shortName: \"PointerEvent Level 2 Extensions\",\n+        wg:        \"Pointer Events Working Group\",\n+        wgURI:     \"https://www.w3.org/2012/pointerevents/\",\n+        otherLinks: [{\n+          key: 'Participation',\n+          data: [\n+              {\n+                value: 'GitHub repository',\n+                href: 'https://github.com/w3c/pointerevents/'\n+              } ,{\n+                value: 'File a bug / view open issues',\n+                href: 'https://github.com/w3c/pointerevents/issues'\n+              }\n+            ]\n+          }],\n+      };\n+    </script>\n+  </head>\n+  <body>\n+    <section id='abstract'>\n+      <p>\n+The features in this specification extend or modify those found in <a href=\"https://w3c.github.io/pointerevents/index.html\">Pointer Events Level 2</a> that describes events and related interfaces for handling hardware agnostic pointer input from devices including a mouse, pen, touchscreen, etc.\n+      </p>\n+    </section>\n+\n+    <section id='sotd'>\n+      <p>\n+        This proposal intends to add new functionalities to a future version of the <a href=\"https://w3c.github.io/pointerevents/index.html\">Pointer Events Level 2</a>.\n+      </p>\n+    </section>\n+\n+    <section id='intro' class='informative'>\n+      <h2>Introduction</h2>\n+      <p>\n+        This document reflects incubation for APIs which are intended to be part of a future version of the Pointer Events specification. They are not yet broadly supported by implementations.\n+      </p>\n+      <p>\n+\tThe <code>getCoalescedEvents</code> API (similar to Android <a href=\"https://developer.android.com/reference/android/view/MotionEvent.html#getHistoricalX(int, int)\">getHistorical</a> APIs and iOS <a href=\"https://developer.xamarin.com/api/member/MonoTouch.UIKit.UIEvent.GetCoalescedTouches/p/MonoTouch.UIKit.UITouch/\">GetCoalescedTouches</a> API) exposes all the events that were coalesced into a single event. Coalescing events into a single event enables user agents to prevent processing of the events that don’t get a chance to update the frame content visually. Basically if the javascript handlers process the events and update the screen contents faster than refresh rate only the last update will be rendered and shown in the next frame. However, some applications like drawing apps may want to take advantage of the precise history of events as user moves the pointer on the screen to be able to draw smoother and better looking curves. This API can be used in those scenarios to get all the coalesced events from the event that was dispatched to the javascript.\n+      </p>\n+    </section>\n+    <section>\n+      <h2>Extensions to the <code>PointerEvent</code> interface</h2>\n+      <p>\n+        The following section describes extensions to the existing <a href=\"https://w3c.github.io/pointerevents/index.html#pointerevent-interface\"><code>PointerEvent</code> interface</a>.\n+      </p>\n+      <div>\n+          <pre class=\"idl\">\n+partial dictionary PointerEventInit {\n+    sequence&lt;PointerEvent> coalescedEvents = [];\n+};\n+\n+partial interface PointerEvent {\n+    sequence&lt;PointerEvent> getCoalescedEvents();\n+};\n+          </pre>\n+          <dl dfn-for=\"PointerEvent\" link-for=\"PointerEvent\">\n+              <dt><dfn>getCoalescedEvents</dfn></dt>\n+              <dd>\n+                  <p>Returns a sequence of all <code>PointerEvents</code> that were coalesced into the dispatched <code>pointermove</code> event. The following attributes of the coalesced events will always have the same value as the dispatched event: <code>pointerId</code>, <code>pointerType</code>, <code>isPrimary</code>, and particularly <code>target</code>. But other attributes might be different. The events in the sequence will have increasing <a href=\"https://dom.spec.whatwg.org/#dom-event-timestamp\"><code>timeStamps</code></a> ([[!WHATWG-DOM]]). So the first event will have the smallest <code>timeStamp</code>. The dispatched event's attributes will be initalized in a way that is best representative of all the coalesced events. For example its <code>timeStamp</code> will be equal to the last event's <code>timeStamp</code> in the sequence and its <a href=\"https://www.w3.org/TR/pointerlock/#widl-MouseEvent-movementX\">movementX</a> and <a href=\"https://www.w3.org/TR/pointerlock/#widl-MouseEvent-movementY\">movementY</a> ([[!POINTERLOCK]]) will be the sum of that of all the coalesced events. None of the events in the sequence will have (nested) coalesced events, so <code>getCoalescedEvents</code> returns an empty sequence for them. This API always returns at least one coalesced event for <code>pointermove</code> events and an empty list for other types of <code>PointerEvents</code>.</p>\n+              </dd>\n+          </dl>\n+      </div>\n+    </section>\n+\n+    <section>\n+      <h2>Timing of coalesced event firing</h2>\n+      <p>Coalescing events only happens for <code>pointermove</code> events. All the coalesced events should be fired before the next frame or before any <code>pointerup</code>, <code>pointerdown</code>, <code>pointercancel</code> events. Note that user agents don't need to hit-test all the coalesced events as all of them will have the same target as the dispatched event.</p>\n+      <p>When the user agent dispatches any <code>PointerEvent</code> it MUST dispatch all the events held back so far for coalescing, regardless of their <code>pointerIds</code>. The ordering of all these dispatched events should be in a way that resemebles the most with the actual events' ordering. For example if a <code>pointerdown</code> event causes the dispatch for the coalesced <code>pointermove</code> events the user agent SHOULD first dispatch one <code>pointermove</code> event with all those coalesced events of a <code>pointerId</code> followed by the <code>pointerdown</code> event.</p>\n+      <p>Here is an example of the actual events happening in one frame with increasing <code>timestamps</code> and the dispatched events by the user agent:","path":"extension.html","position":86,"original_position":86,"commit_id":"29fcffa8af5aa207190a131ccc15799ca3e9dbf6","original_commit_id":"29fcffa8af5aa207190a131ccc15799ca3e9dbf6","user":{"login":"mustaqahmed","id":8505377,"avatar_url":"https://avatars.githubusercontent.com/u/8505377?v=3","gravatar_id":"","url":"https://api.github.com/users/mustaqahmed","html_url":"https://github.com/mustaqahmed","followers_url":"https://api.github.com/users/mustaqahmed/followers","following_url":"https://api.github.com/users/mustaqahmed/following{/other_user}","gists_url":"https://api.github.com/users/mustaqahmed/gists{/gist_id}","starred_url":"https://api.github.com/users/mustaqahmed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mustaqahmed/subscriptions","organizations_url":"https://api.github.com/users/mustaqahmed/orgs","repos_url":"https://api.github.com/users/mustaqahmed/repos","events_url":"https://api.github.com/users/mustaqahmed/events{/privacy}","received_events_url":"https://api.github.com/users/mustaqahmed/received_events","type":"User","site_admin":false},"body":"Nit: s/dispatched events by/events dispatched by/.","created_at":"2016-11-19T12:39:01Z","updated_at":"2016-11-19T12:39:23Z","html_url":"https://github.com/w3c/pointerevents/pull/149#discussion_r88778743","pull_request_url":"https://api.github.com/repos/w3c/pointerevents/pulls/149","_links":{"self":{"href":"https://api.github.com/repos/w3c/pointerevents/pulls/comments/88778743"},"html":{"href":"https://github.com/w3c/pointerevents/pull/149#discussion_r88778743"},"pull_request":{"href":"https://api.github.com/repos/w3c/pointerevents/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/pointerevents/pulls/149","id":88130146,"html_url":"https://github.com/w3c/pointerevents/pull/149","diff_url":"https://github.com/w3c/pointerevents/pull/149.diff","patch_url":"https://github.com/w3c/pointerevents/pull/149.patch","issue_url":"https://api.github.com/repos/w3c/pointerevents/issues/149","number":149,"state":"open","locked":false,"title":"Initial draft of getCoalescedEvents API","user":{"login":"NavidZ","id":16761559,"avatar_url":"https://avatars.githubusercontent.com/u/16761559?v=3","gravatar_id":"","url":"https://api.github.com/users/NavidZ","html_url":"https://github.com/NavidZ","followers_url":"https://api.github.com/users/NavidZ/followers","following_url":"https://api.github.com/users/NavidZ/following{/other_user}","gists_url":"https://api.github.com/users/NavidZ/gists{/gist_id}","starred_url":"https://api.github.com/users/NavidZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NavidZ/subscriptions","organizations_url":"https://api.github.com/users/NavidZ/orgs","repos_url":"https://api.github.com/users/NavidZ/repos","events_url":"https://api.github.com/users/NavidZ/events{/privacy}","received_events_url":"https://api.github.com/users/NavidZ/received_events","type":"User","site_admin":false},"body":"Addresses #22 \n","created_at":"2016-10-05T18:21:01Z","updated_at":"2016-11-19T12:44:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6861103d531dedc304cb66c9cf60c238db680bb1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/w3c/pointerevents/pulls/149/commits","review_comments_url":"https://api.github.com/repos/w3c/pointerevents/pulls/149/comments","review_comment_url":"https://api.github.com/repos/w3c/pointerevents/pulls/comments{/number}","comments_url":"https://api.github.com/repos/w3c/pointerevents/issues/149/comments","statuses_url":"https://api.github.com/repos/w3c/pointerevents/statuses/29fcffa8af5aa207190a131ccc15799ca3e9dbf6","head":{"label":"NavidZ:get-coalesced-events","ref":"get-coalesced-events","sha":"29fcffa8af5aa207190a131ccc15799ca3e9dbf6","user":{"login":"NavidZ","id":16761559,"avatar_url":"https://avatars.githubusercontent.com/u/16761559?v=3","gravatar_id":"","url":"https://api.github.com/users/NavidZ","html_url":"https://github.com/NavidZ","followers_url":"https://api.github.com/users/NavidZ/followers","following_url":"https://api.github.com/users/NavidZ/following{/other_user}","gists_url":"https://api.github.com/users/NavidZ/gists{/gist_id}","starred_url":"https://api.github.com/users/NavidZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NavidZ/subscriptions","organizations_url":"https://api.github.com/users/NavidZ/orgs","repos_url":"https://api.github.com/users/NavidZ/repos","events_url":"https://api.github.com/users/NavidZ/events{/privacy}","received_events_url":"https://api.github.com/users/NavidZ/received_events","type":"User","site_admin":false},"repo":{"id":52626177,"name":"pointerevents","full_name":"NavidZ/pointerevents","owner":{"login":"NavidZ","id":16761559,"avatar_url":"https://avatars.githubusercontent.com/u/16761559?v=3","gravatar_id":"","url":"https://api.github.com/users/NavidZ","html_url":"https://github.com/NavidZ","followers_url":"https://api.github.com/users/NavidZ/followers","following_url":"https://api.github.com/users/NavidZ/following{/other_user}","gists_url":"https://api.github.com/users/NavidZ/gists{/gist_id}","starred_url":"https://api.github.com/users/NavidZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NavidZ/subscriptions","organizations_url":"https://api.github.com/users/NavidZ/orgs","repos_url":"https://api.github.com/users/NavidZ/repos","events_url":"https://api.github.com/users/NavidZ/events{/privacy}","received_events_url":"https://api.github.com/users/NavidZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NavidZ/pointerevents","description":"The Pointer Events Spec","fork":true,"url":"https://api.github.com/repos/NavidZ/pointerevents","forks_url":"https://api.github.com/repos/NavidZ/pointerevents/forks","keys_url":"https://api.github.com/repos/NavidZ/pointerevents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NavidZ/pointerevents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NavidZ/pointerevents/teams","hooks_url":"https://api.github.com/repos/NavidZ/pointerevents/hooks","issue_events_url":"https://api.github.com/repos/NavidZ/pointerevents/issues/events{/number}","events_url":"https://api.github.com/repos/NavidZ/pointerevents/events","assignees_url":"https://api.github.com/repos/NavidZ/pointerevents/assignees{/user}","branches_url":"https://api.github.com/repos/NavidZ/pointerevents/branches{/branch}","tags_url":"https://api.github.com/repos/NavidZ/pointerevents/tags","blobs_url":"https://api.github.com/repos/NavidZ/pointerevents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NavidZ/pointerevents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NavidZ/pointerevents/git/refs{/sha}","trees_url":"https://api.github.com/repos/NavidZ/pointerevents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NavidZ/pointerevents/statuses/{sha}","languages_url":"https://api.github.com/repos/NavidZ/pointerevents/languages","stargazers_url":"https://api.github.com/repos/NavidZ/pointerevents/stargazers","contributors_url":"https://api.github.com/repos/NavidZ/pointerevents/contributors","subscribers_url":"https://api.github.com/repos/NavidZ/pointerevents/subscribers","subscription_url":"https://api.github.com/repos/NavidZ/pointerevents/subscription","commits_url":"https://api.github.com/repos/NavidZ/pointerevents/commits{/sha}","git_commits_url":"https://api.github.com/repos/NavidZ/pointerevents/git/commits{/sha}","comments_url":"https://api.github.com/repos/NavidZ/pointerevents/comments{/number}","issue_comment_url":"https://api.github.com/repos/NavidZ/pointerevents/issues/comments{/number}","contents_url":"https://api.github.com/repos/NavidZ/pointerevents/contents/{+path}","compare_url":"https://api.github.com/repos/NavidZ/pointerevents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NavidZ/pointerevents/merges","archive_url":"https://api.github.com/repos/NavidZ/pointerevents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NavidZ/pointerevents/downloads","issues_url":"https://api.github.com/repos/NavidZ/pointerevents/issues{/number}","pulls_url":"https://api.github.com/repos/NavidZ/pointerevents/pulls{/number}","milestones_url":"https://api.github.com/repos/NavidZ/pointerevents/milestones{/number}","notifications_url":"https://api.github.com/repos/NavidZ/pointerevents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NavidZ/pointerevents/labels{/name}","releases_url":"https://api.github.com/repos/NavidZ/pointerevents/releases{/id}","deployments_url":"https://api.github.com/repos/NavidZ/pointerevents/deployments","created_at":"2016-02-26T19:03:21Z","updated_at":"2016-02-26T19:03:22Z","pushed_at":"2016-11-17T21:04:37Z","git_url":"git://github.com/NavidZ/pointerevents.git","ssh_url":"git@github.com:NavidZ/pointerevents.git","clone_url":"https://github.com/NavidZ/pointerevents.git","svn_url":"https://github.com/NavidZ/pointerevents","homepage":null,"size":653,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"w3c:gh-pages","ref":"gh-pages","sha":"63af43b4ff2908b2269da207b772dfb9bac66c1f","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":33608627,"name":"pointerevents","full_name":"w3c/pointerevents","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/pointerevents","description":"The Pointer Events Spec","fork":false,"url":"https://api.github.com/repos/w3c/pointerevents","forks_url":"https://api.github.com/repos/w3c/pointerevents/forks","keys_url":"https://api.github.com/repos/w3c/pointerevents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/pointerevents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/pointerevents/teams","hooks_url":"https://api.github.com/repos/w3c/pointerevents/hooks","issue_events_url":"https://api.github.com/repos/w3c/pointerevents/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/pointerevents/events","assignees_url":"https://api.github.com/repos/w3c/pointerevents/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/pointerevents/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/pointerevents/tags","blobs_url":"https://api.github.com/repos/w3c/pointerevents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/pointerevents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/pointerevents/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/pointerevents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/pointerevents/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/pointerevents/languages","stargazers_url":"https://api.github.com/repos/w3c/pointerevents/stargazers","contributors_url":"https://api.github.com/repos/w3c/pointerevents/contributors","subscribers_url":"https://api.github.com/repos/w3c/pointerevents/subscribers","subscription_url":"https://api.github.com/repos/w3c/pointerevents/subscription","commits_url":"https://api.github.com/repos/w3c/pointerevents/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/pointerevents/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/pointerevents/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/pointerevents/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/pointerevents/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/pointerevents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/pointerevents/merges","archive_url":"https://api.github.com/repos/w3c/pointerevents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/pointerevents/downloads","issues_url":"https://api.github.com/repos/w3c/pointerevents/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/pointerevents/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/pointerevents/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/pointerevents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/pointerevents/labels{/name}","releases_url":"https://api.github.com/repos/w3c/pointerevents/releases{/id}","deployments_url":"https://api.github.com/repos/w3c/pointerevents/deployments","created_at":"2015-04-08T13:30:27Z","updated_at":"2016-10-26T16:11:10Z","pushed_at":"2016-11-17T21:04:37Z","git_url":"git://github.com/w3c/pointerevents.git","ssh_url":"git@github.com:w3c/pointerevents.git","clone_url":"https://github.com/w3c/pointerevents.git","svn_url":"https://github.com/w3c/pointerevents","homepage":null,"size":735,"stargazers_count":18,"watchers_count":18,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":29,"forks":14,"open_issues":29,"watchers":18,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/pointerevents/pulls/149"},"html":{"href":"https://github.com/w3c/pointerevents/pull/149"},"issue":{"href":"https://api.github.com/repos/w3c/pointerevents/issues/149"},"comments":{"href":"https://api.github.com/repos/w3c/pointerevents/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/pointerevents/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/pointerevents/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/w3c/pointerevents/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/pointerevents/statuses/29fcffa8af5aa207190a131ccc15799ca3e9dbf6"}}}}
{"actor":{"display_login":"mustaqahmed"}}