I didn't know about the contains() method!  Thanks!  I think I need to do a !== b && a.contains(b)

I can never decide what I think about the very long symbolic constants that the DOM defines.,,