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

pubsubio-js fails when used together with mootools #1

Open
jonasswiatek opened this issue Aug 3, 2011 · 3 comments
Open

pubsubio-js fails when used together with mootools #1

jonasswiatek opened this issue Aug 3, 2011 · 3 comments

Comments

@jonasswiatek
Copy link

When the pubsub.io.js script is used on a page together with mootools, several errors are thrown.

Test page: http://pastebin.com/MDH01bu1

@jonasswiatek
Copy link
Author

Issue solved - needs discussion.

Line 385-401 must be changed to:

Object.ps_create = Object.ps_create || function (proto) {
    var C = function() {};

    C.prototype = proto;

    return new C();
};

exports.extend = function(proto, fn) {
    var C = function() {
        proto.call(this);
        fn.apply(this, arguments);
    };
    C.prototype = Object.ps_create(proto.prototype);

    return C;       
};

(or similar)

Mootools also defines Object.create, and something conflicts in this process. The above fix works

@jonasswiatek
Copy link
Author

Fixed code formatting in above code example

@jonasswiatek
Copy link
Author

Hey guys, do you have any input on this issue?

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

1 participant