This project is archived and is in readonly mode.

#791 ✓wontfix
Geoffrey Sneddon

Test should not vary expected result based upon browser

Reported by Geoffrey Sneddon | November 19th, 2009 @ 01:39 PM | in 2.0 (closed)

Currently MooTools has the following test:

    value_of($type(arguments)).should_be((window.opera) ? 'array' : 'arguments'); //opera's arguments behave like arrays--which is actually better.

Changing the result based upon the browser seems like a bad idea, as if it is acceptable for arguments to be an array it should be acceptable for it to be an array in all browsers, not just in something with Boolean(window.object) === true.

Furthermore, Opera making the arguments object an array has been a cause of compatibility issues, and is likely to change in some future release (and as such the current test would then fail).

Comments and changes to this ticket

  • Jan Kassens

    Jan Kassens November 19th, 2009 @ 02:00 PM

    • Assigned user set to “Jan Kassens”
    • State changed from “new” to “hold”

    since it seems that arguments don't have a proper prototype it seems we cant make them array like in all browsers and introducing an additional check just to return 'arguments' in opera as well seems unnecessary overhead.

    I'd say we change the test to expect 'array' when it behaves like a proper array or 'arguments' otherwise, no matter what the browser is.


  • Christoph Pojer

    Christoph Pojer November 9th, 2010 @ 07:25 PM

    • State changed from “hold” to “wontfix”
    • Milestone order changed from “0” to “0”

Create your profile

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

Shared Ticket Bins

People watching this ticket