Skip to content

Instantly share code, notes, and snippets.

@kitsunde
Created December 3, 2010 19:35
Show Gist options
  • Save kitsunde/727433 to your computer and use it in GitHub Desktop.
Save kitsunde/727433 to your computer and use it in GitHub Desktop.
if( window.frames.length > 0 )
console.log( "First frame:", window.frames[0] );
First frame: undefined
var activeElement = document.activeElement;
if( activeElement === document.body){
for( var i = 0; i < window.frames.length; ++i ){
activeElement = frames[i].document.activeElement;
if( activeElement !== frames[i].document.body ) break;
}
}
/* Act on element */
chrome.tabs.executeScript( null, {
allFrames : true,
file: "file.js"
});
var activeElement = document.activeElement;
if( window.frames.length > 0 && window.frames[0] !== undefined )
console.log( "Bug 20773 is fixed! Please alert http://www.github.com/Celc" );
if( activeElement !== document.body ){
/* Act on element */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment