Open ljharb opened 9 years ago
both RegExp.input
and RegExp.$_
have value undefined
In that particular browser, yes. However, not in most browsers, where it is equal to the last string that was used to exec against a regex.
RegExp.input
is not standard and should not be used anyway, you can use "input" property of an object returned by "exec" instead
The spec allows for nonstandard extensions, and by wrapping RegExp
, I don't want to break a browsers's builtin extensions.
The difficulty here is that input
/$_
in Opera is the only one of these properties that actually exists but doesn't function.
If in fact I can detect this at runtime by running a regex exec, then I can simply skip the test.
It seems like Opera 12.15 has
RegExp.input
, but it's alwaysundefined
, so the test for it is failing.To fix this issue, either a) we need to discover how to fix the behavior, b) figure out how to feature-detect when the test isn't applicable, c) figure out if it's acceptable to detect this at runtime and not copy over the "input" property when it doesn't work.