Skip to content

Conversation

lankaapura
Copy link
Contributor

@@ -3560,6 +3560,8 @@
<property name="onended" event-handler="ended" type="EventHandler"/>
<property name="onerror" event-handler="error" type="EventHandler"/>
<property name="onfocus" event-handler="focus" type="EventHandler"/>
<property name="focusin" event-handler="focusin" type="EventHandler"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files are autogrenerated and we do not manually change them.So we will need to add support for adding even handler maps to the generation script and add them to overridingTypes.json instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhegazy thanks, I'll update the PR.

Copy link
Contributor Author

@lankaapura lankaapura Feb 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mhegazy

I have added following to addedTypes.json but it doesn't generate anything. Do I have to update somewhere else too? I suspect that it's the double quotes in DocumentEventMap properties. (ex: "blur": FocusEvent; ) but not sure.

{
        "kind": "property",
        "interface": "DocumentEventMap",
        "name": "\"focusin\"",
        "type": "FocusEvent"
    },
    {
        "kind": "property",
        "interface": "DocumentEventMap",
        "name": "\"focusout\"",
        "type": "FocusEvent"
    }

@lankaapura lankaapura force-pushed the fix-typescript-issue-21822 branch from 985b959 to 5bfaaae Compare February 12, 2018 05:34
@lankaapura lankaapura closed this Feb 12, 2018
@lankaapura lankaapura force-pushed the fix-typescript-issue-21822 branch from 5bfaaae to 67d58e6 Compare February 12, 2018 05:39
@lankaapura lankaapura reopened this Feb 14, 2018
@lankaapura lankaapura closed this Feb 14, 2018
@lankaapura lankaapura force-pushed the fix-typescript-issue-21822 branch from 1aa74e8 to 67d58e6 Compare February 14, 2018 00:33
@lankaapura lankaapura reopened this Feb 14, 2018
@saschanaz
Copy link
Contributor

Type additions for *EventMap interfaces are currently ignored, this is why the test passes without any baseline updates.

@lankaapura
Copy link
Contributor Author

Thanks @saschanaz so do I need to update TS.fsx file to include it? or any other suggestions to fix the issue?

@saschanaz
Copy link
Contributor

saschanaz commented Feb 14, 2018 via email

@lankaapura
Copy link
Contributor Author

@saschanaz @mhegazy PR updated. Pls review.

@mhegazy mhegazy merged commit 24ad30a into microsoft:master Feb 20, 2018
@dumistoklus
Copy link

Why this PR not in master branch still?

@chicoxyzzy
Copy link

chicoxyzzy commented Oct 4, 2018

FocusEvents are still not there https://github.com/Microsoft/TSJS-lib-generator/blob/master/src/emitter.ts#L27-L38

@stevenyxu
Copy link

I also want focusin/focusout because it's inconvenient to keep on writing addEventListener('focusin' as any as keyof HTMLElementEventMap, ...).

But HTMLElementEventMap is generated from https://github.com/Microsoft/TSJS-lib-generator which requires that the event be in a W3C candidate recommendation or further, but I could only find focusin in a working draft https://www.w3.org/TR/uievents/#event-type-focusin. I don't know that it will make it based on the current standard for inclusion.

@anyexinglu
Copy link

So guys, which version has the 'focusin' and 'focusout'?

@saschanaz
Copy link
Contributor

#696 added them again, so I think the next release will have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

focusin, focusout events missing from DocumentEventMap/HTMLElementEventMap
7 participants