Use documentElement instead of body in domNodeIsAttachedToDocument.