Created
September 1, 2009 20:10
-
-
Save scottferg/179342 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
// In your toolstrip JS onClick event | |
var port chrome.self.connect(); | |
port.postMessage({array:of, some:elements}); | |
// In your content-script | |
// Event handler that listens for responses from | |
// the extension | |
chrome.extension.onConnect().addListener(function(port) { | |
port.onMessage.addListener( function( data ) { | |
// Data is the response, resize your window here | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment