Make passing `Element` to `getElement` work (#4675)
Fix #4674 and other issues.
Most obviously: Passing HTMLElement now works (consider
`getElement(c30)`)
More implicitly: Checking `id instanceof HTMLElement` is wrong logic,
since the `id` property is introduced by `Element` (the base class which
`HTMLElement` inherits from).
Otherwise, code would not work, if we pass in, say, an `SVGElement`.
Check here for more details about `Element.id`:
https://developer.mozilla.org/en-US/docs/Web/API/Element/id