chakra-core / chakra-core/ChakraCore
[Bug]: Missing Implementation of String.prototype.replaceAll Method
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### ChakraCore Version
36becec
### Steps to reproduce
When executing code containing the `String.prototype.replaceAll` method, a `TypeError: Object doesn't support property or method 'replaceAll'` occurs.
### Proof of concept
```js
var replaceWith = function (inputStr) {
return inputStr.replaceAll('a', 'b');
};
var originalStr = 'Y)a,K;aC&.';
var modifiedStr = replaceWith(originalStr);
print(modifiedStr);
```
### Exception or Error
```text
TypeError: Object doesn't support property or method 'replaceAll'
at replaceWith (/home/test.js:2:5)
at Global code (/home/test.js:5:1)
```
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.