Passing module registry to javascript