From 4d0c740ad27a5c9a126bd64c690dbafa83288ff6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 5 Jul 2024 11:26:22 +0100 Subject: [PATCH] Add Modernizr rule for Intl.Segmenter Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vector/index.ts b/src/vector/index.ts index c5fee22a04..e4289ace5d 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -56,8 +56,7 @@ function checkBrowserFeatures(): boolean { return false; } - // Custom checks atop Modernizr because it doesn't have ES2018/ES2019 checks - // in it for some features we depend on. + // Custom checks atop Modernizr because it doesn't have modern checks in it for some features we depend on. // Modernizr requires rules to be lowercase with no punctuation. // ES2018: http://262.ecma-international.org/9.0/#sec-promise.prototype.finally window.Modernizr.addTest("promiseprototypefinally", () => typeof window.Promise?.prototype?.finally === "function"); @@ -70,6 +69,8 @@ function checkBrowserFeatures(): boolean { ); // ES2019: http://262.ecma-international.org/10.0/#sec-object.fromentries window.Modernizr.addTest("objectfromentries", () => typeof window.Object?.fromEntries === "function"); + // ES2024: https://402.ecma-international.org/9.0/#sec-intl.segmenter + window.Modernizr.addTest("intlsegmenter", () => typeof window.Intl?.Segmenter === "function"); const featureList = Object.keys(window.Modernizr) as Array;