Skip to content

Commit 6989fc7

Browse files
hamishwilleebsmth
andauthored
FF134: Relnote: RegExp.escape() supported (#36957)
Co-authored-by: Brian Smith <[email protected]>
1 parent 7df171f commit 6989fc7

File tree

1 file changed

+1
-0
lines changed
  • files/en-us/mozilla/firefox/releases/134

1 file changed

+1
-0
lines changed

files/en-us/mozilla/firefox/releases/134/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This article provides information about the changes in Firefox 134 that affect d
2222

2323
### JavaScript
2424

25+
- Support for the {{jsxref("RegExp.escape()")}} static method that can be used to escape any potential regex syntax characters in a string, returning a new string that can be safely used as a [literal](/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Literal_character) pattern for the {{jsxref("RegExp/RegExp", "RegExp()")}} constructor. ([Firefox bug 1918235](https://bugzil.la/1918235)).
2526
- The {{jsxref("Promise.try()")}} convenience method is now supported.
2627
The method takes a callback of any kind (a function that returns or throws, synchronously or asynchronously) and wraps its result in a {{jsxref("Promise")}}.
2728
This allows you to use promise semantics ({{jsxref("Promise.then", ".then()")}}, {{jsxref("Promise.catch", ".catch()")}}) to handle the result from any kind of method. ([Firefox bug 1917879](https://bugzil.la/1917879) and [Firefox bug 1905364](https://bugzil.la/1905364)).

0 commit comments

Comments
 (0)