mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
[Performance] Fast path to resolve body selector (#1545)
Fast path to resolve body selector
This commit is contained in:
parent
67b8e1edfa
commit
efb42e09cf
@ -595,6 +595,8 @@ return (function () {
|
|||||||
return [document];
|
return [document];
|
||||||
} else if (selector === 'window') {
|
} else if (selector === 'window') {
|
||||||
return [window];
|
return [window];
|
||||||
|
} else if (selector === 'body') {
|
||||||
|
return [document.body];
|
||||||
} else {
|
} else {
|
||||||
return getDocument().querySelectorAll(normalizeSelector(selector));
|
return getDocument().querySelectorAll(normalizeSelector(selector));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user