| 1150 | extend(ZeroFrame, superClass); |
| 1151 | |
| 1152 | function ZeroFrame(url) { |
| 1153 | this.onCloseWebsocket = bind(this.onCloseWebsocket, this); |
| 1154 | this.onOpenWebsocket = bind(this.onOpenWebsocket, this); |
| 1155 | this.onRequest = bind(this.onRequest, this); |
| 1156 | this.onMessage = bind(this.onMessage, this); |
| 1157 | this.url = url; |
| 1158 | this.waiting_cb = {}; |
| 1159 | this.wrapper_nonce = document.location.href.replace(/.*wrapper_nonce=([A-Za-z0-9]+).*/, "$1"); |
| 1160 | this.connect(); |
| 1161 | this.next_message_id = 1; |
| 1162 | this.history_state = {}; |
| 1163 | this.init(); |
| 1164 | } |
| 1165 | |
| 1166 | ZeroFrame.prototype.init = function() { |
| 1167 | return this; |