Message from JavaScript discussions

February 2019

— So a var chat = io.connect(SERVER + "/chat") is enough?

— 

const elem = document
.querySelector('button');

if (elem) {
elem
.addEventListener('click', foo);
}


vs:

const elem = Maybe.of(
document
.querySelector('button'));

elem.map(x =>
x.addEventListener('click', foo));

— I think

— I'll try

— It's not needed at all, no checks. i mean the data polling / value update

— Why you need to check what is already there. just write correct code

— Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://file/socket.io/?EIO=3&transport=polling&t=MZYaqiJ. (Reason: CORS request did not succeed).[Learn More]

Message permanent page

— You have to enable CORS in your server.

— But “file” is your server??

— No, my server isn't in javascript

— So what? CORS is not a JavaScript thing

— Idk what's cors