geogebra-component.js provides a custom HTML element for embedding GeoGebra applets.
Usage
Download geogebra-component.js.
Include the GeoGebra deployggb.js script and geogebra-component.js in your page:
<html>
<head>
…
<script src="https://www.geogebra.org/scripts/deployggb.js"></script>
<script src="geogebra-component.js" defer></script>
</head>
<body>
…
</body>
</html>
Write a <geogebra-applet> element wherever you want a GeoGebra applet to appear.
Attributes on the element configure how it appears.
Use event listeners and property getters/setters to interact with the applet after it loads.