Yemdust

Results 32 comments of Yemdust

After add code listed above, still say 'FormData' is not defined. I'm no idea about how a js object registered in webF.

我尝试添加了formData和arrayBuffer,并且编译通过。 (formData还没有添加到请求的内容里面, 因为我那个vue程序好像可以new FormData了,暂时就没有管它了) 现在在测试arrayBuffer,但是用js测试new出来的对象似乎类型不对。 ts这样写的: ``` import {webf} from './webf'; export class ArrayBuffer{ private id:string; private byteLength?:number=0; constructor(byteLength?:number){ this.byteLength=byteLength; this.id = webf.invokeModule('ArrayBufferData', 'init',[byteLength]); } public slice(start:number,end:number):void{ webf.invokeModule('ArrayBufferData','slice',[this.id,start,end]); } public...

确实没有很清晰使用了polyfill,C++,又混合dart的时候,对象实现是如何注册到qjs里面。

那如果实现FormData,必须要实现一个qjs_form_data是吗?

好的。Fetch API和xmlHttpRequest,在webf中是共享的实现代码吗?好像没有看到xmlHttpRequest。

好的。那如果添加了FormData, 估计xhr这里也要适配一下。

我尝试在formData中使用BlobParts, ```typescript // type FormDataEntryValue = File | string; export interface FormData { new():FormData; append(name: string, value: BlobPart, fileName?: string): void; del(name: string): void; get(name: string): BlobPart getAll(name: string): BlobPart[];...

回调函数在d.ts里面用什么表示,NativeTypeFunction?

FormData已经实现,现在需要执行单元测试。 我这边尝试了npm run test但是测试框架好像配置有问题,简单看了一下不知道如何解决,方便看一下吗 https://github.com/openwebf/webf/issues/642 npm run test出错。libwebf.so: undefined symbol: initTestFramework @andycall

目前只是测试FormData的api,FFI我还不会,不知道怎么弄到fetchModule里面。 我想是否能在FormData上面添加一个getBytes(), 在xhr.ts里面调用一下,data就自动变成一个dart里面的Uint8List?