Skip to content

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

@ayuan0828

Description

@ayuan0828

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

var replaceWith = function (inputStr) {
    return inputStr.replaceAll('a', 'b');
};
var originalStr = 'Y)a,K;aC&.';
var modifiedStr = replaceWith(originalStr);
print(modifiedStr);

Exception or Error

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions