Canvas-Latex Error - need help!

Hi gang, the canvas-latex library that makes math equations is not loading if we load ZIM with an ES6 import. But it does work with script tags. Can't figure it out. Here are the two files:

ZIM - CanvasLatex - Code Creativity - working with script tags
ZIM - CanvasLatex - Code Creativity - not working with module

A solution might be to import the canvas-latex with ES6 import but can't seem to get that to work - @capi421 - any idea what is going on with that? I need a default() function but if I try and import it directly it says it is a keyword - sigh. There is no default export so I tried * as CanvasLatex but it later says CanvasLatex.default() is not a constructor.

Anyway, it would be good to find out why it is giving the this.dispatchEvent is not defined or whatever the error is.

Any help is welcome.


Oh - lost track of this one - any suggestions @capi421 or others?

@racheli any idea?

<!DOCTYPE html>
<meta charset="utf-8" />
<title>ZIM - CanvasLatex - Code Creativity</title>

<!-- - JavaScript Canvas Framework -->
<!-- <script src="../cdn/1.4.1/createjs.js"></script>
<script src="../cdn/016/zim_doc.js"></script> 
<script src="../explore/canvas-latex.js"></script> -->

<script type=module>

import zim from "";
import  "";

// See Docs under Frame for FIT, FILL, FULL, and TAG
new Frame(FIT, 1024, 768, light, dark, ready);
function ready() {
	// given F (Frame), S (Stage), W (width), H (height)
	// put code here
	var options = {
		displayMode: true,
		debugBounds: false,
		strict: false

var equation = new CanvasLatex.default(`
  `, options);


<meta name="viewport" content="width=device-width, user-scalable=no" />

My guess is that this is a scope problem inside the module.
Importing the canvas script from inside the module fixes the problem.