es5-shim

IE11 issue Angular CLI project in Angular2(TS), polyfills are notworking

南笙酒味 提交于 2019-12-05 18:29:05
I am using anugular-cli 1.0.0-beta.16 which has polyfills.ts which looks like this: // This file includes polyfills needed by Angular 2 and is loaded before // the app. You can add your own extra polyfills to this file. import 'core-js/es6/symbol'; import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/es6/parse-int'; import 'core-js/es6/parse-float'; import 'core-js/es6/number'; import 'core-js/es6/math'; import 'core-js/es6/string'; import 'core-js/es6/date'; import 'core-js/es6/array'; import 'core-js/es6/regexp'; import 'core-js/es6/map'; import 'core-js/es6/set';

How to provide ECMAScript 5 (ES 5)-shim?

夙愿已清 提交于 2019-12-03 06:30:32
问题 ECMAScript Fifth Edition (released December 2009) introduces a bunch of new methods (see this table for details). However, there still are older browsers out there which do not implement those new methods. Luckily, there exists a convenient script (written in JavaScript) - ES5-shim - which implements those methods manually in environments where they don't exist. However, I am not sure how to provide ES5-shim... Should I just "give" it to all browsers, like so: <script src="es5-shim.js"><

How to provide ECMAScript 5 (ES 5)-shim?

北战南征 提交于 2019-12-02 20:06:25
ECMAScript Fifth Edition (released December 2009) introduces a bunch of new methods (see this table for details). However, there still are older browsers out there which do not implement those new methods. Luckily, there exists a convenient script (written in JavaScript) - ES5-shim - which implements those methods manually in environments where they don't exist. However, I am not sure how to provide ES5-shim... Should I just "give" it to all browsers, like so: <script src="es5-shim.js"></scipt> Or should I include a check in order to only "bother" those browsers which really need it, like so:

Object.defineProperty polyfill

时光总嘲笑我的痴心妄想 提交于 2019-11-29 02:35:46
I am currently writing a JavaScript API which is based on new features in ES5. It uses Object.defineProperty quite extensively. I have wrapped this into two new functions, called Object.createGetSetProperty and Object.createValueProperty I am however experiencing problems running this in older browsers (such as the dreaded, IE8) Consider the following code: Object.createGetSetProperty = function (object, property, get, set, enumerable, configurable) { if (!Object.defineProperty) throw new Error("Object.defineProperty is not supported on this platform"); Object.defineProperty(object, property,

bind polyfill for PhantomJS

做~自己de王妃 提交于 2019-11-28 14:04:07
I am trying to add bind polyfill in my phantomjs file using es5-shim.js. I have tried to include es5-shim.js using require(), but I am still getting error when I execute the phantomjs file. What is the correct way to use this? I tried the polyfill in this link and it seems to work fine for me. Note that phantomjs scripts run inside WebKit's JavaScriptCore engine (which uses ES5) so most of these functions should already come out of the box. D:\>phantomjs.exe phantomjs> console.log(Object.keys) function keys() { [native code] } undefined phantomjs> var shim = require("D:\\es5-shim.js");

bind polyfill for PhantomJS

江枫思渺然 提交于 2019-11-27 08:06:48
问题 I am trying to add bind polyfill in my phantomjs file using es5-shim.js. I have tried to include es5-shim.js using require(), but I am still getting error when I execute the phantomjs file. What is the correct way to use this? 回答1: I tried the polyfill in this link and it seems to work fine for me. Note that phantomjs scripts run inside WebKit's JavaScriptCore engine (which uses ES5) so most of these functions should already come out of the box. D:\>phantomjs.exe phantomjs> console.log(Object