Symbol.replace

Symbol.replace 这个属性指定了当一个字符串替换所匹配字符串时所调用的方法。String.prototype.replace() 方法会调用此方法。

更多信息, 详见 String.prototype.replace()

Symbol.replace 属性的属性特性:
writable false
enumerable false
configurable false

Specifications

Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
Symbol.replace
Standard Initial definition.
ECMAScript Latest Draft (ECMA-262)
Symbol.replace
Draft

Browser compatibility

Update compatibility data on GitHub
Desktop Mobile Server
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet Node.js
replace Chrome Full support 50 Edge No support No Firefox Full support 49 IE No support No Opera Full support Yes Safari Full support Yes WebView Android Full support 50 Chrome Android Full support 50 Firefox Android Full support 49 Opera Android Full support Yes Safari iOS Full support Yes Samsung Internet Android Full support 5.0 nodejs Full support 6.0.0

Legend

Full support  
Full support
No support  
No support

See also