#225 ✓invalid
airportyh

argumentNames() doesn't work in IE when parameter list on separate lines

Reported by airportyh | July 19th, 2008 @ 10:32 PM

When you write a function with parameters on separate lines like this:

function f(

p1,

p2,

p3){

/**/

}

f.argumentNames() will not work and returns undefined. Patch attached.

Comments and changes to this ticket

  • Juriy Zaytsev

    Juriy Zaytsev July 20th, 2008 @ 12:35 AM

    • State changed from “new” to “invalid”

    The latest regexp for argumentNames is a little different from the one in your patch:

    /^[\s\(]*function[^(]*\(([^\)]*)\)/
    

    It seems to match "newline-separated" arguments just fine.

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 04:05 AM

    • Tag cleared.

    [not-tagged:"ie" not-tagged:"ie6" not-tagged:"ie7" not-tagged:"ie8" bulk edit command]

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

People watching this ticket

Attachments

Referenced by

Pages