diff --git a/extensions/html-language-features/server/src/modes/javascriptMode.ts b/extensions/html-language-features/server/src/modes/javascriptMode.ts
index 2e5231a84fb78f8e9be83dc8b2f6080a1b1e7952..03dc5755c1adc548bd9c308213370832af5c1154 100644
--- a/extensions/html-language-features/server/src/modes/javascriptMode.ts
+++ b/extensions/html-language-features/server/src/modes/javascriptMode.ts
@@ -24,10 +24,10 @@ if (!ts.sys.fileExists(jquery_d_ts)) {
jquery_d_ts = join(__dirname, '../../lib/jquery.d.ts'); // from source
}
-export function getJavaScriptMode(documentRegions: LanguageModelCache, id: 'javascript' | 'typescript'): LanguageMode {
- let jsDocuments = getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument('javascript'));
+export function getJavaScriptMode(documentRegions: LanguageModelCache, languageId: 'javascript' | 'typescript'): LanguageMode {
+ let jsDocuments = getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument(languageId));
- const workingFile = id === 'javascript' ? 'vscode://javascript/1.js' : 'vscode://javascript/2.ts'; // the same 'file' is used for all contents
+ const workingFile = languageId === 'javascript' ? 'vscode://javascript/1.js' : 'vscode://javascript/2.ts'; // the same 'file' is used for all contents
let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic };
let currentTextDocument: TextDocument;
@@ -72,7 +72,7 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache {
+suite('JavaScript Semantic Tokens', () => {
test('variables', () => {
const input = [
@@ -133,20 +133,39 @@ suite('Type Semantic Tokens', () => {
/*1*/'',
/*2*/'',
- /*6*/'',
- /*7*/'