Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valerysntx/0732e65a6fcf1f591df9 to your computer and use it in GitHub Desktop.
Save valerysntx/0732e65a6fcf1f591df9 to your computer and use it in GitHub Desktop.
Frameless document.querySelectorAll shim
document.querySelectorAll = function(){
var result = [].slice.call( HTMLDocument.prototype.querySelectorAll.apply(document, arguments ) );
for(var i=0; i< frames.length; i++){
try {
var doc = frames[i].document;
result = result.concat( [].slice.call( doc.querySelectorAll.apply(doc, arguments) ) );
} catch(e){}
}
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment