Re: firebug regression: console.log(jQuery('div')) less useful
On Jan 1, 10:10 pm, Danny wrote: > Has anyone else using jQuery noticed that Firebug before 1.2 would > treat console.log(jQuery('div')) as an array and list all the matched > elements on the console, so you could mouse over the list and > highlight the elements, or right-click and scroll into view etc., but > now it just lists "Object length=13" and you need to click on that, > then you get a vertical list that you need to scroll through. The old > way was more helpful, I think. Now that we know this is working as designed, I'll point out that a Firebug extension can add new rules for formatting objects. For example there could be a jquery extension that formats the result of jQuery() in nice ways. The extension would create a 'Firebug.Rep', requiring an object identification method "supportsObject" that returns true if the argument is handled by the 'rep' and a domplate 'tag' to define the output. The Firebug.Rep is registered with Firebug and that's it. The hard part is the domplate, see http://code.google.com/p/domplate/ http://www.softwareishard.com/blog/planet-mozilla/domplate-examples-part-i/ jjb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
In 1.4a12 I get >>>({splice:[].splice, length:2, '0':0, '1':1, '2':2}) [0, 1] On Jan 3, 11:14 am, "Garrett Smith" wrote: > On Sat, Jan 3, 2009 at 8:54 AM, John J Barton > > wrote: > > > Sorry, I was just trying to summarize. The actual test is: > > if (isFinite(obj.length) && typeof obj.splice === 'function') > > >>> ({splice:[].splice, length:2, '0':0, '1':1, '2':2}) > Object length=2 > > and: > > typeof ({splice:[].splice, length:2, '0':0, '1':1, '2':2}).splice === > 'function' > > is of course true. > > Garrett > > > > > On Jan 3, 8:22 am, "Brian Di Palma" wrote: > >> That's not an Array it's an object. For a native Array length is controlled > >> for you and splice() is provided to you. > > >> [] === Array > > >> {} === Object > > >> On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith > >> wrote: > > >> > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton > >> > wrote: > > >> > > Any Javascript object with 'length' and 'splice' should format as an > >> > > array. If not please report a bug. > > >> > Using Firebug 1.2.1, an object with properties |length| and |splice| > >> > is not formatted the same as an Array. > >> > Example: > >> > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) > >> > Object splice=1 length=2 > >> > >>> [0,1,2] > >> > 0,1,2 > > >> > Please describe how an array is to be formatted so that a bug can be > >> > filed. > > >> > Thanks, > > >> > Garrett > > >> > > jjb > > >> > > On Jan 2, 11:09 am, Danny wrote: > >> > >> Thanks; that makes sense. But Firebug also changed the way it displays > >> > >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays > >> > >> that contain objects are displayed as "Object". console.dir() helps, > >> > >> but it was nice to have it all in one line. > > >> > >> Danny > > >> > >> On Jan 2, 12:46 pm, John J Barton wrote: > > >> > >> > jQuery('div') is not an array. It has length but not splice. So > >> > >> > Firebug does not format it as an array. > > >> > >> > In Javascript, the line between what is an array and what is not an > >> > >> > array is unclear. After many versions the current test in Firebug > >> > >> > requires an array to have 'length' and 'splice'. Earlier versions of > >> > >> > Firebug only required 'length', but that caused some objects to be > >> > >> > formatted as arrays that did not have numerical indexes. > > >> > >> > jjb > > >> > >> > On Jan 1, 10:10 pm, Danny wrote: > > >> > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 would > >> > >> > > treat console.log(jQuery('div')) as an array and list all the > >> > matched > >> > >> > > elements on the console, so you could mouse over the list and > >> > >> > > highlight the elements, or right-click and scroll into view etc., > >> > but > >> > >> > > now it just lists "Object length=13" and you need to click on > >> > >> > > that, > >> > >> > > then you get a vertical list that you need to scroll through. The > >> > old > >> > >> > > way was more helpful, I think. > > >> > >> > > Workaround: console.log.apply(console, jQuery('div').get()) comes > >> > >> > > close to reproducing the old behavior. > > >> > >> > > I'll crosspost this on the jQuery list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
On Sat, Jan 3, 2009 at 8:54 AM, John J Barton wrote: > > Sorry, I was just trying to summarize. The actual test is: > if (isFinite(obj.length) && typeof obj.splice === 'function') > >>> ({splice:[].splice, length:2, '0':0, '1':1, '2':2}) Object length=2 and: typeof ({splice:[].splice, length:2, '0':0, '1':1, '2':2}).splice === 'function' is of course true. Garrett > > On Jan 3, 8:22 am, "Brian Di Palma" wrote: >> That's not an Array it's an object. For a native Array length is controlled >> for you and splice() is provided to you. >> >> [] === Array >> >> {} === Object >> >> On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith wrote: >> >> >> >> > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton >> > wrote: >> >> > > Any Javascript object with 'length' and 'splice' should format as an >> > > array. If not please report a bug. >> >> > Using Firebug 1.2.1, an object with properties |length| and |splice| >> > is not formatted the same as an Array. >> > Example: >> > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) >> > Object splice=1 length=2 >> > >>> [0,1,2] >> > 0,1,2 >> >> > Please describe how an array is to be formatted so that a bug can be filed. >> >> > Thanks, >> >> > Garrett >> >> > > jjb >> >> > > On Jan 2, 11:09 am, Danny wrote: >> > >> Thanks; that makes sense. But Firebug also changed the way it displays >> > >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays >> > >> that contain objects are displayed as "Object". console.dir() helps, >> > >> but it was nice to have it all in one line. >> >> > >> Danny >> >> > >> On Jan 2, 12:46 pm, John J Barton wrote: >> >> > >> > jQuery('div') is not an array. It has length but not splice. So >> > >> > Firebug does not format it as an array. >> >> > >> > In Javascript, the line between what is an array and what is not an >> > >> > array is unclear. After many versions the current test in Firebug >> > >> > requires an array to have 'length' and 'splice'. Earlier versions of >> > >> > Firebug only required 'length', but that caused some objects to be >> > >> > formatted as arrays that did not have numerical indexes. >> >> > >> > jjb >> >> > >> > On Jan 1, 10:10 pm, Danny wrote: >> >> > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 would >> > >> > > treat console.log(jQuery('div')) as an array and list all the >> > matched >> > >> > > elements on the console, so you could mouse over the list and >> > >> > > highlight the elements, or right-click and scroll into view etc., >> > but >> > >> > > now it just lists "Object length=13" and you need to click on that, >> > >> > > then you get a vertical list that you need to scroll through. The >> > old >> > >> > > way was more helpful, I think. >> >> > >> > > Workaround: console.log.apply(console, jQuery('div').get()) comes >> > >> > > close to reproducing the old behavior. >> >> > >> > > I'll crosspost this on the jQuery list. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
I don't belive NodeList has splice(). On Sat, Jan 3, 2009 at 5:57 PM, Adam Peller wrote: > > It may have been deliberate to 'duck type' or allow Array-like > objects. An instanceof test would be the only accurate test, but it > may (or may not) be helpful to handle user-created objects as Arrays, > or other things like NodeList, which seems to have its own special > handling. > > -Adam > > On Sat, Jan 3, 2009 at 12:52 PM, Brian Di Palma wrote: > > Which explains why the Object is not being taken as an Array. > > > > typeof obj.splice === 'function' > > > > that condition is failing. Correctly too an object is not an Array. > > > > On Sat, Jan 3, 2009 at 4:54 PM, John J Barton < > johnjbar...@johnjbarton.com> > > wrote: > >> > >> Sorry, I was just trying to summarize. The actual test is: > >> if (isFinite(obj.length) && typeof obj.splice === 'function') > >> > >> jjb > >> > >> On Jan 3, 8:22 am, "Brian Di Palma" wrote: > >> > That's not an Array it's an object. For a native Array length is > >> > controlled > >> > for you and splice() is provided to you. > >> > > >> > [] === Array > >> > > >> > {} === Object > >> > > >> > On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith > >> > wrote: > >> > > >> > > >> > > >> > > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton > >> > > wrote: > >> > > >> > > > Any Javascript object with 'length' and 'splice' should format as > an > >> > > > array. If not please report a bug. > >> > > >> > > Using Firebug 1.2.1, an object with properties |length| and |splice| > >> > > is not formatted the same as an Array. > >> > > Example: > >> > > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) > >> > > Object splice=1 length=2 > >> > > >>> [0,1,2] > >> > > 0,1,2 > >> > > >> > > Please describe how an array is to be formatted so that a bug can be > >> > > filed. > >> > > >> > > Thanks, > >> > > >> > > Garrett > >> > > >> > > > jjb > >> > > >> > > > On Jan 2, 11:09 am, Danny wrote: > >> > > >> Thanks; that makes sense. But Firebug also changed the way it > >> > > >> displays > >> > > >> true arrays. Arrays of simple types like [1,2,3] are listed; > arrays > >> > > >> that contain objects are displayed as "Object". console.dir() > >> > > >> helps, > >> > > >> but it was nice to have it all in one line. > >> > > >> > > >> Danny > >> > > >> > > >> On Jan 2, 12:46 pm, John J Barton > >> > > >> wrote: > >> > > >> > > >> > jQuery('div') is not an array. It has length but not splice. So > >> > > >> > Firebug does not format it as an array. > >> > > >> > > >> > In Javascript, the line between what is an array and what is > not > >> > > >> > an > >> > > >> > array is unclear. After many versions the current test in > >> > > >> > Firebug > >> > > >> > requires an array to have 'length' and 'splice'. Earlier > versions > >> > > >> > of > >> > > >> > Firebug only required 'length', but that caused some objects to > >> > > >> > be > >> > > >> > formatted as arrays that did not have numerical indexes. > >> > > >> > > >> > jjb > >> > > >> > > >> > On Jan 1, 10:10 pm, Danny wrote: > >> > > >> > > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 > >> > > >> > > would > >> > > >> > > treat console.log(jQuery('div')) as an array and list all the > >> > > matched > >> > > >> > > elements on the console, so you could mouse over the list and > >> > > >> > > highlight the elements, or right-click and scroll into view > >> > > >> > > etc., > >> > > but > >> > > >> > > now it just lists "Object length=13" and you need to click on > >> > > >> > > that, > >> > > >> > > then you get a vertical list that you need to scroll through. > >> > > >> > > The > >> > > old > >> > > >> > > way was more helpful, I think. > >> > > >> > > >> > > Workaround: console.log.apply(console, jQuery('div').get()) > >> > > >> > > comes > >> > > >> > > close to reproducing the old behavior. > >> > > >> > > >> > > I'll crosspost this on the jQuery list. > >> > > > > > > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
It may have been deliberate to 'duck type' or allow Array-like objects. An instanceof test would be the only accurate test, but it may (or may not) be helpful to handle user-created objects as Arrays, or other things like NodeList, which seems to have its own special handling. -Adam On Sat, Jan 3, 2009 at 12:52 PM, Brian Di Palma wrote: > Which explains why the Object is not being taken as an Array. > > typeof obj.splice === 'function' > > that condition is failing. Correctly too an object is not an Array. > > On Sat, Jan 3, 2009 at 4:54 PM, John J Barton > wrote: >> >> Sorry, I was just trying to summarize. The actual test is: >> if (isFinite(obj.length) && typeof obj.splice === 'function') >> >> jjb >> >> On Jan 3, 8:22 am, "Brian Di Palma" wrote: >> > That's not an Array it's an object. For a native Array length is >> > controlled >> > for you and splice() is provided to you. >> > >> > [] === Array >> > >> > {} === Object >> > >> > On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith >> > wrote: >> > >> > >> > >> > > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton >> > > wrote: >> > >> > > > Any Javascript object with 'length' and 'splice' should format as an >> > > > array. If not please report a bug. >> > >> > > Using Firebug 1.2.1, an object with properties |length| and |splice| >> > > is not formatted the same as an Array. >> > > Example: >> > > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) >> > > Object splice=1 length=2 >> > > >>> [0,1,2] >> > > 0,1,2 >> > >> > > Please describe how an array is to be formatted so that a bug can be >> > > filed. >> > >> > > Thanks, >> > >> > > Garrett >> > >> > > > jjb >> > >> > > > On Jan 2, 11:09 am, Danny wrote: >> > > >> Thanks; that makes sense. But Firebug also changed the way it >> > > >> displays >> > > >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays >> > > >> that contain objects are displayed as "Object". console.dir() >> > > >> helps, >> > > >> but it was nice to have it all in one line. >> > >> > > >> Danny >> > >> > > >> On Jan 2, 12:46 pm, John J Barton >> > > >> wrote: >> > >> > > >> > jQuery('div') is not an array. It has length but not splice. So >> > > >> > Firebug does not format it as an array. >> > >> > > >> > In Javascript, the line between what is an array and what is not >> > > >> > an >> > > >> > array is unclear. After many versions the current test in >> > > >> > Firebug >> > > >> > requires an array to have 'length' and 'splice'. Earlier versions >> > > >> > of >> > > >> > Firebug only required 'length', but that caused some objects to >> > > >> > be >> > > >> > formatted as arrays that did not have numerical indexes. >> > >> > > >> > jjb >> > >> > > >> > On Jan 1, 10:10 pm, Danny wrote: >> > >> > > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 >> > > >> > > would >> > > >> > > treat console.log(jQuery('div')) as an array and list all the >> > > matched >> > > >> > > elements on the console, so you could mouse over the list and >> > > >> > > highlight the elements, or right-click and scroll into view >> > > >> > > etc., >> > > but >> > > >> > > now it just lists "Object length=13" and you need to click on >> > > >> > > that, >> > > >> > > then you get a vertical list that you need to scroll through. >> > > >> > > The >> > > old >> > > >> > > way was more helpful, I think. >> > >> > > >> > > Workaround: console.log.apply(console, jQuery('div').get()) >> > > >> > > comes >> > > >> > > close to reproducing the old behavior. >> > >> > > >> > > I'll crosspost this on the jQuery list. >> > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
Which explains why the Object is not being taken as an Array. typeof obj.splice === 'function' that condition is failing. Correctly too an object is not an Array. On Sat, Jan 3, 2009 at 4:54 PM, John J Barton wrote: > > Sorry, I was just trying to summarize. The actual test is: > if (isFinite(obj.length) && typeof obj.splice === 'function') > > jjb > > On Jan 3, 8:22 am, "Brian Di Palma" wrote: > > That's not an Array it's an object. For a native Array length is > controlled > > for you and splice() is provided to you. > > > > [] === Array > > > > {} === Object > > > > On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith >wrote: > > > > > > > > > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton > > > wrote: > > > > > > Any Javascript object with 'length' and 'splice' should format as an > > > > array. If not please report a bug. > > > > > Using Firebug 1.2.1, an object with properties |length| and |splice| > > > is not formatted the same as an Array. > > > Example: > > > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) > > > Object splice=1 length=2 > > > >>> [0,1,2] > > > 0,1,2 > > > > > Please describe how an array is to be formatted so that a bug can be > filed. > > > > > Thanks, > > > > > Garrett > > > > > > jjb > > > > > > On Jan 2, 11:09 am, Danny wrote: > > > >> Thanks; that makes sense. But Firebug also changed the way it > displays > > > >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays > > > >> that contain objects are displayed as "Object". console.dir() helps, > > > >> but it was nice to have it all in one line. > > > > > >> Danny > > > > > >> On Jan 2, 12:46 pm, John J Barton > wrote: > > > > > >> > jQuery('div') is not an array. It has length but not splice. So > > > >> > Firebug does not format it as an array. > > > > > >> > In Javascript, the line between what is an array and what is not > an > > > >> > array is unclear. After many versions the current test in Firebug > > > >> > requires an array to have 'length' and 'splice'. Earlier versions > of > > > >> > Firebug only required 'length', but that caused some objects to be > > > >> > formatted as arrays that did not have numerical indexes. > > > > > >> > jjb > > > > > >> > On Jan 1, 10:10 pm, Danny wrote: > > > > > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 > would > > > >> > > treat console.log(jQuery('div')) as an array and list all the > > > matched > > > >> > > elements on the console, so you could mouse over the list and > > > >> > > highlight the elements, or right-click and scroll into view > etc., > > > but > > > >> > > now it just lists "Object length=13" and you need to click on > that, > > > >> > > then you get a vertical list that you need to scroll through. > The > > > old > > > >> > > way was more helpful, I think. > > > > > >> > > Workaround: console.log.apply(console, jQuery('div').get()) > comes > > > >> > > close to reproducing the old behavior. > > > > > >> > > I'll crosspost this on the jQuery list. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
Sorry, I was just trying to summarize. The actual test is: if (isFinite(obj.length) && typeof obj.splice === 'function') jjb On Jan 3, 8:22 am, "Brian Di Palma" wrote: > That's not an Array it's an object. For a native Array length is controlled > for you and splice() is provided to you. > > [] === Array > > {} === Object > > On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith wrote: > > > > > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton > > wrote: > > > > Any Javascript object with 'length' and 'splice' should format as an > > > array. If not please report a bug. > > > Using Firebug 1.2.1, an object with properties |length| and |splice| > > is not formatted the same as an Array. > > Example: > > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) > > Object splice=1 length=2 > > >>> [0,1,2] > > 0,1,2 > > > Please describe how an array is to be formatted so that a bug can be filed. > > > Thanks, > > > Garrett > > > > jjb > > > > On Jan 2, 11:09 am, Danny wrote: > > >> Thanks; that makes sense. But Firebug also changed the way it displays > > >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays > > >> that contain objects are displayed as "Object". console.dir() helps, > > >> but it was nice to have it all in one line. > > > >> Danny > > > >> On Jan 2, 12:46 pm, John J Barton wrote: > > > >> > jQuery('div') is not an array. It has length but not splice. So > > >> > Firebug does not format it as an array. > > > >> > In Javascript, the line between what is an array and what is not an > > >> > array is unclear. After many versions the current test in Firebug > > >> > requires an array to have 'length' and 'splice'. Earlier versions of > > >> > Firebug only required 'length', but that caused some objects to be > > >> > formatted as arrays that did not have numerical indexes. > > > >> > jjb > > > >> > On Jan 1, 10:10 pm, Danny wrote: > > > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 would > > >> > > treat console.log(jQuery('div')) as an array and list all the > > matched > > >> > > elements on the console, so you could mouse over the list and > > >> > > highlight the elements, or right-click and scroll into view etc., > > but > > >> > > now it just lists "Object length=13" and you need to click on that, > > >> > > then you get a vertical list that you need to scroll through. The > > old > > >> > > way was more helpful, I think. > > > >> > > Workaround: console.log.apply(console, jQuery('div').get()) comes > > >> > > close to reproducing the old behavior. > > > >> > > I'll crosspost this on the jQuery list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
That's not an Array it's an object. For a native Array length is controlled for you and splice() is provided to you. [] === Array {} === Object On Sat, Jan 3, 2009 at 7:03 AM, Garrett Smith wrote: > > On Fri, Jan 2, 2009 at 9:28 PM, John J Barton > wrote: > > > > Any Javascript object with 'length' and 'splice' should format as an > > array. If not please report a bug. > > Using Firebug 1.2.1, an object with properties |length| and |splice| > is not formatted the same as an Array. > Example: > >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) > Object splice=1 length=2 > >>> [0,1,2] > 0,1,2 > > Please describe how an array is to be formatted so that a bug can be filed. > > Thanks, > > Garrett > > > jjb > > > > On Jan 2, 11:09 am, Danny wrote: > >> Thanks; that makes sense. But Firebug also changed the way it displays > >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays > >> that contain objects are displayed as "Object". console.dir() helps, > >> but it was nice to have it all in one line. > >> > >> Danny > >> > >> On Jan 2, 12:46 pm, John J Barton wrote: > >> > >> > jQuery('div') is not an array. It has length but not splice. So > >> > Firebug does not format it as an array. > >> > >> > In Javascript, the line between what is an array and what is not an > >> > array is unclear. After many versions the current test in Firebug > >> > requires an array to have 'length' and 'splice'. Earlier versions of > >> > Firebug only required 'length', but that caused some objects to be > >> > formatted as arrays that did not have numerical indexes. > >> > >> > jjb > >> > >> > On Jan 1, 10:10 pm, Danny wrote: > >> > >> > > Has anyone else using jQuery noticed that Firebug before 1.2 would > >> > > treat console.log(jQuery('div')) as an array and list all the > matched > >> > > elements on the console, so you could mouse over the list and > >> > > highlight the elements, or right-click and scroll into view etc., > but > >> > > now it just lists "Object length=13" and you need to click on that, > >> > > then you get a vertical list that you need to scroll through. The > old > >> > > way was more helpful, I think. > >> > >> > > Workaround: console.log.apply(console, jQuery('div').get()) comes > >> > > close to reproducing the old behavior. > >> > >> > > I'll crosspost this on the jQuery list. > > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
On Fri, Jan 2, 2009 at 9:28 PM, John J Barton wrote: > > Any Javascript object with 'length' and 'splice' should format as an > array. If not please report a bug. Using Firebug 1.2.1, an object with properties |length| and |splice| is not formatted the same as an Array. Example: >>> ({splice:1, length:2, '0':0, '1':1, '2':2}) Object splice=1 length=2 >>> [0,1,2] 0,1,2 Please describe how an array is to be formatted so that a bug can be filed. Thanks, Garrett > jjb > > On Jan 2, 11:09 am, Danny wrote: >> Thanks; that makes sense. But Firebug also changed the way it displays >> true arrays. Arrays of simple types like [1,2,3] are listed; arrays >> that contain objects are displayed as "Object". console.dir() helps, >> but it was nice to have it all in one line. >> >> Danny >> >> On Jan 2, 12:46 pm, John J Barton wrote: >> >> > jQuery('div') is not an array. It has length but not splice. So >> > Firebug does not format it as an array. >> >> > In Javascript, the line between what is an array and what is not an >> > array is unclear. After many versions the current test in Firebug >> > requires an array to have 'length' and 'splice'. Earlier versions of >> > Firebug only required 'length', but that caused some objects to be >> > formatted as arrays that did not have numerical indexes. >> >> > jjb >> >> > On Jan 1, 10:10 pm, Danny wrote: >> >> > > Has anyone else using jQuery noticed that Firebug before 1.2 would >> > > treat console.log(jQuery('div')) as an array and list all the matched >> > > elements on the console, so you could mouse over the list and >> > > highlight the elements, or right-click and scroll into view etc., but >> > > now it just lists "Object length=13" and you need to click on that, >> > > then you get a vertical list that you need to scroll through. The old >> > > way was more helpful, I think. >> >> > > Workaround: console.log.apply(console, jQuery('div').get()) comes >> > > close to reproducing the old behavior. >> >> > > I'll crosspost this on the jQuery list. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
Any Javascript object with 'length' and 'splice' should format as an array. If not please report a bug. jjb On Jan 2, 11:09 am, Danny wrote: > Thanks; that makes sense. But Firebug also changed the way it displays > true arrays. Arrays of simple types like [1,2,3] are listed; arrays > that contain objects are displayed as "Object". console.dir() helps, > but it was nice to have it all in one line. > > Danny > > On Jan 2, 12:46 pm, John J Barton wrote: > > > jQuery('div') is not an array. It has length but not splice. So > > Firebug does not format it as an array. > > > In Javascript, the line between what is an array and what is not an > > array is unclear. After many versions the current test in Firebug > > requires an array to have 'length' and 'splice'. Earlier versions of > > Firebug only required 'length', but that caused some objects to be > > formatted as arrays that did not have numerical indexes. > > > jjb > > > On Jan 1, 10:10 pm, Danny wrote: > > > > Has anyone else using jQuery noticed that Firebug before 1.2 would > > > treat console.log(jQuery('div')) as an array and list all the matched > > > elements on the console, so you could mouse over the list and > > > highlight the elements, or right-click and scroll into view etc., but > > > now it just lists "Object length=13" and you need to click on that, > > > then you get a vertical list that you need to scroll through. The old > > > way was more helpful, I think. > > > > Workaround: console.log.apply(console, jQuery('div').get()) comes > > > close to reproducing the old behavior. > > > > I'll crosspost this on the jQuery list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
Thanks; that makes sense. But Firebug also changed the way it displays true arrays. Arrays of simple types like [1,2,3] are listed; arrays that contain objects are displayed as "Object". console.dir() helps, but it was nice to have it all in one line. Danny On Jan 2, 12:46 pm, John J Barton wrote: > jQuery('div') is not an array. It has length but not splice. So > Firebug does not format it as an array. > > In Javascript, the line between what is an array and what is not an > array is unclear. After many versions the current test in Firebug > requires an array to have 'length' and 'splice'. Earlier versions of > Firebug only required 'length', but that caused some objects to be > formatted as arrays that did not have numerical indexes. > > jjb > > On Jan 1, 10:10 pm, Danny wrote: > > > Has anyone else using jQuery noticed that Firebug before 1.2 would > > treat console.log(jQuery('div')) as an array and list all the matched > > elements on the console, so you could mouse over the list and > > highlight the elements, or right-click and scroll into view etc., but > > now it just lists "Object length=13" and you need to click on that, > > then you get a vertical list that you need to scroll through. The old > > way was more helpful, I think. > > > Workaround: console.log.apply(console, jQuery('div').get()) comes > > close to reproducing the old behavior. > > > I'll crosspost this on the jQuery list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---
Re: firebug regression: console.log(jQuery('div')) less useful
jQuery('div') is not an array. It has length but not splice. So Firebug does not format it as an array. In Javascript, the line between what is an array and what is not an array is unclear. After many versions the current test in Firebug requires an array to have 'length' and 'splice'. Earlier versions of Firebug only required 'length', but that caused some objects to be formatted as arrays that did not have numerical indexes. jjb On Jan 1, 10:10 pm, Danny wrote: > Has anyone else using jQuery noticed that Firebug before 1.2 would > treat console.log(jQuery('div')) as an array and list all the matched > elements on the console, so you could mouse over the list and > highlight the elements, or right-click and scroll into view etc., but > now it just lists "Object length=13" and you need to click on that, > then you get a vertical list that you need to scroll through. The old > way was more helpful, I think. > > Workaround: console.log.apply(console, jQuery('div').get()) comes > close to reproducing the old behavior. > > I'll crosspost this on the jQuery list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to firebug@googlegroups.com To unsubscribe from this group, send email to firebug+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~--~~~~--~~--~--~---