Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RegExp.input test fails on Opera 12.15 #353

Open
ljharb opened this issue Jun 20, 2015 · 4 comments
Open

RegExp.input test fails on Opera 12.15 #353

ljharb opened this issue Jun 20, 2015 · 4 comments

Comments

@ljharb
Copy link
Collaborator

ljharb commented Jun 20, 2015

It seems like Opera 12.15 has RegExp.input, but it's always undefined, 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.

@Yaffle
Copy link
Contributor

Yaffle commented Jun 22, 2015

both RegExp.input and RegExp.$_ have value undefined

@ljharb
Copy link
Collaborator Author

ljharb commented Jun 22, 2015

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.

@Yaffle
Copy link
Contributor

Yaffle commented Jun 22, 2015

RegExp.input is not standard and should not be used anyway, you can use "input" property of an object returned by "exec" instead

@ljharb
Copy link
Collaborator Author

ljharb commented Jun 22, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants