| 708 | }; |
| 709 | |
| 710 | function EventSourcePolyfill(url, options) { |
| 711 | EventTarget.call(this); |
| 712 | options = options || {}; |
| 713 | |
| 714 | this.onopen = undefined; |
| 715 | this.onmessage = undefined; |
| 716 | this.onerror = undefined; |
| 717 | |
| 718 | this.url = undefined; |
| 719 | this.readyState = undefined; |
| 720 | this.withCredentials = undefined; |
| 721 | this.headers = undefined; |
| 722 | |
| 723 | this._close = undefined; |
| 724 | |
| 725 | start(this, url, options); |
| 726 | } |
| 727 | |
| 728 | function getBestXHRTransport() { |
| 729 | return (XMLHttpRequest != undefined && ("withCredentials" in XMLHttpRequest.prototype)) || XDomainRequest == undefined |