This project is archived and is in readonly mode.

#911 ✓resolved
JedWatson

Function.create() breaks Bespin (Sproutcore Compatibility?)

Reported by JedWatson | May 20th, 2010 @ 09:42 AM

Hi,

I've been trying to integrate Mozilla's Bespin Embedded into our mootools-based web app.

There is an incompatibility which, if you include mt 1.2.4 or 1.3b1, prevents Bespin from intialising correctly.

I haven't been able to ascertain whether it's Bespin that's failing, or the Sproutcore framework they use.

The only problem seems to be the presence of Function.prototype.create

For example, if you include a line of JS which sets

Function.prototype.create = null;

after including mt and before you include Bespin, Bespin works just fine (mt of course breaks).

I have successfully worked around the issue in my own environment by renaming the create() method to createFn() and updating all calls in Core and More to call createFn() instead of create() - there are 9 matches.

In my case it's a minor change because most code uses bind() delay() or periodical() which wraps create()

I realise this would be a breaking API change, which you may not want to make just in order to allow mootools and Bespin to coexist in a web page. However, that's your decision, and I thought I'd give you the info in case.

all the best,
Jed.

Comments and changes to this ticket

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

Pages