-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.8.1 (not present in 2.7.2)
Search Terms: opener (found #10379, but this was back in 2.0 / 2016), window readonly, set window opener to null typescript 2.8
Code
const newWindow = window.open(url);
if (newWindow) {
newWindow.opener = null;
}Expected behavior:
window.opener should be assignable to null for security reasons (e.g. microsoft/monaco-editor#601). Setting the noopener window feature only works in modern browsers.
Actual behavior:
window.opener is declared as readonly. This appears to be a 2.8 regression of #10379
Playground Link: here
Related Issues:
#10379
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue