make createElement() more flexible, to accept either an Element of a Document instance.