Skip to content

Does the "script-closable" definition match reality? #1866

Open
@bzbarsky

Description

@bzbarsky

https://html.spec.whatwg.org/multipage/browsers.html#script-closable says the value is true if was created by a script (as opposed to by an action of the user).

Simple testcase, looks like this:

test.html: <a href="test2.html" target="_blank">Click me to open a popup window</a>

test2.html: <a href="test3.html">Navigate here</a>

test3.html: <button onclick='window.close()'>Click to close</button>

Trying that out in browsers shows they all allow closing the window via that window.close() call, though Edge prompts the user for permission before doing so.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions