Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot reload and navigate #16

Open
timofischer81 opened this issue Jun 4, 2016 · 3 comments
Open

cannot reload and navigate #16

timofischer81 opened this issue Jun 4, 2016 · 3 comments

Comments

@timofischer81
Copy link

I try to implement a reload button but I get the error "undefined is not a function (evaluating '_react2.default.findNodeHandle(this.refs[WEBVIEW_REF])') when hitting it. What am I doing wrong? Thanks!

var WEBVIEW_REF = 'crosswalkWebView';

class crosswalkTest extends Component {

_refreshBrowser() {
        this.refs[WEBVIEW_REF].reload();
    }

    render() {
         return (
            <View style={[styles.container]}>
                <View style={[styles.addressBarRow]}>
                    <TouchableOpacity
                        onPress={this._refreshBrowser.bind(this)}
                        style={styles.navButton}>
                        <Icon name="refresh" size={20} color="grey" style={styles.iconStyle} />
                    </TouchableOpacity>
                </View>

               <CrosswalkWebView
                   ref={WEBVIEW_REF}
                   style={styles.webViewAndroid}
                   localhost={false}
                   url={this.state.url}
               />
            </View>
         );
      }
}
@jordaaash
Copy link
Owner

This might be related to @ruqqq's fix here: ruqqq@71fb00e

Can anyone confirm?

@timofischer81
Copy link
Author

I get the same error if I apply that fix.

@jordaaash
Copy link
Owner

Looking into this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants