Part of our plan to Remove usages of metal-dom in DXP codebase.
The goal of this task is to remove all usages of toElement from the metal-dom package.
To this day, there's no standard way to replace our current implementation of toElement:
A good amount of usages of toElement can be simply replaced with document.querySelector or simply document.getElementById since they unequivocally always use a selector or identifier.
The few other cases where an input can be of both types, it should be okay to encode this function somewhere.
- All usages of toElement from metal-dom have been replaced
Possible occurrences of toElement (Deduped list of modules on git grep 'toElement(' *.js*)