Skip to content

Commit

Permalink
Merge pull request #242 from minrk/hardcode-widgets-js
Browse files Browse the repository at this point in the history
load widget extension in js
  • Loading branch information
takluyver committed Jul 28, 2015
2 parents 0afe9d2 + ff191ae commit cf4341a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions notebook/static/base/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ define([
};

var utils = {
load_extension: load_extension,
load_extensions: load_extensions,
load_extensions_from_config: load_extensions_from_config,
regex_split : regex_split,
Expand Down
6 changes: 2 additions & 4 deletions notebook/static/notebook/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ require([
"use strict";

// BEGIN HARDCODED WIDGETS HACK
// Don't include in above require call, avoiding r.js
// and crash on import failure.
require(['nbextensions/widgets/notebook/js/extension'], function(){}, function(err) {
console.error('ipywidgets package not installed. Widgets are not available.');
utils.load_extension('widgets/notebook/js/extension').catch(function () {
console.warn('ipywidgets package not installed. Widgets are not available.');
});
// END HARDCODED WIDGETS HACK

Expand Down

0 comments on commit cf4341a

Please sign in to comment.