In this Chapter
In this release, YUI on YAP is a beta feature providing limited YUI library support.
Caja, the YAP front-end securer, restricts the use of certain insecure JavaScript features within the Canvas view of a YAP Open application. However, several YUI utilities have been integrated with YAP, enabling you to include YUI functionality in a Canvas View.
To understand this chapter, you should already be familiar with YUI. For more information, see the YUI Library sites on YDN and yuilibrary.com.
YAP supports a subset of the YUI 2.8.0 libraries and utilities. Other releases of YUI are not supported. The specific YUI libraries and utilities that YAP supports are listed in the following sections:
To include YUI in your Canvas View, follow the procedures described in the "Start building" step on the page YUI 2 - Yahoo! User Interface Library. If you include YUI directly from the Yahoo! servers, the YUI JavaScript libraries are interpreted by the cajoler and swapped with a Caja-safe version on the Yahoo! servers. If you include YUI by inserting the contents inline onto your page, the inlined script is interpreted by the cajoler and rewritten to its Caja-safe equivalent.
To determine which YUI scripts and CSS need to be included in your application, use the YUI Dependency Configurator. However, YAP currently supports only YUI 2.8.0; do not be misled by the Configurator into importing unsupported versions. For example, the Configurator might supply a script that pulls in 2.8.2 libraries, like this:
<script type="text/javascript" src="http://yui.yahooapis.com/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
To avoid errors, you would replace the Configurator-supplied script with this:
<script type="text/javascript" src="http://yui.yahooapis.com/2.8.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
To report a bug or ask a question about YUI on YAP, post to the YAP Forum. For support on YUI without YAP, see the yuilibrary.com site. When posting, please provide the following information: