Raynos / DOM-shim

Shims out the entire DOM4 API
http://raynos.github.com/DOM-shim/test/test.html
155 stars 15 forks source link

Fix bug in Opera 12 and FF 10 with document.createTreeWalker #40

Open termi opened 12 years ago

termi commented 12 years ago

http://www.w3.org/TR/domcore/#dom-document-createtreewalker Opera 12.00.1213 and FF 10.0 needs 3rd and 4th argument:

//In Opera and FF filter and entityExpandBol can't be undefined
document.createTreeWalker(root, nodesToShow, filter, entityExpandBol);

DOM4 spec says what filter is an optional "argument" and "entityExpandBol" argument not in DOM4 spec anymore

//this is valid
document.createTreeWalker(document.body, NodeFilter.ALL)
Raynos commented 12 years ago

I have havn't implemented anything to do with TreeWalker, it's on the todo list though.

It should be noted that tree walkers are slow as hell and should be avoided for performance reasons.

termi commented 12 years ago

I add issue only for "not forgotten" reason. I am now working on TreeWalker.

Is TreeWalker slow in all browsers (especially in Chrome) or only in browsers which have old implementation of TreeWalker ?

termi commented 12 years ago

Do you mind of adding issue only for "not forgotten" reason? I find new bug in Opera with element.dataset http://jsfiddle.net/RPkJu/5/

Raynos commented 12 years ago

@termi1uc1 http://stackoverflow.com/questions/7941288/when-to-use-nodeiterator

As for adding issues for "not forgotten" reason is fine.

I appreciate a back log of bugs on the "to fix" list.