Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
feat(store): load page when webview is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Lasse Küchler authored and lkuechler committed Dec 11, 2017
1 parent aee3caa commit 255ada4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/component/app.tsx
Expand Up @@ -58,13 +58,11 @@ class App extends React.Component<AppProps> {
}

public componentDidMount(): void {
console.log('mount');
// const webviewTag: WebviewTag = document.getElementById('preview') as WebviewTag;
window.setTimeout(() => {
console.log('load');
const webviewTag: WebviewTag = document.getElementById('preview') as WebviewTag;
webviewTag.addEventListener('did-stop-loading', () => {
store.openStyleguide('../stacked-example');
store.openPage('my-project', 'mypage');
}, 1000);
});
}

public render(): JSX.Element {
Expand Down

0 comments on commit 255ada4

Please sign in to comment.