[Performance] Fast path to resolve body selector (#1545)

Fast path to resolve body selector
This commit is contained in:
Vincent 2023-08-01 21:35:25 +02:00 committed by GitHub
parent 67b8e1edfa
commit efb42e09cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -595,6 +595,8 @@ return (function () {
return [document];
} else if (selector === 'window') {
return [window];
} else if (selector === 'body') {
return [document.body];
} else {
return getDocument().querySelectorAll(normalizeSelector(selector));
}