#397 ✓resolved
T.J. Crowder

argumentNames confounded by inline comments on IE

Reported by T.J. Crowder | October 20th, 2008 @ 03:12 PM | in 1.6.1

On IE6 (at least), the Function.argumentNames function doesn't handle comments intermixed with the parameter names, which (among other things) makes $super handling unreliable.

Example:


function showNameAndCount(
    /*string*/name,
    /*number*/count
    )
{
    alert("name = " + name + ", count = " + count);
}

Calling showNameAndCount.argumentNames() returns this array:


['/*string*/name', '/*number*/count']

Since Class.addMethods looks for names[0] == '$super', this breaks $super support on IE6 when people comment things in this way.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Referenced by

Pages