Skip to content

Commit 5ef9d63

Browse files
Deprecate interfaces when their MDN article is a redirect
1 parent eebe4f5 commit 5ef9d63

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,14 @@ function emitDom() {
9898
for (const [key, value] of Object.entries(descriptions)) {
9999
const target = idl.interfaces!.interface[key] || namespaces[key];
100100
if (target) {
101-
target.comment = transformVerbosity(key, value);
101+
if (value.startsWith("REDIRECT")) {
102+
// When an MDN article for an interface redirects to a different one,
103+
// it implies the interface was renamed in the specification and
104+
// its old name should be deprecated.
105+
markAsDeprecated(target);
106+
} else {
107+
target.comment = transformVerbosity(key, value);
108+
}
102109
}
103110
}
104111
return idl;

0 commit comments

Comments
 (0)