Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2569,6 +2569,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param content The text and HTML tags to write.
*/
writeln(...content: string[]): void;
createElement(tagName: "picture"): HTMLPictureElement;
Copy link
Contributor

Choose a reason for hiding this comment

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

these will be ignored if they are defined here after the less specific signature: createElement(tagName: string).
@zhengbli why is the order messed up here? and how can we fix it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually the overloads wouldn't be ignored, even if they are defined after the more generic signature. The reason why the order is messed up is that the information in the json files are picked up after the emitting from the spec was done, so they are always placed at the end. I can fix it later, though it shouldn't affect the functionality now.

getElementsByTagName(tagname: "picture"): NodeListOf<HTMLPictureElement>;
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
Expand Down Expand Up @@ -2981,6 +2983,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
webkitRequestFullscreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
getElementsByTagName(tagname: "picture"): NodeListOf<HTMLPictureElement>;
Copy link
Contributor

Choose a reason for hiding this comment

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

and here too.

addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
Expand Down Expand Up @@ -12641,6 +12644,14 @@ declare var HTMLTemplateElement: {
new(): HTMLTemplateElement;
}

interface HTMLPictureElement extends HTMLElement {
}

declare var HTMLPictureElement: {
prototype: HTMLPictureElement;
new(): HTMLPictureElement;
}

declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;

interface ErrorEventHandler {
Expand Down
28 changes: 28 additions & 0 deletions inputfiles/addedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,33 @@
"interface": "StorageEvent",
"name": "storageArea?",
"type": "Storage"
},
{
"kind": "interface",
"name": "HTMLPictureElement",
"flavor": "Web",
"extends": "HTMLElement",
"constructorSignatures": [
"new(): HTMLPictureElement"
],
"properties": []
},
{
"kind": "method",
"interface": "Document",
"name": "createElement",
"signatures": ["createElement(tagName: \"picture\"): HTMLPictureElement"]
},
{
"kind": "method",
"interface": "Document",
"name": "getElementsByTagName",
"signatures": ["getElementsByTagName(tagname: \"picture\"): NodeListOf<HTMLPictureElement>"]
},
{
"kind": "method",
"interface": "Element",
"name": "getElementsByTagName",
"signatures": ["getElementsByTagName(tagname: \"picture\"): NodeListOf<HTMLPictureElement>"]
}
]