How can I keep track of these Firefox warning messages?

Since I upgraded to jQuery 1.4.4, I get a few new warning messages when I run unit tests in Firefox 3.6.13. Here's a typical:

Warning: Unexpected token in attribute selector: '!'.
Source File: http://localhost/unitTests/devunitTests.html
Line: 0

Or even more useful:

Warning: Selector expected.
Source File: http://localhost/unitTests/ui/editors/iframe2.html?test=15
Line: 0

The web page looks great and all of my JavaScript code seems to be working fine, so I am reluctant to spend a potentially large amount of time skipping my code to track these messages. However, can anyone suggest what provokes warnings?

+3
source share
2 answers

, Firefox javascript , javascript-. , var, - , . , javascript javascript - , jQuery.

JavaScript JavaScript: http://www.howtocreate.co.uk/strictJSFirefox.html

, , , .

TL; DR: , , FF .

0

, - :

$(selectorVariable)

... - :

$("something[" + attributeNameVariable + "!=somethingElse]")

, "" "selector[!=value]" . , if(), , ( , , ).

+2

Source: https://habr.com/ru/post/1784700/


All Articles