I agree that the current isObject has to be renamed to avoid confusion. But we don't need any isObject using Object.prototype.toString.call anywhere in the code... This could be included in any plugin, where required.
On Nov 10, 9:28 pm, DBJDBJ <dbj...@gmail.com> wrote: > All is ok then ? > > We/You/me just need , soemthing along these lines : > > jQuery.isObject = function( obj ) > { > return Object.prototype.toString.call(obj) === "[object > Object]" ) ; > } > > jQuery.isObjectLiteral = function( obj ) > { > if ( ! jQuert.isObject(obj) ) { > return false; > } > //own properties are iterated firstl, > //so to speed up, we can test if the last one is owned or not > var key; > for ( key in obj ) {} > return !key || Object.prototype.hasOwnProperty.call( obj, key ); > > } > > Maybe a bit more optimised. > > The solution above does not care about IE "thinking" of DOM methods as > objects, but apparently "it was decided", this is not important. > > Job done ... after several months of mauling the issue ... Better even > then never ;o) > > --DBJ -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@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=.