Questions tagged [es5-shim]

Support for ECMAScript5 (ES5) on older browsers (mainly pre IE9). The ES5 specification was published in 2009.

Support for ECMAScript5 (ES5) on older browsers (mainly pre IE9). The ES5 specification was published in 2009.

Compatibility table https://kangax.github.io/compat-table/es5/

56 questions
1
vote
0 answers

Can I use ES5 Array method at Android2.2+ WebView?

Had read: http://kangax.github.io/es5-compat-table/#Array.prototype.map but can't find webview version compatibility such as the one on http://caniuse.com
atian25
  • 4,166
  • 8
  • 37
  • 60
1
vote
0 answers

When do I need shim and when do I need sham?

Why does the EC5 Shim library have two files? When do I need each one?
Ian Warburton
  • 15,170
  • 23
  • 107
  • 189
0
votes
2 answers

How to form one string array based on two other arrays using map in ES5?

I am writing a simple js/es5 script to combine all the strings in a CWL. The CWL only supports ES5, so there are many functions/features from ES6 cannot be used. I am not familiar with js in general. For a minimal example: var arr1 = ["a", "b"] var…
WenliL
  • 419
  • 2
  • 14
0
votes
1 answer

Trying to understand requirejs, shim and dependencies while updating code

Short version: I'm updating some old libs to try to get them in AMD/requirejs format for management, but some of them have dependencies on old code. Main Question: I'm primarily confused as to what to list in…
Scott
  • 7,983
  • 2
  • 26
  • 41
0
votes
0 answers

Using "array-includes" instead "includes" in javascript function to skip problem in IE11

I'm writing an application in ASP.net. I'm also using Bootstrap 3 framework. Now bootstrap-table.min.js use f(!h.includes(e)).... This provokes in Internet Explorer 11 an exception and suggest to use indexOF. In Firefox and Chrome all is ok. A…
Frank
  • 67
  • 8
0
votes
1 answer

Modular JS: How to pass variables and event

I have this JS code: const getData = { // set vars start_date: , end_date: , init: function() { this.cacheDom(); …
Imnotapotato
  • 5,308
  • 13
  • 80
  • 147
0
votes
1 answer

Paramater is not passed from parent to child function in javascript for browser.executesript()

I want to open new tab (am creating a href and clicking)using below code in protractor. If I hardcode the link text directly inside the setattributes(), then it works fine. If i send the linkname from calling function, linkname throws error as…
Nalu
  • 195
  • 2
  • 13
0
votes
4 answers

Is there a better way to code if within if statement

I'm wondering if there is a cleaner way to write this javascript code. if within if seems pretty average. Happy to use es5/es6 if possible. Basically, I'm checking to see if a variable exists, if it does exist I want to make sure the url contains…
bp123
  • 3,217
  • 8
  • 35
  • 74
0
votes
1 answer

Merge array of objects with sort by date

I've this object: { id: 1, nums: 3, dates: [ { date: '21-10-2012', promo: { id: 1, name: 'promo 1' }, hours: [ { hour: '22:00', vision: { …
0
votes
3 answers

How bundle polyfills and external library with Rollup JS?

It's my first application with Angular 2. We run aot and rollup in order to generate a bundle. But we must always add polyfills (shim, reflect-metadata and zone.js) to the index.html with script HTML element. Is it possible to add this polyfills to…
lecogiteur
  • 307
  • 1
  • 7
  • 16
0
votes
1 answer

Optimization - Compatibility for lodash merge with many args

Consider values as an undetermined list of objects. I want an effective ES5 version of this: var result = _.merge({}, ...values); // <-- This is what I want Since ...anything is not allowed I've made this: var result _.reduce(response,…
HollyPony
  • 817
  • 9
  • 15
0
votes
1 answer

Unable to pass the data after action is called in redux

I'm new to redux. I'm using ES5 in my project. I've just started implementing redux in this. main.js: let store = createStore(rootReducer); //Reducer defined in reducer.js file class RenderClass extends Component { render() { return ( …
User1230321
  • 1,435
  • 4
  • 23
  • 39
0
votes
3 answers

ES5 vs ES6 Javascript for Arrays

I am trying to convert the following to work, but I think it is an Es5/ES6 issue. Help Appreciated. this.rows = Array.from(Array(Math.ceil(this.subCategoryModels.length / 3)).keys()); I currently get typscript errors: [ts] Property 'from' does not…
Richard
  • 8,193
  • 28
  • 107
  • 228
0
votes
0 answers

the perfect way of implementing javascript 'outerHTML' as exactly native way

We all know we can use outerHTML like these two way:

I am superstar.

//first way var star = document.getElementsByTagName('p')[0]; var h1 = document.getElementsByTagName('h1')[0]; var starOuterHTML =…
franklee
  • 63
  • 11
0
votes
1 answer

JPlayer can't get played in IE8

I have a problem with jPplayer in IE8. I'm working on an application which should support IE8. It works in every other version >8 of IE and plays on chrome and firefox. I googled it with multiple keywords and changed it based on different scenario…
Reza
  • 1,516
  • 14
  • 23