I get SyntaxError: An invalid or illegal string was specifiedtrying to connect to a WebSocket in Firefox.
SyntaxError: An invalid or illegal string was specified
<!doctype html> <html> <head><meta charset="utf-8"></head> <body> <script> var socket = new WebSocket('127.0.0.1:1234'); </script> </body> </html>
Why am I getting this error?
It seems like a schema is required when trying to connect to a WebSocket, so this is:
var socket = new WebSocket('ws://127.0.0.1:1234');
works great.
Source: https://habr.com/ru/post/1624403/More articles:VSTS Create an area path using WorkItemClassificationNode - vstsExport / Import Color Schemes SAS Enhanced Editor - editorIs there a way to turn off Hibernate optimization lock? - javaSAS: advanced editor. Color Scheme Sharing - editorCapturing method references with mockito - javaПолучить объект из коллекции без цикла в java - javaWhen mixing Prolog coroutining (freeze / 2, when / 2) and DCG - prologHow to combine multiple grep commands? - linuxТест дерева двоичного дерева Prolog - родительский родительский родитель node - binary-treeCurrency with 5 decimal digits? - precisionAll Articles