Skip to content

Do you accept contributions for wrappers over JavaScript objects? #124

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Closed
revolter opened this issue Mar 16, 2021 · 4 comments
Closed

Do you accept contributions for wrappers over JavaScript objects? #124

revolter opened this issue Mar 16, 2021 · 4 comments

Comments

@revolter
Copy link
Contributor

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

@j-f1
Copy link
Member

j-f1 commented Mar 16, 2021

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.

@MaxDesiatov
Copy link
Contributor

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...

@j-f1
Copy link
Member

j-f1 commented Mar 16, 2021

Here’s FileReader: https://github.com/swiftwasm/DOMKit/blob/e45d37fbfddbe982a612f577d41ade85bab1bfbc/Sources/DOMKit/WebIDL/FileReader.swift

@revolter
Copy link
Contributor Author

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

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants