New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “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? Sign in to your account
Make Standard Library browser compatible #641
Comments
The browser-compatible modules have at the top: // This module is browser-compatible.The idea is that these modules can run in browsers already if bundled into JS with However, the idea of the registry ( |
|
There is also this, which we were going to put into |
|
@nayeemrmn thanks for your quick answer. I'm also mean to do it only to |
Hi!
Now that you are working on review and stabilizing the Deno Standard Library here https://github.com/denoland/deno/issues/8405, I like to make a suggestion.
One of the greatest point of Deno is the compatibility with the standards. If it works on the browser, it should work on Deno, I guess this is the reason why you're implementing web APIs like
window,location,alertorfetch. The standard library of Deno is a great addition, but to me it has a problem: it's written in Typescript. I know that Typescript is a big bet for Deno and I think it's great that it can be supported by default, without need to install any additional tool to transpile. But browsers do not support Typescript, so there's no way to import and use any deno std module directly in the browser.Perhaps this was been discussed before, but I'd like to propose that these components would have a ES6 javascript version, that could be imported and used in the browser. I'm not suggesting to remove Typescript, but providing an additional
*.jsendpoint so in a browser I could import and execute:Doing so, the std library would be not only great for Deno but for the whole javascript ecosystem.
Some of the std modules require the
Deno.*runtime API (fs, for example). But others don't. I propose to provide a*.jsversion only for those modules using standard web apis.What do you think?
The text was updated successfully, but these errors were encountered: