File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1128,6 +1128,10 @@ var htmx = (function() {
11281128 * @returns {(Node|Window)[] }
11291129 */
11301130 function querySelectorAllExt ( elt , selector , global ) {
1131+ if ( selector . indexOf ( 'global ' ) === 0 ) {
1132+ return querySelectorAllExt ( elt , selector . slice ( 7 ) , true )
1133+ }
1134+
11311135 elt = resolveTarget ( elt )
11321136
11331137 const parts = selector . split ( ',' )
@@ -1158,12 +1162,6 @@ var htmx = (function() {
11581162 item = getRootNode ( elt , ! ! global )
11591163 } else if ( selector === 'host' ) {
11601164 item = ( /** @type ShadowRoot */ ( elt . getRootNode ( ) ) ) . host
1161- } else if ( selector . indexOf ( 'global ' ) === 0 ) {
1162- // Previous implementation of `global` only supported it at the first position and applied it to the entire selector string.
1163- // For backward compatibility and to maintain logical consistency, we make it apply to everything that follows.
1164- parts . unshift ( selector . slice ( 7 ) )
1165- result . push ( ...querySelectorAllExt ( elt , parts . join ( ',' ) , true ) )
1166- break
11671165 } else {
11681166 unprocessedParts . push ( selector )
11691167 }
You can’t perform that action at this time.
0 commit comments