class selector doesn't work dynamically testcase coming up...
Created attachment 12851 [details] testcase
This actually has nothing to do with CSS, which works fine. The issue is with JavaScript, which is not allowing the use of the word "class" as a variable name. The JS console reports a parse error on that line.
*** This bug has been marked as a duplicate of 6179 ***
How can this be a duplicate of a bug that's fixed? I guess the issue here is that class works in Firefox, but not Windows IE.
Yes, it's not a duplicate. We might not want to fix it though, since IE still treats "class" as a future keyword.
In bug 6179, I chose to follow WinIE rather than Mozilla, and reserve 'class'. Is there a compelling real-world example that justifies unreserving 'class'?
(In reply to comment #4) > How can this be a duplicate of a bug that's fixed? This was the original issue reported in bug 6179, but the bug was re-purposed after it was decided that it was invalid. Since bug 6179 contains the rationale for our behavior in this case, I marked this as a duplicate.
so, should this be closed as WONTFIX then?
Personally I'm fine with being stricter with the "class" keyword ... but I can definitely see the argument for not allowing it. However, maybe instead of a Parse Error it should be a console warning? Furthermore, in using the new Debug Inspector if a JavaScript contains the someObject.class or var class WebKit seems to crash after a few seconds.
(In reply to comment #9) > Furthermore, in using the new Debug Inspector if a JavaScript contains the > someObject.class or var class WebKit seems to crash after a few seconds. Could you please file a new bug for this?
(In reply to comment #10) > Could you please file a new bug for this? Good call, please see https://bugs.webkit.org/show_bug.cgi?id=22046
Per the ES5 spec, class is not a reserved word. This is definitely now correct behaviour.