Closed
Bug 1015762
Opened 10 years ago
Closed 10 years ago
JavaScript String.prototype.replace
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 369778
People
(Reporter: zhanzhenzhen, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807
Steps to reproduce:
Maybe it's a JavaScript String.prototype.replace bug. In all other browsers, the p1 argument is undefined. But in Firefox it's "".
"abc".replace(/a(c)?/,function(match,p1,p2){console.log(match,p1);return match;})
Actual results:
"a" ""
Expected results:
"a" undefined
Updated•10 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•