Skip to content

Commit 1812469

Browse files
committed
update custom.js docs with promises
1 parent 96d87c5 commit 1812469

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

notebook/static/custom/custom.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
* Instances are created after the loading of this file and might need to be accessed using events:
2121
* define([
2222
* 'base/js/namespace',
23-
* 'base/js/events'
24-
* ], function(IPython, events) {
25-
* events.on("app_initialized.NotebookApp", function () {
23+
* 'base/js/promises'
24+
* ], function(IPython, promises) {
25+
* promises.app_initialized.then(function (appName) {
26+
* if (appName !== 'NotebookApp') return;
2627
* IPython.keyboard_manager....
2728
* });
2829
* });
@@ -34,9 +35,10 @@
3435
*
3536
* define([
3637
* 'base/js/namespace',
37-
* 'base/js/events'
38-
* ], function(IPython, events) {
39-
* events.on('app_initialized.NotebookApp', function(){
38+
* 'base/js/promises'
39+
* ], function(IPython, promises) {
40+
* promises.app_initialized.then(function (appName) {
41+
* if (appName !== 'NotebookApp') return;
4042
* IPython.toolbar.add_buttons_group([
4143
* {
4244
* 'label' : 'run qtconsole',

0 commit comments

Comments
 (0)