Skip to content
Open
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
2 changes: 1 addition & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31943,7 +31943,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31918,7 +31918,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31940,7 +31940,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31940,7 +31940,7 @@ declare var StorageManager: {
new(): StorageManager;
};

/** @deprecated */
/** @deprecated Do not use */
interface StyleMedia {
type: string;
matchMedium(mediaquery: string): boolean;
Expand Down
84 changes: 1 addition & 83 deletions inputfiles/addedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@
]
}
},
"DeviceMotionEventAcceleration": {
"noInterfaceObject": true
},
"DeviceMotionEventRotationRate": {
"noInterfaceObject": true
},
"HTMLImageElement": {
"name": "HTMLImageElement",
"properties": {
Expand All @@ -106,18 +100,7 @@
]
}
},
"CSSStyleProperties": {
"properties": {
"property": {
"imageOrientation": {
"deprecated": true
},
"wordWrap": {
"deprecated": true
}
}
}
},

"Window": {
"name": "Window",
"methods": {
Expand All @@ -132,18 +115,6 @@
],
"events": {
"event": [
{
"name": "devicemotion",
"type": "DeviceMotionEvent"
},
{
"name": "deviceorientation",
"type": "DeviceOrientationEvent"
},
{
"name": "deviceorientationabsolute",
"type": "DeviceOrientationEvent"
},
{
"name": "gamepadconnected",
"type": "GamepadEvent"
Expand Down Expand Up @@ -394,32 +365,6 @@
]
}
},
// This is used in the React d.ts files, and not including
// it would force an update for anyone using React.
"StyleMedia": {
"name": "StyleMedia",
"exposed": "Window",
"noInterfaceObject": true,
"deprecated": true,
"properties": {
"property": {
"type": {
"name": "type",
"type": "DOMString"
}
}
},
"methods": {
"method": {
"matchMedium": {
"name": "matchMedium",
"overrideSignatures": [
"matchMedium(mediaquery: string): boolean"
]
}
}
}
},
"Navigator": {
"name": "Navigator",
"properties": {
Expand Down Expand Up @@ -447,33 +392,6 @@
}
}
},
"IDBDatabase": {
"name": "IDBDatabase",
"events": {
"event": [
{
"name": "versionchange",
"type": "IDBVersionChangeEvent"
}
]
}
},
"IDBOpenDBRequest": {
"name": "IDBOpenDBRequest",
"extends": "IDBRequest<IDBDatabase>",
"events": {
"event": [
{
"name": "upgradeneeded",
"type": "IDBVersionChangeEvent"
},
{
"name": "blocked",
"type": "IDBVersionChangeEvent"
}
]
}
},
"UIEvent": {
"properties": {
"property": {
Expand Down
84 changes: 0 additions & 84 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1393,18 +1393,6 @@
}
},
"IDBCursor": {
"properties": {
"property": {
"key": {
"name": "key",
"type": "IDBValidKey"
},
"primaryKey": {
"name": "primaryKey",
"type": "IDBValidKey"
}
}
},
"methods": {
"method": {
"continue": {
Expand Down Expand Up @@ -1453,18 +1441,6 @@
}
},
"IDBRequest": {
"properties": {
"property": {
"source": {
"name": "source",
"nullable": false
},
"result": {
"name": "result",
"overrideType": "T"
}
}
},
"typeParameters": [
{
"name": "T",
Expand Down Expand Up @@ -3297,30 +3273,6 @@
}
}
},
"CSSFontFaceRule": {
"properties": {
"property": {
"style": {
// CSS Fonts Level 4 now says CSSFontFaceDescriptors but nobody implements it as of 2024-04
// https://github.com/w3c/csswg-drafts/pull/9686
"type": "CSSStyleProperties"
}
}
}
},
"CSSStyleProperties": {
"properties": {
"property": {
"cssFloat": {
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat"
},
"webkitLineClamp": {
// The corresponding standardized property is not supported by anyone as of 2024-10.
"deprecated": false
}
}
}
},
"ContactAddress": {
"name": "PaymentAddress"
},
Expand Down Expand Up @@ -3369,48 +3321,12 @@
"MediaSource": {
"exposed": "Window"
},

// Payment Request added shippingAddress with a different type
// https://github.com/w3c/payment-request/pull/996
"PaymentRequest": {
"properties": {
"property": {
"shippingAddress": {
"type": "PaymentAddress"
}
}
}
},
"PaymentResponse": {
"properties": {
"property": {
"shippingAddress": {
"type": "PaymentAddress"
}
}
}
},

"SourceBuffer": {
"exposed": "Window"
},
"SourceBufferList": {
"exposed": "Window"
},
"StylePropertyMapReadOnly": {
"methods": {
"method": {
"get": {
// https://github.com/w3c/css-houdini-drafts/pull/1087
"signature": {
"0": {
"overrideType": "undefined | CSSStyleValue"
}
}
}
}
}
},
"HTMLImageElement": {
"properties": {
"property": {
Expand Down
18 changes: 18 additions & 0 deletions inputfiles/patches/IDB.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
interface IDBDatabase {
event versionchange type=IDBVersionChangeEvent
}

interface IDBOpenDBRequest extends=IDBRequest<IDBDatabase> {
event upgradeneeded type=IDBVersionChangeEvent
event blocked type=IDBVersionChangeEvent
}

interface IDBRequest {
property source nullable=#false
property result overrideType=T
}

interface IDBCursor {
property key type=IDBValidKey
property primaryKey type=IDBValidKey
}
5 changes: 5 additions & 0 deletions inputfiles/patches/css-font.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ enum FontDisplay {
fallback
optional
}

interface CSSFontFaceRule {
property style type=CSSStyleProperties
}

19 changes: 18 additions & 1 deletion inputfiles/patches/cssom.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,21 @@ interface CSSStyleDeclaration \
forward=CSSStyleDeclarationBase \
forwardExtends=CSSStyleProperties

interface CSSStyleProperties replaceReference=CSSStyleDeclaration
interface CSSStyleProperties replaceReference=CSSStyleDeclaration {
property imageOrientation deprecated=#true
property wordWrap deprecated=#true
property cssFloat mdnUrl="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat"

// The corresponding standardized property is not supported by anyone as of 2024-10.
property webkitLineClamp deprecated=#false
}

// This is used in the React d.ts files, and not including
// it would force an update for anyone using React.
interface StyleMedia exposed=Window noInterfaceObject=#true deprecated="Do not use" {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to add a string until #2187 is merged

property type type=DOMString

method matchMedium returns=boolean {
param mediaquery type=DOMString
}
}
8 changes: 8 additions & 0 deletions inputfiles/patches/device-motion.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
interface DeviceMotionEventAcceleration noInterfaceObject=#true
interface DeviceMotionEventRotationRate noInterfaceObject=#true

interface Window {
event devicemotion type=DeviceMotionEvent
event deviceorientation type=DeviceOrientationEvent
event deviceorientationabsolute type=DeviceOrientationEvent
}
10 changes: 10 additions & 0 deletions inputfiles/patches/payments.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Payment Request added shippingAddress with a different type
// https://github.com/w3c/payment-request/pull/996

interface PaymentRequest {
property shippingAddress type=PaymentAddress
}

interface PaymentResponse {
property shippingAddress type=PaymentAddress
}
3 changes: 3 additions & 0 deletions src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ function handleProperty(child: Node): Partial<Property> {
...optionalMember("optional", "boolean", child.properties?.optional),
...optionalMember("overrideType", "string", child.properties?.overrideType),
...optionalMember("type", "string", child.properties?.type),
...optionalMember("deprecated", "boolean", child.properties?.deprecated),
...optionalMember("mdnUrl", "string", child.properties?.mdnUrl),
...optionalMember("nullable", "boolean", child.properties?.nullable),
};
}

Expand Down