Using YUI and prototype together

I want to add a calendar control to a page that already includes Prototype and Scriptaculous. Not happy with any of the prototypes I could find, I am considering using the YUI Calendar widget.

Can I cause any problems?

+3
source share
3 answers

We worked hard to ensure that YUI is safe to use with any other library. We prescribe everything, as HermanD says, in only one required global (YAHOO) and one optional (YAHOO_config). We do not modify our own objects. Although Protoype modifies its own prototypes, we protect the code so that it does not violate the functionality of YUI.

If you find errors in using these two together, let us know.

Regards, Eric YUI Team

+14
source

By default, everything in YUI is in the YAHOO namespace, so as long as you reasonably apply namespaces to anything you use from YUI, I would think that you should be fine.

See: http://developer.yahoo.com/yui/yahoo/

0

I successfully used the YUI tab control in an application in which I already used Prototype and Scriptaculous, and had no problems. The weight of all this is small, but if you are looking at a public application. I wouldn’t have much about an internal application, say, for a company, but you might think about how much JavaScript you download to end users and the number of individual files that they download for this page.

0
source

All Articles