javascript - Moving SignalR object between HTML pages -
i use signalr
on javascript
.
i have 2 objects: connection
object , hub proxy
object:
var connection = $.hubconnection(); connection.url = 'http://localhost:xxx/signalr'; var contosochathubproxy = connection.createhubproxy('chathub');
i want these 2 objects recognized in html
pages, tried put them in sessionstorage
had convert them json:
sessionstorage["connection"]= json.stringify(connection); sessionstorage["proxyhub"]= json.stringify(contosochathubproxy);
i got following error:
"converting circular structure json"
i found information in several places, , everywhere written should determine real object.
the question real object?
below there picture of connection object console:
or there way pass object between pages without converting it? (without cookies)
a new page requires new connection. love proven wrong.
Comments
Post a Comment