add hydration test, add window.init function to make it possible

This commit is contained in:
Rich Harris
2018-01-20 12:40:31 -05:00
parent a305d3cea1
commit 61daba7a64
2 changed files with 33 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
import { init } from '../../../runtime.js';
// `routes` is an array of route objects injected by Sapper
init(document.querySelector('#sapper'), __routes__);
window.READY = true;
window.init = () => {
init(document.querySelector('#sapper'), __routes__);
window.READY = true;
};