2008/6/6 artemy tregoubenko <[EMAIL PROTECTED]>:
>
> Some other functions:
>>> typeof setTimeout
> object
>>> typeof clearTimeout
> object
>>> typeof setInterval
> object
>>> typeof clearInterval
> object
>
> Thus:
>>> typeof setTimeout.defer
> undefined
>>> typeof setTimeout.delay
> undefined
>>> typeof setTimeout.curry
> undefined
>
>
> On Fri, 06 Jun 2008 14:08:24 +0400, T.J. Crowder <[EMAIL PROTECTED]>
> wrote:
>
>>
>> OMG, I can confirm this, on IE6 anyway.  (Couldn't they get *anything*
>> right?  I mean, I know Firefox has its issues, but...  And yes,
>> technically a function is an object, but that's no excuse.)
>>
>> The only workaround that immediately comes to mind is to actually have
>> a list of these and compare against them in IE -- e.g.:
>>
>> isFunction: (function(){
>>     if (typeof window.close == "object") {
>>         // IE version, works around typeof returning "object" for
>> intrinsic functions
>>         return function(object) {
>>             return (
>>                 typeof object == "function"
>>                 || object === window.close
>>                 || object === document.getElementById
>>                 // etc., etc., etc.
>>             );
>>         };
>>     } else {
>>         // Non-IE version, expects typeof to work correctly
>>         return function(object) {
>>             return typeof object == "function";
>>         };
>>     }
>> })()
>>
>> Blech.  The more of this that happens, the more I want a separate file
>> that only IE people have to download containing these workarounds...
>> --
>> T.J. Crowder
>> tj / crowder software / com
>>
>> On Jun 6, 9:27 am, Viktor Kojouharov <[EMAIL PROTECTED]> wrote:
>>> Here's quite the problem in IE.
>>>
>>> For certain 'native' functions, like window.close, or
>>> document.getElementById, typeof for those functions returns on object
>>> in IE. Consequently, Object.isFunction will actually return false for
>>> those functions.
>>>
>>> Though there's probably little that can be done, I thought you guys
>>> should know about it.
>> >
>
>
>
> --
> arty ( http://arty.name )
>
> >
>


Thinking out loud ... if it is an object, what are it's properties?
Can the presence of one of these be enough to act as a confirmation
for isFunction()?



-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to