Skip to content

Commit

Permalink
Made Thread default to 'module' type
Browse files Browse the repository at this point in the history
  • Loading branch information
duart38 committed Mar 21, 2021
1 parent 12ffee0 commit 76ced7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Thread<T> {
? "file:" + this.workerURL.pathname
: this.workerURL.href,
{
type,
type: type || "module",
},
);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/example_simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let thread = new Thread<number>((e: MessageEvent) => {
console.log("Worker: Posting message back to main script");
return (result);
}
}, "module");
});

thread.onMessage((e) => {
console.log(`recived back from thread: ${e}`);
Expand Down

0 comments on commit 76ced7e

Please sign in to comment.