`url` attribute is not read-only
See original GitHub issue- I’ve searched for any related issues and avoided creating a duplicate issue.
Description
According to https://developer.mozilla.org/en-US/docs/Web/API/WebSocket, url
attribute should be a read-only string, but it’s currently being set as a plain attribute that can be overwritten, and in fact, it’s being undefined
on server side. I think this should be replaced by a getter.
Reproducible in:
- version: 7.3.1
- Node.js version(s): 15.0.1
- OS version(s): Ubuntu 20.04
Steps to reproduce:
- Create a WebSocket connection
- Set the
url
attribute
Expected result:
Thrown exception about not being able to modify a getter property
Actual result:
The url
attribute is updated with any value provided
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >jQuery "not readonly" selector - Stack Overflow
I suppose you are looking for something like the following: $('input:not([readonly="readonly"])'). Have a look at jQuery's various attribute-selectors.
Read more >HTML DOM Input URL readOnly Property - W3Schools
The readOnly property sets or returns whether a URL field should be read-only, or not. A read-only field cannot be modified. However, a...
Read more >HTML DOM Input URL readOnly Property
The readOnly property sets or returns whether a URL field should be read-only, or not. A read-only field cannot be modified. However, a...
Read more >HTML5 Forms: Readonly Type Attribute - Wufoo
The readonly attribute makes a form control non-editable (or “read only”). ... readonly is only relevant for type text, search, url, tel, email,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you 😃
I was adding it client side then doing ws.url=req.url
I’m sure I can figure out a workaround
Thanks, Eli Tabello 647.382.7084
On Fri., Dec. 18, 2020, 5:28 p.m. Jesús Leganés-Combarro, < notifications@github.com> wrote: