{"action":"created","comment":{"url":"https://api.github.com/repos/google/material-design-lite/pulls/comments/53968912","id":53968912,"diff_hunk":"@@ -15,255 +15,148 @@\n  * limitations under the License.\n  */\n \n-(function() {\n-  'use strict';\n+// Numeric constants used in this component.\n+const numbers_ = Object.freeze({\n+  TINY_TIMEOUT: 0.001\n+});\n+\n+// CSS classes used in this component.\n+const classes_ = Object.freeze({","path":"src/checkbox/checkbox.js","position":null,"original_position":12,"commit_id":"a5e8afa527f0fbfc6ee6702cbaec60d8a8bea5e2","original_commit_id":"bdfe600a437aeb1a4288a2a5b2d2a1206797075b","user":{"login":"Garbee","id":868301,"avatar_url":"https://avatars.githubusercontent.com/u/868301?v=3","gravatar_id":"","url":"https://api.github.com/users/Garbee","html_url":"https://github.com/Garbee","followers_url":"https://api.github.com/users/Garbee/followers","following_url":"https://api.github.com/users/Garbee/following{/other_user}","gists_url":"https://api.github.com/users/Garbee/gists{/gist_id}","starred_url":"https://api.github.com/users/Garbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Garbee/subscriptions","organizations_url":"https://api.github.com/users/Garbee/orgs","repos_url":"https://api.github.com/users/Garbee/repos","events_url":"https://api.github.com/users/Garbee/events{/privacy}","received_events_url":"https://api.github.com/users/Garbee/received_events","type":"User","site_admin":false},"body":"Assuming it is done in the constructor that is just the simplest method. Also, introducing `.prototype.whatever = {}` after the class is defined then introduces problems with re-usability. It then adds more work on people using individual bits to pull out just what they need.","created_at":"2016-02-24T16:54:16Z","updated_at":"2016-02-24T16:54:16Z","html_url":"https://github.com/google/material-design-lite/pull/4153#discussion_r53968912","pull_request_url":"https://api.github.com/repos/google/material-design-lite/pulls/4153","_links":{"self":{"href":"https://api.github.com/repos/google/material-design-lite/pulls/comments/53968912"},"html":{"href":"https://github.com/google/material-design-lite/pull/4153#discussion_r53968912"},"pull_request":{"href":"https://api.github.com/repos/google/material-design-lite/pulls/4153"}}},"pull_request":{"url":"https://api.github.com/repos/google/material-design-lite/pulls/4153","id":60500746,"html_url":"https://github.com/google/material-design-lite/pull/4153","diff_url":"https://github.com/google/material-design-lite/pull/4153.diff","patch_url":"https://github.com/google/material-design-lite/pull/4153.patch","issue_url":"https://api.github.com/repos/google/material-design-lite/issues/4153","number":4153,"state":"open","locked":false,"title":"Proof of concept for the v2 component model","user":{"login":"sgomes","id":409615,"avatar_url":"https://avatars.githubusercontent.com/u/409615?v=3","gravatar_id":"","url":"https://api.github.com/users/sgomes","html_url":"https://github.com/sgomes","followers_url":"https://api.github.com/users/sgomes/followers","following_url":"https://api.github.com/users/sgomes/following{/other_user}","gists_url":"https://api.github.com/users/sgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/sgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgomes/subscriptions","organizations_url":"https://api.github.com/users/sgomes/orgs","repos_url":"https://api.github.com/users/sgomes/repos","events_url":"https://api.github.com/users/sgomes/events{/privacy}","received_events_url":"https://api.github.com/users/sgomes/received_events","type":"User","site_admin":false},"body":"This POC is not meant for merging as-is, but rather as a preview for early review. It implements the checkbox component only, and only addresses the JS side of things (please disregard CSS changes,\r\nas they're the minimum set of changes to enable a simple demo).\r\n\r\nCurrently only Closure compiler transpilation (`gulp closure`) works, which is why the build fails.\r\n\r\nMain changes:\r\n- Moved component code to ES2015.\r\n  Using classes, getters/setters, string interpolation and fat arrow syntax where appropriate.\r\n- Removed dependency on componentHandler.\r\n  Components are self-sufficient, with basic automatic initialisation on load.\r\n- Components do not modify their own DOM structure.\r\n  Adding and removing classes and changing properties is OK, creating and removing DOM elements is not.\r\n- Removed IIFEs around component JS, as well as uniffe and deps.\r\n  Individual components don't need to be inside IIFEs. These should be applied through our pipeline.\r\n- Removed manual exporting of symbols.\r\n  Relying on globals is not the best of practices, and this made for very awkward-looking code. We now use the @export syntax to let Closure compiler know that it should export a symbol, together with a utility script (`utils/export.js`) that performs the actual exporting without relying on a hardcoded `window` global.\r\n\r\nPaging all reviewers for feedback: @Garbee @surma @addyosmani @samccone","created_at":"2016-02-24T12:24:50Z","updated_at":"2016-02-24T16:54:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6e819d9f1ae28c8c1f8b089b59269981166659a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/material-design-lite/pulls/4153/commits","review_comments_url":"https://api.github.com/repos/google/material-design-lite/pulls/4153/comments","review_comment_url":"https://api.github.com/repos/google/material-design-lite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/material-design-lite/issues/4153/comments","statuses_url":"https://api.github.com/repos/google/material-design-lite/statuses/a5e8afa527f0fbfc6ee6702cbaec60d8a8bea5e2","head":{"label":"google:v2-components-poc","ref":"v2-components-poc","sha":"a5e8afa527f0fbfc6ee6702cbaec60d8a8bea5e2","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":29268051,"name":"material-design-lite","full_name":"google/material-design-lite","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/material-design-lite","description":"Material Design Lite Components in HTML/CSS/JS","fork":false,"url":"https://api.github.com/repos/google/material-design-lite","forks_url":"https://api.github.com/repos/google/material-design-lite/forks","keys_url":"https://api.github.com/repos/google/material-design-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/material-design-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/material-design-lite/teams","hooks_url":"https://api.github.com/repos/google/material-design-lite/hooks","issue_events_url":"https://api.github.com/repos/google/material-design-lite/issues/events{/number}","events_url":"https://api.github.com/repos/google/material-design-lite/events","assignees_url":"https://api.github.com/repos/google/material-design-lite/assignees{/user}","branches_url":"https://api.github.com/repos/google/material-design-lite/branches{/branch}","tags_url":"https://api.github.com/repos/google/material-design-lite/tags","blobs_url":"https://api.github.com/repos/google/material-design-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/material-design-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/material-design-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/material-design-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/material-design-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/google/material-design-lite/languages","stargazers_url":"https://api.github.com/repos/google/material-design-lite/stargazers","contributors_url":"https://api.github.com/repos/google/material-design-lite/contributors","subscribers_url":"https://api.github.com/repos/google/material-design-lite/subscribers","subscription_url":"https://api.github.com/repos/google/material-design-lite/subscription","commits_url":"https://api.github.com/repos/google/material-design-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/material-design-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/material-design-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/material-design-lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/material-design-lite/contents/{+path}","compare_url":"https://api.github.com/repos/google/material-design-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/material-design-lite/merges","archive_url":"https://api.github.com/repos/google/material-design-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/material-design-lite/downloads","issues_url":"https://api.github.com/repos/google/material-design-lite/issues{/number}","pulls_url":"https://api.github.com/repos/google/material-design-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/google/material-design-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/google/material-design-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/material-design-lite/labels{/name}","releases_url":"https://api.github.com/repos/google/material-design-lite/releases{/id}","deployments_url":"https://api.github.com/repos/google/material-design-lite/deployments","created_at":"2015-01-14T22:01:33Z","updated_at":"2016-02-24T16:14:51Z","pushed_at":"2016-02-24T15:13:50Z","git_url":"git://github.com/google/material-design-lite.git","ssh_url":"git@github.com:google/material-design-lite.git","clone_url":"https://github.com/google/material-design-lite.git","svn_url":"https://github.com/google/material-design-lite","homepage":"http://getmdl.io","size":57819,"stargazers_count":18939,"watchers_count":18939,"language":"HTML","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2849,"mirror_url":null,"open_issues_count":309,"forks":2849,"open_issues":309,"watchers":18939,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"027e05164202d938571c358565b14528d74ed792","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":29268051,"name":"material-design-lite","full_name":"google/material-design-lite","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/material-design-lite","description":"Material Design Lite Components in HTML/CSS/JS","fork":false,"url":"https://api.github.com/repos/google/material-design-lite","forks_url":"https://api.github.com/repos/google/material-design-lite/forks","keys_url":"https://api.github.com/repos/google/material-design-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/material-design-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/material-design-lite/teams","hooks_url":"https://api.github.com/repos/google/material-design-lite/hooks","issue_events_url":"https://api.github.com/repos/google/material-design-lite/issues/events{/number}","events_url":"https://api.github.com/repos/google/material-design-lite/events","assignees_url":"https://api.github.com/repos/google/material-design-lite/assignees{/user}","branches_url":"https://api.github.com/repos/google/material-design-lite/branches{/branch}","tags_url":"https://api.github.com/repos/google/material-design-lite/tags","blobs_url":"https://api.github.com/repos/google/material-design-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/material-design-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/material-design-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/material-design-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/material-design-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/google/material-design-lite/languages","stargazers_url":"https://api.github.com/repos/google/material-design-lite/stargazers","contributors_url":"https://api.github.com/repos/google/material-design-lite/contributors","subscribers_url":"https://api.github.com/repos/google/material-design-lite/subscribers","subscription_url":"https://api.github.com/repos/google/material-design-lite/subscription","commits_url":"https://api.github.com/repos/google/material-design-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/material-design-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/material-design-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/material-design-lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/material-design-lite/contents/{+path}","compare_url":"https://api.github.com/repos/google/material-design-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/material-design-lite/merges","archive_url":"https://api.github.com/repos/google/material-design-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/material-design-lite/downloads","issues_url":"https://api.github.com/repos/google/material-design-lite/issues{/number}","pulls_url":"https://api.github.com/repos/google/material-design-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/google/material-design-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/google/material-design-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/material-design-lite/labels{/name}","releases_url":"https://api.github.com/repos/google/material-design-lite/releases{/id}","deployments_url":"https://api.github.com/repos/google/material-design-lite/deployments","created_at":"2015-01-14T22:01:33Z","updated_at":"2016-02-24T16:14:51Z","pushed_at":"2016-02-24T15:13:50Z","git_url":"git://github.com/google/material-design-lite.git","ssh_url":"git@github.com:google/material-design-lite.git","clone_url":"https://github.com/google/material-design-lite.git","svn_url":"https://github.com/google/material-design-lite","homepage":"http://getmdl.io","size":57819,"stargazers_count":18939,"watchers_count":18939,"language":"HTML","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2849,"mirror_url":null,"open_issues_count":309,"forks":2849,"open_issues":309,"watchers":18939,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/material-design-lite/pulls/4153"},"html":{"href":"https://github.com/google/material-design-lite/pull/4153"},"issue":{"href":"https://api.github.com/repos/google/material-design-lite/issues/4153"},"comments":{"href":"https://api.github.com/repos/google/material-design-lite/issues/4153/comments"},"review_comments":{"href":"https://api.github.com/repos/google/material-design-lite/pulls/4153/comments"},"review_comment":{"href":"https://api.github.com/repos/google/material-design-lite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/material-design-lite/pulls/4153/commits"},"statuses":{"href":"https://api.github.com/repos/google/material-design-lite/statuses/a5e8afa527f0fbfc6ee6702cbaec60d8a8bea5e2"}}}}