Skip to content

Commit fcd4188

Browse files
committed
-
1 parent ea16eb1 commit fcd4188

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

inputfiles/patches/cssom-view.kdl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Manually moved from Document
22
// See https://github.com/w3c/csswg-drafts/issues/5886 and https://github.com/w3c/csswg-drafts/issues/556
33
interface-mixin DocumentOrShadowRoot {
4-
method elementFromPoint returns=Element nullable=#true {
4+
method elementFromPoint {
5+
type Element nullable=#true
56
param x type=long
67
param y type=long
78
}

src/build/patches.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ function optionalMember<const T>(prop: string, type: T, value?: Value) {
3535
function handleTyped(type: Node, returnType: string) {
3636
const isTyped = type.name == "type";
3737
const name = isTyped ? (type.values[0] as string) : returnType;
38-
const subType = isTyped
39-
? { type: type.children[0].values[0] as string }
40-
: undefined;
38+
const subType =
39+
type.children.length > 0
40+
? { type: type.children[0].values[0] as string }
41+
: undefined;
4142
return {
4243
type: name,
4344
subtype: subType,
45+
...optionalMember("nullable", "boolean", type.properties?.nullable),
4446
};
4547
}
4648

@@ -176,7 +178,6 @@ function handleMethod(child: Node): Partial<Method> {
176178
const name = child.values[0] as string;
177179
const type = child.children[0];
178180
const returnType = child.properties.returns as string;
179-
const nullable = child.properties.nullable as boolean;
180181

181182
const params = child.children
182183
.filter((c) => c.properties.type)
@@ -188,7 +189,6 @@ function handleMethod(child: Node): Partial<Method> {
188189
const signature: Method["signature"] = [
189190
{
190191
param: params,
191-
nullable,
192192
...handleTyped(type, returnType),
193193
},
194194
];

0 commit comments

Comments
 (0)