Refactorings to make code cleaner. Fixes to not execute anything when windows squirrel installer.

This commit is contained in:
David Meza
2017-10-20 13:23:51 -05:00
parent 7a3552dfdc
commit c624a9a009
4 changed files with 29 additions and 17 deletions

View File

@@ -205,10 +205,15 @@ const MattermostView = createReactClass({
webview.getWebContents().goForward();
},
getSrc() {
const webview = findDOMNode(this.refs.webview);
return webview.src;
},
handleDeepLink(relativeUrl) {
const webview = findDOMNode(this.refs.webview);
webview.executeJavaScript(
'history.pushState(null, null, "/' + relativeUrl + '");'
'history.pushState(null, null, "' + relativeUrl + '");'
);
webview.executeJavaScript(
'dispatchEvent(new PopStateEvent("popstate", null));'