IE errors in http://javascript.nwbox.com/NWMatcher/release/benchmarks/ #38

Closed
victor-homyakov opened this Issue Jul 13, 2011 · 5 comments

Comments

Projects
None yet
2 participants
Contributor

victor-homyakov commented Jul 13, 2011

Please, update NWMatcher to 1.2.4 at your page http://javascript.nwbox.com/NWMatcher/release/benchmarks/ to test for compatibility.

Current tests for NWMatcher 1.2.3 shows errors in IE6-IE7 (0 elements found):

selectors            jquery-1.5.1     prototype-1.7     mootools-1.3.1    nwmatcher-1.2.3
a[href][lang][class] 25 ms | 1 found  23 ms | 1 found   24 ms | 1 found   12 ms | 0 found
div[class]           6 ms | 51 found  12 ms | 51 found  11 ms | 51 found  5 ms | 0 found
Contributor

victor-homyakov commented Jul 13, 2011

There is issue with ATTR_MAPPING for getAttribute("class") and hasAttribute("class") in IE6-7-8. Debugging NWMatcher 1.2.4 in IE8 debugger shows that node.getAttributeNode("className") === null and node.getAttributeNode("class") returns proper DispHTMLDOMAttribute, and IE6-7 demonstrates the same behavior.

Owner

dperini commented Jul 15, 2011

I believe I didn't exactly understood your complete statement.

Could you post a selector test that show the IE 6-7-8 issue you talk about in version 1.2.4 ?

Owner

dperini commented Jul 15, 2011

I forgot to tell I fixed the page you linked to with new version of NWMatcher 1.2.4.

Contributor

victor-homyakov commented Jul 18, 2011

  1. Test http://javascript.nwbox.com/NWMatcher/release/benchmarks/ in IE6 and IE7. Results for class attribute selectors will have errors (0 elements found in NWMatcher).
  2. Selector examples: a[class], div[class], div[class=example], i.e. selectors with use of emulated hasAttribute and getAttribute.
  3. I think the same result may appear for the second mapped attribute, for, e.g. in selector label[for].
  4. NWMatcher 1.2.3 has such error only for hasAttribute because of ATTR_MAPPING, and NWMatcher 1.2.4 has error for both hasAttribute and getAttribute (because of fixing issue #37). IE8 has no errors on the above-mentioned test page, but I've found the same behavior under some circumstances on one of my pages.
  5. Removing ATTR_MAPPING fixes this issue (at least for me).
Owner

dperini commented Jul 20, 2011

Victor,
you are correct, attribute mapping is necessary only when accessing the element property directly.
It is not necessary when reading element attributes through getAttribute or getAttributeNode (used to emulate hasAttribute).

I will remove them as soon as possible, I am travelling for vacation this weekend and will be out for one month.
I hope to be able to apply the changes before leaving or during the long travel.

Thank you again for the help.

dperini added a commit that referenced this issue Jul 30, 2011

@dperini dperini closed this Jul 30, 2011

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