[jquery-dev] Re: XPath for objects

2008-11-02 Thread Elijah Insua
Chris,

Yeah, I think MIT/GPL is the best scheme I've seen as it allows for two
similar yet very different levels of freedom.

I may need to contact Ariel to figure out the details, however when gpl
is used with a mit/gpl codebase there really isn't that big of a drawback.

I find it really exciting however that when I look for a solution, it has
already been made.

-- Elijah



On Sun, Nov 2, 2008 at 10:05 PM, chris thatcher <
[EMAIL PROTECTED]> wrote:

> no offense taken.  Which license is GPL only?  you mean jquery.collection
> ?  I'm really not very license savy.  I bet we could poke Ariel with a stick
> and see how he responds?  Is MIT/GPL the goal?
>
>
> On Sun, Nov 2, 2008 at 10:48 PM, Elijah Insua <[EMAIL PROTECTED]> wrote:
>
>> Chris,
>>
>> I do appreciate it! I guess i was just thinking out loud as I am currently
>> looking at providing the sources as BSD or MIT/GPL.  I mean no harm :)
>>
>> --Elijah
>>
>>
>> On Sun, Nov 2, 2008 at 8:56 PM, chris thatcher <
>> [EMAIL PROTECTED]> wrote:
>>
>>> ok, not really sure what you mean about 'maintain a scheme' and how open
>>> source prohibits that, but I was just trying to provide a helpful example.
>>> good luck!
>>>
>>> Thatcher
>>>
>>>
>>> On Sun, Nov 2, 2008 at 9:51 PM, Elijah Insua <[EMAIL PROTECTED]> wrote:
>>>
 sounds really cool, the only down side is the license.  I would like to
 maintain a scheme, and locking it to GPL seems inappropriate in my
 situation. hrm..

 -- Elijah


 On Sat, Nov 1, 2008 at 8:35 PM, chris thatcher <
 [EMAIL PROTECTED]> wrote:

> I posted a very bare bones project on github, jquery.jsonpath uses
> jquery.collection(Ariel Flesler flesler.blogspot.com), json2.js
> (JSON.org), and Stefan Goessner (goessner.net) jsonpath to provide a
> simple jquery-like selector engine for large javascript objects.  I'd like
> it to become a useful foundation for plugins that are 'template-centric', 
> eg
> i18n, capitalize, title, lorem ipsum, etc. Seems useful to me and very
> jquery-like thanks to jquery.collections.
>
> Cheers
>
> On Thu, Oct 30, 2008 at 10:10 AM, chris thatcher <
> [EMAIL PROTECTED]> wrote:
>
>> Becuase e4x has limited support in browsers, (firefox has awesome
>> support for it) I had started a plugin that used jsonpath (
>> http://goessner.net/articles/JsonPath/) and jquery.collection (
>> http://flesler.blogspot.com/2008/01/jquerycollection.html) together
>> to provide a jquery-like way to query large js objects.  The project got
>> dusty, mainly because it tried to cram too much functionality into it 
>> and it
>> became unwieldy.
>>
>> I'm going to take it off the shelf for a few hours this morning and
>> hack it down into a more useful core.  My personal goal for creating it 
>> is
>> to use it in templates and allow jquery-like plugins to add 
>> functionality to
>> it.
>>
>> If your curious I'll create a github project and post the code up
>> there.
>>
>> Thatcher
>>
>>
>> On Thu, Oct 30, 2008 at 9:55 AM, John Resig <[EMAIL PROTECTED]>wrote:
>>
>>>
>>> It sounds like what you're looking for is something like E4X:
>>> http://en.wikipedia.org/wiki/E4X
>>>
>>> Unfortunately it doesn't have very good browser support so it isn't
>>> used very frequently.
>>>
>>> --John
>>>
>>>
>>>
>>> On Thu, Oct 30, 2008 at 3:32 AM, Elijah Insua <[EMAIL PROTECTED]>
>>> wrote:
>>> > First Post!~
>>> >
>>> > What do you think about using the xpath engine for querying object
>>> > structures?
>>> > To my understanding the 'only' way to actually run xpath/xquery
>>> > functionality on
>>> > xml is to first convert it into an object.  Why not convert it into
>>> a
>>> > standard object
>>> > that can be queried generically?
>>> >
>>> > -- Elijah
>>> >
>>> > >
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Christopher Thatcher
>>
>
>
>
> --
> Christopher Thatcher
>
>
>



>>>
>>>
>>> --
>>> Christopher Thatcher
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Christopher Thatcher
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] append() evaluates script tags with non-script types

2008-11-02 Thread Zachary Carter

Using $(document).append(content) will strip out all script tags from
content and attempt to evaluate them. This throws errors when the
script tag contains content other than JavaScript, even when the type
attribute of the script tag is set appropriately. Normal browser
behavior is to ignore such content and not try to evaluate it, but
append() is inconsistent with this.

I added an exception for my specific case (text/html content for use
with John's micro-templating[1]) so the script tag would not be
stripped and I found no issues when appending (IE6/7/8b2 on IETester,
Chrome, FF3/2 linux, Opera 9.51 linux.)

It would be useful for append() to follow the behavior of browsers
regarding script tags and only attempt to evaluate scripts when the
type is missing or is a recognized script mime type (text/javascript
or application/javascript.)

Here was the patch I used:

--- jquery-1.2.6.js 2008-11-02 22:15:42.0 -0500
+++ jquery.patch-1.2.6.js   2008-11-02 22:25:49.0 -0500
@@ -508,7 +508,8 @@
this;

// execute all scripts after the elements have 
been injected
-   if ( jQuery.nodeName( elem, "script" ) )
+   if ( jQuery.nodeName( elem, "script" ) &&
+   ( !elem.type || elem.type == 
"text/javascript" || elem.type
== "application/javascript"))
scripts = scripts.add( elem );
else {
// Remove any inner scripts for later 
evaluation


[1]: http://ejohn.org/blog/javascript-micro-templating/

Best,

Zach Carter
http://zachcarter.info

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Bug in IE7 - Complains about Opera bindReady code in jquery

2008-11-02 Thread Gregoriusness

hey all,

I've got an issue with jQuery in IE7.  It is throwing the following
error:

Line: 2355
Error: Object doesn't support this property or method

Looking at jquery source (v1.2.6), on that line is the Opera condition
for the bindReady() event, ie:

if ( jQuery.browser.opera )
document.addEventListener( "DOMContentLoaded", function () {
if (jQuery.isReady) return;
for (var i = 0; i < document.styleSheets.length; i++)
if (document.styleSheets[i].disabled) {
setTimeout( arguments.callee, 0 );
return;
}
// and execute any waiting functions
jQuery.ready();
}, false);

If i comment out this block of code, all works fine (even in opera).

is this a known bug?  is there a workaround (besides what i've done)??

thanks heaps
greg


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: XPath for objects

2008-11-02 Thread chris thatcher
no offense taken.  Which license is GPL only?  you mean jquery.collection ?
I'm really not very license savy.  I bet we could poke Ariel with a stick
and see how he responds?  Is MIT/GPL the goal?

On Sun, Nov 2, 2008 at 10:48 PM, Elijah Insua <[EMAIL PROTECTED]> wrote:

> Chris,
>
> I do appreciate it! I guess i was just thinking out loud as I am currently
> looking at providing the sources as BSD or MIT/GPL.  I mean no harm :)
>
> --Elijah
>
>
> On Sun, Nov 2, 2008 at 8:56 PM, chris thatcher <
> [EMAIL PROTECTED]> wrote:
>
>> ok, not really sure what you mean about 'maintain a scheme' and how open
>> source prohibits that, but I was just trying to provide a helpful example.
>> good luck!
>>
>> Thatcher
>>
>>
>> On Sun, Nov 2, 2008 at 9:51 PM, Elijah Insua <[EMAIL PROTECTED]> wrote:
>>
>>> sounds really cool, the only down side is the license.  I would like to
>>> maintain a scheme, and locking it to GPL seems inappropriate in my
>>> situation. hrm..
>>>
>>> -- Elijah
>>>
>>>
>>> On Sat, Nov 1, 2008 at 8:35 PM, chris thatcher <
>>> [EMAIL PROTECTED]> wrote:
>>>
 I posted a very bare bones project on github, jquery.jsonpath uses
 jquery.collection(Ariel Flesler flesler.blogspot.com), json2.js
 (JSON.org), and Stefan Goessner (goessner.net) jsonpath to provide a
 simple jquery-like selector engine for large javascript objects.  I'd like
 it to become a useful foundation for plugins that are 'template-centric', 
 eg
 i18n, capitalize, title, lorem ipsum, etc. Seems useful to me and very
 jquery-like thanks to jquery.collections.

 Cheers

 On Thu, Oct 30, 2008 at 10:10 AM, chris thatcher <
 [EMAIL PROTECTED]> wrote:

> Becuase e4x has limited support in browsers, (firefox has awesome
> support for it) I had started a plugin that used jsonpath (
> http://goessner.net/articles/JsonPath/) and jquery.collection (
> http://flesler.blogspot.com/2008/01/jquerycollection.html) together to
> provide a jquery-like way to query large js objects.  The project got 
> dusty,
> mainly because it tried to cram too much functionality into it and it 
> became
> unwieldy.
>
> I'm going to take it off the shelf for a few hours this morning and
> hack it down into a more useful core.  My personal goal for creating it is
> to use it in templates and allow jquery-like plugins to add functionality 
> to
> it.
>
> If your curious I'll create a github project and post the code up
> there.
>
> Thatcher
>
>
> On Thu, Oct 30, 2008 at 9:55 AM, John Resig <[EMAIL PROTECTED]> wrote:
>
>>
>> It sounds like what you're looking for is something like E4X:
>> http://en.wikipedia.org/wiki/E4X
>>
>> Unfortunately it doesn't have very good browser support so it isn't
>> used very frequently.
>>
>> --John
>>
>>
>>
>> On Thu, Oct 30, 2008 at 3:32 AM, Elijah Insua <[EMAIL PROTECTED]>
>> wrote:
>> > First Post!~
>> >
>> > What do you think about using the xpath engine for querying object
>> > structures?
>> > To my understanding the 'only' way to actually run xpath/xquery
>> > functionality on
>> > xml is to first convert it into an object.  Why not convert it into
>> a
>> > standard object
>> > that can be queried generically?
>> >
>> > -- Elijah
>> >
>> > >
>> >
>>
>>
>>
>
>
> --
> Christopher Thatcher
>



 --
 Christopher Thatcher



>>>
>>>
>>>
>>
>>
>> --
>> Christopher Thatcher
>>
>>
>>
>
> >
>


-- 
Christopher Thatcher

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: XPath for objects

2008-11-02 Thread Elijah Insua
Chris,

I do appreciate it! I guess i was just thinking out loud as I am currently
looking at providing the sources as BSD or MIT/GPL.  I mean no harm :)

--Elijah

On Sun, Nov 2, 2008 at 8:56 PM, chris thatcher <
[EMAIL PROTECTED]> wrote:

> ok, not really sure what you mean about 'maintain a scheme' and how open
> source prohibits that, but I was just trying to provide a helpful example.
> good luck!
>
> Thatcher
>
>
> On Sun, Nov 2, 2008 at 9:51 PM, Elijah Insua <[EMAIL PROTECTED]> wrote:
>
>> sounds really cool, the only down side is the license.  I would like to
>> maintain a scheme, and locking it to GPL seems inappropriate in my
>> situation. hrm..
>>
>> -- Elijah
>>
>>
>> On Sat, Nov 1, 2008 at 8:35 PM, chris thatcher <
>> [EMAIL PROTECTED]> wrote:
>>
>>> I posted a very bare bones project on github, jquery.jsonpath uses
>>> jquery.collection(Ariel Flesler flesler.blogspot.com), json2.js
>>> (JSON.org), and Stefan Goessner (goessner.net) jsonpath to provide a
>>> simple jquery-like selector engine for large javascript objects.  I'd like
>>> it to become a useful foundation for plugins that are 'template-centric', eg
>>> i18n, capitalize, title, lorem ipsum, etc. Seems useful to me and very
>>> jquery-like thanks to jquery.collections.
>>>
>>> Cheers
>>>
>>> On Thu, Oct 30, 2008 at 10:10 AM, chris thatcher <
>>> [EMAIL PROTECTED]> wrote:
>>>
 Becuase e4x has limited support in browsers, (firefox has awesome
 support for it) I had started a plugin that used jsonpath (
 http://goessner.net/articles/JsonPath/) and jquery.collection (
 http://flesler.blogspot.com/2008/01/jquerycollection.html) together to
 provide a jquery-like way to query large js objects.  The project got 
 dusty,
 mainly because it tried to cram too much functionality into it and it 
 became
 unwieldy.

 I'm going to take it off the shelf for a few hours this morning and hack
 it down into a more useful core.  My personal goal for creating it is to 
 use
 it in templates and allow jquery-like plugins to add functionality to it.

 If your curious I'll create a github project and post the code up there.

 Thatcher


 On Thu, Oct 30, 2008 at 9:55 AM, John Resig <[EMAIL PROTECTED]> wrote:

>
> It sounds like what you're looking for is something like E4X:
> http://en.wikipedia.org/wiki/E4X
>
> Unfortunately it doesn't have very good browser support so it isn't
> used very frequently.
>
> --John
>
>
>
> On Thu, Oct 30, 2008 at 3:32 AM, Elijah Insua <[EMAIL PROTECTED]>
> wrote:
> > First Post!~
> >
> > What do you think about using the xpath engine for querying object
> > structures?
> > To my understanding the 'only' way to actually run xpath/xquery
> > functionality on
> > xml is to first convert it into an object.  Why not convert it into a
> > standard object
> > that can be queried generically?
> >
> > -- Elijah
> >
> > >
> >
>
>
>


 --
 Christopher Thatcher

>>>
>>>
>>>
>>> --
>>> Christopher Thatcher
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Christopher Thatcher
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: XPath for objects

2008-11-02 Thread chris thatcher
ok, not really sure what you mean about 'maintain a scheme' and how open
source prohibits that, but I was just trying to provide a helpful example.
good luck!

Thatcher

On Sun, Nov 2, 2008 at 9:51 PM, Elijah Insua <[EMAIL PROTECTED]> wrote:

> sounds really cool, the only down side is the license.  I would like to
> maintain a scheme, and locking it to GPL seems inappropriate in my
> situation. hrm..
>
> -- Elijah
>
>
> On Sat, Nov 1, 2008 at 8:35 PM, chris thatcher <
> [EMAIL PROTECTED]> wrote:
>
>> I posted a very bare bones project on github, jquery.jsonpath uses
>> jquery.collection(Ariel Flesler flesler.blogspot.com), json2.js
>> (JSON.org), and Stefan Goessner (goessner.net) jsonpath to provide a
>> simple jquery-like selector engine for large javascript objects.  I'd like
>> it to become a useful foundation for plugins that are 'template-centric', eg
>> i18n, capitalize, title, lorem ipsum, etc. Seems useful to me and very
>> jquery-like thanks to jquery.collections.
>>
>> Cheers
>>
>> On Thu, Oct 30, 2008 at 10:10 AM, chris thatcher <
>> [EMAIL PROTECTED]> wrote:
>>
>>> Becuase e4x has limited support in browsers, (firefox has awesome support
>>> for it) I had started a plugin that used jsonpath (
>>> http://goessner.net/articles/JsonPath/) and jquery.collection (
>>> http://flesler.blogspot.com/2008/01/jquerycollection.html) together to
>>> provide a jquery-like way to query large js objects.  The project got dusty,
>>> mainly because it tried to cram too much functionality into it and it became
>>> unwieldy.
>>>
>>> I'm going to take it off the shelf for a few hours this morning and hack
>>> it down into a more useful core.  My personal goal for creating it is to use
>>> it in templates and allow jquery-like plugins to add functionality to it.
>>>
>>> If your curious I'll create a github project and post the code up there.
>>>
>>> Thatcher
>>>
>>>
>>> On Thu, Oct 30, 2008 at 9:55 AM, John Resig <[EMAIL PROTECTED]> wrote:
>>>

 It sounds like what you're looking for is something like E4X:
 http://en.wikipedia.org/wiki/E4X

 Unfortunately it doesn't have very good browser support so it isn't
 used very frequently.

 --John



 On Thu, Oct 30, 2008 at 3:32 AM, Elijah Insua <[EMAIL PROTECTED]> wrote:
 > First Post!~
 >
 > What do you think about using the xpath engine for querying object
 > structures?
 > To my understanding the 'only' way to actually run xpath/xquery
 > functionality on
 > xml is to first convert it into an object.  Why not convert it into a
 > standard object
 > that can be queried generically?
 >
 > -- Elijah
 >
 > >
 >



>>>
>>>
>>> --
>>> Christopher Thatcher
>>>
>>
>>
>>
>> --
>> Christopher Thatcher
>>
>>
>>
>
> >
>


-- 
Christopher Thatcher

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: XPath for objects

2008-11-02 Thread Elijah Insua
sounds really cool, the only down side is the license.  I would like to
maintain a scheme, and locking it to GPL seems inappropriate in my
situation. hrm..

-- Elijah


On Sat, Nov 1, 2008 at 8:35 PM, chris thatcher <
[EMAIL PROTECTED]> wrote:

> I posted a very bare bones project on github, jquery.jsonpath uses
> jquery.collection(Ariel Flesler flesler.blogspot.com), json2.js
> (JSON.org), and Stefan Goessner (goessner.net) jsonpath to provide a
> simple jquery-like selector engine for large javascript objects.  I'd like
> it to become a useful foundation for plugins that are 'template-centric', eg
> i18n, capitalize, title, lorem ipsum, etc. Seems useful to me and very
> jquery-like thanks to jquery.collections.
>
> Cheers
>
> On Thu, Oct 30, 2008 at 10:10 AM, chris thatcher <
> [EMAIL PROTECTED]> wrote:
>
>> Becuase e4x has limited support in browsers, (firefox has awesome support
>> for it) I had started a plugin that used jsonpath (
>> http://goessner.net/articles/JsonPath/) and jquery.collection (
>> http://flesler.blogspot.com/2008/01/jquerycollection.html) together to
>> provide a jquery-like way to query large js objects.  The project got dusty,
>> mainly because it tried to cram too much functionality into it and it became
>> unwieldy.
>>
>> I'm going to take it off the shelf for a few hours this morning and hack
>> it down into a more useful core.  My personal goal for creating it is to use
>> it in templates and allow jquery-like plugins to add functionality to it.
>>
>> If your curious I'll create a github project and post the code up there.
>>
>> Thatcher
>>
>>
>> On Thu, Oct 30, 2008 at 9:55 AM, John Resig <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> It sounds like what you're looking for is something like E4X:
>>> http://en.wikipedia.org/wiki/E4X
>>>
>>> Unfortunately it doesn't have very good browser support so it isn't
>>> used very frequently.
>>>
>>> --John
>>>
>>>
>>>
>>> On Thu, Oct 30, 2008 at 3:32 AM, Elijah Insua <[EMAIL PROTECTED]> wrote:
>>> > First Post!~
>>> >
>>> > What do you think about using the xpath engine for querying object
>>> > structures?
>>> > To my understanding the 'only' way to actually run xpath/xquery
>>> > functionality on
>>> > xml is to first convert it into an object.  Why not convert it into a
>>> > standard object
>>> > that can be queried generically?
>>> >
>>> > -- Elijah
>>> >
>>> > >
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Christopher Thatcher
>>
>
>
>
> --
> Christopher Thatcher
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: jQuery's Data functions

2008-11-02 Thread Balazs Endresz

I've just made a small patch to Sizzle: http://jsbin.com/omipi/edit
It works like: Sizzle("div[data.foo.bar^=12]");
I first thought of using ":" too in the square brackets but i fear
that needs a bit more hacking with other regular expressions too, but
that would work better for sure.
Just for the record I haven't seen a selector engine till now but
looking at jQuery's current one and Peppy, well, I think that would be
a nightmare to implement something like this on those (especially with
Peppy), Sizzle seems to be incomparably better designed!

On Nov 2, 10:13 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> Seems fine to me. The ideal place for it would be inside $.expr[':']
> but I'm not sure it fits.
>
> $('*:data(foo)')
>
> No place for the value. The other option (requires modifying/
> overloading the core) would be:
>
> $('*[:foo=bar]')
>
> Where those ':' are some random character that identifies this. As a
> generic solution, I think we could add another $.expr for characters
> on this place.
> So.. one could do (f.e)
>
> $('*[~padding=0px]')
>
> As a random way of selecting by style properties. Hopefully Sizzle
> will allow this easily.
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com/
>
> On Nov 2, 3:28 am, Danny <[EMAIL PROTECTED]> wrote:
>
> > I was recently having a discussion with a fellow developer who was
> > writing code that set custom html attributes to various nodes to save
> > information that'd be required later when working with them.
> > I asked him why he wasn't using jquery's built-in support, Data for
> > storing that information in the nodes. He responded saying, he
> > woulnd't be able to use jquery's selectors to query against the dom.
> > $("div[custId=5]")  //etc.
>
> > That made me wonder, why isn't there some sort of support for querying
> > the values in the jquery.data from within a selector.  I'm aware I
> > could write a whole .filter(...) function but thats extrodinarily
> > wordy and defeat the purpose.
>
> > I was wondering what others thought of this, and how useful the data
> > functionality is to them in this regard.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: New Selector Engine Patch

2008-11-02 Thread Sam Collett
If Sizzle is likely to be included in multiple projects wouldn't duplication
occur (i.e. jQuery and TinyMCE on the same page)? Or would you include
Sizzle then the libraries, e.g.
js/sizzle.js
js/jquery.js
js/tinymce.js

Sizzle sounds like it will be of a benefit to many developers, even those
that don't use jQuery.

-Sam

2008/11/1 John Resig <[EMAIL PROTECTED]>

>
> Hey Everyone -
>
> I've been working on a new selector engine for jQuery on-and-off again
> these past couple months and I finally have something ready to land:
> http://dev.jquery.com/ticket/3563
>
> I've been working on the code for this project over here:
> http://github.com/jeresig/sizzle/tree/master
>
> (The end goal is to have this become the new default selector engine
> in a number of libraries - Prototype, MochiKit, Dojo, and TinyMCE have
> all expressed interest in using it, as well.)
>
> It passes the test suite in Firefox 3, Safari 3.1, and IE 6. There is
> one minor bug in Firefox 3.1 and another minor one in Opera 9.6 - both
> of which are specific browser bugs (and I'm filing appropriately) and
> neither of which are show stoppers.
>
> It's a considerable boost in performance over what we have now, in
> jQuery. I'll go into specific details later (once we're sure that
> there's no major bugs).
>
> Let me know if you have any questions and I'll be happy to answer them
> (although I'll be going out of town tomorrow for a week).
>
> --John
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: jQuery's Data functions

2008-11-02 Thread Ariel Flesler

Seems fine to me. The ideal place for it would be inside $.expr[':']
but I'm not sure it fits.

$('*:data(foo)')

No place for the value. The other option (requires modifying/
overloading the core) would be:

$('*[:foo=bar]')

Where those ':' are some random character that identifies this. As a
generic solution, I think we could add another $.expr for characters
on this place.
So.. one could do (f.e)

$('*[~padding=0px]')

As a random way of selecting by style properties. Hopefully Sizzle
will allow this easily.

--
Ariel Flesler
http://flesler.blogspot.com/

On Nov 2, 3:28 am, Danny <[EMAIL PROTECTED]> wrote:
> I was recently having a discussion with a fellow developer who was
> writing code that set custom html attributes to various nodes to save
> information that'd be required later when working with them.
> I asked him why he wasn't using jquery's built-in support, Data for
> storing that information in the nodes. He responded saying, he
> woulnd't be able to use jquery's selectors to query against the dom.
> $("div[custId=5]")  //etc.
>
> That made me wonder, why isn't there some sort of support for querying
> the values in the jquery.data from within a selector.  I'm aware I
> could write a whole .filter(...) function but thats extrodinarily
> wordy and defeat the purpose.
>
> I was wondering what others thought of this, and how useful the data
> functionality is to them in this regard.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Object tag problem -- when is it going to be fixed?

2008-11-02 Thread Ariel Flesler

Yeah, we already have like 3-4 tickets on that part.
We'll handle that asap.

On Sun, Nov 2, 2008 at 5:39 PM, Valentin <[EMAIL PROTECTED]> wrote:
>
> You don't get it. Using the .Render() function is one issue (the minor
> one I might add).
> The important issue is that you can't do something as simple as
>
> $('object').hide() (say to hide all the objects on the page)
>
> You basically can't do anything with $('object') ...
>
> On Oct 31, 12:47 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>> Now that I look at this again... it simply doesn't fit the way we've
>> been doing things until now.
>>
>> No one that has used jQuery for a while expects something like this to
>> work:
>>
>> $('div').appendChild( blah );
>>
>> The jQuery object is simply different from its contained items. It
>> exposes some methods to control them but doesn't mean it "mirrors"
>> them.
>>
>> One can always add the Render function as a plugin, or as part of the
>> final implementation.
>>
>> --
>> Ariel Fleslerhttp://flesler.blogspot.com
>>
>> On Oct 30, 5:03 am, "Andrea Giammarchi" <[EMAIL PROTECTED]>
>> wrote:
>>
>> > Yes, the summary is this: $('object')[0].Render();
>> > but Valentin probably expect same call for every matched object like:
>>
>> > $('object').each(function(){this.Render()});
>>
>> > sounds weird to me, but could be useful in some case, the problem is the
>> > returned value witn a $('object').Render() or $('object').TCallLabel() ...
>> > one result, an arry with every result for each index, or jQuery itself?
>>
>> > The specific plugin should be simple in every case, but we miss the 
>> > expected
>> > behavior ... Valentin?
>>
>> > On Thu, Oct 30, 2008 at 1:42 AM, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>>
>> > > Definitely not something to add to the core, but easily doable with a
>> > > plugin by overloading $.fn.init or by simply adding to $.fn.
>>
>> > > I haven't interacted with stuff like that, but if I'm not wrong, the
>> > > gral pattern for this stuff would be something like:
>> > > $('object')[0].Render();
>>
>> > > It's the first I see such an idea of adding methods to a jQuery object
>> > > to handle specific elements inside it...
>> > > Still.. why not ?
>>
>> > > One idea, what about using/adding the object's id as jquery cache's
>> > > id ? It can't be just a number so no conflict can arise.
>> > > Problem is, we're modifying the environment what we usually don't do.
>>
>> > > --
>> > > Ariel Flesler
>> > >http://flesler.blogspot.com/
>>
>> > > On Oct 29, 7:58 pm, "Andrea Giammarchi" <[EMAIL PROTECTED]>
>> > > wrote:
>> > > > $('#id_of_object').Render()
>>
>> > > > really interesting problem, I am thinking about JS to Flash dedicated
>> > > > functions as well.
>>
>> > > > Since there is a __defineGetter__ or a watch that work pretty well but
>> > > does
>> > > > not make sense in IE, I think the core should be check if the element
>> > > > nodeName is an object and in that case assign a list of "fake 
>> > > > functions"
>> > > > that invokes a specific one able to manage every case.
>>
>> > > > As example, the returned jQuery ArrayObject, if the element is an 
>> > > > object,
>> > > > should contain functions like:
>> > > > Render:function(){
>> > > > return objectCallback.call(this, 'Render', arguments);},
>>
>> > > > TCallLabel**:function(){
>> > > > return objectCallback.call(this, 'TCallLabel**', arguments);}
>>
>> > > > and so on, with those functions pre defined externally to avoid 
>> > > > creation
>> > > of
>> > > > hundreds of functions that do the same every time.
>>
>> > > > the objectCallback function should be something like
>> > > > function objectCallback(fnName, arguments){
>> > > > return this[0][fnName].apply(this[0], arguments || []);
>>
>> > > > }
>>
>> > > > this means prepare the core to accept every kind of calable method for
>> > > > video, object, applet, whatever tag ... so I suppose it should be 
>> > > > better
>> > > to
>> > > > let people be able to implement what they need, creating specific 
>> > > > plugins
>> > > > for every kind of tag.
>>
>> > > > Is my idea that bad?
>>
>> > > > Regards
>>
>> > > > On Wed, Oct 29, 2008 at 8:01 PM, Valentin <[EMAIL PROTECTED]
>> > > >wrote:
>>
>> > > > > John,
>>
>> > > > > Thansk for the quick answer. On my testing environment I've applied
>> > > > > the "patch" described in the bug ticket (the last two posts) and that
>> > > > > took away the error on the unload. Still everything else remains
>> > > > > there. The funny thing is that I discovered this morning that I can
>> > > > > select an object with the following clause
>>
>> > > > > $('object#id_of_object') and the properties work on Firefox then
>> > > > > (hide, show etc.)
>>
>> > > > > If I try $('#id_of_object') this doesn't work.
>>
>> > > > > Anyway, is there a time-table for the next version of the Jquery that
>> > > > > addresses (at least part of) these issues?
>>
>> > > > > On Oct 29, 10:01 am, "John Resig" <[EMAIL PROTECTED]> wrote:
>> > > > >

[jquery-dev] Re: Object tag problem -- when is it going to be fixed?

2008-11-02 Thread Jeffrey Kretz

What you're saying makes sense, but I personally have gotten used to
wrapping an  in a div and applying DOM manipulation to the DIV
itself.

I've filed it in my brain in the same place where the other cross-browser
problems go, like IE6//z-index.

I think a full resolution would be great, but it doesn't seem like a
show-stopper to me.

Just my $0.02.

JK

-Original Message-
From: jquery-dev@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Valentin
Sent: Sunday, November 02, 2008 11:40 AM
To: jQuery Development
Subject: [jquery-dev] Re: Object tag problem -- when is it going to be
fixed?


You don't get it. Using the .Render() function is one issue (the minor
one I might add).
The important issue is that you can't do something as simple as

$('object').hide() (say to hide all the objects on the page)

You basically can't do anything with $('object') ...

On Oct 31, 12:47 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> Now that I look at this again... it simply doesn't fit the way we've
> been doing things until now.
>
> No one that has used jQuery for a while expects something like this to
> work:
>
> $('div').appendChild( blah );
>
> The jQuery object is simply different from its contained items. It
> exposes some methods to control them but doesn't mean it "mirrors"
> them.
>
> One can always add the Render function as a plugin, or as part of the
> final implementation.
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com
>
> On Oct 30, 5:03 am, "Andrea Giammarchi" <[EMAIL PROTECTED]>
> wrote:
>
> > Yes, the summary is this: $('object')[0].Render();
> > but Valentin probably expect same call for every matched object like:
>
> > $('object').each(function(){this.Render()});
>
> > sounds weird to me, but could be useful in some case, the problem is the
> > returned value witn a $('object').Render() or $('object').TCallLabel()
...
> > one result, an arry with every result for each index, or jQuery itself?
>
> > The specific plugin should be simple in every case, but we miss the
expected
> > behavior ... Valentin?
>
> > On Thu, Oct 30, 2008 at 1:42 AM, Ariel Flesler <[EMAIL PROTECTED]>
wrote:
>
> > > Definitely not something to add to the core, but easily doable with a
> > > plugin by overloading $.fn.init or by simply adding to $.fn.
>
> > > I haven't interacted with stuff like that, but if I'm not wrong, the
> > > gral pattern for this stuff would be something like:
> > > $('object')[0].Render();
>
> > > It's the first I see such an idea of adding methods to a jQuery object
> > > to handle specific elements inside it...
> > > Still.. why not ?
>
> > > One idea, what about using/adding the object's id as jquery cache's
> > > id ? It can't be just a number so no conflict can arise.
> > > Problem is, we're modifying the environment what we usually don't do.
>
> > > --
> > > Ariel Flesler
> > >http://flesler.blogspot.com/
>
> > > On Oct 29, 7:58 pm, "Andrea Giammarchi" <[EMAIL PROTECTED]>
> > > wrote:
> > > > $('#id_of_object').Render()
>
> > > > really interesting problem, I am thinking about JS to Flash
dedicated
> > > > functions as well.
>
> > > > Since there is a __defineGetter__ or a watch that work pretty well
but
> > > does
> > > > not make sense in IE, I think the core should be check if the
element
> > > > nodeName is an object and in that case assign a list of "fake
functions"
> > > > that invokes a specific one able to manage every case.
>
> > > > As example, the returned jQuery ArrayObject, if the element is an
object,
> > > > should contain functions like:
> > > > Render:function(){
> > > >     return objectCallback.call(this, 'Render', arguments);},
>
> > > > TCallLabel**:function(){
> > > >     return objectCallback.call(this, 'TCallLabel**', arguments);}
>
> > > > and so on, with those functions pre defined externally to avoid
creation
> > > of
> > > > hundreds of functions that do the same every time.
>
> > > > the objectCallback function should be something like
> > > > function objectCallback(fnName, arguments){
> > > >     return this[0][fnName].apply(this[0], arguments || []);
>
> > > > }
>
> > > > this means prepare the core to accept every kind of calable method
for
> > > > video, object, applet, whatever tag ... so I suppose it should be
better
> > > to
> > > > let people be able to implement what they need, creating specific
plugins
> > > > for every kind of tag.
>
> > > > Is my idea that bad?
>
> > > > Regards
>
> > > > On Wed, Oct 29, 2008 at 8:01 PM, Valentin
<[EMAIL PROTECTED]
> > > >wrote:
>
> > > > > John,
>
> > > > > Thansk for the quick answer. On my testing environment I've
applied
> > > > > the "patch" described in the bug ticket (the last two posts) and
that
> > > > > took away the error on the unload. Still everything else remains
> > > > > there. The funny thing is that I discovered this morning that I
can
> > > > > select an object with the following clause
>
> > > > > $('object#id_of_object') and the properties work on Firefox then
> > > > > (hide, show etc.)

[jquery-dev] Re: ajax.js:httpdData patch for failing JSON eval()

2008-11-02 Thread Andrea Giammarchi
fale is a JSON valid result, I would return undefined that in JSON should
never exist as case.

It's not the first time I return true or false from the server, and a false
positive like false (sorry for the concept) will mess up a lot of requestes
without a reason.



On Sun, Nov 2, 2008 at 6:21 PM, Rick Strahl <[EMAIL PROTECTED]> wrote:

>
> Wouldn't it be better to return the Exception object (or something
> that you can test for anyway)?
>
> Otherwise I'd argue that the exception thrown by a failed eval is a
> better choice than returning false.
>
> +++ Rick ---
>
>
> On Oct 31, 3:22 pm, Rob Manson <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > not sure if you're happy for patches to be posted directly here...so
> > feel free to tell me where to patch it 8)
> >
> > roBman
> >
> > BUG:
> > httpData: function in ajax.js (used by getJSON() calls or get() calls
> > where type == "json") doesn't currently test the eval is successful.
> >
> > e.g. it just assumes that valid JSON was returned and eval will succeed,
> > silently failing if this is the case.
> >
> > FIX:
> > Here's a patch to bring it in line with the other functions above.
> >
> > e.g. httpSuccess and httpNotModified
> >
> > NOTE: Let me know if there's a more "preferred" way to handle this error
> >
> > DIFF against 1.2.6 from svn:
> > Index: src/ajax.js
> > ===
> > --- src/ajax.js (revision 5918)
> > +++ src/ajax.js (working copy)
> > @@ -478,9 +478,12 @@
> >
> > // Get the JavaScript object, if JSON is used.
> > if ( type == "json" )
> > -   data = eval("(" + data + ")");
> > -
> > -   return data;
> > +   // Check to make sure the JSON returned evaluates
> correctly
> > +   try {
> > +   data = eval("(" + data + ")");
> > +   return data;
> > +   } catch(e) {}
> > +   return false;
> > },
> >
> > // Serialize an array of form elements or a set of
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: Object tag problem -- when is it going to be fixed?

2008-11-02 Thread Valentin

You don't get it. Using the .Render() function is one issue (the minor
one I might add).
The important issue is that you can't do something as simple as

$('object').hide() (say to hide all the objects on the page)

You basically can't do anything with $('object') ...

On Oct 31, 12:47 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> Now that I look at this again... it simply doesn't fit the way we've
> been doing things until now.
>
> No one that has used jQuery for a while expects something like this to
> work:
>
> $('div').appendChild( blah );
>
> The jQuery object is simply different from its contained items. It
> exposes some methods to control them but doesn't mean it "mirrors"
> them.
>
> One can always add the Render function as a plugin, or as part of the
> final implementation.
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com
>
> On Oct 30, 5:03 am, "Andrea Giammarchi" <[EMAIL PROTECTED]>
> wrote:
>
> > Yes, the summary is this: $('object')[0].Render();
> > but Valentin probably expect same call for every matched object like:
>
> > $('object').each(function(){this.Render()});
>
> > sounds weird to me, but could be useful in some case, the problem is the
> > returned value witn a $('object').Render() or $('object').TCallLabel() ...
> > one result, an arry with every result for each index, or jQuery itself?
>
> > The specific plugin should be simple in every case, but we miss the expected
> > behavior ... Valentin?
>
> > On Thu, Oct 30, 2008 at 1:42 AM, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
> > > Definitely not something to add to the core, but easily doable with a
> > > plugin by overloading $.fn.init or by simply adding to $.fn.
>
> > > I haven't interacted with stuff like that, but if I'm not wrong, the
> > > gral pattern for this stuff would be something like:
> > > $('object')[0].Render();
>
> > > It's the first I see such an idea of adding methods to a jQuery object
> > > to handle specific elements inside it...
> > > Still.. why not ?
>
> > > One idea, what about using/adding the object's id as jquery cache's
> > > id ? It can't be just a number so no conflict can arise.
> > > Problem is, we're modifying the environment what we usually don't do.
>
> > > --
> > > Ariel Flesler
> > >http://flesler.blogspot.com/
>
> > > On Oct 29, 7:58 pm, "Andrea Giammarchi" <[EMAIL PROTECTED]>
> > > wrote:
> > > > $('#id_of_object').Render()
>
> > > > really interesting problem, I am thinking about JS to Flash dedicated
> > > > functions as well.
>
> > > > Since there is a __defineGetter__ or a watch that work pretty well but
> > > does
> > > > not make sense in IE, I think the core should be check if the element
> > > > nodeName is an object and in that case assign a list of "fake functions"
> > > > that invokes a specific one able to manage every case.
>
> > > > As example, the returned jQuery ArrayObject, if the element is an 
> > > > object,
> > > > should contain functions like:
> > > > Render:function(){
> > > >     return objectCallback.call(this, 'Render', arguments);},
>
> > > > TCallLabel**:function(){
> > > >     return objectCallback.call(this, 'TCallLabel**', arguments);}
>
> > > > and so on, with those functions pre defined externally to avoid creation
> > > of
> > > > hundreds of functions that do the same every time.
>
> > > > the objectCallback function should be something like
> > > > function objectCallback(fnName, arguments){
> > > >     return this[0][fnName].apply(this[0], arguments || []);
>
> > > > }
>
> > > > this means prepare the core to accept every kind of calable method for
> > > > video, object, applet, whatever tag ... so I suppose it should be better
> > > to
> > > > let people be able to implement what they need, creating specific 
> > > > plugins
> > > > for every kind of tag.
>
> > > > Is my idea that bad?
>
> > > > Regards
>
> > > > On Wed, Oct 29, 2008 at 8:01 PM, Valentin <[EMAIL PROTECTED]
> > > >wrote:
>
> > > > > John,
>
> > > > > Thansk for the quick answer. On my testing environment I've applied
> > > > > the "patch" described in the bug ticket (the last two posts) and that
> > > > > took away the error on the unload. Still everything else remains
> > > > > there. The funny thing is that I discovered this morning that I can
> > > > > select an object with the following clause
>
> > > > > $('object#id_of_object') and the properties work on Firefox then
> > > > > (hide, show etc.)
>
> > > > > If I try $('#id_of_object') this doesn't work.
>
> > > > > Anyway, is there a time-table for the next version of the Jquery that
> > > > > addresses (at least part of) these issues?
>
> > > > > On Oct 29, 10:01 am, "John Resig" <[EMAIL PROTECTED]> wrote:
> > > > > > I definitely agree that this is a big issue. We've discussed this
> > > > > > before but were unclear as to the ramifications of not attaching
> > > > > > anything to these specific elements. Although since code is breaking
> > > > > > it definitely takes a high priority for us.
>
> > > > > > I'm not sure if the 

[jquery-dev] Re: ajax.js:httpdData patch for failing JSON eval()

2008-11-02 Thread Rick Strahl

Wouldn't it be better to return the Exception object (or something
that you can test for anyway)?

Otherwise I'd argue that the exception thrown by a failed eval is a
better choice than returning false.

+++ Rick ---


On Oct 31, 3:22 pm, Rob Manson <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> not sure if you're happy for patches to be posted directly here...so
> feel free to tell me where to patch it 8)
>
> roBman
>
> BUG:
> httpData: function in ajax.js (used by getJSON() calls or get() calls
> where type == "json") doesn't currently test the eval is successful.
>
> e.g. it just assumes that valid JSON was returned and eval will succeed,
> silently failing if this is the case.
>
> FIX:
> Here's a patch to bring it in line with the other functions above.
>
> e.g. httpSuccess and httpNotModified
>
> NOTE: Let me know if there's a more "preferred" way to handle this error
>
> DIFF against 1.2.6 from svn:
> Index: src/ajax.js
> ===
> --- src/ajax.js (revision 5918)
> +++ src/ajax.js (working copy)
> @@ -478,9 +478,12 @@
>
>                 // Get the JavaScript object, if JSON is used.
>                 if ( type == "json" )
> -                       data = eval("(" + data + ")");
> -
> -               return data;
> +                       // Check to make sure the JSON returned evaluates 
> correctly
> +                       try {
> +                               data = eval("(" + data + ")");
> +                               return data;
> +                       } catch(e) {}
> +                       return false;
>         },
>
>         // Serialize an array of form elements or a set of
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: jQuery's Data functions

2008-11-02 Thread Anthony Johnston

I like this idea too
How about prefix the data name with "data:" or something so that jquery
knows only to check the data if the prefix is there, so you don't slow other
selections down and allow for data names that are standard html attributes

Ant

-Original Message-
From: jquery-dev@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Danny
Sent: 02 November 2008 05:28
To: jQuery Development
Subject: [jquery-dev] jQuery's Data functions


I was recently having a discussion with a fellow developer who was
writing code that set custom html attributes to various nodes to save
information that'd be required later when working with them.
I asked him why he wasn't using jquery's built-in support, Data for
storing that information in the nodes. He responded saying, he
woulnd't be able to use jquery's selectors to query against the dom.
$("div[custId=5]")  //etc.

That made me wonder, why isn't there some sort of support for querying
the values in the jquery.data from within a selector.  I'm aware I
could write a whole .filter(...) function but thats extrodinarily
wordy and defeat the purpose.

I was wondering what others thought of this, and how useful the data
functionality is to them in this regard.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] jQuery's Data functions

2008-11-02 Thread Danny

I was recently having a discussion with a fellow developer who was
writing code that set custom html attributes to various nodes to save
information that'd be required later when working with them.
I asked him why he wasn't using jquery's built-in support, Data for
storing that information in the nodes. He responded saying, he
woulnd't be able to use jquery's selectors to query against the dom.
$("div[custId=5]")  //etc.

That made me wonder, why isn't there some sort of support for querying
the values in the jquery.data from within a selector.  I'm aware I
could write a whole .filter(...) function but thats extrodinarily
wordy and defeat the purpose.

I was wondering what others thought of this, and how useful the data
functionality is to them in this regard.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: ajax.js:httpdData patch for failing JSON eval()

2008-11-02 Thread Elijah Insua
I agree, if there is an exception it is probably better to just use it.

On Sun, Nov 2, 2008 at 8:36 AM, Ariel Flesler <[EMAIL PROTECTED]> wrote:

>
> Returning false seems to me like the same as making it die silently.
>
> I'd rather let the error go up, or throw our own error.
>
> --
> Ariel Flesler
> http://flesler.blogspot.com
>
> On Oct 31, 11:22 pm, Rob Manson <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > not sure if you're happy for patches to be posted directly here...so
> > feel free to tell me where to patch it 8)
> >
> > roBman
> >
> > BUG:
> > httpData: function in ajax.js (used by getJSON() calls or get() calls
> > where type == "json") doesn't currently test the eval is successful.
> >
> > e.g. it just assumes that valid JSON was returned and eval will succeed,
> > silently failing if this is the case.
> >
> > FIX:
> > Here's a patch to bring it in line with the other functions above.
> >
> > e.g. httpSuccess and httpNotModified
> >
> > NOTE: Let me know if there's a more "preferred" way to handle this error
> >
> > DIFF against 1.2.6 from svn:
> > Index: src/ajax.js
> > ===
> > --- src/ajax.js (revision 5918)
> > +++ src/ajax.js (working copy)
> > @@ -478,9 +478,12 @@
> >
> > // Get the JavaScript object, if JSON is used.
> > if ( type == "json" )
> > -   data = eval("(" + data + ")");
> > -
> > -   return data;
> > +   // Check to make sure the JSON returned evaluates
> correctly
> > +   try {
> > +   data = eval("(" + data + ")");
> > +   return data;
> > +   } catch(e) {}
> > +   return false;
> > },
> >
> > // Serialize an array of form elements or a set of
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: ajax.js:httpdData patch for failing JSON eval()

2008-11-02 Thread Ariel Flesler

Returning false seems to me like the same as making it die silently.

I'd rather let the error go up, or throw our own error.

--
Ariel Flesler
http://flesler.blogspot.com

On Oct 31, 11:22 pm, Rob Manson <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> not sure if you're happy for patches to be posted directly here...so
> feel free to tell me where to patch it 8)
>
> roBman
>
> BUG:
> httpData: function in ajax.js (used by getJSON() calls or get() calls
> where type == "json") doesn't currently test the eval is successful.
>
> e.g. it just assumes that valid JSON was returned and eval will succeed,
> silently failing if this is the case.
>
> FIX:
> Here's a patch to bring it in line with the other functions above.
>
> e.g. httpSuccess and httpNotModified
>
> NOTE: Let me know if there's a more "preferred" way to handle this error
>
> DIFF against 1.2.6 from svn:
> Index: src/ajax.js
> ===
> --- src/ajax.js (revision 5918)
> +++ src/ajax.js (working copy)
> @@ -478,9 +478,12 @@
>
>                 // Get the JavaScript object, if JSON is used.
>                 if ( type == "json" )
> -                       data = eval("(" + data + ")");
> -
> -               return data;
> +                       // Check to make sure the JSON returned evaluates 
> correctly
> +                       try {
> +                               data = eval("(" + data + ")");
> +                               return data;
> +                       } catch(e) {}
> +                       return false;
>         },
>
>         // Serialize an array of form elements or a set of
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---



[jquery-dev] Re: New Selector Engine Patch

2008-11-02 Thread weepy

IE7
==

Tests completed in 1328 milliseconds.
4 tests of 153 failed.

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)

1. selector module: element (1, 8, 9)
2. Select all elements, no comment nodes

5. selector module: class (3, 13, 16)
12. Escaped Class (.test\.foo\[5\]bar) expected:
[ span#test.foo[5]bar ] result: [  ]
14. Descendant scaped Class (div .test\.foo\[5\]bar) expected:
[ span#test.foo[5]bar ] result: [  ]
16. Child escaped Class (form > .test\.foo\[5\]bar) expected:
[ span#test.foo[5]bar ] result: [  ]


weepy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~--~~~~--~~--~--~---