在Google Chrome扩展程序中打开一个Socket.IO连接 [英] Opening a Socket.IO connection in a google chrome extension

查看:433
本文介绍了在Google Chrome扩展程序中打开一个Socket.IO连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在每次用户通过谷歌浏览器扩展访问新页面时打开与外部Socket.IO服务器的连接。这是我的第一个扩展,所以它有点难。

I'm trying to figure out how to open a connection to an external Socket.IO server every time the user visits a new page from a google chrome extension. This is my first extension, so it's a bit tough.

我尝试使用iframe和history.onVisit事件,但目前还没有运气。 b $ b

I tried using an iframe and the history.onVisit event, but no luck so far.

推荐答案

经过一番研究,我意识到Socket.IO目前不支持跨站点连接。所以这个想法出来了。

After some research I realized that Socket.IO doesn't currently support cross-site connections. So that idea's out.

这篇关于在Google Chrome扩展程序中打开一个Socket.IO连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆