YUI recommends YUI3.
YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.
This documentation is no longer maintained.
In this simple example, the ProfilerViewer Control is used to profile an instance of the YUI Calendar Control. Interact with the calendar interface, then activate the ProfilerViewer to see the profile data. You can then continue to interact with the calendar, refreshing the data in the ProfilerViewer to update the profiling display.
One of the nice things about the YUI Profiler is that it makes it simple to profile any JavaScript function or object structure. ProfilerViewer's job is to make it just as easy to explore that data.
In this example, we create an instance of YUI's Calendar Control, tell Profiler to profile our Calendar instance, and then use ProfilerViewer to experience that data.
This example has the following dependencies:
We begin with empty div
elements for Calendar and Profiler to use:
In JavaScript, we instantiate our Calendar and then pass the instance to Profiler for profiling:
Finally, we set up ProfilerViewer to consume the profiling information and make it visible in the interface:
The full JavaScript block for this example is as follows:
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.
Copyright © 2013 Yahoo! Inc. All rights reserved.