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.

Cheers.

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

@racheli any idea?

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

<!-- zimjs.com - 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 "https://zimjs.org/cdn/016/zim_test";
import  "https://zimjs.org/cdn/canvas-latex";

// 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(`
      ax^2+bx+c+a^{(a^{3a}+3\\times4)}a^{a^a_a}_{a^a_a}\\\\
      1+\\sqrt[3]{2}+\\sqrt[1923^234]{2^{2}}
  `, options);
  zimify(equation);
  
  equation.sca(1.5).center().expand(0).drag({all:true});


}

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

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