Skip to content

Commit

Permalink
Merge pull request #784 from adobe/revert-TNT-42028
Browse files Browse the repository at this point in the history
Revert TNT-42028 Support Shadow DOM selectors #773
  • Loading branch information
XDex authored Nov 18, 2021
2 parents 8f0550e + 6f2de17 commit fa7ae97
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 432 deletions.
16 changes: 0 additions & 16 deletions src/components/Personalization/dom-actions/dom/querySelectorAll.js

This file was deleted.

This file was deleted.

11 changes: 2 additions & 9 deletions src/utils/dom/selectNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import querySelectorAll from "../../components/Personalization/dom-actions/dom/querySelectorAll";
import selectNodesWithShadow, {
isShadowSelector
} from "../../components/Personalization/dom-actions/dom/selectNodesWithShadow";
import toArray from "../toArray";

/**
* Returns an array of matched DOM nodes.
Expand All @@ -22,9 +19,5 @@ import selectNodesWithShadow, {
* @returns {Array} an array of DOM nodes
*/
export default (selector, context = document) => {
if (!isShadowSelector(selector)) {
return querySelectorAll(context, selector);
}

return selectNodesWithShadow(context, selector);
return toArray(context.querySelectorAll(selector));
};
46 changes: 0 additions & 46 deletions test/functional/fixtures/Personalization/C28758.js

This file was deleted.

2 changes: 1 addition & 1 deletion test/functional/helpers/createFixture/clientScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const getProdNpmLibraryCode = () => {
return readCache.sync(prodNpmLibraryPath, "utf8");
};

export const injectInlineScript = ClientFunction(code => {
const injectInlineScript = ClientFunction(code => {
const scriptElement = document.createElement("script");
// eslint-disable-next-line no-undef
scriptElement.innerHTML = code;
Expand Down
101 changes: 0 additions & 101 deletions test/functional/specs/Personalization/C28758.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit fa7ae97

Please sign in to comment.