_.isElement
The node that can only ever say 'no'
- py_dict
- BOOLEAN
_.isElement is the one node in this whole family you should know about mainly so you don't waste time on it: it always returns False. The docs describe it as "Returns true if object is a DOM element" - the original Underscore.js semantics - but this is a Python port running in a Python process. There is no DOM. The implementation says as much:
def isElement(self):
""" No use in python
"""
return self._wrap(False)
Feed it anything - a dict, a string, an image, a list - and the answer is False, every time. That's not a bug you hit intermittently; it's the entire behavior of the node.
The inputs that matter
The schema is a bit of a giveaway that this node is auto-generated boilerplate:
- py_dict - the primary input (
*). It's namedpy_dictbecause the generator filedisElementunder "object" methods, even though the value is discarded entirely. - Output is a single
BOOLEAN, alwaysfalse.
Why it exists
This is a transparency artifact of how the pack works. The ovum/underscore nodes are generated by walking every method on the bundled underscore3 Python port of Underscore.js and stamping out one ComfyUI node per method. Underscore.js has _.isElement (it checks for a browser DOM element), the port kept a stub for API parity, and the generator dutifully turned the stub into a node. Nobody decided this was a useful node; it's just what the machinery produced. It's the clearest example in the pack of the README's own warning that the underscore family is a work in progress.
The honest take
Don't reach for _.isElement for anything. If you need "is this a real DOM element" - you're in ComfyUI, so you don't. If you were hoping for a general object check, that's _.isObject or _.isDict/_.isDictlike depending on what you mean. Consider _.isElement a placeholder from the port, useful only as a reminder that these nodes were machine-generated and some of them are hollow.
Installing
Ships in comfy-ovum (MIT). ComfyUI Manager → search comfy-ovum → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
No extra dependencies for the underscore nodes - the bundled underscore3 port covers them.
Gotchas
Beyond "it always returns false," the only real risk is wiring it in thinking it does something. It doesn't - and that's honestly the most useful fact in this article. If a workflow you loaded from somewhere includes _.isElement and you were wondering why a branch never fires, now you know: it's not your graph, it's the node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| py_dictopt | * | Primary input object (expected object). You can still pass any JSON-serializable value. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |