Skip to content

Commit

Permalink
fix: Use frame query that supports shadow dom (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
isner authored and WilcoFiers committed Aug 22, 2017
1 parent 508fae2 commit 94008ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/core/public/cleanup-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ function cleanupPlugins(resolve, reject) {
});
});

axe.utils.toArray(document.querySelectorAll('frame, iframe')).forEach(function (frame) {
var flattenedTree = axe.utils.getFlattenedTree(document.body)

axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function (node) {
q.defer(function (res, rej) {
return axe.utils.sendCommandToFrame(frame, {
return axe.utils.sendCommandToFrame(node.actualNode, {
command: 'cleanup-plugin'
}, res, rej);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/core/public/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ Plugin.prototype.add = function (impl) {
axe.registerPlugin = function (plugin) {
'use strict';
axe.plugins[plugin.id] = new Plugin(plugin);
};
};

0 comments on commit 94008ff

Please sign in to comment.