I started a lib basically ripping out prev(), next(), prevAll(), etc. from jquery.. do you know if there is already a component that has these? Also do you think it belongs in here.
The main advantage I see of wrapping el.previousElementSibling etc. is dealing with nulls. Right now you have to do klutzy stuff like this to wrap potentially null els (not sure if this is even right):
var x = el.previousElementSibling;
x = x ? dom(x) : dom([]);
The other thing is jquery code uses the backwards-compatible previousSibling, etc., not sure if that matters (I don't particularly care).
I started a lib basically ripping out prev(), next(), prevAll(), etc. from jquery.. do you know if there is already a component that has these? Also do you think it belongs in here.
The main advantage I see of wrapping
el.previousElementSibling
etc. is dealing with nulls. Right now you have to do klutzy stuff like this to wrap potentially null els (not sure if this is even right):The other thing is jquery code uses the backwards-compatible
previousSibling
, etc., not sure if that matters (I don't particularly care).