(val)
| 20 | * @return {*} |
| 21 | */ |
| 22 | export function elementStringOrPassThru(val) { |
| 23 | // Do check equivalent to `val instanceof Element` without cross-window bug |
| 24 | if (isElement(val)) { |
| 25 | val = /** @type {Element} */ (val); |
| 26 | return val.tagName.toLowerCase() + (val.id ? `#${val.id}` : ''); |
| 27 | } |
| 28 | return val; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Tests if an error message contains the user sentinel. |
no test coverage detected