Thanks for the reply Aaron. I was just trying the extension system by attempting a quick port of Diigo's bookrmarklet. I have been working with Diigo's bookmarklet for Chrome for some time without issues.
Now that you mention the per-content-script 'window' object I understand where things might differ from the bookmarklet implementation. I must admit I threw this code hastily together... now that I have read http://dev.chromium.org/developers/design-documents/extensions/content-scripts I understand better the situation. So I guess "pure Greasemonkey-style" JS injection in a page won't be allowed, right? On May 29, 1:22 pm, Aaron Boodman <[email protected]> wrote: > Hello Jean-Lou, > > Thanks for trying out the system. Do you have a simple example of what > you mean with adding properties to the window object? > > There is a special setup of the window object in Chrome content > scripts. Basically each content script gets 'their own' window object. > If you add properties to it in one content script, they won't be > visible in other content scripts or from the web page's own > JavaScript. But it is rare for people to need to do this, so I'm > curious what you're up to. > > - a > > On Fri, May 29, 2009 at 7:40 AM, Jean-Lou Dupont > > > > <[email protected]> wrote: > > > I have put together a proof-of-concept extension for Diigo (http:// > >www.diigo.com/) here:http://code.google.com/p/chrome-diigo/ > > > It seems there is an issue with prototyping/adding objects to the > > "window" object. The javascript console complains the "diigolet" > > object being undefined but clearly looking at the JS code, the > > diigolet object is defined. --~--~---------~--~----~------------~-------~--~----~ Chromium Discussion mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-discuss -~----------~----~----~----~------~----~------~--~---
