Skip to content

Commit 80288c4

Browse files
authored
err actually most of this is from HTML.
Removed deprecated properties and added documentElement with non-nullable type.
1 parent a94c6cb commit 80288c4

File tree

1 file changed

+2
-55
lines changed

1 file changed

+2
-55
lines changed

inputfiles/patches/dom.kdl

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,62 +12,9 @@ interface EventListenerObject noInterfaceObject=#true {
1212
}
1313

1414
interface Document {
15-
// Pre-TS-5.1 hack to make document.location assignable
16-
property location readonly=#false {
17-
// Technically this can be null for a detached iframe.
18-
// But that's an edge case and flipping this also breaks compatibility.
19-
type nullable=#false
15+
property documentElement {
16+
type HTMLElement nullable=#false
2017
}
21-
22-
// Similarly body and head are mostly non-null for HTML documents.
23-
// body can frequently be null when executing scripts in head, but flipping
24-
// it also breaks compatibiliity.
25-
property body {
26-
type nullable=#false
27-
}
28-
property head {
29-
type nullable=#false
30-
}
31-
32-
// More specific types for HTMLCollection properties
33-
property anchors {
34-
type HTMLCollectionOf {
35-
type HTMLAnchorElement
36-
}
37-
}
38-
property embeds {
39-
type HTMLCollectionOf {
40-
type HTMLEmbedElement
41-
}
42-
}
43-
property forms {
44-
type HTMLCollectionOf {
45-
type HTMLFormElement
46-
}
47-
}
48-
property images {
49-
type HTMLCollectionOf {
50-
type HTMLImageElement
51-
}
52-
}
53-
property links {
54-
type HTMLCollectionOf {
55-
type HTMLAnchorElement
56-
type HTMLAreaElement
57-
}
58-
}
59-
property plugins {
60-
type HTMLCollectionOf {
61-
type HTMLEmbedElement
62-
}
63-
}
64-
property scripts {
65-
type HTMLCollectionOf {
66-
type HTMLScriptElement
67-
}
68-
}
69-
70-
property defaultView overrideType="WindowProxy & typeof globalThis"
7118
}
7219

7320
enum InsertPosition {

0 commit comments

Comments
 (0)