Skip to content

BeforeUnloadEvent tests return false negative in Edge 15-18 #1666

Open
@foolip

Description

I have tested https://mdn-bcd-collector.gooborg.com/tests/api/BeforeUnloadEvent in Edge 15 and 18 in BrowserStack. The issue most likely affects Edge 12-18.

The test returns false with "Cannot create event". However, BeforeUnloadEvent is defined and 'returnValue' in BeforeUnloadEvent.prototype is true, so the event interface is supported.

Unlike other custom event tests, trying new BeforeUnloadEvent('beforeunload') won't work, because Edge throws with "Function expected".

I can't see a good way to write a test that will give the right result on all browsers, so filing this issue.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions