I'm doing that right now and it returns the path to my test file
instead of the url of the page I'm currently viewing.

For example, if I'm on the page of www.amazon.com, and I click on my
browser action icon, with this line of code:
document.writeln(window.location);

I get this return value, instead of 'www.amazon.com':
chrome-extension://gfaicebfdaponcbjcedgbjiicfgplkef/test.html

On Dec 8, 8:47 pm, Mohamed Mansour <[email protected]> wrote:
> Without content scripts, can't you just do?
> javascript:alert(window.location)
>
> Unless you mean the URL of the current 
> extension:http://code.google.com/chrome/extensions/extension.html#method-getURL
>  <http://code.google.com/chrome/extensions/extension.html#method-getURL>
>
>
>
> On Tue, Dec 8, 2009 at 11:19 PM, dk_man <[email protected]> wrote:
> > As a newbie to Chrome extension development, I'm curious to know if
> > there is a way to access the properties of the current document being
> > viewed without the need to create contents scripts. For example, if I
> > want my extension to access the location of the document that is
> > currently being viewed, I can use 'content.document.location' for
> > Mozilla, but is there an equivalent way to access this property in
> > Chrome?
>
> > If not, what is the recommended way to do so to ensure that the
> > extension will have access to such values?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<chromium-extensions%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/chromium-extensions?hl=en.
>
> --
>  - Mohamed Mansour

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to