You don't usually really need slice/pop on a list of DOM nodes
Actually, you do, and that's exactly why it's necessary.
For example, how else would .eq()
, .first()
, etc. work. The jQuery object contains a copy of the NodeList
in an array, and then the individual methods take slices of that array. Similarly, you can't .add()
nodes to a NodeList
.
Furthermore, those arrays need to remain valid even if the elements therein are subsequently removed from the DOM. The references in the array are still valid, and can be used to reinsert those elements back into the DOM.
If all you had was a live NodeList
the elements would automagically disappear from the list when they're removed from the DOM, and would be lost forever unless you had a separate reference to them.