Skip to content

DragEvent should accept a DragEventInit inheriting from MouseEventInit #17885

@WojciechP

Description

@WojciechP

TypeScript Version: master, eef7d8b

Code

let ev = new DragEvent('drag', {clientX: 40})

Expected behavior:
This should typecheck, because the second argument to new DragEvent should inherit from MouseEventInit: https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent

Actual behavior:
Typechecking fails, because the typings only allow dataTransfer property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions