Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
10 changes: 5 additions & 5 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,12 +947,12 @@ interface KeySystemTrackConfiguration {
}

interface KeyboardEventInit extends EventModifierInit {
/** @deprecated */
/** @deprecated CharCode is inconsistent across environments, consider using .key instead */
charCode?: number;
code?: string;
isComposing?: boolean;
key?: string;
/** @deprecated */
/** @deprecated KeyCode is inconsistent across environments, consider using .key instead */
keyCode?: number;
location?: number;
repeat?: boolean;
Expand Down Expand Up @@ -9195,7 +9195,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
*/
wordSpacing: string;
/**
* @deprecated
* @deprecated The 'wordWrap' property is non-standard and has been replaced by 'overflow-wrap' in modern CSS.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/overflow-wrap)
*/
Expand Down Expand Up @@ -39462,7 +39462,7 @@ interface WindowEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down Expand Up @@ -41831,7 +41831,7 @@ declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down
10 changes: 5 additions & 5 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,12 +944,12 @@ interface KeySystemTrackConfiguration {
}

interface KeyboardEventInit extends EventModifierInit {
/** @deprecated */
/** @deprecated CharCode is inconsistent across environments, consider using .key instead */
charCode?: number;
code?: string;
isComposing?: boolean;
key?: string;
/** @deprecated */
/** @deprecated KeyCode is inconsistent across environments, consider using .key instead */
keyCode?: number;
location?: number;
repeat?: boolean;
Expand Down Expand Up @@ -9185,7 +9185,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
*/
wordSpacing: string;
/**
* @deprecated
* @deprecated The 'wordWrap' property is non-standard and has been replaced by 'overflow-wrap' in modern CSS.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/overflow-wrap)
*/
Expand Down Expand Up @@ -39436,7 +39436,7 @@ interface WindowEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down Expand Up @@ -41805,7 +41805,7 @@ declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down
10 changes: 5 additions & 5 deletions baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,12 +944,12 @@ interface KeySystemTrackConfiguration {
}

interface KeyboardEventInit extends EventModifierInit {
/** @deprecated */
/** @deprecated CharCode is inconsistent across environments, consider using .key instead */
charCode?: number;
code?: string;
isComposing?: boolean;
key?: string;
/** @deprecated */
/** @deprecated KeyCode is inconsistent across environments, consider using .key instead */
keyCode?: number;
location?: number;
repeat?: boolean;
Expand Down Expand Up @@ -9192,7 +9192,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
*/
wordSpacing: string;
/**
* @deprecated
* @deprecated The 'wordWrap' property is non-standard and has been replaced by 'overflow-wrap' in modern CSS.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/overflow-wrap)
*/
Expand Down Expand Up @@ -39459,7 +39459,7 @@ interface WindowEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down Expand Up @@ -41828,7 +41828,7 @@ declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down
10 changes: 5 additions & 5 deletions baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,12 +944,12 @@ interface KeySystemTrackConfiguration {
}

interface KeyboardEventInit extends EventModifierInit {
/** @deprecated */
/** @deprecated CharCode is inconsistent across environments, consider using .key instead */
charCode?: number;
code?: string;
isComposing?: boolean;
key?: string;
/** @deprecated */
/** @deprecated KeyCode is inconsistent across environments, consider using .key instead */
keyCode?: number;
location?: number;
repeat?: boolean;
Expand Down Expand Up @@ -9192,7 +9192,7 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
*/
wordSpacing: string;
/**
* @deprecated
* @deprecated The 'wordWrap' property is non-standard and has been replaced by 'overflow-wrap' in modern CSS.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/overflow-wrap)
*/
Expand Down Expand Up @@ -39459,7 +39459,7 @@ interface WindowEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down Expand Up @@ -41828,7 +41828,7 @@ declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */
declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
/**
* @deprecated
* @deprecated The unload event is not reliable, consider visibilitychange or pagehide events
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event)
*/
Expand Down
14 changes: 9 additions & 5 deletions inputfiles/patches/cssom.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ interface CSSStyleDeclaration \
forwardExtends=CSSStyleProperties

interface CSSStyleProperties replaceReference=CSSStyleDeclaration {
property wordWrap deprecated=#true

// The corresponding standardized property is not supported by
// anyone as of 2024-10.
property webkitLineClamp deprecated=#false
property wordWrap deprecated="The 'wordWrap' property is non-standard and has been replaced by 'overflow-wrap' in modern CSS."
}

removals {
interface CSSStyleProperties {
// The corresponding standardized property is not supported by
// anyone as of 2024-10.
property webkitLineClamp deprecated=""
}
}
4 changes: 1 addition & 3 deletions inputfiles/patches/html.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ interface HTMLDocument extends=Document exposed=Window
interface-mixin MessageEventTarget overrideThis=T typeParameters=T

interface-mixin WindowEventHandlers {
// TODO: pass a string instead for deprecated
// The unload event is not reliable, consider visibilitychange or pagehide events
property onunload deprecated=#true
property onunload deprecated="The unload event is not reliable, consider visibilitychange or pagehide events"
}
7 changes: 2 additions & 5 deletions inputfiles/patches/uievents.kdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
dictionary KeyboardEventInit {
// TODO: pass a string instead for deprecated
// charCode is inconsistent across environments, consider using .key instead
member charCode deprecated=#true
// keyCode is inconsistent across environments, consider using .key instead
member keyCode deprecated=#true
member charCode deprecated="CharCode is inconsistent across environments, consider using .key instead"
member keyCode deprecated="KeyCode is inconsistent across environments, consider using .key instead"
}
8 changes: 6 additions & 2 deletions src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ function handleProperty(child: Node): Partial<Property> {
? handleTyped(typeNode)
: optionalMember("type", "string", child.properties?.type)),
...optionalMember("readonly", "boolean", child.properties?.readonly),
...optionalMember("deprecated", "boolean", child.properties?.deprecated),
...optionalMember("deprecated", "string", child.properties?.deprecated),
...(child.properties?.supported && { deprecated: false }),
};
}

Expand Down Expand Up @@ -366,7 +367,7 @@ function handleMember(c: Node): Partial<Member> {
name,
...optionalMember("type", "string", c.properties?.type),
...optionalMember("required", "boolean", c.properties?.required),
...optionalMember("deprecated", "boolean", c.properties?.deprecated),
...optionalMember("deprecated", "string", c.properties?.deprecated),
...optionalMember("overrideType", "string", c.properties?.overrideType),
};
}
Expand Down Expand Up @@ -414,6 +415,9 @@ function convertForRemovals(obj: unknown): unknown {
// Replace empty objects with null
return Object.keys(newObj).length === 0 ? null : newObj;
}
if (obj === "") {
return null;
}
return obj;
}

Expand Down