Making focused window accessible to JS.