Share JSXGraph: example "Import JSXGraph as ES6 module"

JSXGraph
Share JSXGraph: example "Import JSXGraph as ES6 module"
This website is a beta version. The official release will be in **2024**.

Import JSXGraph as ES6 module

ES6 imports are possible with `jsxgraphcore.mjs`.
<div id="jxgbox" class="jxgbox" style="width:600px; height:600px;"> </div>
<script type="module">
// This is the ES6 import example:
import JXG from 'https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.mjs';

const board = JXG.JSXGraph.initBoard('jxgbox', {
    boundingbox: [-5, 5, 5, -5],
    axis: true
});
var curve = board.create('functiongraph', ['exp(x)']);
</script>
// Define the id of your board in BOARDID

// Dummy example, please ignore
const board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-5, 5, 5, -5],
});