Thursday, November 30, 2023
Home3D ModelingHtmlDialog CEF assist for ES modules? - Ruby API

HtmlDialog CEF assist for ES modules? – Ruby API

In constructing a plugin utilizing the HtmlDialog for its interface, I’ve been stepping into the world of front-end javascript improvement, the place ES modules are actually the usual for structuring an software. Nevertheless so far as I can inform, ES modules can’t be loaded in an HtmlDialog – in a easy take a look at file the place I import a module utilizing <script sort="module" src=""></script>, the script doesn’t load, and checking the Dev Instruments (accessed by right-clicking the HTMLDialog), reveals the next message:

Didn’t load module script: The server responded with a non-JavaScript MIME sort of “”. Strict MIME sort checking is enforced for module scripts per HTML spec.

If HtmlDialog is loading utilizing the file:// protocol from the native filesystem, then that is precisely what you’d count on, but it surely’s actually inconvenient for testing a dialog in Sketchup to must re-build the entire package deal each time I need to make a change. Is there a strategy to get Sketchup’s HtmlDialog to efficiently load a <script sort="module"...> tag?



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments