ReadableStream

This commit is contained in:
Karl Seguin
2025-12-01 15:16:24 +08:00
parent 613428c54c
commit 92ae2c46b6
13 changed files with 632 additions and 59 deletions

View File

@@ -270,7 +270,10 @@ pub fn attachClass(comptime JsApi: type, isolate: v8.Isolate, template: v8.Funct
bridge.Iterator => {
// Same as a function, but with a specific name
const function_template = v8.FunctionTemplate.initCallback(isolate, value.func);
const js_name = v8.Symbol.getIterator(isolate).toName();
const js_name = if (value.async)
v8.Symbol.getAsyncIterator(isolate).toName()
else
v8.Symbol.getIterator(isolate).toName();
template_proto.set(js_name, function_template, v8.PropertyAttribute.None);
},
bridge.Property => {