Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulties while creating a worker for a custom mode #147

Open
n1313 opened this issue Dec 4, 2018 · 1 comment
Open

Difficulties while creating a worker for a custom mode #147

n1313 opened this issue Dec 4, 2018 · 1 comment

Comments

@n1313
Copy link

n1313 commented Dec 4, 2018

Hi, I am trying to create a worker for a custom mode (following this guide) and I can't get my browser to make a request for my worker file. Upon examination of brace source, I have found a line in $workerBlob method that looks suspicious to me: https://github.com/thlorenz/brace/blame/master/index.js#L17977:

var script = mod.src;"importScripts('" + net.qualifyURL(workerUrl) + "');";

What is this string "importScripts('" + net.qualifyURL(workerUrl) + "');" supposed to be doing? This line was changed in v0.11.0. Before the change, it was this:

var script = "importScripts('" + net.qualifyURL(workerUrl) + "');";

This one makes more sense to me.

I am not entirely sure if this is a bug, or my problems are stemming from something else entirely, but I would appreciate someone more knowledgeable taking a look at this and helping me understand. And any pointers or docs on how to create a custom worker would be appreciated as well. Thanks!

@n1313 n1313 changed the title Difficulties while creating a worker Difficulties while creating a worker for custom mode Dec 4, 2018
@n1313 n1313 changed the title Difficulties while creating a worker for custom mode Difficulties while creating a worker for a custom mode Dec 4, 2018
@wdick
Copy link

wdick commented Jan 29, 2019

Having the same problem. I'm trying to import my own mode generated with XText.
But neither relative nor absolute URLs to the mode file are loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants