https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • t

    tall-machine-76705

    07/14/2022, 9:36 PM
    Trying to figure it out but I'm failing miserably
  • t

    tall-machine-76705

    07/14/2022, 9:37 PM
    I can't seem to find the correct value to add, based on a scenario where the server is emitting e.g.
    server.emit('abc', 123)
  • r

    ripe-action-67367

    07/14/2022, 9:50 PM
    https://stackoverflow.com/questions/29604563/websocket-client-to-socket-io
  • r

    ripe-action-67367

    07/14/2022, 9:54 PM
    note that socket.io implements custom protocol on top of websockets, so it may not work as expected. Didn't test it tho, could be wrong
  • r

    ripe-action-67367

    07/14/2022, 9:54 PM
    probably, socket.io integration could be an extension on its own
  • t

    tall-machine-76705

    07/14/2022, 10:05 PM
    Ah, that's true, it's a custom protocol...
  • g

    gorgeous-ghost-95789

    07/15/2022, 12:39 AM
    But it would be a great fit for hyperscript. Should be easy to make and publish a custom implementation there.
  • e

    eager-artist-90251

    07/15/2022, 1:22 PM
    What is this wss://demo.piesocket.com thing? What I do is go to https://www.piesocket.com/websocket-tester, enter my localhost ws address (ws://localhost:4432/echo) and play with it. I see my HTML snippets correctly returned. In CodePen, with your snippet, if I use
    Copy code
    <div hx-ext="ws" ws-connect="ws://localhost:4432/echo">
    instead of your demo.piesocket thing then I see nothing. I'm missing sthg.
  • e

    eager-artist-90251

    07/15/2022, 1:26 PM
    No, no messages in the browser console (FF 90), (looking at the WS entry of the Network tab). My test server works (as I see that it returns the snippets when playing in the websocket-tester), I am failing to update the "notifications" div.
  • r

    ripe-action-67367

    07/15/2022, 1:30 PM
    wss://demo.piesocket.com is test websocket endpoint, that can be created at https://www.piesocket.com/websocket-tester
  • r

    ripe-action-67367

    07/15/2022, 1:31 PM
    What version of htmx and websockets extensions do you use?
  • r

    ripe-action-67367

    07/15/2022, 1:33 PM
    Ok, there is nothing in the network tab, but is there anything in the logs? Like "Firefox can’t establish a connection to the server at " or something?
  • e

    eager-artist-90251

    07/15/2022, 1:33 PM
    no, neither
  • r

    ripe-action-67367

    07/15/2022, 1:34 PM
    > I see my HTML snippets correctly returned.
  • r

    ripe-action-67367

    07/15/2022, 1:34 PM
    Question
  • r

    ripe-action-67367

    07/15/2022, 1:34 PM
    Does you server broadcast response to all clients?
  • e

    eager-artist-90251

    07/15/2022, 1:34 PM
    ahah, pinned version of htmx and old one :S
  • e

    eager-artist-90251

    07/15/2022, 1:34 PM
    let me update… (1.3.3)
  • e

    eager-artist-90251

    07/15/2022, 1:35 PM
    +1 let me check too.
  • e

    eager-artist-90251

    07/15/2022, 1:37 PM
    Didn't see it has a pre-filled address. Thanks.
  • e

    eager-artist-90251

    07/15/2022, 1:45 PM
    htmx 1.8. Seems like I can't connect from my app and the tester at the same time, but that's on my side. I can see the responses updated in the "notifications" div. Thanks!
  • l

    late-king-98305

    07/15/2022, 3:36 PM
    Does this file somehow make JetBrains products understand hx attributes? If so, how does one configure it to use it? https://github.com/danieljsummers/htmx/blob/master/editors/jetbrains/htmx.web-types
  • l

    late-king-98305

    07/15/2022, 3:37 PM
    (whoops - linked to my doc fork... the file's the same, though...)
  • r

    ripe-action-67367

    07/15/2022, 3:48 PM
    https://github.com/JetBrains/web-types looks like package.json is involved
  • r

    refined-waiter-90422

    07/15/2022, 3:53 PM
    we've had countless people attempt the JetBrains highlighter for hyperscript.
  • r

    refined-waiter-90422

    07/15/2022, 3:54 PM
    someday an adventurous dev will bring home the treasure
  • r

    ripe-action-67367

    07/15/2022, 3:55 PM
    Can confirm that adding
    "web-types": "./editors/jetbrains/htmx.web-types",
    into package.json works immediately. Don't know if it works with CDN links, but here you have it (webstorm 2022)
  • l

    late-king-98305

    07/15/2022, 4:06 PM
    Nice!
  • l

    late-king-98305

    07/15/2022, 4:07 PM
    Quick ? on docs - is this list not sorted alphabetically, like the others, on purpose? I can include that sort in my PR. @mysterious-toddler-20573 @gorgeous-ghost-95789 @gorgeous-airport-54386 https://htmx.org/reference/#response_headers
  • m

    mysterious-toddler-20573

    07/15/2022, 4:12 PM
    alphabetical is probably a good thing
1...747748749...1146Latest