diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js
index d4421735d..6638b2fc0 100644
--- a/IPython/html/static/widgets/js/widget.js
+++ b/IPython/html/static/widgets/js/widget.js
@@ -355,7 +355,7 @@ define(["widgets/js/manager",
this.pending_msgs++;
}
}
- // Since the comm is a one-way communication, assume the message
+ // Since the comm is a one-way communication, assume the message
// arrived. Don't call success since we don't have a model back from the server
// this means we miss out on the 'sync' event.
this._buffered_state_diff = {};
@@ -369,7 +369,7 @@ define(["widgets/js/manager",
// being the value or the promise of the serialized value
var serializers = this.constructor.serializers;
if (serializers) {
- for (k in attrs) {
+ for (var k in attrs) {
if (serializers[k] && serializers[k].serialize) {
attrs[k] = (serializers[k].serialize)(attrs[k], this);
}
@@ -383,11 +383,13 @@ define(["widgets/js/manager",
for (var i=0; i