diff --git a/myjs.ipynb b/myjs.ipynb new file mode 100644 index 0000000..10a21f0 --- /dev/null +++ b/myjs.ipynb @@ -0,0 +1,67 @@ +{ + "metadata": { + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.2-final" + }, + "orig_nbformat": 2, + "kernelspec": { + "name": "Python 3.9.2 64-bit", + "display_name": "Python 3.9.2 64-bit", + "metadata": { + "interpreter": { + "hash": "767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90" + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 2, + "cells": [ + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": "", + "application/javascript": "\nconsole.log(window.origin)\n" + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "ok\n" + ] + } + ], + "source": [ + "import IPython\n", + "cors_code='''\n", + "console.log(window.origin)\n", + "'''\n", + "display(IPython.display.Javascript(cors_code))\n", + "print(\"ok\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ] +}