Skip to content

Commit e00ac36

Browse files
committed
Merge remote-tracking branch 'refs/remotes/Microsoft/master'
2 parents ee0d104 + 84161c1 commit e00ac36

File tree

6 files changed

+215
-14
lines changed

6 files changed

+215
-14
lines changed

TS.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ let EmitStaticInterface flavor (i:Browser.Interface) =
568568
// interface, and put the static members into the object literal type of 'declare var'
569569
// For static types with only static members, we put everything in the interface.
570570
// Because in the two cases the interface contains different things, it might be easier to
571-
// read to seperate them into two functions.
571+
// read to separate them into two functions.
572572
let emitStaticInterfaceWithNonStaticMembers () =
573573
Pt.resetIndent()
574574
EmitInterfaceDeclaration i

baselines/dom.generated.d.ts

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,16 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
36753675
getElementsByClassName(classNames: string): NodeListOf<Element>;
36763676
matches(selector: string): boolean;
36773677
closest(selector: string): Element | null;
3678+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
3679+
scroll(options?: ScrollToOptions): void;
3680+
scroll(x: number, y: number): void;
3681+
scrollTo(options?: ScrollToOptions): void;
3682+
scrollTo(x: number, y: number): void;
3683+
scrollBy(options?: ScrollToOptions): void;
3684+
scrollBy(x: number, y: number): void;
3685+
insertAdjacentElement(position: string, insertedElement: Element): Element | null;
3686+
insertAdjacentHTML(where: string, html: string): void;
3687+
insertAdjacentText(where: string, text: string): void;
36783688
addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
36793689
addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
36803690
addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
@@ -4446,7 +4456,7 @@ interface HTMLCanvasElement extends HTMLElement {
44464456
* @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
44474457
*/
44484458
toDataURL(type?: string, ...args: any[]): string;
4449-
toBlob(callback: (result: Blob | null) => void, ... arguments: any[]): void;
4459+
toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
44504460
}
44514461

44524462
declare var HTMLCanvasElement: {
@@ -4621,11 +4631,7 @@ interface HTMLElement extends Element {
46214631
click(): void;
46224632
dragDrop(): boolean;
46234633
focus(): void;
4624-
insertAdjacentElement(position: string, insertedElement: Element): Element;
4625-
insertAdjacentHTML(where: string, html: string): void;
4626-
insertAdjacentText(where: string, text: string): void;
46274634
msGetInputContext(): MSInputMethodContext;
4628-
scrollIntoView(top?: boolean): void;
46294635
setActive(): void;
46304636
addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
46314637
addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
@@ -5890,6 +5896,7 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
58905896
*/
58915897
type: string;
58925898
import?: Document;
5899+
integrity: string;
58935900
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
58945901
}
58955902

@@ -6751,6 +6758,7 @@ interface HTMLScriptElement extends HTMLElement {
67516758
* Sets or retrieves the MIME type for the associated scripting engine.
67526759
*/
67536760
type: string;
6761+
integrity: string;
67546762
}
67556763

67566764
declare var HTMLScriptElement: {
@@ -7756,6 +7764,7 @@ interface KeyboardEvent extends UIEvent {
77567764
readonly repeat: boolean;
77577765
readonly shiftKey: boolean;
77587766
readonly which: number;
7767+
readonly code: string;
77597768
getModifierState(keyArg: string): boolean;
77607769
initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
77617770
readonly DOM_KEY_LOCATION_JOYSTICK: number;
@@ -9128,6 +9137,7 @@ interface PerformanceTiming {
91289137
readonly responseStart: number;
91299138
readonly unloadEventEnd: number;
91309139
readonly unloadEventStart: number;
9140+
readonly secureConnectionStart: number;
91319141
toJSON(): any;
91329142
}
91339143

@@ -11405,8 +11415,8 @@ declare var StereoPannerNode: {
1140511415
interface Storage {
1140611416
readonly length: number;
1140711417
clear(): void;
11408-
getItem(key: string): string;
11409-
key(index: number): string;
11418+
getItem(key: string): string | null;
11419+
key(index: number): string | null;
1141011420
removeItem(key: string): void;
1141111421
setItem(key: string, data: string): void;
1141211422
[key: string]: any;
@@ -13002,6 +13012,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
1300213012
webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
1300313013
webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
1300413014
webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
13015+
scroll(options?: ScrollToOptions): void;
13016+
scrollTo(options?: ScrollToOptions): void;
13017+
scrollBy(options?: ScrollToOptions): void;
1300513018
addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
1300613019
addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
1300713020
addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
@@ -14029,6 +14042,20 @@ interface ProgressEventInit extends EventInit {
1402914042
total?: number;
1403014043
}
1403114044

14045+
interface ScrollOptions {
14046+
behavior?: ScrollBehavior;
14047+
}
14048+
14049+
interface ScrollToOptions extends ScrollOptions {
14050+
left?: number;
14051+
top?: number;
14052+
}
14053+
14054+
interface ScrollIntoViewOptions extends ScrollOptions {
14055+
block?: ScrollLogicalPosition;
14056+
inline?: ScrollLogicalPosition;
14057+
}
14058+
1403214059
interface ClipboardEventInit extends EventInit {
1403314060
data?: string;
1403414061
dataType?: string;
@@ -14072,7 +14099,7 @@ interface EcdsaParams extends Algorithm {
1407214099
}
1407314100

1407414101
interface EcKeyGenParams extends Algorithm {
14075-
typedCurve: string;
14102+
namedCurve: string;
1407614103
}
1407714104

1407814105
interface EcKeyAlgorithm extends KeyAlgorithm {
@@ -14425,6 +14452,9 @@ declare function webkitCancelAnimationFrame(handle: number): void;
1442514452
declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
1442614453
declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
1442714454
declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
14455+
declare function scroll(options?: ScrollToOptions): void;
14456+
declare function scrollTo(options?: ScrollToOptions): void;
14457+
declare function scrollBy(options?: ScrollToOptions): void;
1442814458
declare function toString(): string;
1442914459
declare function addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1443014460
declare function dispatchEvent(evt: Event): boolean;
@@ -14580,6 +14610,8 @@ type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
1458014610
type RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;
1458114611
type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
1458214612
type payloadtype = number;
14613+
type ScrollBehavior = "auto" | "instant" | "smooth";
14614+
type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
1458314615
type IDBValidKey = number | string | Date | IDBArrayKey;
1458414616
type BufferSource = ArrayBuffer | ArrayBufferView;
1458514617
type MouseWheelEvent = WheelEvent;

baselines/webworker.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ interface EcdsaParams extends Algorithm {
10001000
}
10011001

10021002
interface EcKeyGenParams extends Algorithm {
1003-
typedCurve: string;
1003+
namedCurve: string;
10041004
}
10051005

10061006
interface EcKeyAlgorithm extends KeyAlgorithm {

inputfiles/addedTypes.json

Lines changed: 146 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,106 @@
241241
{
242242
"kind": "method",
243243
"interface": "Element",
244-
"signatures": ["closest(selector: string): Element | null"]
244+
"signatures": [ "closest(selector: string): Element | null" ]
245+
},
246+
{
247+
"kind": "typedef",
248+
"flavor": "Web",
249+
"name": "ScrollBehavior",
250+
"type": "\"auto\" | \"instant\" | \"smooth\""
251+
},
252+
{
253+
"kind": "interface",
254+
"flavor": "Web",
255+
"name": "ScrollOptions",
256+
"properties": [
257+
{
258+
"name": "behavior?",
259+
"type": "ScrollBehavior"
260+
}
261+
]
262+
},
263+
{
264+
"kind": "interface",
265+
"flavor": "Web",
266+
"name": "ScrollToOptions",
267+
"extends": "ScrollOptions",
268+
"properties": [
269+
{
270+
"name": "left?",
271+
"type": "number"
272+
},
273+
{
274+
"name": "top?",
275+
"type": "number"
276+
}
277+
]
278+
},
279+
{
280+
"kind": "method",
281+
"interface": "Window",
282+
"signatures": [ "scroll(options?: ScrollToOptions): void" ]
283+
},
284+
{
285+
"kind": "method",
286+
"interface": "Window",
287+
"signatures": [ "scrollTo(options?: ScrollToOptions): void" ]
288+
},
289+
{
290+
"kind": "method",
291+
"interface": "Window",
292+
"signatures": [ "scrollBy(options?: ScrollToOptions): void" ]
293+
},
294+
{
295+
"kind": "typedef",
296+
"flavor": "Web",
297+
"name": "ScrollLogicalPosition",
298+
"type": "\"start\" | \"center\" | \"end\" | \"nearest\""
299+
},
300+
{
301+
"kind": "interface",
302+
"flavor": "Web",
303+
"name": "ScrollIntoViewOptions",
304+
"extends": "ScrollOptions",
305+
"properties": [
306+
{
307+
"name": "block?",
308+
"type": "ScrollLogicalPosition"
309+
},
310+
{
311+
"name": "inline?",
312+
"type": "ScrollLogicalPosition"
313+
}
314+
]
315+
},
316+
{
317+
"kind": "method",
318+
"interface": "Element",
319+
"signatures": [ "scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void" ]
320+
},
321+
{
322+
"kind": "method",
323+
"interface": "Element",
324+
"signatures": [
325+
"scroll(options?: ScrollToOptions): void",
326+
"scroll(x: number, y: number): void"
327+
]
328+
},
329+
{
330+
"kind": "method",
331+
"interface": "Element",
332+
"signatures": [
333+
"scrollTo(options?: ScrollToOptions): void",
334+
"scrollTo(x: number, y: number): void"
335+
]
336+
},
337+
{
338+
"kind": "method",
339+
"interface": "Element",
340+
"signatures": [
341+
"scrollBy(options?: ScrollToOptions): void",
342+
"scrollBy(x: number, y: number): void"
343+
]
245344
},
246345
{
247346
"kind": "indexer",
@@ -343,7 +442,7 @@
343442
"kind": "method",
344443
"interface": "HTMLCanvasElement",
345444
"name": "toBlob",
346-
"signatures": ["toBlob(callback: (result: Blob | null) => void, ... arguments: any[]): void"]
445+
"signatures": ["toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void"]
347446
},
348447
{
349448
"kind": "property",
@@ -554,7 +653,7 @@
554653
"extends": "Algorithm",
555654
"properties": [
556655
{
557-
"name": "typedCurve",
656+
"name": "namedCurve",
558657
"type": "string"
559658
}
560659
]
@@ -984,5 +1083,49 @@
9841083
"name": "MouseWheelEvent",
9851084
"flavor": "Web",
9861085
"type": "WheelEvent"
1086+
},
1087+
{
1088+
"kind": "method",
1089+
"interface": "Element",
1090+
"name": "insertAdjacentElement",
1091+
"signatures": ["insertAdjacentElement(position: string, insertedElement: Element): Element | null"]
1092+
},
1093+
{
1094+
"kind": "method",
1095+
"interface": "Element",
1096+
"name": "insertAdjacentHTML",
1097+
"signatures": ["insertAdjacentHTML(where: string, html: string): void"]
1098+
},
1099+
{
1100+
"kind": "method",
1101+
"interface": "Element",
1102+
"name": "insertAdjacentText",
1103+
"signatures": ["insertAdjacentText(where: string, text: string): void"]
1104+
},
1105+
{
1106+
"kind": "property",
1107+
"name": "secureConnectionStart",
1108+
"interface": "PerformanceTiming",
1109+
"readonly": true,
1110+
"type": "number"
1111+
},
1112+
{
1113+
"kind": "property",
1114+
"interface": "HTMLLinkElement",
1115+
"name": "integrity",
1116+
"type": "string"
1117+
},
1118+
{
1119+
"kind": "property",
1120+
"interface": "HTMLScriptElement",
1121+
"name": "integrity",
1122+
"type": "string"
1123+
},
1124+
{
1125+
"kind": "property",
1126+
"interface": "KeyboardEvent",
1127+
"readonly": true,
1128+
"name": "code",
1129+
"type": "string"
9871130
}
9881131
]

inputfiles/overridingTypes.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,13 @@
580580
"kind": "method",
581581
"interface": "Storage",
582582
"name": "getItem",
583-
"signatures": ["getItem(key: string): string"]
583+
"signatures": ["getItem(key: string): string | null"]
584+
},
585+
{
586+
"kind": "method",
587+
"interface": "Storage",
588+
"name": "key",
589+
"signatures": ["key(index: number): string | null"]
584590
},
585591
{
586592
"kind": "method",

inputfiles/removedTypes.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
"interface": "HTMLElement",
2020
"name": "contains"
2121
},
22+
{
23+
"kind": "method",
24+
"interface": "HTMLElement",
25+
"name": "scrollIntoView"
26+
},
2227
{
2328
"kind": "method",
2429
"interface": "StorageEvent",
@@ -48,5 +53,20 @@
4853
"kind": "property",
4954
"interface": "XMLHttpRequest",
5055
"name": "msCaching"
56+
},
57+
{
58+
"kind": "method",
59+
"interface": "HTMLElement",
60+
"name": "insertAdjacentElement"
61+
},
62+
{
63+
"kind": "method",
64+
"interface": "HTMLElement",
65+
"name": "insertAdjacentHTML"
66+
},
67+
{
68+
"kind": "method",
69+
"interface": "HTMLElement",
70+
"name": "insertAdjacentText"
5171
}
5272
]

0 commit comments

Comments
 (0)