gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

Provide way to disable checking of SWF "Insecure" name #80

Closed imanel closed 13 years ago

imanel commented 13 years ago

In code you check by name "WebSocketMainInsecure.swf" if insecure file is used. This prevents us from changing file name to anything except of that. There should be switch to disable this approach and always assume that correct file was used.

This is probably good moment to implement one namespace for all variables, like mentioned in #79

gimite commented 13 years ago

Good point. I added flag WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR at: https://github.com/gimite/web-socket-js/commit/a71f371861dc0c19002ae7ecf8ce6dd60bc5f259

Using one namespace might be a bit cleaner, but I don't want to change existing flag names to confuse users.

imanel commented 13 years ago

Good idea would be to default unified namespace to "old" variables so user could choose which one he would like to use. We could deprecate them in readme and describe both methods with note that old one will be removed in few months. That way we will have place to add new methods, but without changing how old ones is working.

I will try to introduce draft of this solution in few days for your consideration.

gimite commented 13 years ago

Yeah that would be possible but I think the merit (looks slightly nicer, global namespace is slightly cleaner) is too small for the effort. Anyway WEBSOCKET* will not likely to cause name collision.