Browse Source

Stop using old polyfills

Alex Dima 4 năm trước cách đây
mục cha
commit
2af61871de
2 tập tin đã thay đổi với 0 bổ sung35 xóa
  1. 0 31
      src/fillers/polyfills.ts
  2. 0 4
      src/htmlWorker.ts

+ 0 - 31
src/fillers/polyfills.ts

@@ -1,31 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-export function polyfill() {
-
-    // Object.assign, for IE11
-    if (typeof Object['assign'] != 'function') {
-        Object.defineProperty(Object, "assign", {
-            value: function assign(destination, sources) {
-                'use strict';
-                if (destination !== null) {
-                    for (let i = 1; i < arguments.length; i++) {
-                        const source = arguments[i];
-                        if (source) {
-                            for (var key in source) {
-                                if (Object.prototype.hasOwnProperty.call(source, key)) {
-                                    destination[key] = source[key]
-                                }
-                            }
-                        }
-                    };
-                }
-                return destination;
-            },
-            writable: true,
-            configurable: true
-        });
-    }
-}

+ 0 - 4
src/htmlWorker.ts

@@ -8,10 +8,6 @@ import IWorkerContext = monaco.worker.IWorkerContext;
 
 import * as htmlService from 'vscode-html-languageservice';
 
-import * as poli from './fillers/polyfills';
-
-poli.polyfill();
-
 export class HTMLWorker {
 
 	private _ctx: IWorkerContext;