Hi Stefan, Why don't you use local version of the script using script tag in your xul document like this: <script type="application/x-javascript" src="jquery-1.2.3.js"/> (well put whatever version you fancy)? You might be interested in couple of problems I ran into using jQuery and actually one of the posts is about script injection:
http://digitalmihailo.blogspot.com/search/label/jQuery http://digitalmihailo.blogspot.com/2008/05/make-jsonp-work-in-firefox-chrome.html the jsonp article is interesting from the point of using script injections since it isn't that easy and jsonp is about injecting script in runtime. In chrome you cannot simply inject script that is not part of the chrome already (e.g. part of your extension). Simply put injecting a script from web is too big security threat since in chrome any script have all the privileges that current user running firefox has. So what the injected script might do is read or corrupt your private data or system files, especially if you are running firefox with admin privileges. It is not too hard for someone with malicious intents to fool you as being jQuery.com and actually serve you some harmful script. Sometimes you have to inject the script and the article will show you how, I have another article coming along the way about making it more secure, but script injection in chrome will never be 100% secure if the serving server is not in your intranet. Hope this helps. Cheers, Mihailo On Jun 14, 10:54 am, Stefan Petrea <[EMAIL PROTECTED]> wrote: > Hi, > > I've so far developed an extension. > Now it's time to start using jquery in it. > How do I include it inside the extension so that I can use it ? > I've seen here an > examplehttp://www.learningjquery.com/2006/12/jquerify-bookmarklet. > From there I see that I should do something like this in my code > var s=document.createElement('script'); > s.setAttribute('src','http://jquery.com/src/jquery-latest.js'); > document.getElementsByTagName('body')[0].appendChild(s); > Altough I'm not quite sure what this would do ? > Would it include jquery library at runtime in my code so I can use it ? > How would you do this ? > I've also seen this notion of 'script injection' that seems similar to what > I want to achieve. > In particular this > pagehttp://leftlogic.com/lounge/articles/bookmarklet-coding/#more-18 > shows something like this. > Has anyone tried to do this ? > Does it work or am I trying to push a rock that will not move ? > Either way I'm going to give it a shot,but if you've done this and might have > any details to share please do :) > > Thank you > > -- > > Stefan Petrea > homepage :http://perlhobby.googlecode.com/ > mobile phone : +40732070179