(_hyperscript)
| 396 | }; |
| 397 | streamConversion._rawResponse = true; |
| 398 | function eventsourcePlugin(_hyperscript) { |
| 399 | _hyperscript.addFeature(EventSourceFeature.keyword, EventSourceFeature.parse.bind(EventSourceFeature)); |
| 400 | _hyperscript.config.conversions.Stream = streamConversion; |
| 401 | addEventListener("hyperscript:beforeFetch", function(evt) { |
| 402 | if (evt.detail.conversion === "Stream") { |
| 403 | evt.detail.headers["Accept"] = "text/event-stream"; |
| 404 | } |
| 405 | }); |
| 406 | } |
| 407 | if (typeof self !== "undefined" && self._hyperscript) { |
| 408 | self._hyperscript.use(eventsourcePlugin); |
| 409 | } |
nothing calls this directly
no test coverage detected