Skip to content

Missing SubmitEvent in auto complete #40811

@MrTA2

Description

@MrTA2

Search Terms:

SubmitEvent

Code

// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
function form_Submit(e:SubmitEvent):void { ....... }

Expected behavior:

SubmitEvent is recognized as a DOM type

Actual behavior:

It is not

Playground Link:

Related Issues:

This can be solved by adding this to lib.dom.d.ts:

interface SubmitEvent extends Event
{
readonly submitter: HTMLElement;
}
declare var SubmitEvent: {
prototype: SubmitEvent;
new(type: string, eventInitDict?: EventInit): SubmitEvent;
};

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