@@ -748,6 +748,69 @@ const patterns = {
748748 blinkFeatureID : 3902 ,
749749 chromeStatusID : 5741247866077184 ,
750750 } ,
751+ 'Prompt' : {
752+ regEx : / L a n g u a g e M o d e l \. c r e a t e \s * \( / g,
753+ where : 'JavaScript' ,
754+ supported : ( async ( ) => 'LanguageModel' in self ) ( ) ,
755+ featureDetection : `(async () => 'LanguageModel' in self)()` ,
756+ documentation : 'https://developer.chrome.com/docs/ai/prompt-api' ,
757+ blinkFeatureID : 5405 ,
758+ chromeStatusID : 5134603979063296 ,
759+ } ,
760+ 'Summarizer' : {
761+ regEx : / S u m m a r i z e r \. c r e a t e \s * \( / g,
762+ where : 'JavaScript' ,
763+ supported : ( async ( ) => 'Summarizer' in self ) ( ) ,
764+ featureDetection : `(async () => 'Summarizer' in self)()` ,
765+ documentation : 'https://developer.chrome.com/docs/ai/summarizer-api' ,
766+ blinkFeatureID : 5445 ,
767+ chromeStatusID : 5193953788559360 ,
768+ } ,
769+ 'Writer' : {
770+ regEx : / W r i t e r \. c r e a t e \s * \( / g,
771+ where : 'JavaScript' ,
772+ supported : ( async ( ) => 'Writer' in self ) ( ) ,
773+ featureDetection : `(async () => 'Writer' in self)()` ,
774+ documentation : 'https://developer.chrome.com/docs/ai/writer-api' ,
775+ blinkFeatureID : 5417 ,
776+ chromeStatusID : 4712595362414592 ,
777+ } ,
778+ 'Rewriter' : {
779+ regEx : / R e w r i t e r \. c r e a t e \s * \( / g,
780+ where : 'JavaScript' ,
781+ supported : ( async ( ) => 'Rewriter' in self ) ( ) ,
782+ featureDetection : `(async () => 'Rewriter' in self)()` ,
783+ documentation : 'https://developer.chrome.com/docs/ai/rewriter-api' ,
784+ blinkFeatureID : 5431 ,
785+ chromeStatusID : 5112320150470656 ,
786+ } ,
787+ 'Proofreader' : {
788+ regEx : / P r o o f r e a d e r \. c r e a t e \s * \( / g,
789+ where : 'JavaScript' ,
790+ supported : ( async ( ) => 'Proofreader' in self ) ( ) ,
791+ featureDetection : `(async () => 'Proofreader' in self)()` ,
792+ documentation : 'https://github.com/webmachinelearning/proofreader-api' ,
793+ blinkFeatureID : 5567 ,
794+ chromeStatusID : 5164677291835392 ,
795+ } ,
796+ 'Translator' : {
797+ regEx : / T r a n s l a t o r \. c r e a t e \s * \( / g,
798+ where : 'JavaScript' ,
799+ supported : ( async ( ) => 'Translator' in self ) ( ) ,
800+ featureDetection : `(async () => 'Translator' in self)()` ,
801+ documentation : 'https://developer.chrome.com/docs/ai/translator-api' ,
802+ blinkFeatureID : 5392 ,
803+ chromeStatusID : 5172811302961152 ,
804+ } ,
805+ 'LanguageDetector' : {
806+ regEx : / L a n g u a g e D e t e c t o r \. c r e a t e \s * \( / g,
807+ where : 'JavaScript' ,
808+ supported : ( async ( ) => 'LanguageDetector' in self ) ( ) ,
809+ featureDetection : `(async () => 'LanguageDetector' in self)()` ,
810+ documentation : 'https://developer.chrome.com/docs/ai/language-detection' ,
811+ blinkFeatureID : 5401 ,
812+ chromeStatusID : 6494349985841152 ,
813+ } ,
751814} ;
752815
753816const responseBodies = $WPT_BODIES ;
@@ -763,7 +826,7 @@ const checkURLConditions = (where, url, mimeType, responseBody) => {
763826 // (https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#textjavascript).
764827 if (
765828 where === "JavaScript" &&
766- / .m ? j s / . test ( url ) &&
829+ / \ .m ? j s / . test ( url ) &&
767830 mimeType . toLowerCase ( ) . endsWith ( "script" )
768831 ) {
769832 return true ;
0 commit comments