Freelancer icon indicating copy to clipboard operation
Freelancer copied to clipboard

any way to name the worker?

Open devrim opened this issue 6 years ago • 2 comments

thanks for the amazing lib. just wanted to ask if it's something i'm not seeing (...args), if not, should i contribute that?

https://stackoverflow.com/questions/44885803/can-you-assign-a-name-to-a-web-worker

devrim avatar Jan 05 '18 05:01 devrim

Please contribute that @devrim 👍 I didn't know about its second argument.

Wildhoney avatar Jan 05 '18 09:01 Wildhoney

it should have been as easy as this;


  /**
   * @constructor
   * @param {*} args
   * @return {Worker}
   */
  constructor(...args) {
    return super(createUrl(...args), {name: "foo"});
  }

however, i am not seeing that name on my chrome workers.

image

if i create a worker from a ./js/* that name: foo works. i don't know what it's not liking..

i'll check it out again sometime in the future. cheers!

devrim avatar Jan 06 '18 02:01 devrim