gimite/web-socket-js — comment on commit 4f7b9f870eb69f7eb626260d8b972f573b447af4
File: web_socket.js line 381
By luciferous:

This section's readability could be improved by using `swfobject.addDomLoadEvent` and unwrapping `WebSocket.__initialize`:

if (document.readyState == "complete") {
// Document is already loaded.
WebSocket.__initialize();
} else {
swfobject.addDomLoadEvent(WebSocket.__initialize);
}