Skip to content

Commit

Permalink
Make the type of the Node argument to Document#importNode non-null.
Browse files Browse the repository at this point in the history
Document#importNode is defined to take a non-null Node argument, and the browser will throw an exception if null is passed in. However, the externs currently specify the type as nullable. This change is required to unblock fixing the externs.

This CL was automatically generated by finding call sites where the type cannot be proven to be non-null, and adding an explicit cast. A better fix may exist (for example, prepending a `!` to the type of an existing variable). If that's the case, please use go/suggestfix to propose an alternative.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=223047656
  • Loading branch information
tjgq authored and nreid260 committed Nov 28, 2018
1 parent 57a4aca commit 4c9ccc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion closure/goog/net/iframeio.js
Expand Up @@ -916,7 +916,7 @@ goog.net.IframeIo.prototype.sendFormInternal_ = function() {
}

// Append a cloned form to the iframe
var clone = doc.importNode(this.form_, true);
var clone = doc.importNode(goog.asserts.assert(this.form_), true);
clone.target = innerFrameName;
// Work around crbug.com/66987
clone.action = this.form_.action;
Expand Down

0 comments on commit 4c9ccc4

Please sign in to comment.