Semi-Urgent Help Requested with bind conflict

6 views
Skip to first unread message

adampbragg

unread,
Oct 26, 2010, 4:30:25 PM10/26/10
to MooTools Users
Hey Everyone,

I ran into an issue today where the google toolbar in IE8 overwrites
Function.prototype.bind. So, my code running on MooTools 1.2.4 in the
same page breaks. I tried a quick fix to rename bind to bindIt within
mootools as a test but this failed on my first test. I am going to
continue to pursue that track because I need a quick fix.

But, if anyone else knows another way I can resolve this issue, please
let me know. Or, if you have some guidance regarding my "renaming
bind" solution, please send away. If not, thank you for reading my
request and considering it.

-Adam

Sean McArthur

unread,
Oct 26, 2010, 4:36:41 PM10/26/10
to mootool...@googlegroups.com
The MooTools 1.2 version of bind is considered non-standard. EcmaScript 5 defined bind slightly differently. Google is likely adding JavaScript functions like they have in Chrome.

This might be a daunting task, I don't know how much of your code relies on 1.2 functions, but if you were to switch to the new MooTools 1.3, you could write the binds the new way and know it won't break anymore.

Ryan Florence

unread,
Oct 26, 2010, 4:37:49 PM10/26/10
to mootool...@googlegroups.com
bind(context, [args]) ~= pass([args], context)

So you can swap your binds for passes if you need to.

adampbragg

unread,
Oct 26, 2010, 4:45:52 PM10/26/10
to MooTools Users
Hey Sean,

That sounds good. I will certainly get there. I hope to avoid that in
this cycle since we are at the end of QA. I may have to go there with
a very long night :) If I do, I will let you know how that goes. I
appreciate you letting me know that the Bind in 1.3 is different than
the Bind in 1.2. I had not investigated that yet.

-Adam

On Oct 26, 1:36 pm, Sean McArthur <sean.mons...@gmail.com> wrote:
> The MooTools 1.2 version of bind is considered non-standard. EcmaScript 5
> defined bind slightly differently. Google is likely adding JavaScript
> functions like they have in Chrome.
>
> This might be a daunting task, I don't know how much of your code relies on
> 1.2 functions, but if you were to switch to the new MooTools 1.3, you could
> write the binds the new way and know it won't break anymore.
>

adampbragg

unread,
Oct 26, 2010, 4:47:30 PM10/26/10
to MooTools Users
Hey Ryan,

Great to know! I will try out swapping Pass for Bind.

Thank you,

-Adam

Ryan Florence

unread,
Oct 26, 2010, 4:53:35 PM10/26/10
to mootool...@googlegroups.com

Christoph Pojer

unread,
Oct 27, 2010, 8:10:26 AM10/27/10
to MooTools Users
You can also upgrade to 1.2.5 (or 1.3) :)

adampbragg

unread,
Oct 27, 2010, 1:24:11 PM10/27/10
to MooTools Users
Hey Ryan,

As you probably knew it would, Pass works just as well and now I no
longer have a conflict with the Google Toolbar.

Many Thanks,

-Adam

adampbragg

unread,
Oct 27, 2010, 1:25:16 PM10/27/10
to MooTools Users
Hey Christoph,

I certainly will be upgrading. I can't wait to get that library
through our QA so I can get to the latest MooTools goodness.

Thank you,

-Adam

adampbragg

unread,
Oct 27, 2010, 1:42:26 PM10/27/10
to MooTools Users
Hey Everyone,

I wanted to add a bit more clarification to the issue. The conflict
happens on function.bind and not on element.bind.

Thank you,

-Adam

Christoph Pojer

unread,
Oct 27, 2010, 4:00:55 PM10/27/10
to MooTools Users
There is no element.bind in MooTools ;)

adampbragg

unread,
Oct 27, 2010, 4:16:31 PM10/27/10
to MooTools Users
Oh my goodness oh my goodness oh my goodness!!

I have been using the jQuery/MooTools mixture for too long. I hang my
head in shame.

Thank you, Christoph, for alerting me to the corruption my psyche.

Christoph Pojer

unread,
Oct 28, 2010, 3:11:19 AM10/28/10
to MooTools Users
hahaha
Reply all
Reply to author
Forward
0 new messages