1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-02-18 18:09:18 +00:00
code-server-2/src/client.ts
Asher 712274d912
Groundwork for language support
- Implement the localization service.
- Use the proper build process which generates the require JSON files.
- Implement getting the locale and language configuration.
2019-08-02 19:29:00 -05:00

21 lines
672 B
TypeScript

import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection";
import { coderApi, vscodeApi } from "vs/server/src/api";
import "vs/css!./media/firefox";
/**
* This is called by vs/workbench/browser/web.main.ts after the workbench has
* been initialized so we can initialize our own client-side code.
*/
export const initialize = async (services: ServiceCollection): Promise<void> => {
const target = window as any;
target.ide = coderApi(services);
target.vscode = vscodeApi(services);
const event = new CustomEvent('ide-ready');
(event as any).ide = target.ide;
(event as any).vscode = target.vscode;
window.dispatchEvent(event);
};