Jupyter 前端扩展 JavaScript API 的文档在哪里? [英] Where is a docs for Jupyter front-end extensions JavaScript API?
问题描述
我已阅读关于编写 Jupyter 的
另见
如何列出包括方法在内的属性:
...
I've read the docs about writing the Jupyter front-end extensions, and learn the examples, and now can build the simple extension by myself.
But - where is a complete docs for Jupyter extensions JavaScript API? How to find the JavaScript API for notebook properties and methods?
解决方案This answer is outdated. Also see answer below.
This might not be the answer you hoped for. However, it might help some readers being new to JavaScript development.
I also was looking for documentation on the Jupyter client API and could not find official docs.
The JavaScript source code can be found on the GitHub repository, for example:
What also helped was to
A. Use Google Chrome development tools, set a break point in the extension and type
Jupyter
in the console. Then you get a browsable tree structure that can be used to inspect the Jupyter object. That tree structure does not seem to contain methods.
B. Log all the properties of an object, including the methods. If you want to know about the methods of the notebook use for example
for(var property in Jupyter.notebook){ console.log(property)}
C. When typing in the console there is code completion. For example you might want to type
Jupyter.notebook.
and see the suggestions on how to complete the command:
Also see
- How to inspect Javascript Objects
- How to display all methods of an object?
- https://www.codeproject.com/Articles/24549/How-to-Inspect-a-JavaScript-Object
- Chrome Developer Tools console - inspect JavaScript object
Browsable tree structure in dev tools console:
How to list properties including methods:
...
这篇关于Jupyter 前端扩展 JavaScript API 的文档在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!