maybe "window" should be changed to "context" in this doc