Feature checking is usually done by checking for a specific method or
attribute on the object.

For a template you can check for the evaluate method:

if(MyObject.evaluate) {
  // it's a template
}

On Wed, Sep 1, 2010 at 5:20 PM, Richard Quadling <rquadl...@gmail.com>wrote:

> Hi.
>
> I can't find a way to determine the type of object being supplied to a
> function.
>
> I can check if it is a string ...
>
> if (Object.isString(param)) {
>  var tmpl = new Template(param);
> } else if (Object.type(param) = 'Template') {
>  var tmpl = param;
> }
>
> sort of thing.
>
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to