Hello Code

This commit is contained in:
Erich Gamma
2015-11-13 14:39:38 +01:00
commit 8f35cc4768
1897 changed files with 704173 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
(function () {
'use strict';
var MonacoEnvironment = (<any>self).MonacoEnvironment;
var monacoBaseUrl = MonacoEnvironment && MonacoEnvironment.baseUrl ? MonacoEnvironment.baseUrl : '../../../';
importScripts(monacoBaseUrl + 'vs/loader.js');
require.config({
baseUrl: monacoBaseUrl,
catchError: true
});
var beforeReadyMessages:any[] = [];
self.onmessage = (message) => beforeReadyMessages.push(message);
// Note: not using a import-module statement here, because
// it would wrap above statements in the define call.
require(['vs/base/common/worker/workerServer'], function(ws) {
var messageHandler = ws.create((msg:any) => {
(<any>self).postMessage(msg);
}, null);
self.onmessage = (e) => messageHandler.onmessage(e.data);
while(beforeReadyMessages.length > 0) {
self.onmessage(beforeReadyMessages.shift());
}
});
})();