This tag should be used to identify questions regarding compatibility issues between ES5 and future versions of EcmaScript (i.e. Finding how an ES6 algorithm can be made ES5 compatible)
Questions tagged [es5-compatiblity]
31 questions
15
votes
1 answer
Proxy substitue for ES5
Is it possible to listen to property changes without the use of Proxy and setInterval?
For common objects you could use the function below but that works for all existing properties but doesn't work for any properties that might get added after the…

nick zoum
- 7,216
- 7
- 36
- 80
5
votes
3 answers
Converting => () => to ES5
I'm in the process of converting some scripting from from ES6 to ES5 due to a dependency on the system executing the scripts. I'm running into an issue with this particular command:
transition.selectAll('path.hidden-arc')
.attrTween('d', d => ()…

Josh Simmons
- 69
- 5
3
votes
1 answer
What are the risks of using toString to get the name of a function?
Since ES5 doesn't support Function#name. I was looking for a way to emulate that functionality. While a lot of people recommend using Function#toString, others strongly advised against it.
So what are the risks of using the below code to get the…

nick zoum
- 7,216
- 7
- 36
- 80
3
votes
1 answer
How do I use Promises with TypeScript when targeting es5?
Promise.all(ajaxRequests).then(()=> {
console.log("done");
});
The above code gives the following compiler error:
TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library?…

Chris Stryczynski
- 30,145
- 48
- 175
- 286
2
votes
0 answers
Make Angular 12 app run on really old browser
this is my version of Angular:
Angular CLI: 12.2.6
Node: 16.13.2 (Unsupported)
Package Manager: npm 8.1.2
OS: win32 x64
Angular: 12.2.6
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-moment-adapter,…

sehueyl
- 35
- 4
2
votes
1 answer
load in vanilla ES5 js file into ES6 environment via import
Scenario
As part of my prototyping process I wanted to bring in tween.js which I can do using a