[Project_owners] Webpage-to-extension communication

Stan James sjames at uni-osnabrueck.de
Sat May 21 10:45:34 EDT 2005


Hi all,

My extension extension often adds elements to visited HTML pages, but 
sometimes these elements need to communicate back to the extension. 
(E.g. when the user chooses to turn them off.) I've been using two 
hack-ish approaches so far:
- Setting javascript variables on the page which are then polled (every 
second) by the extension.
- Hiding "directives" for the extension in a link URL which can then be 
detected by the extension. (e.g. 
http://www.google.com/#my_extension_command)

Neither are very efficient or elegant. I understand the security 
concerns for pages not being able to play with browser-level things, but 
it seems their should be some way for this one-way communication to occur.

My best guess is to set up event handlers, but I can't get them to 
detect page events without also running in the page's limited security 
context.

Thanks for any ideas!

-stan


ps- i need beta-testers!  http://getoutfoxed.com





More information about the Project_owners mailing list