Comment #58 on issue 18857 by thegooddale: Support for GM Functions  
(Greasemonkey) in Chrome
http://code.google.com/p/chromium/issues/detail?id=18857

Re: unsafeWindow

What if you adapted a similar approach to window.postMessage?
https://developer.mozilla.org/en/DOM/window.postMessage
"window.postMessage is a method for safely enabling cross-origin  
communication."

I was thinking you could do something like this:
1.It happens before the script runs...
2.Since everything in javascript is an object, save every "object" on the  
webpage to
an associative array (e.g. var webPageObjects={})
3.Use JSON to convert them all to a string (JSON.stringify(webPageObjects))
4.Send the string from the webpage "space" to the privelaged  
extension "space".
(pseudocode: chrome.postMessage(string,extensionID))
5.The script extension "space" now uses JSON.parse() to parse the string  
message and
the script/extension now has access to variable names/values, functions etc  
that were
on the webpage.
Note: not "live" access.

I have no idea if this is actually feasable, it's just an idea I had. :

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

-- 
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs

Reply via email to