• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog »
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

plugin satyam table async css model caridy jafl lsmith node apipkin nzakas greghinch io event solmsted liferay ericf yql datatable widget form animation foxxtrot davglass

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Parent Window Utility (gallery-parent-window) on cdn

    Last Updated: 09/11/10
    + 1 -

    Caridy Patino

    YUI Contributor

    See 11 more by this user.

    Created: 08/20/10
    Last CDN Push: 11/17/10
    Build Tag: gallery-2010.11.17-21-32
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.2.0
    Free for use.

    Overview

    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.

    Usage

    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>

    Tests

    Run this test in your browser and report any issue.

    • http://caridy.name/sandbox/yui3-gallery/src/gallery-parent-window/tests/parent-window.html

    Note: Make sure you include OS, Browser Version and the test result from YUI Console in your ticket.

    CHANGELOG

    Check the latest changes in this module.

    • http://github.com/caridy/yui3-gallery/tree/master/src/gallery-parent-window/
    • Tags:
    • caridy
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    <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
      });
     
    });

    Forum Posts

    Subject Author Date
    Nice Simon Gilligan 12/6/10
    Re: Nice Caridy Patino 12/7/10

    © 2006-2011 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