Bug 982909 - Consistently use inner window when calling OpenJS. r=jst, r=mrbkap, a=1.1.x+