{"action":"created","comment":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/72198609","id":72198609,"diff_hunk":"@@ -0,0 +1,160 @@\n+/*global _ccsg */\n+\n+/****************************************************************************\n+ Copyright (c) 2013-2016 Chukong Technologies Inc.\n+ http://www.cocos.com\n+ Permission is hereby granted, free of charge, to any person obtaining a copy\n+ of this software and associated engine source code (the \"Software\"), a limited,\n+ worldwide, royalty-free, non-assignable, revocable and  non-exclusive license\n+ to use Cocos Creator solely to develop games on your target platforms. You shall\n+ not use Cocos Creator software for developing other software or tools that's\n+ used for developing games. You are not granted to publish, distribute,\n+ sublicense, and/or sell copies of Cocos Creator.\n+ The software or tools in this License Agreement are licensed, not sold.\n+ Chukong Aipu reserves all rights not expressly granted to you.\n+ THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ THE SOFTWARE.\n+ ****************************************************************************/\n+\n+var EventType = _ccsg.WebView.EventType;\n+\n+/*\n+ * !#en WebView event type\n+ * !#zh   WebView 事件类型\n+ * @enum WebView.EventType\n+ */\n+\n+/*\n+ * !#en Web page Load completed.\n+ * !#zh  网页加载完成\n+ * @property {String} LOADED\n+ */\n+\n+/**\n+ * !#en cc.WebView is a component for display web pages in the game\n+ * !#zh WebView 组件，用于在游戏中显示网页\n+ * @class WebView\n+ * @extends _RendererUnderSG\n+ */\n+var WebView = cc.Class({\n+    name: 'cc.WebView',\n+    extends: cc._RendererUnderSG,\n+\n+    editor: CC_EDITOR && {\n+        menu: 'i18n:MAIN_MENU.component.ui/WebView'\n+    },\n+\n+    properties: {\n+        _useOriginalSize: true,\n+\n+        _url: '',\n+        /**\n+         * !#en A given URL to be loaded by the WebView, it should have a http or https prefix.\n+         * !#zh 指定 WebView 加载的网址，它应该是一个 http 或者 https 开头的字符串\n+         * @property {String} url\n+         */\n+        url: {\n+            type: String,\n+            get: function () {\n+                return this._url;\n+            },\n+            set: function (url) {\n+                this._url = url;\n+                var sgNode = this._sgNode;\n+                if (sgNode) {\n+                    sgNode.loadURL(url);\n+                }\n+            }\n+        },\n+\n+        /**\n+         * !#en The webview's event callback , it will be triggered when web page finished loading.\n+         * !#zh WebView 的回调事件，当网页加载完成之后会回调此函数\n+         * @property {cc.Component.EventHandler[]} webViewLoadedEvents\n+         */\n+        webViewLoadedEvents: {","path":"cocos2d/core/components/CCWebView.js","position":79,"original_position":80,"commit_id":"628e6c2962c42b587f3429a923b6b7f16c126919","original_commit_id":"628e6c2962c42b587f3429a923b6b7f16c126919","user":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"body":"对，这个是延续之前所有的 UI 组件的事件风格。","created_at":"2016-07-26T07:12:15Z","updated_at":"2016-07-26T07:12:15Z","html_url":"https://github.com/cocos-creator/engine/pull/948#discussion_r72198609","pull_request_url":"https://api.github.com/repos/cocos-creator/engine/pulls/948","_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/72198609"},"html":{"href":"https://github.com/cocos-creator/engine/pull/948#discussion_r72198609"},"pull_request":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/948"}}},"pull_request":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/948","id":78654728,"html_url":"https://github.com/cocos-creator/engine/pull/948","diff_url":"https://github.com/cocos-creator/engine/pull/948.diff","patch_url":"https://github.com/cocos-creator/engine/pull/948.patch","issue_url":"https://api.github.com/repos/cocos-creator/engine/issues/948","number":948,"state":"open","locked":false,"title":"Add webview support","user":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"body":"Re: cocos-creator/fireball#3656\r\n\r\nChanges proposed in this pull request:\r\n * 添加 webview 支持 \r\n\r\n@cocos-creator/engine-admins\r\n","created_at":"2016-07-25T09:57:45Z","updated_at":"2016-07-26T07:12:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62091e98fabff4ebdd57aef4e93139657b9d61d5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cocos-creator/engine/pulls/948/commits","review_comments_url":"https://api.github.com/repos/cocos-creator/engine/pulls/948/comments","review_comment_url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos-creator/engine/issues/948/comments","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/628e6c2962c42b587f3429a923b6b7f16c126919","head":{"label":"zilongshanren:add-webview-support","ref":"add-webview-support","sha":"628e6c2962c42b587f3429a923b6b7f16c126919","user":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"repo":{"id":54608207,"name":"engine","full_name":"zilongshanren/engine","owner":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zilongshanren/engine","description":"The engine for Cocos Creator","fork":true,"url":"https://api.github.com/repos/zilongshanren/engine","forks_url":"https://api.github.com/repos/zilongshanren/engine/forks","keys_url":"https://api.github.com/repos/zilongshanren/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zilongshanren/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zilongshanren/engine/teams","hooks_url":"https://api.github.com/repos/zilongshanren/engine/hooks","issue_events_url":"https://api.github.com/repos/zilongshanren/engine/issues/events{/number}","events_url":"https://api.github.com/repos/zilongshanren/engine/events","assignees_url":"https://api.github.com/repos/zilongshanren/engine/assignees{/user}","branches_url":"https://api.github.com/repos/zilongshanren/engine/branches{/branch}","tags_url":"https://api.github.com/repos/zilongshanren/engine/tags","blobs_url":"https://api.github.com/repos/zilongshanren/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zilongshanren/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zilongshanren/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/zilongshanren/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zilongshanren/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/zilongshanren/engine/languages","stargazers_url":"https://api.github.com/repos/zilongshanren/engine/stargazers","contributors_url":"https://api.github.com/repos/zilongshanren/engine/contributors","subscribers_url":"https://api.github.com/repos/zilongshanren/engine/subscribers","subscription_url":"https://api.github.com/repos/zilongshanren/engine/subscription","commits_url":"https://api.github.com/repos/zilongshanren/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/zilongshanren/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/zilongshanren/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/zilongshanren/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/zilongshanren/engine/contents/{+path}","compare_url":"https://api.github.com/repos/zilongshanren/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zilongshanren/engine/merges","archive_url":"https://api.github.com/repos/zilongshanren/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zilongshanren/engine/downloads","issues_url":"https://api.github.com/repos/zilongshanren/engine/issues{/number}","pulls_url":"https://api.github.com/repos/zilongshanren/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/zilongshanren/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/zilongshanren/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zilongshanren/engine/labels{/name}","releases_url":"https://api.github.com/repos/zilongshanren/engine/releases{/id}","deployments_url":"https://api.github.com/repos/zilongshanren/engine/deployments","created_at":"2016-03-24T02:22:57Z","updated_at":"2016-03-24T02:23:01Z","pushed_at":"2016-07-26T06:08:53Z","git_url":"git://github.com/zilongshanren/engine.git","ssh_url":"git@github.com:zilongshanren/engine.git","clone_url":"https://github.com/zilongshanren/engine.git","svn_url":"https://github.com/zilongshanren/engine","homepage":"http://www.cocos2d-x.org/creator","size":24797,"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":"cocos-creator:master","ref":"master","sha":"09ba6baff00cb24091e92e673c956bbdbb11e39b","user":{"login":"cocos-creator","id":6937061,"avatar_url":"https://avatars.githubusercontent.com/u/6937061?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos-creator","html_url":"https://github.com/cocos-creator","followers_url":"https://api.github.com/users/cocos-creator/followers","following_url":"https://api.github.com/users/cocos-creator/following{/other_user}","gists_url":"https://api.github.com/users/cocos-creator/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos-creator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos-creator/subscriptions","organizations_url":"https://api.github.com/users/cocos-creator/orgs","repos_url":"https://api.github.com/users/cocos-creator/repos","events_url":"https://api.github.com/users/cocos-creator/events{/privacy}","received_events_url":"https://api.github.com/users/cocos-creator/received_events","type":"Organization","site_admin":false},"repo":{"id":47440536,"name":"engine","full_name":"cocos-creator/engine","owner":{"login":"cocos-creator","id":6937061,"avatar_url":"https://avatars.githubusercontent.com/u/6937061?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos-creator","html_url":"https://github.com/cocos-creator","followers_url":"https://api.github.com/users/cocos-creator/followers","following_url":"https://api.github.com/users/cocos-creator/following{/other_user}","gists_url":"https://api.github.com/users/cocos-creator/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos-creator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos-creator/subscriptions","organizations_url":"https://api.github.com/users/cocos-creator/orgs","repos_url":"https://api.github.com/users/cocos-creator/repos","events_url":"https://api.github.com/users/cocos-creator/events{/privacy}","received_events_url":"https://api.github.com/users/cocos-creator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos-creator/engine","description":"The engine for Cocos Creator","fork":false,"url":"https://api.github.com/repos/cocos-creator/engine","forks_url":"https://api.github.com/repos/cocos-creator/engine/forks","keys_url":"https://api.github.com/repos/cocos-creator/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos-creator/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos-creator/engine/teams","hooks_url":"https://api.github.com/repos/cocos-creator/engine/hooks","issue_events_url":"https://api.github.com/repos/cocos-creator/engine/issues/events{/number}","events_url":"https://api.github.com/repos/cocos-creator/engine/events","assignees_url":"https://api.github.com/repos/cocos-creator/engine/assignees{/user}","branches_url":"https://api.github.com/repos/cocos-creator/engine/branches{/branch}","tags_url":"https://api.github.com/repos/cocos-creator/engine/tags","blobs_url":"https://api.github.com/repos/cocos-creator/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos-creator/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos-creator/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos-creator/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos-creator/engine/languages","stargazers_url":"https://api.github.com/repos/cocos-creator/engine/stargazers","contributors_url":"https://api.github.com/repos/cocos-creator/engine/contributors","subscribers_url":"https://api.github.com/repos/cocos-creator/engine/subscribers","subscription_url":"https://api.github.com/repos/cocos-creator/engine/subscription","commits_url":"https://api.github.com/repos/cocos-creator/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos-creator/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos-creator/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos-creator/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos-creator/engine/contents/{+path}","compare_url":"https://api.github.com/repos/cocos-creator/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos-creator/engine/merges","archive_url":"https://api.github.com/repos/cocos-creator/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos-creator/engine/downloads","issues_url":"https://api.github.com/repos/cocos-creator/engine/issues{/number}","pulls_url":"https://api.github.com/repos/cocos-creator/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos-creator/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos-creator/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos-creator/engine/labels{/name}","releases_url":"https://api.github.com/repos/cocos-creator/engine/releases{/id}","deployments_url":"https://api.github.com/repos/cocos-creator/engine/deployments","created_at":"2015-12-05T03:28:59Z","updated_at":"2016-07-24T13:47:56Z","pushed_at":"2016-07-26T06:45:48Z","git_url":"git://github.com/cocos-creator/engine.git","ssh_url":"git@github.com:cocos-creator/engine.git","clone_url":"https://github.com/cocos-creator/engine.git","svn_url":"https://github.com/cocos-creator/engine","homepage":"http://www.cocos2d-x.org/creator","size":25510,"stargazers_count":94,"watchers_count":94,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":14,"forks":56,"open_issues":14,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/948"},"html":{"href":"https://github.com/cocos-creator/engine/pull/948"},"issue":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/948"},"comments":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/948/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/948/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/948/commits"},"statuses":{"href":"https://api.github.com/repos/cocos-creator/engine/statuses/628e6c2962c42b587f3429a923b6b7f16c126919"}}}}
{"actor":{"display_login":"zilongshanren"}}