chakra-core / chakra-core/ChakraCore

[Bug]: Missing Implementation of String.prototype.replaceAll Method

Open
#7,013 6 comments 0 reactions 0 assignees View on GitHub
Bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.