{"action":"created","comment":{"url":"https://api.github.com/repos/chikeichan/Trio/pulls/comments/45833304","id":45833304,"diff_hunk":"@@ -124,6 +119,19 @@ Component.prototype.registerElement = function(opts) {\n                 }\n             }\n         }\n+\n+        function replaceStyleHost(root) {\n+            if (window && window.ShadowDOMPolyfill) {\n+                var list = root.getElementsByTagName('style');\n+                Array.prototype.forEach.call(list, function (style) {\n+                    var text = style.textContent\n+                        .replace(/:host\\b/gm, this.tagName.toLowerCase())\n+                        .replace(/::shadow\\b/gm, ' ')\n+                        .replace(/::content\\b/gm, ' ');\n+                    style.textContent = text;\n+                }.bind(this));","path":"src/component/component.js","position":67,"original_position":67,"commit_id":"551c754596e7b477dc0b4800b0909e0cab914ba2","original_commit_id":"551c754596e7b477dc0b4800b0909e0cab914ba2","user":{"login":"chikeichan","id":8507735,"avatar_url":"https://avatars.githubusercontent.com/u/8507735?v=3","gravatar_id":"","url":"https://api.github.com/users/chikeichan","html_url":"https://github.com/chikeichan","followers_url":"https://api.github.com/users/chikeichan/followers","following_url":"https://api.github.com/users/chikeichan/following{/other_user}","gists_url":"https://api.github.com/users/chikeichan/gists{/gist_id}","starred_url":"https://api.github.com/users/chikeichan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikeichan/subscriptions","organizations_url":"https://api.github.com/users/chikeichan/orgs","repos_url":"https://api.github.com/users/chikeichan/repos","events_url":"https://api.github.com/users/chikeichan/events{/privacy}","received_events_url":"https://api.github.com/users/chikeichan/received_events","type":"User","site_admin":false},"body":"When styling webcomponent, Chrome expect the selector ':host', while Safari expect the tag name itself.\r\n\r\nThis method use regex to replace :host with tagName when using Polyfill\r\n","created_at":"2015-11-25T06:30:46Z","updated_at":"2015-11-25T06:30:46Z","html_url":"https://github.com/chikeichan/Trio/pull/98#discussion_r45833304","pull_request_url":"https://api.github.com/repos/chikeichan/Trio/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/chikeichan/Trio/pulls/comments/45833304"},"html":{"href":"https://github.com/chikeichan/Trio/pull/98#discussion_r45833304"},"pull_request":{"href":"https://api.github.com/repos/chikeichan/Trio/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/chikeichan/Trio/pulls/98","id":51756164,"html_url":"https://github.com/chikeichan/Trio/pull/98","diff_url":"https://github.com/chikeichan/Trio/pull/98.diff","patch_url":"https://github.com/chikeichan/Trio/pull/98.patch","issue_url":"https://api.github.com/repos/chikeichan/Trio/issues/98","number":98,"state":"open","locked":false,"title":"97 - Add compatibility with Safari for webcomponents.js","user":{"login":"chikeichan","id":8507735,"avatar_url":"https://avatars.githubusercontent.com/u/8507735?v=3","gravatar_id":"","url":"https://api.github.com/users/chikeichan","html_url":"https://github.com/chikeichan","followers_url":"https://api.github.com/users/chikeichan/followers","following_url":"https://api.github.com/users/chikeichan/following{/other_user}","gists_url":"https://api.github.com/users/chikeichan/gists{/gist_id}","starred_url":"https://api.github.com/users/chikeichan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikeichan/subscriptions","organizations_url":"https://api.github.com/users/chikeichan/orgs","repos_url":"https://api.github.com/users/chikeichan/repos","events_url":"https://api.github.com/users/chikeichan/events{/privacy}","received_events_url":"https://api.github.com/users/chikeichan/received_events","type":"User","site_admin":false},"body":"this resolves #97 ","created_at":"2015-11-25T06:11:15Z","updated_at":"2015-11-25T06:30:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd858b938a6bcf121a19b0308df9bcffd01a4d9b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chikeichan/Trio/pulls/98/commits","review_comments_url":"https://api.github.com/repos/chikeichan/Trio/pulls/98/comments","review_comment_url":"https://api.github.com/repos/chikeichan/Trio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chikeichan/Trio/issues/98/comments","statuses_url":"https://api.github.com/repos/chikeichan/Trio/statuses/551c754596e7b477dc0b4800b0909e0cab914ba2","head":{"label":"chikeichan:trio#97","ref":"trio#97","sha":"551c754596e7b477dc0b4800b0909e0cab914ba2","user":{"login":"chikeichan","id":8507735,"avatar_url":"https://avatars.githubusercontent.com/u/8507735?v=3","gravatar_id":"","url":"https://api.github.com/users/chikeichan","html_url":"https://github.com/chikeichan","followers_url":"https://api.github.com/users/chikeichan/followers","following_url":"https://api.github.com/users/chikeichan/following{/other_user}","gists_url":"https://api.github.com/users/chikeichan/gists{/gist_id}","starred_url":"https://api.github.com/users/chikeichan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikeichan/subscriptions","organizations_url":"https://api.github.com/users/chikeichan/orgs","repos_url":"https://api.github.com/users/chikeichan/repos","events_url":"https://api.github.com/users/chikeichan/events{/privacy}","received_events_url":"https://api.github.com/users/chikeichan/received_events","type":"User","site_admin":false},"repo":{"id":39370355,"name":"Trio","full_name":"chikeichan/Trio","owner":{"login":"chikeichan","id":8507735,"avatar_url":"https://avatars.githubusercontent.com/u/8507735?v=3","gravatar_id":"","url":"https://api.github.com/users/chikeichan","html_url":"https://github.com/chikeichan","followers_url":"https://api.github.com/users/chikeichan/followers","following_url":"https://api.github.com/users/chikeichan/following{/other_user}","gists_url":"https://api.github.com/users/chikeichan/gists{/gist_id}","starred_url":"https://api.github.com/users/chikeichan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikeichan/subscriptions","organizations_url":"https://api.github.com/users/chikeichan/orgs","repos_url":"https://api.github.com/users/chikeichan/repos","events_url":"https://api.github.com/users/chikeichan/events{/privacy}","received_events_url":"https://api.github.com/users/chikeichan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chikeichan/Trio","description":"MVC Framework","fork":false,"url":"https://api.github.com/repos/chikeichan/Trio","forks_url":"https://api.github.com/repos/chikeichan/Trio/forks","keys_url":"https://api.github.com/repos/chikeichan/Trio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chikeichan/Trio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chikeichan/Trio/teams","hooks_url":"https://api.github.com/repos/chikeichan/Trio/hooks","issue_events_url":"https://api.github.com/repos/chikeichan/Trio/issues/events{/number}","events_url":"https://api.github.com/repos/chikeichan/Trio/events","assignees_url":"https://api.github.com/repos/chikeichan/Trio/assignees{/user}","branches_url":"https://api.github.com/repos/chikeichan/Trio/branches{/branch}","tags_url":"https://api.github.com/repos/chikeichan/Trio/tags","blobs_url":"https://api.github.com/repos/chikeichan/Trio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chikeichan/Trio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chikeichan/Trio/git/refs{/sha}","trees_url":"https://api.github.com/repos/chikeichan/Trio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chikeichan/Trio/statuses/{sha}","languages_url":"https://api.github.com/repos/chikeichan/Trio/languages","stargazers_url":"https://api.github.com/repos/chikeichan/Trio/stargazers","contributors_url":"https://api.github.com/repos/chikeichan/Trio/contributors","subscribers_url":"https://api.github.com/repos/chikeichan/Trio/subscribers","subscription_url":"https://api.github.com/repos/chikeichan/Trio/subscription","commits_url":"https://api.github.com/repos/chikeichan/Trio/commits{/sha}","git_commits_url":"https://api.github.com/repos/chikeichan/Trio/git/commits{/sha}","comments_url":"https://api.github.com/repos/chikeichan/Trio/comments{/number}","issue_comment_url":"https://api.github.com/repos/chikeichan/Trio/issues/comments{/number}","contents_url":"https://api.github.com/repos/chikeichan/Trio/contents/{+path}","compare_url":"https://api.github.com/repos/chikeichan/Trio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chikeichan/Trio/merges","archive_url":"https://api.github.com/repos/chikeichan/Trio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chikeichan/Trio/downloads","issues_url":"https://api.github.com/repos/chikeichan/Trio/issues{/number}","pulls_url":"https://api.github.com/repos/chikeichan/Trio/pulls{/number}","milestones_url":"https://api.github.com/repos/chikeichan/Trio/milestones{/number}","notifications_url":"https://api.github.com/repos/chikeichan/Trio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chikeichan/Trio/labels{/name}","releases_url":"https://api.github.com/repos/chikeichan/Trio/releases{/id}","created_at":"2015-07-20T07:49:39Z","updated_at":"2015-10-24T02:20:29Z","pushed_at":"2015-11-25T06:24:15Z","git_url":"git://github.com/chikeichan/Trio.git","ssh_url":"git@github.com:chikeichan/Trio.git","clone_url":"https://github.com/chikeichan/Trio.git","svn_url":"https://github.com/chikeichan/Trio","homepage":"","size":564,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":28,"forks":1,"open_issues":28,"watchers":1,"default_branch":"dev"}},"base":{"label":"chikeichan:dev","ref":"dev","sha":"0cd613765b2bc0be33595d159fbc57bef1e6862f","user":{"login":"chikeichan","id":8507735,"avatar_url":"https://avatars.githubusercontent.com/u/8507735?v=3","gravatar_id":"","url":"https://api.github.com/users/chikeichan","html_url":"https://github.com/chikeichan","followers_url":"https://api.github.com/users/chikeichan/followers","following_url":"https://api.github.com/users/chikeichan/following{/other_user}","gists_url":"https://api.github.com/users/chikeichan/gists{/gist_id}","starred_url":"https://api.github.com/users/chikeichan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikeichan/subscriptions","organizations_url":"https://api.github.com/users/chikeichan/orgs","repos_url":"https://api.github.com/users/chikeichan/repos","events_url":"https://api.github.com/users/chikeichan/events{/privacy}","received_events_url":"https://api.github.com/users/chikeichan/received_events","type":"User","site_admin":false},"repo":{"id":39370355,"name":"Trio","full_name":"chikeichan/Trio","owner":{"login":"chikeichan","id":8507735,"avatar_url":"https://avatars.githubusercontent.com/u/8507735?v=3","gravatar_id":"","url":"https://api.github.com/users/chikeichan","html_url":"https://github.com/chikeichan","followers_url":"https://api.github.com/users/chikeichan/followers","following_url":"https://api.github.com/users/chikeichan/following{/other_user}","gists_url":"https://api.github.com/users/chikeichan/gists{/gist_id}","starred_url":"https://api.github.com/users/chikeichan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chikeichan/subscriptions","organizations_url":"https://api.github.com/users/chikeichan/orgs","repos_url":"https://api.github.com/users/chikeichan/repos","events_url":"https://api.github.com/users/chikeichan/events{/privacy}","received_events_url":"https://api.github.com/users/chikeichan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chikeichan/Trio","description":"MVC Framework","fork":false,"url":"https://api.github.com/repos/chikeichan/Trio","forks_url":"https://api.github.com/repos/chikeichan/Trio/forks","keys_url":"https://api.github.com/repos/chikeichan/Trio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chikeichan/Trio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chikeichan/Trio/teams","hooks_url":"https://api.github.com/repos/chikeichan/Trio/hooks","issue_events_url":"https://api.github.com/repos/chikeichan/Trio/issues/events{/number}","events_url":"https://api.github.com/repos/chikeichan/Trio/events","assignees_url":"https://api.github.com/repos/chikeichan/Trio/assignees{/user}","branches_url":"https://api.github.com/repos/chikeichan/Trio/branches{/branch}","tags_url":"https://api.github.com/repos/chikeichan/Trio/tags","blobs_url":"https://api.github.com/repos/chikeichan/Trio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chikeichan/Trio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chikeichan/Trio/git/refs{/sha}","trees_url":"https://api.github.com/repos/chikeichan/Trio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chikeichan/Trio/statuses/{sha}","languages_url":"https://api.github.com/repos/chikeichan/Trio/languages","stargazers_url":"https://api.github.com/repos/chikeichan/Trio/stargazers","contributors_url":"https://api.github.com/repos/chikeichan/Trio/contributors","subscribers_url":"https://api.github.com/repos/chikeichan/Trio/subscribers","subscription_url":"https://api.github.com/repos/chikeichan/Trio/subscription","commits_url":"https://api.github.com/repos/chikeichan/Trio/commits{/sha}","git_commits_url":"https://api.github.com/repos/chikeichan/Trio/git/commits{/sha}","comments_url":"https://api.github.com/repos/chikeichan/Trio/comments{/number}","issue_comment_url":"https://api.github.com/repos/chikeichan/Trio/issues/comments{/number}","contents_url":"https://api.github.com/repos/chikeichan/Trio/contents/{+path}","compare_url":"https://api.github.com/repos/chikeichan/Trio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chikeichan/Trio/merges","archive_url":"https://api.github.com/repos/chikeichan/Trio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chikeichan/Trio/downloads","issues_url":"https://api.github.com/repos/chikeichan/Trio/issues{/number}","pulls_url":"https://api.github.com/repos/chikeichan/Trio/pulls{/number}","milestones_url":"https://api.github.com/repos/chikeichan/Trio/milestones{/number}","notifications_url":"https://api.github.com/repos/chikeichan/Trio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chikeichan/Trio/labels{/name}","releases_url":"https://api.github.com/repos/chikeichan/Trio/releases{/id}","created_at":"2015-07-20T07:49:39Z","updated_at":"2015-10-24T02:20:29Z","pushed_at":"2015-11-25T06:24:15Z","git_url":"git://github.com/chikeichan/Trio.git","ssh_url":"git@github.com:chikeichan/Trio.git","clone_url":"https://github.com/chikeichan/Trio.git","svn_url":"https://github.com/chikeichan/Trio","homepage":"","size":564,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":28,"forks":1,"open_issues":28,"watchers":1,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/chikeichan/Trio/pulls/98"},"html":{"href":"https://github.com/chikeichan/Trio/pull/98"},"issue":{"href":"https://api.github.com/repos/chikeichan/Trio/issues/98"},"comments":{"href":"https://api.github.com/repos/chikeichan/Trio/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/chikeichan/Trio/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/chikeichan/Trio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chikeichan/Trio/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/chikeichan/Trio/statuses/551c754596e7b477dc0b4800b0909e0cab914ba2"}}}}