--- Revision 570 +++ Revision 572 @@ -26,6 +26,10 @@ UI.IframeShim = Class.create(UI.Options, { + options: { + parent: document.body + }, + /* Method: initialize Constructor @@ -37,13 +41,14 @@ Returns: this */ - initialize: function() { + initialize: function(options) { + this.setOptions(options); this.element = new Element('iframe', { style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=1);', src: 'javascript:false;', frameborder: 0 }); - $(document.body).insert(this.element); + $(this.options.parent || document.body).insert(this.element); }, /* @@ -104,7 +109,7 @@ */ setBounds: function(bounds) { for (prop in bounds) { - bounds[prop] += 'px'; + bounds[prop] = parseInt(bounds[prop]) + 'px'; } this.element.setStyle(bounds); return this;