mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
web: css language server not working when display language is set (#172430)
This commit is contained in:
parent
7a04589c16
commit
49e696c011
|
@ -13,6 +13,9 @@ const messageWriter = new BrowserMessageWriter(self);
|
|||
|
||||
const connection = createConnection(messageReader, messageWriter);
|
||||
|
||||
console.log = connection.console.log.bind(connection.console);
|
||||
console.error = connection.console.error.bind(connection.console);
|
||||
|
||||
const runtime: RuntimeEnvironment = {
|
||||
timer: {
|
||||
setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable {
|
||||
|
|
|
@ -7,13 +7,30 @@ declare let self: any;
|
|||
import * as l10n from '@vscode/l10n';
|
||||
|
||||
let initialized = false;
|
||||
self.onmessage = async (e: any) => {
|
||||
const pendingMessages: any[] = [];
|
||||
const messageHandler = async (e: any) => {
|
||||
if (!initialized) {
|
||||
const l10nLog: string[] = [];
|
||||
initialized = true;
|
||||
const i10lLocation = e.data.i10lLocation;
|
||||
if (i10lLocation) {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
try {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
l10nLog.push(`l10n: Configured to ${i10lLocation.toString()}.`);
|
||||
} catch (e) {
|
||||
l10nLog.push(`l10n: Problems loading ${i10lLocation.toString()} : ${e}.`);
|
||||
}
|
||||
} else {
|
||||
l10nLog.push(`l10n: No bundle configured.`);
|
||||
}
|
||||
await import('./cssServerMain');
|
||||
if (self.onmessage !== messageHandler) {
|
||||
pendingMessages.forEach(self.onmessage);
|
||||
pendingMessages.length = 0;
|
||||
}
|
||||
l10nLog.forEach(console.log);
|
||||
} else {
|
||||
pendingMessages.push(e);
|
||||
}
|
||||
};
|
||||
self.onmessage = messageHandler;
|
||||
|
|
|
@ -13,6 +13,9 @@ const messageWriter = new BrowserMessageWriter(self);
|
|||
|
||||
const connection = createConnection(messageReader, messageWriter);
|
||||
|
||||
console.log = connection.console.log.bind(connection.console);
|
||||
console.error = connection.console.error.bind(connection.console);
|
||||
|
||||
const runtime: RuntimeEnvironment = {
|
||||
timer: {
|
||||
setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable {
|
||||
|
|
|
@ -7,13 +7,30 @@ declare let self: any;
|
|||
import * as l10n from '@vscode/l10n';
|
||||
|
||||
let initialized = false;
|
||||
self.onmessage = async (e: any) => {
|
||||
const pendingMessages: any[] = [];
|
||||
const messageHandler = async (e: any) => {
|
||||
if (!initialized) {
|
||||
const l10nLog: string[] = [];
|
||||
initialized = true;
|
||||
const i10lLocation = e.data.i10lLocation;
|
||||
if (i10lLocation) {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
try {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
l10nLog.push(`l10n: Configured to ${i10lLocation.toString()}.`);
|
||||
} catch (e) {
|
||||
l10nLog.push(`l10n: Problems loading ${i10lLocation.toString()} : ${e}.`);
|
||||
}
|
||||
} else {
|
||||
l10nLog.push(`l10n: No bundle configured.`);
|
||||
}
|
||||
await import('./htmlServerMain');
|
||||
if (self.onmessage !== messageHandler) {
|
||||
pendingMessages.forEach(self.onmessage);
|
||||
pendingMessages.length = 0;
|
||||
}
|
||||
l10nLog.forEach(console.log);
|
||||
} else {
|
||||
pendingMessages.push(e);
|
||||
}
|
||||
};
|
||||
self.onmessage = messageHandler;
|
||||
|
|
|
@ -13,6 +13,9 @@ const messageWriter = new BrowserMessageWriter(self);
|
|||
|
||||
const connection = createConnection(messageReader, messageWriter);
|
||||
|
||||
console.log = connection.console.log.bind(connection.console);
|
||||
console.error = connection.console.error.bind(connection.console);
|
||||
|
||||
const runtime: RuntimeEnvironment = {
|
||||
timer: {
|
||||
setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable {
|
||||
|
|
|
@ -7,13 +7,30 @@ declare let self: any;
|
|||
import * as l10n from '@vscode/l10n';
|
||||
|
||||
let initialized = false;
|
||||
self.onmessage = async (e: any) => {
|
||||
const pendingMessages: any[] = [];
|
||||
const messageHandler = async (e: any) => {
|
||||
if (!initialized) {
|
||||
const l10nLog: string[] = [];
|
||||
initialized = true;
|
||||
const i10lLocation = e.data.i10lLocation;
|
||||
if (i10lLocation) {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
try {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
l10nLog.push(`l10n: Configured to ${i10lLocation.toString()}.`);
|
||||
} catch (e) {
|
||||
l10nLog.push(`l10n: Problems loading ${i10lLocation.toString()} : ${e}.`);
|
||||
}
|
||||
} else {
|
||||
l10nLog.push(`l10n: No bundle configured.`);
|
||||
}
|
||||
await import('./jsonServerMain');
|
||||
if (self.onmessage !== messageHandler) {
|
||||
pendingMessages.forEach(self.onmessage);
|
||||
pendingMessages.length = 0;
|
||||
}
|
||||
l10nLog.forEach(console.log);
|
||||
} else {
|
||||
pendingMessages.push(e);
|
||||
}
|
||||
};
|
||||
self.onmessage = messageHandler;
|
||||
|
|
Loading…
Reference in a new issue