mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
A modern runtime for JavaScript and TypeScript.
https://deno.com/
2fc5878668
Changed `URL.port` implementation to match [WHATWG specifications](https://url.spec.whatwg.org/#port-state). This PR matches the behaviour of other browsers: 1. a `TypeError` must be thrown when passing an URL with an invalid port to the constructor. 2. When setting an invalid port, using property setter, I haven't found what should happen in this case, so I mimic **Firefox** & **Node** behaviour. If an invalid port is set, it will use the previous value. **Chrome** sets the value to `'0'` if an invalid port is set. I prefer to keep the previous valid value. (I can use Chrome's behaviour if you think it's better, it's a simple value change) ``` url.port = '3000'; // valid url.port = 'deno'; // invalid assertEquals(url.port, '3000'); ``` 3. If the port value equals the current protocol default port value, `port` will be an empty string. |
||
---|---|---|
.cargo | ||
.github | ||
cli | ||
core | ||
deno_typescript | ||
std | ||
test_plugin | ||
third_party@4a3ade3322 | ||
tools | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.prettierignore | ||
.prettierrc.json | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
Releases.md |
Deno
A secure runtime for JavaScript and TypeScript.
Deno aims to provide a productive and secure scripting environment for the modern programmer. It is built on top of V8, Rust, and TypeScript.
Please read the introduction for more specifics.