@@ -187,6 +187,7 @@ class WKWebView extends React.Component {
187187 * Receive scroll events from view
188188 */
189189 onScroll : PropTypes . func ,
190+ onUrlChanged : PropTypes . func ,
190191 /**
191192 * A callback to get response headers, http status code and http localized status code.
192193 */
@@ -221,6 +222,10 @@ class WKWebView extends React.Component {
221222 * Sets the JS to be injected when the webpage loads.
222223 */
223224 injectedJavaScript : PropTypes . string ,
225+ /**
226+ * A domain whose cookies will be injected into `document.cookies`.
227+ */
228+ injectedCookiesSource : PropTypes . string ,
224229 /**
225230 * Allows custom handling of any webview requests by a JS handler. Return true
226231 * or false from this method to continue loading the request.
@@ -339,6 +344,7 @@ class WKWebView extends React.Component {
339344 injectedJavaScriptForMainFrameOnly = { this . props . injectedJavaScriptForMainFrameOnly }
340345 injectJavaScript = { this . props . injectJavaScript }
341346 injectedJavaScript = { this . props . injectedJavaScript }
347+ injectedCookiesSource = { this . props . injectedCookiesSource }
342348 bounces = { this . props . bounces }
343349 scrollEnabled = { this . props . scrollEnabled }
344350 contentInset = { this . props . contentInset }
@@ -355,6 +361,7 @@ class WKWebView extends React.Component {
355361 onProgress = { this . _onProgress }
356362 onMessage = { this . _onMessage }
357363 onScroll = { this . _onScroll }
364+ onUrlChanged = { this . _onUrlChanged }
358365 onShouldStartLoadWithRequest = { onShouldStartLoadWithRequest }
359366 pagingEnabled = { this . props . pagingEnabled }
360367 directionalLockEnabled = { this . props . directionalLockEnabled }
@@ -511,6 +518,11 @@ class WKWebView extends React.Component {
511518 onScroll && onScroll ( event . nativeEvent ) ;
512519 } ;
513520
521+ _onUrlChanged = ( event : Event ) => {
522+ const onUrlChanged = this . props . onUrlChanged ;
523+ onUrlChanged && onUrlChanged ( event . nativeEvent ) ;
524+ }
525+
514526 _onNavigationResponse = ( event : Event ) => {
515527 const { onNavigationResponse } = this . props ;
516528 onNavigationResponse && onNavigationResponse ( event )
0 commit comments