{"action":"created","comment":{"url":"https://api.github.com/repos/WICG/webusb/pulls/comments/115042405","pull_request_review_id":36558086,"id":115042405,"diff_hunk":"@@ -1,27 +0,0 @@\n-# WebUSB Explained\n-\n-## What is it?\n-Today when you connect a device to your computer you hope that somehow it will find the right driver and it will Just Work&trade;. For lots of devices it does because there are standardized drivers for things like keyboards, mice, hard drives and webcams built into the operating system. What about the long tail of unusual devices or the next generation of gadgets that haven't been standardized yet? WebUSB takes \"plug and play\" to the next level by connecting devices to the software that drives them across any platform by harnessing the power of web technologies.\n-\n-## What is it not?\n-WebUSB does not attempt to provide a general mechanism for any web page to connect to any USB device. Historically USB hosts and devices have trusted each other too much to let arbitrary pages connect to them. There are published attacks against USB devices that will accept unsigned firmware updates that cause them to become malicious and attack the host they are connected to; exploiting the trust relationship in both directions.\n-\n-Instead, USB devices will be associated with a web origin and can only be connected to a page from the same origin. New devices (or firmware updates) may include a list of acceptable origins that the user agent can query, similar to the CORS mechanism for HTTP requests. Device vendors may enable existing devices by registering them in an open directory mapping device IDs to acceptable origins.\n-\n-## An example: Web support for 3-D printers\n-3D printers are all the rage these days but you can’t go on Thingiverse and hit `Ctrl-P` to print out any of the designs because user agents and the operating systems they run on have not implemented 3-D printer support.\n-\n-First, a manufacturer like MakerBot can build their device setup and calibration software directly into their website. When the excited new user plugs the USB cable into their computer they are greeted by a friendly notification, “MakerBot Replicator II detected. Go to setup.makerbot.com/replicator2 to connect.” When they visit this site it will ask for permission to connect to their new printer and can then guide them through the rest of the setup and calibration process.\n-\n-On Thingiverse all they need to do to support MakerBot printers is include an `<iframe>` tag that loads a page from `https://api.makerbot.com`. This origin is also on the printer’s list of approved sites. The two origins, `https://www.thingiverse.com` and `https://api.makerbot.com` remain isolated because the browser doesn’t allow a top-level frame to modify the content of a 3rd party iframe. Thingiverse can, however use Window.postMessage() to communicate with it. The MessageEvent received by the \"driver iframe\" contains the unforgeable origin of the message, which allows the driver to implement any authorization scheme it would like. This mechanism would likely be encapsulated in a Javascript library that can be included by the web app to create the iframe and wrap the messaging interface in a friendlier API.\n-\n-WebUSB thus replaces native code and native SDKs with cross-platform hardware support and web-ready libraries.\n-\n-## Appendix: A Brief Introduction to USB","path":"explainer.md","position":20,"original_position":20,"commit_id":"a7633495b6e7e4021502317ce0a5218afcd6e1c1","original_commit_id":"a7633495b6e7e4021502317ce0a5218afcd6e1c1","user":{"login":"jyasskin","id":83420,"avatar_url":"https://avatars2.githubusercontent.com/u/83420?v=3","gravatar_id":"","url":"https://api.github.com/users/jyasskin","html_url":"https://github.com/jyasskin","followers_url":"https://api.github.com/users/jyasskin/followers","following_url":"https://api.github.com/users/jyasskin/following{/other_user}","gists_url":"https://api.github.com/users/jyasskin/gists{/gist_id}","starred_url":"https://api.github.com/users/jyasskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyasskin/subscriptions","organizations_url":"https://api.github.com/users/jyasskin/orgs","repos_url":"https://api.github.com/users/jyasskin/repos","events_url":"https://api.github.com/users/jyasskin/events{/privacy}","received_events_url":"https://api.github.com/users/jyasskin/received_events","type":"User","site_admin":false},"body":"It'd be nice to include this sort of introduction, or a link to it, in the spec's introduction. Otherwise web programmers just kinda get dumped into a confusing pile of descriptors.","created_at":"2017-05-05T16:56:47Z","updated_at":"2017-05-05T17:01:02Z","html_url":"https://github.com/WICG/webusb/pull/92#discussion_r115042405","pull_request_url":"https://api.github.com/repos/WICG/webusb/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/WICG/webusb/pulls/comments/115042405"},"html":{"href":"https://github.com/WICG/webusb/pull/92#discussion_r115042405"},"pull_request":{"href":"https://api.github.com/repos/WICG/webusb/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/WICG/webusb/pulls/92","id":119089550,"html_url":"https://github.com/WICG/webusb/pull/92","diff_url":"https://github.com/WICG/webusb/pull/92.diff","patch_url":"https://github.com/WICG/webusb/pull/92.patch","issue_url":"https://api.github.com/repos/WICG/webusb/issues/92","number":92,"state":"open","locked":false,"title":"Add a Motivating Applications section and remove explainer","user":{"login":"reillyeon","id":152137,"avatar_url":"https://avatars2.githubusercontent.com/u/152137?v=3","gravatar_id":"","url":"https://api.github.com/users/reillyeon","html_url":"https://github.com/reillyeon","followers_url":"https://api.github.com/users/reillyeon/followers","following_url":"https://api.github.com/users/reillyeon/following{/other_user}","gists_url":"https://api.github.com/users/reillyeon/gists{/gist_id}","starred_url":"https://api.github.com/users/reillyeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reillyeon/subscriptions","organizations_url":"https://api.github.com/users/reillyeon/orgs","repos_url":"https://api.github.com/users/reillyeon/repos","events_url":"https://api.github.com/users/reillyeon/events{/privacy}","received_events_url":"https://api.github.com/users/reillyeon/received_events","type":"User","site_admin":false},"body":"At this point in the specification process the explainer is redundant as the introductory information is now included in the specification. This change adds new \"Motivating Applications\" section and removes the\r\nseparate explainer document.\r\n\r\nResolves issues #16 and #90.","created_at":"2017-05-04T23:52:09Z","updated_at":"2017-05-05T17:01:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a05293a4fd00874aee2145f03cdd65cc63a1fc0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/WICG/webusb/pulls/92/commits","review_comments_url":"https://api.github.com/repos/WICG/webusb/pulls/92/comments","review_comment_url":"https://api.github.com/repos/WICG/webusb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WICG/webusb/issues/92/comments","statuses_url":"https://api.github.com/repos/WICG/webusb/statuses/a7633495b6e7e4021502317ce0a5218afcd6e1c1","head":{"label":"reillyeon:motivating_apps","ref":"motivating_apps","sha":"a7633495b6e7e4021502317ce0a5218afcd6e1c1","user":{"login":"reillyeon","id":152137,"avatar_url":"https://avatars2.githubusercontent.com/u/152137?v=3","gravatar_id":"","url":"https://api.github.com/users/reillyeon","html_url":"https://github.com/reillyeon","followers_url":"https://api.github.com/users/reillyeon/followers","following_url":"https://api.github.com/users/reillyeon/following{/other_user}","gists_url":"https://api.github.com/users/reillyeon/gists{/gist_id}","starred_url":"https://api.github.com/users/reillyeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reillyeon/subscriptions","organizations_url":"https://api.github.com/users/reillyeon/orgs","repos_url":"https://api.github.com/users/reillyeon/repos","events_url":"https://api.github.com/users/reillyeon/events{/privacy}","received_events_url":"https://api.github.com/users/reillyeon/received_events","type":"User","site_admin":false},"repo":{"id":81626036,"name":"webusb","full_name":"reillyeon/webusb","owner":{"login":"reillyeon","id":152137,"avatar_url":"https://avatars2.githubusercontent.com/u/152137?v=3","gravatar_id":"","url":"https://api.github.com/users/reillyeon","html_url":"https://github.com/reillyeon","followers_url":"https://api.github.com/users/reillyeon/followers","following_url":"https://api.github.com/users/reillyeon/following{/other_user}","gists_url":"https://api.github.com/users/reillyeon/gists{/gist_id}","starred_url":"https://api.github.com/users/reillyeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reillyeon/subscriptions","organizations_url":"https://api.github.com/users/reillyeon/orgs","repos_url":"https://api.github.com/users/reillyeon/repos","events_url":"https://api.github.com/users/reillyeon/events{/privacy}","received_events_url":"https://api.github.com/users/reillyeon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reillyeon/webusb","description":"Connecting hardware to the web.","fork":true,"url":"https://api.github.com/repos/reillyeon/webusb","forks_url":"https://api.github.com/repos/reillyeon/webusb/forks","keys_url":"https://api.github.com/repos/reillyeon/webusb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reillyeon/webusb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reillyeon/webusb/teams","hooks_url":"https://api.github.com/repos/reillyeon/webusb/hooks","issue_events_url":"https://api.github.com/repos/reillyeon/webusb/issues/events{/number}","events_url":"https://api.github.com/repos/reillyeon/webusb/events","assignees_url":"https://api.github.com/repos/reillyeon/webusb/assignees{/user}","branches_url":"https://api.github.com/repos/reillyeon/webusb/branches{/branch}","tags_url":"https://api.github.com/repos/reillyeon/webusb/tags","blobs_url":"https://api.github.com/repos/reillyeon/webusb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reillyeon/webusb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reillyeon/webusb/git/refs{/sha}","trees_url":"https://api.github.com/repos/reillyeon/webusb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reillyeon/webusb/statuses/{sha}","languages_url":"https://api.github.com/repos/reillyeon/webusb/languages","stargazers_url":"https://api.github.com/repos/reillyeon/webusb/stargazers","contributors_url":"https://api.github.com/repos/reillyeon/webusb/contributors","subscribers_url":"https://api.github.com/repos/reillyeon/webusb/subscribers","subscription_url":"https://api.github.com/repos/reillyeon/webusb/subscription","commits_url":"https://api.github.com/repos/reillyeon/webusb/commits{/sha}","git_commits_url":"https://api.github.com/repos/reillyeon/webusb/git/commits{/sha}","comments_url":"https://api.github.com/repos/reillyeon/webusb/comments{/number}","issue_comment_url":"https://api.github.com/repos/reillyeon/webusb/issues/comments{/number}","contents_url":"https://api.github.com/repos/reillyeon/webusb/contents/{+path}","compare_url":"https://api.github.com/repos/reillyeon/webusb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reillyeon/webusb/merges","archive_url":"https://api.github.com/repos/reillyeon/webusb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reillyeon/webusb/downloads","issues_url":"https://api.github.com/repos/reillyeon/webusb/issues{/number}","pulls_url":"https://api.github.com/repos/reillyeon/webusb/pulls{/number}","milestones_url":"https://api.github.com/repos/reillyeon/webusb/milestones{/number}","notifications_url":"https://api.github.com/repos/reillyeon/webusb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reillyeon/webusb/labels{/name}","releases_url":"https://api.github.com/repos/reillyeon/webusb/releases{/id}","deployments_url":"https://api.github.com/repos/reillyeon/webusb/deployments","created_at":"2017-02-11T02:47:12Z","updated_at":"2017-03-20T20:30:19Z","pushed_at":"2017-05-05T00:49:01Z","git_url":"git://github.com/reillyeon/webusb.git","ssh_url":"git@github.com:reillyeon/webusb.git","clone_url":"https://github.com/reillyeon/webusb.git","svn_url":"https://github.com/reillyeon/webusb","homepage":"https://wicg.github.io/webusb/","size":495,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WICG:master","ref":"master","sha":"83bbe2bac44fe991e3ed3523c2a639cc832c40be","user":{"login":"WICG","id":13145324,"avatar_url":"https://avatars1.githubusercontent.com/u/13145324?v=3","gravatar_id":"","url":"https://api.github.com/users/WICG","html_url":"https://github.com/WICG","followers_url":"https://api.github.com/users/WICG/followers","following_url":"https://api.github.com/users/WICG/following{/other_user}","gists_url":"https://api.github.com/users/WICG/gists{/gist_id}","starred_url":"https://api.github.com/users/WICG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WICG/subscriptions","organizations_url":"https://api.github.com/users/WICG/orgs","repos_url":"https://api.github.com/users/WICG/repos","events_url":"https://api.github.com/users/WICG/events{/privacy}","received_events_url":"https://api.github.com/users/WICG/received_events","type":"Organization","site_admin":false},"repo":{"id":35305773,"name":"webusb","full_name":"WICG/webusb","owner":{"login":"WICG","id":13145324,"avatar_url":"https://avatars1.githubusercontent.com/u/13145324?v=3","gravatar_id":"","url":"https://api.github.com/users/WICG","html_url":"https://github.com/WICG","followers_url":"https://api.github.com/users/WICG/followers","following_url":"https://api.github.com/users/WICG/following{/other_user}","gists_url":"https://api.github.com/users/WICG/gists{/gist_id}","starred_url":"https://api.github.com/users/WICG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WICG/subscriptions","organizations_url":"https://api.github.com/users/WICG/orgs","repos_url":"https://api.github.com/users/WICG/repos","events_url":"https://api.github.com/users/WICG/events{/privacy}","received_events_url":"https://api.github.com/users/WICG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WICG/webusb","description":"Connecting hardware to the web.","fork":false,"url":"https://api.github.com/repos/WICG/webusb","forks_url":"https://api.github.com/repos/WICG/webusb/forks","keys_url":"https://api.github.com/repos/WICG/webusb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WICG/webusb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WICG/webusb/teams","hooks_url":"https://api.github.com/repos/WICG/webusb/hooks","issue_events_url":"https://api.github.com/repos/WICG/webusb/issues/events{/number}","events_url":"https://api.github.com/repos/WICG/webusb/events","assignees_url":"https://api.github.com/repos/WICG/webusb/assignees{/user}","branches_url":"https://api.github.com/repos/WICG/webusb/branches{/branch}","tags_url":"https://api.github.com/repos/WICG/webusb/tags","blobs_url":"https://api.github.com/repos/WICG/webusb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WICG/webusb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WICG/webusb/git/refs{/sha}","trees_url":"https://api.github.com/repos/WICG/webusb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WICG/webusb/statuses/{sha}","languages_url":"https://api.github.com/repos/WICG/webusb/languages","stargazers_url":"https://api.github.com/repos/WICG/webusb/stargazers","contributors_url":"https://api.github.com/repos/WICG/webusb/contributors","subscribers_url":"https://api.github.com/repos/WICG/webusb/subscribers","subscription_url":"https://api.github.com/repos/WICG/webusb/subscription","commits_url":"https://api.github.com/repos/WICG/webusb/commits{/sha}","git_commits_url":"https://api.github.com/repos/WICG/webusb/git/commits{/sha}","comments_url":"https://api.github.com/repos/WICG/webusb/comments{/number}","issue_comment_url":"https://api.github.com/repos/WICG/webusb/issues/comments{/number}","contents_url":"https://api.github.com/repos/WICG/webusb/contents/{+path}","compare_url":"https://api.github.com/repos/WICG/webusb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WICG/webusb/merges","archive_url":"https://api.github.com/repos/WICG/webusb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WICG/webusb/downloads","issues_url":"https://api.github.com/repos/WICG/webusb/issues{/number}","pulls_url":"https://api.github.com/repos/WICG/webusb/pulls{/number}","milestones_url":"https://api.github.com/repos/WICG/webusb/milestones{/number}","notifications_url":"https://api.github.com/repos/WICG/webusb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WICG/webusb/labels{/name}","releases_url":"https://api.github.com/repos/WICG/webusb/releases{/id}","deployments_url":"https://api.github.com/repos/WICG/webusb/deployments","created_at":"2015-05-08T22:53:16Z","updated_at":"2017-05-03T10:54:03Z","pushed_at":"2017-05-05T03:25:42Z","git_url":"git://github.com/WICG/webusb.git","ssh_url":"git@github.com:WICG/webusb.git","clone_url":"https://github.com/WICG/webusb.git","svn_url":"https://github.com/WICG/webusb","homepage":"https://wicg.github.io/webusb/","size":572,"stargazers_count":453,"watchers_count":453,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":61,"mirror_url":null,"open_issues_count":22,"forks":61,"open_issues":22,"watchers":453,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WICG/webusb/pulls/92"},"html":{"href":"https://github.com/WICG/webusb/pull/92"},"issue":{"href":"https://api.github.com/repos/WICG/webusb/issues/92"},"comments":{"href":"https://api.github.com/repos/WICG/webusb/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/WICG/webusb/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/WICG/webusb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WICG/webusb/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/WICG/webusb/statuses/a7633495b6e7e4021502317ce0a5218afcd6e1c1"}}}}
{"actor":{"display_login":"jyasskin"}}