Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mootools support #17

Open
robholland opened this issue Jun 17, 2010 · 1 comment
Open

mootools support #17

robholland opened this issue Jun 17, 2010 · 1 comment

Comments

@robholland
Copy link

Hola,

We tried using envjs on a mootools project and it failed to load mootools core 1.2.4.

--- mootools-1.2.4-core-nc.js    2010-06-17 13:44:30.000000000 +0100
+++ mootools-1.2.4-core-nc.js.new 2010-06-17 13:44:56.000000000 +0100
@@ -40,6 +40,7 @@
object.constructor = Native;
object.$family = {name: 'native'};
if (legacy && initialize) object.prototype = legacy.prototype;

  • if (object.prototype == undefined) { object.prototype = {}; }
    object.prototype.constructor = object;

if (name){

Mootools was then able to load. I'm not sure if this is a sane fix however... Is this something that can be fixed in env.js and/or envjs and/or capybara-envjs?

@smparkes
Copy link
Owner

It's probably related to env-js, some corner case env.js is handling (the JS frameworks do push env.js, often because they're trying to do some sort of feature detection, which means digging into the corners to see what the platform provides)

I can't tell much from that part of the code, though. Those are all mootools objects so I don't know what they mean or why that particular value is undefined.

I don't use mootools but I'm happy to accept a patch if you can figure out what env.js is missing ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants