[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread Andrea Giammarchi
Thanks for the commit :D Regards On Wed, Jul 15, 2009 at 1:38 PM, John Resig wrote: > Thanks for the patch - fixed! > http://dev.jquery.com/changeset/6436 > > --John > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread John Resig
Thanks for the patch - fixed! http://dev.jquery.com/changeset/6436 --John On Wed, Jul 15, 2009 at 7:52 AM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > Done, ticket http://dev.jquery.com/ticket/4905 > > Already successfully tested locally and online. > > Here a quick example about

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread Andrea Giammarchi
P.S. obviously the jquery file should contain at the end parent rather than window ... is the only difference between jQuery and jQuery from a sandbox, once the patch will be applied ;-) On Wed, Jul 15, 2009 at 12:52 PM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > Done, ticket http:

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread Andrea Giammarchi
Done, ticket http://dev.jquery.com/ticket/4905 Already successfully tested locally and online. Here a quick example about how to obtain a jQuery from a sandbox without affecting anything around and being able to use jQuery in presence of other libraries such Prototype. *iframe src page* // rea

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread John Resig
Sure - sounds reasonable to me. --John On Wed, Jul 15, 2009 at 6:11 AM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > John, I just realized latest from trunk has a window variable and an > undefined one. > > I need to change the core.js file then to make window replacement > availab

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread Andrea Giammarchi
John, I just realized latest from trunk has a window variable and an undefined one. I need to change the core.js file then to make window replacement available. document = window.document, is that OK? On Wed, Jul 15, 2009 at 12:28 AM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > N

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread Andrea Giammarchi
Not now (I am with an USB pen without bandwidth allowed) ... I'll try tomorrow during lunch break. Cheers On Wed, Jul 15, 2009 at 12:19 AM, John Resig wrote: > Cool - could you file a bug along with a patch to src/intro.js > src/outro.js? Thanks! > > --John > > > > On Tue, Jul 14, 2009 at 7:04

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread John Resig
Cool - could you file a bug along with a patch to src/intro.js src/outro.js? Thanks! --John On Tue, Jul 14, 2009 at 7:04 PM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > It would be perfect, cause to build a sandbox version of jquery, if > necessary, the only file we need to change

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread Andrea Giammarchi
It would be perfect, cause to build a sandbox version of jquery, if necessary, the only file we need to change in the entire library is the last one, avoiding conflicts, side effects, and stress! :-) That parent.document || document was just my solution for my problem while this change will be rea

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread John Resig
As we discussed on IM, the parent.document || part would be untennable (since it would make all iframed copies of jQuery incapable of operating within the frame itself). Would the resulting change, (function(document){ })(document); be acceptable? --John On Tue, Jul 14, 2009 at 11:32 AM, An

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread Andrea Giammarchi
Solved: jQuery In A Sandbox Guys, forget all that crap I wrote precedent emails ... I did not think about a truly simple change that will not affect anything, will be extremely simple to maintain, and will make jQuery automatically "sandboxable" This is my latest snippet via Elsewhere: /

[jquery-dev] Re: Sandboxed Compatibility

2009-07-13 Thread Andrea Giammarchi
Last summary ... this code is the best I have tried so far but I still miss the jQuery init method cause I am forcing it via an array returned by Sizzle parent.jQuery = (function(){ function $jQuery(){}; function $(selector, context){ return init.call(new $jQuery, Sizzle(selector,

[jquery-dev] Re: Sandboxed Compatibility

2009-07-13 Thread Andrea Giammarchi
As quick update, I successfully tested this code from the sandbox: parent.jQuery = (function(){ var $ = Function(), document = parent.document, init = jQuery.fn.init, Sizzle = jQuery.find ; $.prototype = jQuery.fn; return function(selector, context){