Created
December 3, 2010 19:35
-
-
Save kitsunde/727433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( window.frames.length > 0 ) | |
console.log( "First frame:", window.frames[0] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First frame: undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.tabs.executeScript( null, { | |
allFrames : true, | |
file: "file.js" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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