diff --git a/IPython/html/static/widgets/js/types.js b/IPython/html/static/widgets/js/types.js
index 0b202b5..f5d8c76 100644
--- a/IPython/html/static/widgets/js/types.js
+++ b/IPython/html/static/widgets/js/types.js
@@ -30,6 +30,8 @@ define([
return Promise.resolve(value);
}
},
+ /* We don't need a serializer since models automatically serialize to their UUIDs */
+ /* courtesy of the model toJSON */
},
}
});
diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js
index 18a7f70..c59d25f 100644
--- a/IPython/html/static/widgets/js/widget.js
+++ b/IPython/html/static/widgets/js/widget.js
@@ -440,6 +440,14 @@ define(["widgets/js/manager",
}, this);
},
+
+ toJSON: function(options) {
+ /**
+ * Serialize the model. See the types.js deserialization function
+ * and the kernel-side serializer/deserializer
+ */
+ return "IPY_MODEL_"+this.id;
+ }
});
widgetmanager.WidgetManager.register_widget_model('WidgetModel', WidgetModel);