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 th
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 aga
Hi all,
In the docs, it says that Array.indexOf uses equivalence (==), not
strict equality (===).
(http://www.prototypejs.org/api/array/indexof)
But the code uses strict equality. From 1.6.0.2:
if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item,
i) {
i || (i = 0);
var len
T.J. Crowder a écrit :
> So I'll file a ticket, my only question is whether I should file it
> against the code or the docs. ;-)
File against the docs :-) This implementation is conformant to
Mozilla's and IE8's implementation of the recent Array#indexOf extension.
--
Christophe Porteneuve ak
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.
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
>>>
I wish it was that easy : ) Unfortunately, we can't really account for
all host objects, which are notorious for their incompliance with
specs (e.g. it's well known how some of them have no constructor
property, and others throw error when accessing certain properties).
Hardcoding few methods bare
T.J.
Thanks, this has already been brought up some time ago.
http://dev.rubyonrails.org/ticket/10263
- kangax
On Jun 6, 6:25 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> In the docs, it says that Array.indexOf uses equivalence (==), not
> strict equality (===).
> (http://www.proto
Yeah, Richard's approach would be about eight times more elegant...if
there were something reliable to test for. It can be IE-specific, of
course. I was sure when I saw his post that there would be
*something* we could check for, but none of the things that come to
mind are both present (IE does
Gah! Sorry, I should have looked.
FWIW, have to disagree with the low/minor categorization. It's not
just that it doesn't say, it's that it explicitly does say the wrong
thing... Are the docs on git? (I don't immediately see them.) I'd
happily fix doc errors...
--
T.J. Crowder
tj / crowder s
2008/6/6 T.J. Crowder <[EMAIL PROTECTED]>:
>
> Yeah, Richard's approach would be about eight times more elegant...if
> there were something reliable to test for. It can be IE-specific, of
> course. I was sure when I saw his post that there would be
> *something* we could check for, but none of t
Agreed. Wrong statement is worse than lack of it : )
The docs are not on git, afaik.
There's a new "pdoc" (inline documentation parser) in the works (by
Tobie/Andrew) - but it's not clear when it will be ready to go public.
We would all "fix" the docs errors happily, but I can hardly remember
las
FYI, we have just landed an updated Object.isFunction few days ago. It
now returns false for regexp objects and works around WebKit's
NodeList issue.
http://github.com/sstephenson/prototype/commit/436a694dc1c30d3dc2bf262f63f8b34c65113439
As far as OP goes, first we all need to "define what a fun
Yeah, I'm really excited by the pdoc effort. (I can't say I like the
syntax, but that's a massively-secondary concern.) Having the docs in
the code itself is The Right Thing, IMHO, with the only downside
really being that it's difficult to have docs-only committers. (It's
possible, though: If
> And as much it pains me ... is it about time we had a
> browser_version_compatibility_plugin.js ?
> [snip]
> Hmm. There are a LOT of
> browsers and versions aren't there?
There are indeed. I think most of us would agree, though, that IE is
a special case. And answering my own snooty question
This is unfortunately not a very detailed bug report, and I'm heading
off for vacation so won't be around to follow up, but hopefully one of
the core developers can take a quick look at the code and may
immediately see something amiss.
After upgrading our test machines to the latest Git from
http
Can you provide a test snippet?
You can compare the differences between the two versions here:
http://www.protolific.net/step-by-step/24.png
As you can see in the comparison the new version does not allow
document.documentElement to be returned as the offsetParent
and the old one did. I suspect t
On Jun 6, 9:13 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Yeah, I'm really excited by the pdoc effort. (I can't say I like the
> syntax, but that's a massively-secondary concern.) Having the docs in
> the code itself is The Right Thing, IMHO, with the only downside
> really being that it'
On Jun 6, 11:58 am, John-David Dalton <[EMAIL PROTECTED]>
wrote:
> Can you provide a test snippet?
> You can compare the differences between the two versions
> here:http://www.protolific.net/step-by-step/24.png
Hi John -
I'm not sure if this will help, but an example of our tooltips can be
seen
Setup:
I'm using prototype.js (1.6.0.2)
Problem:
Whether or not a class variable is static to a class or private to an
instance of that class (object) is not consistent. Depending on the
type of the variable and how it is initialized, results may vary.
Here's an example:
var PersonClass1 = Cl
Sorry for the confusion.
This is not a bug.
Any member (function or property) outside of "initialize" is being put
onto constructor's prototype.
Any instance produced later by that constructor (class) shares those
members via its (instance) prototype chain (instance =>
.prototype => Object.proto
Ah, yes, now that Prototype is using Git, things like this are a lot
easier...
-- T.J. :-)
On Jun 6, 8:51 pm, Andrew Dupont <[EMAIL PROTECTED]> wrote:
> On Jun 6, 9:13 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
>
> > Yeah, I'm really excited by the pdoc effort. (I can't say I like the
> > sy
22 matches
Mail list logo