Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Commit

Permalink
Updates to use newest Rendermime API
Browse files Browse the repository at this point in the history
(c) Copyright IBM Corp. 2016
  • Loading branch information
jhpedemonte committed Aug 2, 2016
1 parent b9f410c commit b697087
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions client/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,17 @@ if (Element && !Element.prototype.matches) {
// NOTE: The HTMLRenderer doesn't work with current Safari versions -- inline JS scripts
// don't load. This simple implementation works around it by using jQuery to add the
// HTML to the DOM; this does run inline scripts.
{
mimetypes: ['text/html'],
render: function(mimetype, data) {
(function() {
var r = new renderers.HTMLRenderer();
r.render = function(mimetype, data) {
var widget = new PhWidget.Widget();
widget.onAfterAttach = function() {
$(widget.node).html(data);
};
return widget;
}
},
};
return r;
})(),
new renderers.ImageRenderer(),
new renderers.SVGRenderer(),
new renderers.LatexRenderer(),
Expand All @@ -169,7 +170,7 @@ if (Element && !Element.prototype.matches) {
mimeMap[m] = t;
});
});
return new RenderMime(mimeMap, order);
return new RenderMime({ renderers: mimeMap, order: order });
}

// shim kernel object on notebook for backward compatibility
Expand Down

0 comments on commit b697087

Please sign in to comment.