Caridy Patino![]()
This utility provides a set of functionalities to interact with the parent window:
- Controlling the parent window through a Y instance
- Sandboxing all YUI driven modules within the iframe instance to avoid polluting the parent window.
- Supporting multiple versions of YUI running in the same page without messing with the seed files.
- etc
All these features are specially useful if you want to create a 3rd Party Webapp.
You can inject this iframe in any page:
<!doctype html>
<html>
<head>
<script type="text/javascript" src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>
<script type="text/javascript">
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.09.01-19-12'
}).use('gallery-parent-window', function (iY) {
iY.ParentWindow({
gallery: 'gallery-2010.08.18-17-12' // for gallery-dispatcher
}).use ('yui2-tabview', 'gallery-dispatcher', 'node', 'event', function(Y) {
// enjoy a safe Y instance running on top of the parent window without
// polluting that document, and relying on the iframe to load any YUI module
});
});
</script>
</head>
<body><br></body>
</html>
Run this test in your browser and report any issue.
Note: Make sure you include OS, Browser Version and the test result from YUI Console in your ticket.
Check the latest changes in this module.
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>// This code should run in an iframe:
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.11.17-21-32'
}).use('gallery-parent-window', function(iY) {
iY.ParentWindow({
gallery: 'gallery-2010.08.18-17-12' // or any other YUI config property
}).use ('yui2-tabview', 'gallery-dispatcher', 'node', 'event', function(Y) {
// safe "Y" instance running on top of the parent
// window without polluting that document, and relying on the iframe
// to load any YUI module
});
});| Subject | Author | Date |
|---|---|---|
| Nice | Simon Gilligan | 12/6/10 |
| Re: Nice | Caridy Patino | 12/7/10 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info