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

web socket not working in frameset #155

Open
eyalzf opened this issue Nov 11, 2014 · 4 comments
Open

web socket not working in frameset #155

eyalzf opened this issue Nov 11, 2014 · 4 comments

Comments

@eyalzf
Copy link

eyalzf commented Nov 11, 2014

Hi,

I'm trying to dynamically inject the web-socket-js scripts into a frameset based page and the scripts are not running. I'm guessing it has to do with the fact the script creates some elements on the body which are not being created since the body is frameset.

Any suggestions?

Thanks,
Eyal

@gimite
Copy link
Owner

gimite commented Nov 12, 2014

Hmm I have no idea. I haven't tried running it in a frameset, so there may be some issue. It would be great if you follow steps in "Troubleshooting" section of README:
https://github.com/gimite/web-socket-js#troubleshooting
Especially the output of Step 2 may give a hint.

@rfox90
Copy link

rfox90 commented Nov 12, 2014

You are correct:
https://github.com/gimite/web-socket-js/blob/master/web_socket.js#L296

Shows where the swf holder is added to the document.

You could probably fork the repo and add a target option/function which could handle it.

Not using framesets would probably be best though. I don't have any idea of your project constraints though so :)

@eyalzf
Copy link
Author

eyalzf commented Nov 12, 2014

I'm injecting the code dynamically and I don't really have control over the
underlying application structure.

Currently, as a workaround, I inject the script to one of the frames,
create the WebSocket object through that frame and from that point I can
use it in script in the top document.

I guess the same solution can be applied internally in the web_socket.js
but I'm not sure it's the right way.
On Nov 12, 2014 4:51 AM, "Richard Fox" [email protected] wrote:

You are correct:
https://github.com/gimite/web-socket-js/blob/master/web_socket.js#L296

Shows where the swf holder is added to the document.

You could probably fork the repo and add a target option/function which
could handling it.

Not using framesets would probably be best though. I don't have any idea
of your project constraints though so :)


Reply to this email directly or view it on GitHub
#155 (comment)
.

@rfox90
Copy link

rfox90 commented Nov 18, 2014

Fork the repo, add some sort of user customizable way of specifying where the swf goes, defaulting to the current behaviour.

And chuck a pull request in.

Other people may find it handy :)

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