From 56e4ebaaebf2ee4db077d607edf12b9bc67b11d5 Mon Sep 17 00:00:00 2001 From: Patrick Ellis Date: Wed, 3 Jan 2024 19:01:26 -0500 Subject: [PATCH 1/3] Update type of HTMLElement.hidden It can now be `"until-found"`: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/hidden#until-found This has now got support from two major browsers (Chrome and Edge): https://caniuse.com/mdn-html_global_attributes_hidden_until-found_value --- inputfiles/overridingTypes.jsonc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 21924841b..b4eeec7d7 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -484,9 +484,7 @@ "properties": { "property": { "hidden": { - // https://github.com/whatwg/html/pull/7475 - // Revisit when this get browser supports. - "overrideType": "boolean", + "overrideType": "boolean | \"until-found\"", "nullable": false } } From b238adf245d145e68ccb8030f4456160847a3791 Mon Sep 17 00:00:00 2001 From: Patrick Ellis Date: Wed, 3 Jan 2024 19:17:46 -0500 Subject: [PATCH 2/3] update baseline to pass tests --- baselines/dom.generated.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index fa749154c..b02fc0601 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -6926,7 +6926,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve */ readonly head: HTMLHeadElement; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/hidden) */ - readonly hidden: boolean; + readonly hidden: boolean | "until-found"; /** * Retrieves a collection, in source order, of img objects in the document. * From 11cf5a41b0a99a5a3f6b52a2048d1dfa58520d92 Mon Sep 17 00:00:00 2001 From: Patrick Ellis Date: Wed, 3 Jan 2024 19:22:11 -0500 Subject: [PATCH 3/3] Update the right interface this time --- baselines/dom.generated.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index b02fc0601..8687bc4ee 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -6926,7 +6926,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve */ readonly head: HTMLHeadElement; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/hidden) */ - readonly hidden: boolean | "until-found"; + readonly hidden: boolean; /** * Retrieves a collection, in source order, of img objects in the document. * @@ -10090,7 +10090,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/draggable) */ draggable: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidden) */ - hidden: boolean; + hidden: boolean | "until-found"; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/inert) */ inert: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/innerText) */