{"action":"opened","number":3643,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/3643","id":48621639,"html_url":"https://github.com/facebook/react-native/pull/3643","diff_url":"https://github.com/facebook/react-native/pull/3643.diff","patch_url":"https://github.com/facebook/react-native/pull/3643.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/3643","number":3643,"state":"open","locked":false,"title":"Exported a callback for native webview delegate method shouldStartLoadWithRequest","user":{"login":"pjcabrera","id":199736,"avatar_url":"https://avatars.githubusercontent.com/u/199736?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcabrera","html_url":"https://github.com/pjcabrera","followers_url":"https://api.github.com/users/pjcabrera/followers","following_url":"https://api.github.com/users/pjcabrera/following{/other_user}","gists_url":"https://api.github.com/users/pjcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcabrera/subscriptions","organizations_url":"https://api.github.com/users/pjcabrera/orgs","repos_url":"https://api.github.com/users/pjcabrera/repos","events_url":"https://api.github.com/users/pjcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/pjcabrera/received_events","type":"User","site_admin":false},"body":"We have a requirement in our app, to open in mobile Safari, any http:// and https:// links displayed in a web view. Our web view is not full screen and is loaded with an HTML string from the backend. Displaying external content in that web view is outside of the scope of our app, so we open them in mobile Safari.\r\n\r\nI've forked the WebView component and added a callback property, shouldStartLoadWithRequest, and modified the RCTWebView implementation of `webView:shouldStartLoadWithRequest:navigationType:`\r\nto check if the shouldStartLoadWithRequest property is set.\r\n\r\nIf the property is set, `webView:shouldStartLoadWithRequest:navigationType:` passes the URL & navigationType to the callback. The callback is then able to ignore the request, redirect it, open a full screen web view to display the URL content, or even deep link to another app with LinkingIOS.openURL().","created_at":"2015-10-23T19:42:35Z","updated_at":"2015-10-23T19:42:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/3643/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/3643/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/3643/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/9b8ae4d77bf77cd8cfc86bc8ec52ea6d12e57261","head":{"label":"apprennet:exposed-callback-for-webview-shouldStartLoadWithRequest","ref":"exposed-callback-for-webview-shouldStartLoadWithRequest","sha":"9b8ae4d77bf77cd8cfc86bc8ec52ea6d12e57261","user":{"login":"apprennet","id":6934261,"avatar_url":"https://avatars.githubusercontent.com/u/6934261?v=3","gravatar_id":"","url":"https://api.github.com/users/apprennet","html_url":"https://github.com/apprennet","followers_url":"https://api.github.com/users/apprennet/followers","following_url":"https://api.github.com/users/apprennet/following{/other_user}","gists_url":"https://api.github.com/users/apprennet/gists{/gist_id}","starred_url":"https://api.github.com/users/apprennet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apprennet/subscriptions","organizations_url":"https://api.github.com/users/apprennet/orgs","repos_url":"https://api.github.com/users/apprennet/repos","events_url":"https://api.github.com/users/apprennet/events{/privacy}","received_events_url":"https://api.github.com/users/apprennet/received_events","type":"Organization","site_admin":false},"repo":{"id":43336435,"name":"react-native","full_name":"apprennet/react-native","owner":{"login":"apprennet","id":6934261,"avatar_url":"https://avatars.githubusercontent.com/u/6934261?v=3","gravatar_id":"","url":"https://api.github.com/users/apprennet","html_url":"https://github.com/apprennet","followers_url":"https://api.github.com/users/apprennet/followers","following_url":"https://api.github.com/users/apprennet/following{/other_user}","gists_url":"https://api.github.com/users/apprennet/gists{/gist_id}","starred_url":"https://api.github.com/users/apprennet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apprennet/subscriptions","organizations_url":"https://api.github.com/users/apprennet/orgs","repos_url":"https://api.github.com/users/apprennet/repos","events_url":"https://api.github.com/users/apprennet/events{/privacy}","received_events_url":"https://api.github.com/users/apprennet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apprennet/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/apprennet/react-native","forks_url":"https://api.github.com/repos/apprennet/react-native/forks","keys_url":"https://api.github.com/repos/apprennet/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apprennet/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apprennet/react-native/teams","hooks_url":"https://api.github.com/repos/apprennet/react-native/hooks","issue_events_url":"https://api.github.com/repos/apprennet/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/apprennet/react-native/events","assignees_url":"https://api.github.com/repos/apprennet/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/apprennet/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/apprennet/react-native/tags","blobs_url":"https://api.github.com/repos/apprennet/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apprennet/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apprennet/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/apprennet/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apprennet/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/apprennet/react-native/languages","stargazers_url":"https://api.github.com/repos/apprennet/react-native/stargazers","contributors_url":"https://api.github.com/repos/apprennet/react-native/contributors","subscribers_url":"https://api.github.com/repos/apprennet/react-native/subscribers","subscription_url":"https://api.github.com/repos/apprennet/react-native/subscription","commits_url":"https://api.github.com/repos/apprennet/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/apprennet/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/apprennet/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/apprennet/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/apprennet/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/apprennet/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apprennet/react-native/merges","archive_url":"https://api.github.com/repos/apprennet/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apprennet/react-native/downloads","issues_url":"https://api.github.com/repos/apprennet/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/apprennet/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/apprennet/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/apprennet/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apprennet/react-native/labels{/name}","releases_url":"https://api.github.com/repos/apprennet/react-native/releases{/id}","created_at":"2015-09-29T01:04:05Z","updated_at":"2015-09-29T01:04:10Z","pushed_at":"2015-10-23T19:33:36Z","git_url":"git://github.com/apprennet/react-native.git","ssh_url":"git@github.com:apprennet/react-native.git","clone_url":"https://github.com/apprennet/react-native.git","svn_url":"https://github.com/apprennet/react-native","homepage":"http://facebook.github.io/react-native/","size":28565,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"ba6be7ab887d448073714560d29f8ecb0bbc706d","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","created_at":"2015-01-09T18:10:16Z","updated_at":"2015-10-23T18:40:32Z","pushed_at":"2015-10-23T19:42:35Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":66424,"stargazers_count":21328,"watchers_count":21328,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3206,"mirror_url":null,"open_issues_count":818,"forks":3206,"open_issues":818,"watchers":21328,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3643"},"html":{"href":"https://github.com/facebook/react-native/pull/3643"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/3643"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/3643/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3643/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3643/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/9b8ae4d77bf77cd8cfc86bc8ec52ea6d12e57261"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":52,"deletions":0,"changed_files":4}}