expose initialisation function for setting window/document.
0.0.5