chernikovalexey/Prevel — Issue #8: Please explain the clean function in Dom.js
Author: herbdaily
Created: 2012-01-26 02:09:00+00:00
State: open

Hi,

I am pretty sure that at least part of it is broken, specifically here:

```
else if(a[i].pl || a[i].length && !a[i].nodeType) {
for(var k = 0; k < a[i].length; ++k)
r.push(a[i][k]);

```

I don't think anything will trigger the first condition, and if you are looking for pl instances, I think you want to cycle through the elements.

Rather than fumble in the dark, I thought I'd ask you what your intention is here. I'm having a really hard time adding nodes recursively, and I think that this function is responsible. Any suggestions would be greatly appreciated.