File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 560560 // if (!Array.isArray(queriedElement)) {
561561 // queriedElement = [queriedElement]
562562 // }
563+
563564 if ( ! specialSelectors [ k ] ) continue ;
564565 if ( k === 0 ) {
565566 if ( type [ i ] === "parent" )
570571 else if ( type [ i ] === "previous" )
571572 queriedElement =
572573 queriedElement . previousElementSibling ;
573- queriedElement = window . top . document ;
574- } else if ( element . contentDocument ) {
575- queriedElement = element . contentDocument ;
574+ } else if ( queriedElement . contentDocument ) {
575+ queriedElement = queriedElement . contentDocument ;
576576 }
577577
578578 switch (
633633 specialSelectors [ k ]
634634 ) ;
635635 }
636- else if ( specialSelectors [ k ] . endsWith ( "[]" ) )
636+ else if (
637+ specialSelectors [ k ] === "$clickedElement"
638+ ) {
639+ queriedElement =
640+ queriedElement . clickedElement ;
641+ } else if ( specialSelectors [ k ] . endsWith ( "[]" ) )
637642 queriedElement =
638643 queriedElement . querySelectorAll (
639644 specialSelectors [ k ] . slice ( 0 , - 2 )
You can’t perform that action at this time.
0 commit comments