Add var(doc, mod, root, str, list, map) to window.
Implement PollService.