Jquery is loaded (although from a local file) using that function -
CmdUtils.loadJQuery = function loadJQuery(func) {
CmdUtils.injectJavascript(
"resource://ubiquity-scripts/jquery.js",
Utils.safeWrapper( function() {
var contentJQuery = CmdUtils.getWindowInsecure().jQuery;
func(contentJQuery);
})
);
};
2008/11/27 <[EMAIL PROTECTED]>
> How about an example?
>
>
> On Thu, Nov 27, 2008 at 3:46 PM, Abimanyu Raja <[EMAIL PROTECTED]>wrote:
>
>> Yes, you should use CmdUtils.injectJavascript to load a external script
>> from the web.
>>
>> - Abi
>>
>> 2008/11/27 <[EMAIL PROTECTED]>
>>
>> Also, are there any performance considerations that need to be made when
>>> doing so.
>>>
>>>
>>> On Thu, Nov 27, 2008 at 3:39 PM, <[EMAIL PROTECTED]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am not sure if this was covered before, but I have a external .JS lib
>>>> that I want to be able to call within my ubiquity command. Can anyone give
>>>> me any pointers? From some previous thread, I think
>>>> CmdUtils.injectJavascript needs to be used. Is this correct?
>>>>
>>>> thanks,
>>>>
>>>> --
>>>> Mayuresh
>>>>
>>>
>>>
>>>
>>> --
>>> Mayuresh
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Mayuresh
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ubiquity-firefox" 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/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---