Skip to content

2.0: window.opener declared as readonly #10379

Closed
microsoft/TypeScript-DOM-lib-generator
#141
@jeffreymorlan

Description

@jeffreymorlan

When you open a popup window of a page on a different domain, for security reasons you might want to set its window.opener to null. This is a type error in 2.0 because the opener property is incorrectly declared read-only:

var newWnd = window.open(...);
newWnd.opener = null;
// Left-hand side of assignment expression cannot be a constant or a read-only property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions