Skip to content

Commit

Permalink
Add Worker constructor api documentation
Browse files Browse the repository at this point in the history
Remove useless print line
[ci skip]
  • Loading branch information
Geequlim committed Aug 8, 2020
1 parent 4203580 commit fe5b28c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions misc/godot.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ declare module globalThis {
//@ts-ignore
class Worker {

/**
* Creates a dedicated worker thread that executes the script at the specified file
*/
constructor(script: string);

/**
* The `onmessage` property of the Worker interface represents an event handler, that is a function to be called when the message event occurs.
* It will be called when the worker's parent receives a message from the worker context by `postMessage` method.
Expand Down
1 change: 0 additions & 1 deletion quickjs/quickjs_binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,6 @@ JSValue QuickJSBinder::worker_abandon_value(JSContext *ctx, JSValue this_val, in
JSValue &value = argv[0];
bool valid = true;
Variant gd_value = var_to_variant(ctx, value);
print_line("=================>" + String(gd_value));
if (gd_value.get_type() == Variant::OBJECT) {
ECMAScriptGCHandler *data = BINDING_DATA_FROM_JS(ctx, value);
if (data) {
Expand Down

0 comments on commit fe5b28c

Please sign in to comment.