Well I had a thought. It might be a bad thing to add extra code into JQuery simply to check if the developer has been stupid. It'd be better to have a plug in that developers can add and temporarily use. I'm working on such an proof of concept plug in, so I'll post here again with the example.
On Sep 4, 1:56 pm, Dave Methvin <dave.meth...@gmail.com> wrote: > > "$(true).html()" - Throws a TypeError with the information 'this > > [0].innerHTML is undefined > > Source File: query-1.3.2.min.js Line: 12' > > Whenever you're debugging, use the non-minimized version of jQuery. > Both Firefox and IE8 have very good debuggers, so when an error like > this occurs in the guts of jQuery you can look at the stack trace to > see how it got there from your own code or plugins. > > > "$("p").html(true)" - Reduces the HTML of all <P> elements to nothing. > > It can be passed objects too, and the same behaviour is observed. > > That's the "Garbage in, garbage out" problem, which is hard to solve > in general. It might be inexpensive for jQuery to stringify the args > in this case, so that instead of nothing you'd get the string "true" > or "[object Object]" in the paragraphs for bogus inputs. At least that > would be a bit less mysterious to debug. --~--~---------~--~----~------------~-------~--~----~ 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 jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---