{"action":"created","comment":{"url":"https://api.github.com/repos/Temasys/AdapterJS/pulls/comments/39952745","id":39952745,"diff_hunk":"@@ -1069,14 +1069,21 @@ if (navigator.mozGetUserMedia) {\n         element.setStreamId(streamId);\n       }\n       var newElement = document.getElementById(elementId);\n-      newElement.onplaying = (element.onplaying) ? element.onplaying : function (arg) {};\n-      newElement.onplay    = (element.onplay)    ? element.onplay    : function (arg) {};\n-      newElement.onloadedmetadata    = (element.onloadedmetadata)    ? element.onloadedmetadata    : function (arg) {};\n-      newElement.onclick   = (element.onclick)   ? element.onclick   : function (arg) {};\n+\n+      for(var property in element) {\n+        if(property.slice(0,2) == \"on\" && element[property] != null) {\n+          if (newElement.attachEvent) {\n+            //isIE\n+            newElement.attachEvent(property, function(event){console.log(event)});\n+          } else {\n+            //other web browsers\n+            newElement.addEventListener(property.slice(2), element[property], false); \n+          }\n+        }\n+      }\n+      newElement.onclick = (element.onclick) ? element.onclick : function (arg) {};","path":"source/adapter.js","position":20,"original_position":20,"commit_id":"f602ef1451db5d612b31957130d991e94e6ef3d6","original_commit_id":"f602ef1451db5d612b31957130d991e94e6ef3d6","user":{"login":"johache","id":3684583,"avatar_url":"https://avatars.githubusercontent.com/u/3684583?v=3","gravatar_id":"","url":"https://api.github.com/users/johache","html_url":"https://github.com/johache","followers_url":"https://api.github.com/users/johache/followers","following_url":"https://api.github.com/users/johache/following{/other_user}","gists_url":"https://api.github.com/users/johache/gists{/gist_id}","starred_url":"https://api.github.com/users/johache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johache/subscriptions","organizations_url":"https://api.github.com/users/johache/orgs","repos_url":"https://api.github.com/users/johache/repos","events_url":"https://api.github.com/users/johache/events{/privacy}","received_events_url":"https://api.github.com/users/johache/received_events","type":"User","site_admin":false},"body":"Why does onclick keep it own line ?","created_at":"2015-09-21T09:21:56Z","updated_at":"2015-09-21T09:21:56Z","html_url":"https://github.com/Temasys/AdapterJS/pull/124#discussion_r39952745","pull_request_url":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124","_links":{"self":{"href":"https://api.github.com/repos/Temasys/AdapterJS/pulls/comments/39952745"},"html":{"href":"https://github.com/Temasys/AdapterJS/pull/124#discussion_r39952745"},"pull_request":{"href":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124"}}},"pull_request":{"url":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124","id":45525312,"html_url":"https://github.com/Temasys/AdapterJS/pull/124","diff_url":"https://github.com/Temasys/AdapterJS/pull/124.diff","patch_url":"https://github.com/Temasys/AdapterJS/pull/124.patch","issue_url":"https://api.github.com/repos/Temasys/AdapterJS/issues/124","number":124,"state":"open","locked":false,"title":"Ajs 218 forward event listeners","user":{"login":"sebbeaume","id":13192838,"avatar_url":"https://avatars.githubusercontent.com/u/13192838?v=3","gravatar_id":"","url":"https://api.github.com/users/sebbeaume","html_url":"https://github.com/sebbeaume","followers_url":"https://api.github.com/users/sebbeaume/followers","following_url":"https://api.github.com/users/sebbeaume/following{/other_user}","gists_url":"https://api.github.com/users/sebbeaume/gists{/gist_id}","starred_url":"https://api.github.com/users/sebbeaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebbeaume/subscriptions","organizations_url":"https://api.github.com/users/sebbeaume/orgs","repos_url":"https://api.github.com/users/sebbeaume/repos","events_url":"https://api.github.com/users/sebbeaume/events{/privacy}","received_events_url":"https://api.github.com/users/sebbeaume/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-21T08:51:11Z","updated_at":"2015-09-21T09:21:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f53cd90331fad9d7e78b13774133c5b96853ae06","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124/commits","review_comments_url":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124/comments","review_comment_url":"https://api.github.com/repos/Temasys/AdapterJS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Temasys/AdapterJS/issues/124/comments","statuses_url":"https://api.github.com/repos/Temasys/AdapterJS/statuses/f602ef1451db5d612b31957130d991e94e6ef3d6","head":{"label":"Temasys:AJS-218-forward-event-listeners","ref":"AJS-218-forward-event-listeners","sha":"f602ef1451db5d612b31957130d991e94e6ef3d6","user":{"login":"Temasys","id":6687728,"avatar_url":"https://avatars.githubusercontent.com/u/6687728?v=3","gravatar_id":"","url":"https://api.github.com/users/Temasys","html_url":"https://github.com/Temasys","followers_url":"https://api.github.com/users/Temasys/followers","following_url":"https://api.github.com/users/Temasys/following{/other_user}","gists_url":"https://api.github.com/users/Temasys/gists{/gist_id}","starred_url":"https://api.github.com/users/Temasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temasys/subscriptions","organizations_url":"https://api.github.com/users/Temasys/orgs","repos_url":"https://api.github.com/users/Temasys/repos","events_url":"https://api.github.com/users/Temasys/events{/privacy}","received_events_url":"https://api.github.com/users/Temasys/received_events","type":"Organization","site_admin":false},"repo":{"id":21158532,"name":"AdapterJS","full_name":"Temasys/AdapterJS","owner":{"login":"Temasys","id":6687728,"avatar_url":"https://avatars.githubusercontent.com/u/6687728?v=3","gravatar_id":"","url":"https://api.github.com/users/Temasys","html_url":"https://github.com/Temasys","followers_url":"https://api.github.com/users/Temasys/followers","following_url":"https://api.github.com/users/Temasys/following{/other_user}","gists_url":"https://api.github.com/users/Temasys/gists{/gist_id}","starred_url":"https://api.github.com/users/Temasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temasys/subscriptions","organizations_url":"https://api.github.com/users/Temasys/orgs","repos_url":"https://api.github.com/users/Temasys/repos","events_url":"https://api.github.com/users/Temasys/events{/privacy}","received_events_url":"https://api.github.com/users/Temasys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Temasys/AdapterJS","description":"AdapterJS Javascript Polyfill and Tools for WebRTC - Skylink WebRTC","fork":false,"url":"https://api.github.com/repos/Temasys/AdapterJS","forks_url":"https://api.github.com/repos/Temasys/AdapterJS/forks","keys_url":"https://api.github.com/repos/Temasys/AdapterJS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Temasys/AdapterJS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Temasys/AdapterJS/teams","hooks_url":"https://api.github.com/repos/Temasys/AdapterJS/hooks","issue_events_url":"https://api.github.com/repos/Temasys/AdapterJS/issues/events{/number}","events_url":"https://api.github.com/repos/Temasys/AdapterJS/events","assignees_url":"https://api.github.com/repos/Temasys/AdapterJS/assignees{/user}","branches_url":"https://api.github.com/repos/Temasys/AdapterJS/branches{/branch}","tags_url":"https://api.github.com/repos/Temasys/AdapterJS/tags","blobs_url":"https://api.github.com/repos/Temasys/AdapterJS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Temasys/AdapterJS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Temasys/AdapterJS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Temasys/AdapterJS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Temasys/AdapterJS/statuses/{sha}","languages_url":"https://api.github.com/repos/Temasys/AdapterJS/languages","stargazers_url":"https://api.github.com/repos/Temasys/AdapterJS/stargazers","contributors_url":"https://api.github.com/repos/Temasys/AdapterJS/contributors","subscribers_url":"https://api.github.com/repos/Temasys/AdapterJS/subscribers","subscription_url":"https://api.github.com/repos/Temasys/AdapterJS/subscription","commits_url":"https://api.github.com/repos/Temasys/AdapterJS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Temasys/AdapterJS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Temasys/AdapterJS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Temasys/AdapterJS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Temasys/AdapterJS/contents/{+path}","compare_url":"https://api.github.com/repos/Temasys/AdapterJS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Temasys/AdapterJS/merges","archive_url":"https://api.github.com/repos/Temasys/AdapterJS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Temasys/AdapterJS/downloads","issues_url":"https://api.github.com/repos/Temasys/AdapterJS/issues{/number}","pulls_url":"https://api.github.com/repos/Temasys/AdapterJS/pulls{/number}","milestones_url":"https://api.github.com/repos/Temasys/AdapterJS/milestones{/number}","notifications_url":"https://api.github.com/repos/Temasys/AdapterJS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Temasys/AdapterJS/labels{/name}","releases_url":"https://api.github.com/repos/Temasys/AdapterJS/releases{/id}","created_at":"2014-06-24T09:02:16Z","updated_at":"2015-09-20T12:12:21Z","pushed_at":"2015-09-21T08:51:12Z","git_url":"git://github.com/Temasys/AdapterJS.git","ssh_url":"git@github.com:Temasys/AdapterJS.git","clone_url":"https://github.com/Temasys/AdapterJS.git","svn_url":"https://github.com/Temasys/AdapterJS","homepage":"http://skylink.io/web","size":10668,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":37,"forks":25,"open_issues":37,"watchers":135,"default_branch":"master"}},"base":{"label":"Temasys:development","ref":"development","sha":"fbcdb471e7cc3e145d0824984581c64c32b0c1f2","user":{"login":"Temasys","id":6687728,"avatar_url":"https://avatars.githubusercontent.com/u/6687728?v=3","gravatar_id":"","url":"https://api.github.com/users/Temasys","html_url":"https://github.com/Temasys","followers_url":"https://api.github.com/users/Temasys/followers","following_url":"https://api.github.com/users/Temasys/following{/other_user}","gists_url":"https://api.github.com/users/Temasys/gists{/gist_id}","starred_url":"https://api.github.com/users/Temasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temasys/subscriptions","organizations_url":"https://api.github.com/users/Temasys/orgs","repos_url":"https://api.github.com/users/Temasys/repos","events_url":"https://api.github.com/users/Temasys/events{/privacy}","received_events_url":"https://api.github.com/users/Temasys/received_events","type":"Organization","site_admin":false},"repo":{"id":21158532,"name":"AdapterJS","full_name":"Temasys/AdapterJS","owner":{"login":"Temasys","id":6687728,"avatar_url":"https://avatars.githubusercontent.com/u/6687728?v=3","gravatar_id":"","url":"https://api.github.com/users/Temasys","html_url":"https://github.com/Temasys","followers_url":"https://api.github.com/users/Temasys/followers","following_url":"https://api.github.com/users/Temasys/following{/other_user}","gists_url":"https://api.github.com/users/Temasys/gists{/gist_id}","starred_url":"https://api.github.com/users/Temasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Temasys/subscriptions","organizations_url":"https://api.github.com/users/Temasys/orgs","repos_url":"https://api.github.com/users/Temasys/repos","events_url":"https://api.github.com/users/Temasys/events{/privacy}","received_events_url":"https://api.github.com/users/Temasys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Temasys/AdapterJS","description":"AdapterJS Javascript Polyfill and Tools for WebRTC - Skylink WebRTC","fork":false,"url":"https://api.github.com/repos/Temasys/AdapterJS","forks_url":"https://api.github.com/repos/Temasys/AdapterJS/forks","keys_url":"https://api.github.com/repos/Temasys/AdapterJS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Temasys/AdapterJS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Temasys/AdapterJS/teams","hooks_url":"https://api.github.com/repos/Temasys/AdapterJS/hooks","issue_events_url":"https://api.github.com/repos/Temasys/AdapterJS/issues/events{/number}","events_url":"https://api.github.com/repos/Temasys/AdapterJS/events","assignees_url":"https://api.github.com/repos/Temasys/AdapterJS/assignees{/user}","branches_url":"https://api.github.com/repos/Temasys/AdapterJS/branches{/branch}","tags_url":"https://api.github.com/repos/Temasys/AdapterJS/tags","blobs_url":"https://api.github.com/repos/Temasys/AdapterJS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Temasys/AdapterJS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Temasys/AdapterJS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Temasys/AdapterJS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Temasys/AdapterJS/statuses/{sha}","languages_url":"https://api.github.com/repos/Temasys/AdapterJS/languages","stargazers_url":"https://api.github.com/repos/Temasys/AdapterJS/stargazers","contributors_url":"https://api.github.com/repos/Temasys/AdapterJS/contributors","subscribers_url":"https://api.github.com/repos/Temasys/AdapterJS/subscribers","subscription_url":"https://api.github.com/repos/Temasys/AdapterJS/subscription","commits_url":"https://api.github.com/repos/Temasys/AdapterJS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Temasys/AdapterJS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Temasys/AdapterJS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Temasys/AdapterJS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Temasys/AdapterJS/contents/{+path}","compare_url":"https://api.github.com/repos/Temasys/AdapterJS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Temasys/AdapterJS/merges","archive_url":"https://api.github.com/repos/Temasys/AdapterJS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Temasys/AdapterJS/downloads","issues_url":"https://api.github.com/repos/Temasys/AdapterJS/issues{/number}","pulls_url":"https://api.github.com/repos/Temasys/AdapterJS/pulls{/number}","milestones_url":"https://api.github.com/repos/Temasys/AdapterJS/milestones{/number}","notifications_url":"https://api.github.com/repos/Temasys/AdapterJS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Temasys/AdapterJS/labels{/name}","releases_url":"https://api.github.com/repos/Temasys/AdapterJS/releases{/id}","created_at":"2014-06-24T09:02:16Z","updated_at":"2015-09-20T12:12:21Z","pushed_at":"2015-09-21T08:51:12Z","git_url":"git://github.com/Temasys/AdapterJS.git","ssh_url":"git@github.com:Temasys/AdapterJS.git","clone_url":"https://github.com/Temasys/AdapterJS.git","svn_url":"https://github.com/Temasys/AdapterJS","homepage":"http://skylink.io/web","size":10668,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":37,"forks":25,"open_issues":37,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124"},"html":{"href":"https://github.com/Temasys/AdapterJS/pull/124"},"issue":{"href":"https://api.github.com/repos/Temasys/AdapterJS/issues/124"},"comments":{"href":"https://api.github.com/repos/Temasys/AdapterJS/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/Temasys/AdapterJS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Temasys/AdapterJS/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/Temasys/AdapterJS/statuses/f602ef1451db5d612b31957130d991e94e6ef3d6"}}}}