This looks different: it's only spotting the difference of things in `oldNodes` that are not in `newNodes`. If there's something in `newNodes` that's not in `oldNodes` then your code won't trigger updating the `setAttribute`.