Skip to content

Conversation

@saschanaz
Copy link
Contributor

Diffs are mainly because of HTMLElement not including event handlers anymore.

@@ -5267,9 +5298,13 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils {
*/
text: string;
type: string;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof DocumentAndElementEventHandlersEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
Copy link
Contributor

Choose a reason for hiding this comment

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

HTMLElementEventMap already extends ElementEventMap

Copy link
Contributor

Choose a reason for hiding this comment

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

also i think the change here should be on HTMLElementEventMap to extend DocumentAndElementEventHandlersEventMap and GlobalEventHandlersEventMap instead of on every element.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HTMLElementEventMap already extends ElementEventMap

Yes, but that map is now empty and not generated because HTMLElement does not directly include any event handlers anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

we should generate the map always instead of generating overloads.. the map can still be empty, but just extends other maps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, makes sense. I'll try it.

@mhegazy mhegazy merged commit e4bdc45 into microsoft:master Jul 9, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jul 9, 2018

thanks!

@saschanaz saschanaz deleted the html-dom branch July 9, 2018 22:30
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.

2 participants