-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
JavaScript strict warning while (match = regex.exec(string)) {...}
#1173
Comments
Most sites, including the one you are looking at, use the compressed version of MathJax, and so all of its code is on one line (line 19 in this case). So it is hard to tell what exactly is triggering the warning. I suspect that it is this line:
which does an assignment within the condition of the Thanks for reporting the warning, but it turns out to be correct as is, so I'm closing the issue. |
Hmm, maybe the comment #1 from https://bugzilla.mozilla.org/show_bug.cgi?id=1158522 could be applied to your code? ;-) |
=> closed as "expected behavior" / "abandoned" |
@pkra, the OP's link to bugzilla does give a method of avoiding the message (add an extra set of parentheses), if we wanted to do that. No real harm to it, but the warning message is not something I'm particularly concerned about. If you want to drop it, I'm OK with that, but just wanted to be sure that you knew that there was a simple "fix". |
@dpvc ah, sorry. This sounded similar to requests for supporting strict mode, which I thought was not an option generally speaking. It seemed abandoned and was tagged 'expected behavior'. Anyway, fixing always sounds nice. |
while (match = regex.exec(string)) {...}
…s at least one line from issue mathjax#1173.
=> Merged |
Hi,
I compiled seamonkey/firefox with DEBUG output enabled and it prints out on STD{OUT,ERR} a lot of messages. There are some related to your code ( I was browsing http://mbe.oxfordjournals.org ):
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/jquery-min.js, line 16: SyntaxError: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/jquery-min.js, line 17: SyntaxError: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/jquery-min.js, line 18: SyntaxError: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/jquery-min.js, line 16: ReferenceError: reference to undefined property f.valHooks[this]
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/hw-shared.js, line 76: TypeError: variable i redeclares argument
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/hw-shared.js, line 193: TypeError: variable i redeclares argument
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/hw-shared.js, line 466: SyntaxError: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://mbe.oxfordjournals.org/shared/js/hw-shared.js, line 475: SyntaxError: test for equality (==) mistyped as assignment (=)?
^G[2313] ###!!! ASSERTION: Should have a valid plugin instance or not receive events.: 'mInstance', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/plugins/base/nsPluginInstanceOwner.cpp, line 1394
^G[2313] ###!!! ASSERTION: Should have a valid plugin instance or not receive events.: 'mInstance', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/plugins/base/nsPluginInstanceOwner.cpp, line 1394
[2313] WARNING: NS_ENSURE_TRUE(ParseTypeAttribute(type, &version)) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/nsScriptLoader.cpp, line 571
JavaScript strict warning: http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML, line 19: SyntaxError: test for equality (==) mistyped as assignment (=)?
JavaScript strict warning: http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML, line 19: ReferenceError: reference to undefined property args.execute
JavaScript strict warning: http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML, line 19: ReferenceError: reference to undefined property this.head
JavaScript strict warning: http://mbe.oxfordjournals.org/resource/js/main.js, line 119: SyntaxError: test for equality (==) mistyped as assignment (=)?
The text was updated successfully, but these errors were encountered: