76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Provides shimming support for Node via a Plugin.
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * This fixes SELECT bleedthrough for IE6 & Mac scrollbars
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @module shim-plugin
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Node plugin which can be used to add shim support.
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @class Plugin.Shim
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @param {Object} User configuration object
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Default class used to mark the shim element
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith * @property CLASS_NAME
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @type String
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @default "yui-node-shim"
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass // TODO: use ClassNameManager
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Default markup template used to generate the shim element.
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith * @property TEMPLATE
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @type String
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass Shim.TEMPLATE = '<iframe class="' + Shim.CLASS_NAME +
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass '" frameborder="0" title="Node Stacking Shim"' +
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass 'src="javascript:false" tabindex="-1" role="presentation"' +
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass 'style="position:absolute; z-index:-1;"></iframe>';
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass initEvents: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass this._resizeHandle = this._host.on('resize', this.sync, this);
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass getShim: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass return this._shim || (
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass insert: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Updates the size of the shim to fill its container
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @method sync
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass sync: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Removes the shim and destroys the plugin
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @method destroy
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass destroy: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass}, '@VERSION@' ,{requires:['node-style', 'node-pluginhost']});