Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5990199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:12:32+00:00 2026-05-22T23:12:32+00:00

I have a problem with the behavior of Firefox 4 in regards to parameters

  • 0

I have a problem with the behavior of Firefox 4 in regards to parameters passed to the function that is getting called upon a click event.

Take a look at this example:

<html>
<head>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.11/mootools.js"></script>
</head>
<body>
    <span id="e">Klick mich!</span> 
    <script type="text/javascript">
        $("e").addEvent("click", function(a, b, c){
            alert(this);
            alert(a);
            alert(b);
            alert(c);
            console.log(this);
            console.log(a);
            console.log(b);
            console.log(c);
        }.bind(1, [2, 3]));
    </script>   
</body>
</html>

If you open this with Firefox 4 the result is:

  1. 1
  2. 2,3
  3. object MouseEvent
  4. undefined

In any other browser the result is:

  1. 1
  2. 2
  3. 3
  4. undefined

As you can see only Firefox 4 passes an MouseEvent to the function. This behavior breaks a lot of my code.

Do you know any solution? Thanks for help.

EDIT1: Chrome behaves like FF4

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:12:33+00:00Added an answer on May 22, 2026 at 11:12 pm

    the problem is – this is mootools 1.11 – UNSUPPORTED AND OLD

    in mootools 1.11, it was accepted to use ( http://docs111.mootools.net/Native/Function.js#Function.bind ):

    bind optional, the object that the “this” of the function will refer to.

    args optional, the arguments passed. must be an array if arguments > 1

    hence, doing .bind(1, [args]) was correct. However, recently the native Function.bind implementation changed in browsers that implement it – https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind

    thisArg The value to be passed as the this parameter to the target function when the bound function is called. The value is ignored if the bound function is constructed using the new operator.

    arg1, arg2, … Arguments to prepend to arguments provided to the bound function when invoking the target function.

    it means, to make it work you need .bind(1,2,3,4); where 1 is bound scope and 2,3,4 are arguments.

    you SHOULD upgrade, running mootools 1.11 on browsers that came 4 years after it got written will yield unpredictable results. always. for example, 1.11 won’t detect gecko/ff anymore due to deprecated func used to test for it.

    what next, check for netscape4? 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with fancybox. I want to write a function that will run
i have problem with libhid . i found that there 2 way 4 accessing
I have an application that supplies long list of parameters to a web page,
I have a very weird problem. This ONLY affects Firefox on Mac, using the
I have a jQuery script that works perfectly fine in Chrome 11 and Firefox
I have some input elements that the users are request special behavior on pageup
I seem to stumble on problem after problem giving my entities behaviour. I have
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
i have problem with autorotate on iphone i set up in all classes -
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.