Probably. But it is certainly not my idea ;) I mean there it is, for last several releases .... It is maybe that it is labelled "too trivial" to be part of jQuery ?
--DBJ On 10 Nov, 20:45, lrbabe <lrb...@gmail.com> wrote: > 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=.