[webkit-dev] safari extension script loading within injected file
lzell11 at gmail.com
Wed Feb 2 22:59:13 PST 2011
On Tue, Feb 1, 2011 at 5:44 PM, Nick Guenther <nick.guenther at dossierview.com
> Cluestick (or n00b question): What's 'document' within the extension scope?
It is not the same as 'document' of the loaded page. I am no expert with
terminology here, so in case that makes zero sense: If I load up a web page
and use the debugger to print window.document, it is different from the
injected js. This single file creates a variable, window.MyGlobal. What is
very interesting to me is that this object is accessible from the loaded
page! Meaning if I create an html file that tries to access
window.MyGlobal, it can. I don't think web page authors are supposed to be
able to access variables created by extensions.
I'm going to pose the question in the Apple list Adam suggested. I'll post
the solution here for completeness when I get one.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev