Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line 65 Error in IE8 #150

Open
shahraship opened this issue Mar 4, 2014 · 5 comments
Open

Line 65 Error in IE8 #150

shahraship opened this issue Mar 4, 2014 · 5 comments

Comments

@shahraship
Copy link

I tried to load this up in IE8 and I'm getting an error on line 65:

WebSocket.__flash.create(): Object doesn't support this property or method.

WebSocket.__flash seems like a valid object, however the "create" seems to be failing.

I have Flash Player 12 installed. The SWF seems to be loading just fine, however, I see this error upon initialization through JavaScript.

@gimite
Copy link
Owner

gimite commented Mar 6, 2014

Hmm I'm not sure why. Can you try "Troubleshooting" section in:
https://github.com/gimite/web-socket-js

Especially follow Step 1 and see if you get any other log messages?

I'll try to see if I can reproduce.

@gimite
Copy link
Owner

gimite commented Mar 6, 2014

Especially follow Step 1 and see if you get any other log messages?

I mean the step to put WEB_SOCKET_DEBUG = true. There seems to be two "Step 1" :)

@shahraship
Copy link
Author

I think I understand why that happens now. I look at the sample.html code and it works in the same browser. The main difference between what I have vs. sample.html is that, it uses body onload, which waits for flash to be loaded as well. However, in my application, I'm using requirejs to load this module. Once the module is loaded, I then attempt to connect with socket right away. Seems like flash isn't completely loaded at that time and that is why the above error is thrown.

I'm however not quiet sure about what is the best way to fix this is.

@reklis
Copy link

reklis commented Mar 7, 2014

require(['domReady'], function (domReady) {
domReady(function () {
//This function is called once the DOM is ready.
//It will be safe to query the DOM and manipulate
//DOM nodes in this function.
});
});

http://requirejs.org/docs/api.html#pageload

@gimite
Copy link
Owner

gimite commented Apr 23, 2014

Sorry I forgot to follow up on this thread. web-socket-js queues actual process until Flash object is ready, so it should work even if you use WebSocket immediately after loading web_socket.js. I verified that it works with IE11. But there may be an issue specific to IE8. It may be safer to wait until onload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants