File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,11 @@ document.body.addEventListener('htmx:responseError', (e) => {
2121 showErrorToast ( `Error ${ e . detail . xhr . status } when calling ${ e . detail . requestConfig . path } ` ) ;
2222} ) ;
2323
24- let webSocket ;
25-
26- // TODO: move websocket creation to shared webworker
27- htmx . createWebSocket = ( url ) => {
28- if ( ! [ 0 , 1 ] . includes ( webSocket ?. readyState ) ) return webSocket ;
29- const ws = new WebSocket ( url , [ ] ) ;
30- ws . binaryType = htmx . config . wsBinaryType ;
31- webSocket = ws ;
32- return ws ;
33- } ;
24+ // TODO: move websocket creation to shared webworker by overriding htmx.createWebSocket
3425
3526document . body . addEventListener ( 'htmx:wsOpen' , ( e ) => {
3627 const socket = e . detail . socketWrapper ;
3728 socket . send (
38- JSON . stringify ( { action : 'subscribe' , data : { url : window . location . href } } )
29+ JSON . stringify ( { action : 'subscribe' , data : { url : window . location . href } } )
3930 ) ;
4031} ) ;
You can’t perform that action at this time.
0 commit comments