10 extensions including jQuery won't bog the browser down, as each extension 
runs in a separate process anyways. However using Google CDN makes the 
extensions smaller and jQuery will be loaded from the browser cache most of 
the time.

--------------------------------------------------
From: "Doug @ Straw Dogs" <[email protected]>
Sent: Tuesday, December 29, 2009 9:19 PM
To: "Chromium-extensions" <[email protected]>
Subject: [crx] Re: Using jQuery

> Is including jQuery recommended?
> Are there any plans to implement some mechanism to include jQuery more
> efficiently from say the Google CDN for multiple extensions at a time?
>
> I'm just thinking that if 10 authors include jQuery individually then
> it's going to bog the browser down unecessarily. There must be a nicer
> way of doing it?
>
> On Dec 29, 6:48 pm, Brian Kennish <[email protected]> wrote:
>> On Tue, Dec 22, 2009 at 11:57 AM, Schalk Neethling
>>
>>
>>
>>
>>
>> <[email protected]> wrote:
>> > For testing purposes I basically have a popup.html defined in my
>> > Manifest and then have the following in my background.html:
>>
>> > <html>
>> > <head>
>> > <script src="jquery.min.js" type="text/javascript"></script>
>>
>> > <script>
>> > $("p").css({'background-color': 'yellow'});
>> > </script>
>>
>> > </head>
>> > </html>
>>
>> > In my popup I do have a little Hello World paragraph but on loading the
>> > extension and clicking on the icon the popup pops with the paragraph 
>> > but
>> > the background color does not change :(
>>
>> > Am I going about this the wrong way? I have tried adding the:
>>
>> > <script>
>> > $("p").css({'background-color': 'yellow'});
>> > </script>
>>
>> > to the popup.html but with no success.
>>
>> Hey Schalk, you'll have to include jQuery in your popup file to
>> reference the library there. Extension components don't automatically
>> have access to a background page's JavaScript objects.
>>
>> Also, you might find it easier to load jQuery remotely rather than
>> bundling it with your extension. For example, the Google AJAX
>> Libraries API provides a convenient way to do so:
>>
>> <script
>>   type="text/javascript"
>>   src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";>
>> </script>
>
> --
>
> 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.
>
>
> 

--

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