swiftwasm/JavaScriptKit

Do you accept contributions for wrappers over JavaScript objects?

revolter opened this issue · 4 comments

For example, would you accept a JSFileReader class, similar to JSDate, which would wrap FileReader?

j-f1 commented

IMO JavaScriptKit should only contain portable classes — ones that would work in most (if not all) JS environments. DOM-specific types like FileReader would be better off in DOMKit, which is in need of finishing, if you’re interested.

I agree, JavaScriptKit is only supposed to wrap APIs that are available across all JavaScript runtimes, including Node.js. DOMKit is a better fit for browser-specific stuff, and there we try to get these wrappers automatically generated. I don't remember if FileReader is covered by our codegen off the top of my head...

Amazing! You are the best maintainers in the world ❤️