Skip to content
Discussion options

You must be logged in to vote

Hey @zcy19373416,

glad hear you're enjoying working with Langium :)

I'm not too familiar with liquidjs, but it seems like the library or your code try to access the window.document variable in the scope of the webworker. Webworkers have a different set of APIs exposed to them compared to the JS that runs in the main thread of the window.

Instead of accessing the document directly and modifying the DOM, you should return the generated html from the command handler and let the caller site (i.e. the main JS thread) handle the DOM modification.

Note that we offer an integrated set of generator tools, which can be seen here. Since it's integrated into TypeScript, you can run all the conditiona…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@zcy19373416
Comment options

@msujew
Comment options

@zcy19373416
Comment options

Answer selected by zcy19373416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants