allow DOM objects directly instead of their id

This can be useful when dealing with dynamic object, when we already have a reference to the object and / or when we don't want to set an id.