elemental2.dom.WebSocket#close(int code, String reason) throws InvalidAccessError: A parameter or an operation is not supported by the underlying object
See original GitHub issueThe two methods
elemental2.dom.WebSocket#close(int code, String reason)
and
elemental2.dom.WebSocket#close(int code)
both throw an InvalidAccessError in Firefox (don’t know if other Browsers work)
elemental2.dom.WebSocket#close()
is working as intended.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Evil Firefox Error -- "A parameter or an operation is not ...
Since this is the first duckduckgo result for InvalidAccessError: A parameter or an operation is not supported by the underlying object I ...
Read more >DOMException - Web APIs | MDN
(Legacy code value: 14 and legacy constant name: NAMESPACE_ERR ). InvalidAccessError. The object does not support the operation or argument.
Read more >WebSocket - Adobe Developer
Returns: string - returns a string indicating the name of the sub-protocol the server selected; this will be one of the strings specified...
Read more >18 Using the WebSocket Protocol in WebLogic Server
Typically the WebSocket protocol is not supported either because the WebSocket object is not available or because WebSocket frames are blocked by a...
Read more >python-websockets(1) - Arch manual pages
The WebSocket server loads the Python code in app.py then serves every WebSocket request with ... throw new Error(`Unsupported event type: ${event.type}.`);
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 FreeTop 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
Top GitHub Comments
I have done exactly the same thing … multiple times. Hence how I could guess 😉
I am not sure what you mean.
onclose
is called with aCloseEvent
and I believe that is still invoked, even if you initiate the close. If you use the more genericaddEventListener
then you may need to cast the event to the correct type.Although it has been a while since I looked at the code so it may be that the Elemental2 externs don’t specify the types tightly enough and you ay need to always do a cast