{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/comments/30009435","id":30009435,"diff_hunk":"@@ -1 +1,53 @@\n // define your StockView here\n+var StockView = function( selector, model ){\n+  this.el = document.querySelector( selector );\n+  this.model = model;\n+  this.render();\n+  this.lookupSymbol();\n+  this.updateShares();\n+}\n+\n+// Stock prototype\n+StockView.prototype = {\n+  \n+  render: function() {\n+    var companyName = document.querySelector(\".company-name\");\n+    companyName.innerHTML = stock.companyName;\n+    var price = document.querySelector(\".price\");\n+    price.innerHTML = \"$\" + stock.price.toFixed(2);\n+    var totalValue = document.querySelector(\".total-value\");\n+    totalValue.innerHTML = \"The total value at \" + stock.numShares + \" shares is $\" + stock.totalValue + \".\"; \n+  },\n+\n+  lookupSymbol: function() {\n+    // When the user enters a symbol, instantiate a new instance of a stock model and associate it with the 'model' attribute of the view. Then re-render the view\n+    var form = document.getElementById(\"#lookup-stock\");\n+    form.addEventListener(\"submit\", onSubmit);","path":"js/views/stock.js","position":25,"original_position":25,"commit_id":"7807b0038edb4253d68d69e8876b93dfcce7bb78","original_commit_id":"7807b0038edb4253d68d69e8876b93dfcce7bb78","user":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"body":"Interesting you did it this way, with a brand-new private function. I'd just include it as an inline callback:\r\n```\r\nform.addEventListener(\"submit\", function(){\r\n\r\n});\r\n```","created_at":"2015-05-11T01:35:01Z","updated_at":"2015-05-11T01:35:01Z","html_url":"https://github.com/ga-dc/stock-tracker/pull/9#discussion_r30009435","pull_request_url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/comments/30009435"},"html":{"href":"https://github.com/ga-dc/stock-tracker/pull/9#discussion_r30009435"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9","id":34785196,"html_url":"https://github.com/ga-dc/stock-tracker/pull/9","diff_url":"https://github.com/ga-dc/stock-tracker/pull/9.diff","patch_url":"https://github.com/ga-dc/stock-tracker/pull/9.patch","issue_url":"https://api.github.com/repos/ga-dc/stock-tracker/issues/9","number":9,"state":"open","locked":false,"title":"Completed w08d02 hw","user":{"login":"nhashmi","id":9420529,"avatar_url":"https://avatars.githubusercontent.com/u/9420529?v=3","gravatar_id":"","url":"https://api.github.com/users/nhashmi","html_url":"https://github.com/nhashmi","followers_url":"https://api.github.com/users/nhashmi/followers","following_url":"https://api.github.com/users/nhashmi/following{/other_user}","gists_url":"https://api.github.com/users/nhashmi/gists{/gist_id}","starred_url":"https://api.github.com/users/nhashmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhashmi/subscriptions","organizations_url":"https://api.github.com/users/nhashmi/orgs","repos_url":"https://api.github.com/users/nhashmi/repos","events_url":"https://api.github.com/users/nhashmi/events{/privacy}","received_events_url":"https://api.github.com/users/nhashmi/received_events","type":"User","site_admin":false},"body":"Comfort: 3\r\nCompleteness: 5\r\n\r\nIt took me a while to start understanding prototypes, models, and views in JavaScript, but this exercise definitely helped. I still feel a little shaky on some of the concepts, but I had fun working this one out. ","created_at":"2015-05-06T02:42:29Z","updated_at":"2015-05-11T01:35:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72871e2dfd4c97f84629bc70c8bd203883b322de","assignee":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/stock-tracker/issues/9/comments","statuses_url":"https://api.github.com/repos/ga-dc/stock-tracker/statuses/7807b0038edb4253d68d69e8876b93dfcce7bb78","head":{"label":"nhashmi:master","ref":"master","sha":"7807b0038edb4253d68d69e8876b93dfcce7bb78","user":{"login":"nhashmi","id":9420529,"avatar_url":"https://avatars.githubusercontent.com/u/9420529?v=3","gravatar_id":"","url":"https://api.github.com/users/nhashmi","html_url":"https://github.com/nhashmi","followers_url":"https://api.github.com/users/nhashmi/followers","following_url":"https://api.github.com/users/nhashmi/following{/other_user}","gists_url":"https://api.github.com/users/nhashmi/gists{/gist_id}","starred_url":"https://api.github.com/users/nhashmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhashmi/subscriptions","organizations_url":"https://api.github.com/users/nhashmi/orgs","repos_url":"https://api.github.com/users/nhashmi/repos","events_url":"https://api.github.com/users/nhashmi/events{/privacy}","received_events_url":"https://api.github.com/users/nhashmi/received_events","type":"User","site_admin":false},"repo":{"id":35123843,"name":"stock-tracker","full_name":"nhashmi/stock-tracker","owner":{"login":"nhashmi","id":9420529,"avatar_url":"https://avatars.githubusercontent.com/u/9420529?v=3","gravatar_id":"","url":"https://api.github.com/users/nhashmi","html_url":"https://github.com/nhashmi","followers_url":"https://api.github.com/users/nhashmi/followers","following_url":"https://api.github.com/users/nhashmi/following{/other_user}","gists_url":"https://api.github.com/users/nhashmi/gists{/gist_id}","starred_url":"https://api.github.com/users/nhashmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhashmi/subscriptions","organizations_url":"https://api.github.com/users/nhashmi/orgs","repos_url":"https://api.github.com/users/nhashmi/repos","events_url":"https://api.github.com/users/nhashmi/events{/privacy}","received_events_url":"https://api.github.com/users/nhashmi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nhashmi/stock-tracker","description":"","fork":true,"url":"https://api.github.com/repos/nhashmi/stock-tracker","forks_url":"https://api.github.com/repos/nhashmi/stock-tracker/forks","keys_url":"https://api.github.com/repos/nhashmi/stock-tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nhashmi/stock-tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nhashmi/stock-tracker/teams","hooks_url":"https://api.github.com/repos/nhashmi/stock-tracker/hooks","issue_events_url":"https://api.github.com/repos/nhashmi/stock-tracker/issues/events{/number}","events_url":"https://api.github.com/repos/nhashmi/stock-tracker/events","assignees_url":"https://api.github.com/repos/nhashmi/stock-tracker/assignees{/user}","branches_url":"https://api.github.com/repos/nhashmi/stock-tracker/branches{/branch}","tags_url":"https://api.github.com/repos/nhashmi/stock-tracker/tags","blobs_url":"https://api.github.com/repos/nhashmi/stock-tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nhashmi/stock-tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nhashmi/stock-tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/nhashmi/stock-tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nhashmi/stock-tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/nhashmi/stock-tracker/languages","stargazers_url":"https://api.github.com/repos/nhashmi/stock-tracker/stargazers","contributors_url":"https://api.github.com/repos/nhashmi/stock-tracker/contributors","subscribers_url":"https://api.github.com/repos/nhashmi/stock-tracker/subscribers","subscription_url":"https://api.github.com/repos/nhashmi/stock-tracker/subscription","commits_url":"https://api.github.com/repos/nhashmi/stock-tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/nhashmi/stock-tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/nhashmi/stock-tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/nhashmi/stock-tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/nhashmi/stock-tracker/contents/{+path}","compare_url":"https://api.github.com/repos/nhashmi/stock-tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nhashmi/stock-tracker/merges","archive_url":"https://api.github.com/repos/nhashmi/stock-tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nhashmi/stock-tracker/downloads","issues_url":"https://api.github.com/repos/nhashmi/stock-tracker/issues{/number}","pulls_url":"https://api.github.com/repos/nhashmi/stock-tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/nhashmi/stock-tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/nhashmi/stock-tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nhashmi/stock-tracker/labels{/name}","releases_url":"https://api.github.com/repos/nhashmi/stock-tracker/releases{/id}","created_at":"2015-05-05T21:02:41Z","updated_at":"2015-05-06T02:40:17Z","pushed_at":"2015-05-07T02:05:52Z","git_url":"git://github.com/nhashmi/stock-tracker.git","ssh_url":"git@github.com:nhashmi/stock-tracker.git","clone_url":"https://github.com/nhashmi/stock-tracker.git","svn_url":"https://github.com/nhashmi/stock-tracker","homepage":null,"size":92,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"ga-dc:master","ref":"master","sha":"fda44f81f39469f84556c4da7df5252b8255b77b","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":35071695,"name":"stock-tracker","full_name":"ga-dc/stock-tracker","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/stock-tracker","description":"","fork":false,"url":"https://api.github.com/repos/ga-dc/stock-tracker","forks_url":"https://api.github.com/repos/ga-dc/stock-tracker/forks","keys_url":"https://api.github.com/repos/ga-dc/stock-tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/stock-tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/stock-tracker/teams","hooks_url":"https://api.github.com/repos/ga-dc/stock-tracker/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/stock-tracker/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/stock-tracker/events","assignees_url":"https://api.github.com/repos/ga-dc/stock-tracker/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/stock-tracker/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/stock-tracker/tags","blobs_url":"https://api.github.com/repos/ga-dc/stock-tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/stock-tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/stock-tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/stock-tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/stock-tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/stock-tracker/languages","stargazers_url":"https://api.github.com/repos/ga-dc/stock-tracker/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/stock-tracker/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/stock-tracker/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/stock-tracker/subscription","commits_url":"https://api.github.com/repos/ga-dc/stock-tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/stock-tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/stock-tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/stock-tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/stock-tracker/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/stock-tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/stock-tracker/merges","archive_url":"https://api.github.com/repos/ga-dc/stock-tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/stock-tracker/downloads","issues_url":"https://api.github.com/repos/ga-dc/stock-tracker/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/stock-tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/stock-tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/stock-tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/stock-tracker/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/stock-tracker/releases{/id}","created_at":"2015-05-05T01:54:51Z","updated_at":"2015-05-05T21:03:26Z","pushed_at":"2015-05-07T14:43:44Z","git_url":"git://github.com/ga-dc/stock-tracker.git","ssh_url":"git@github.com:ga-dc/stock-tracker.git","clone_url":"https://github.com/ga-dc/stock-tracker.git","svn_url":"https://github.com/ga-dc/stock-tracker","homepage":null,"size":1779,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":41,"mirror_url":null,"open_issues_count":30,"forks":41,"open_issues":30,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9"},"html":{"href":"https://github.com/ga-dc/stock-tracker/pull/9"},"issue":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/issues/9"},"comments":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/stock-tracker/statuses/7807b0038edb4253d68d69e8876b93dfcce7bb78"}}}}