Open XuluWarrior opened 6 years ago
I believe getRootElement
is the correct replacement.
I don't believe it is. The testing "root" is not the same as the document root.
If no context is provided then find() prepends settings.rootElement
to the selector
if (contextEl instanceof HTMLElement) {
result = contextEl.querySelector(selectorOrElement);
} else {
result = document.querySelector(`${settings.rootElement} ${selectorOrElement}`);
}
@XuluWarrior you are correct, I was mistaken.
Currently the empty selector is transformed to ''. This does not return the same node(s). e.g.
find()
would return the context node. `find('')` will return the first child of the context.