Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Fix bug with iframes
Browse files Browse the repository at this point in the history
R=nicksantos
DELTA=7  (3 added, 0 deleted, 4 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=5609


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2217 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information
carlanton@google.com committed Oct 4, 2012
1 parent 7e503de commit 7d4192b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions closure/goog/net/iframeio.js
Expand Up @@ -141,6 +141,7 @@ goog.require('goog.debug');
goog.require('goog.debug.Logger');
goog.require('goog.dom');
goog.require('goog.events');
goog.require('goog.events.Event');
goog.require('goog.events.EventTarget');
goog.require('goog.events.EventType');
goog.require('goog.json');
Expand Down Expand Up @@ -344,8 +345,9 @@ goog.net.IframeIo.getForm_ = function() {
* @private
*/
goog.net.IframeIo.addFormInputs_ = function(form, data) {
var helper = goog.dom.getDomHelper(form);
goog.structs.forEach(data, function(value, key) {
var inp = goog.dom.createDom('input',
var inp = helper.createDom('input',
{'type': 'hidden', 'name': key, 'value': value});
form.appendChild(inp);
});
Expand Down Expand Up @@ -1114,8 +1116,8 @@ goog.net.IframeIo.prototype.createIframe_ = function() {
iframeAttributes.src = 'javascript:""';
}

this.iframe_ = /** @type {HTMLIFrameElement} */(goog.dom.createDom(
'iframe', iframeAttributes));
this.iframe_ = /** @type {HTMLIFrameElement} */(
goog.dom.getDomHelper(this.form_).createDom('iframe', iframeAttributes));

var s = this.iframe_.style;
s.visibility = 'hidden';
Expand All @@ -1137,7 +1139,8 @@ goog.net.IframeIo.prototype.createIframe_ = function() {
* @private
*/
goog.net.IframeIo.prototype.appendIframe_ = function() {
goog.dom.getDocument().body.appendChild(this.iframe_);
goog.dom.getDomHelper(this.form_).getDocument().body.appendChild(
this.iframe_);
};


Expand Down

0 comments on commit 7d4192b

Please sign in to comment.