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

    mysterious-toddler-20573

    09/15/2020, 4:17 PM
    that was a temporary fix in
    dev
    but never made it out into the wild, if you have hyperscript that isn't on an element with an
    hx-
    attribute
  • m

    mysterious-toddler-20573

    09/15/2020, 4:17 PM
    again, sorry for the issue, I didn't have time to work on hyperscript for a while while I was moving and trying to keep htmx afloat. Next release of both (in a week or so) should be much cleaner.
  • g

    gorgeous-ghost-95789

    09/15/2020, 5:54 PM
    @User - thanks for merging the server sent events PR. I have a little more time this week to put to good use. Are there any other items (large or small) where you could use some help? I'd like to focus on things that you actually need to do before 1.0 release, instead of just the parts that I think are fun.
  • m

    mysterious-toddler-20573

    09/15/2020, 5:56 PM
    hmm
  • m

    mysterious-toddler-20573

    09/15/2020, 5:58 PM
    nothing really jumps out at me
  • m

    mysterious-toddler-20573

    09/15/2020, 5:58 PM
    I am working through the change to colons for separators now
  • g

    gorgeous-ghost-95789

    09/15/2020, 6:04 PM
    Ok. If anything comes up that you'd like to offload, just let me know. I'm up for writing docs, too, if you want to point me in that direction. 🙂
  • m

    mysterious-toddler-20573

    09/15/2020, 6:32 PM
    I eventually want someone to rework the website, but I'm trying to trick @User into doing that
  • m

    mysterious-toddler-20573

    09/15/2020, 6:32 PM
    Just pushed up the comma to whitespace change for web sockets and SSE
  • m

    mysterious-toddler-20573

    09/15/2020, 6:33 PM
    new syntax:
    Copy code
    html
    <div hx-sse="connect:/foo swap:bar">...</div>
  • g

    gorgeous-ghost-95789

    09/15/2020, 7:02 PM
    Sounds good. I won't tell him 🙂
  • g

    gorgeous-ghost-95789

    09/15/2020, 7:03 PM
    New syntax seems great, btw. And, good that it's consistent between the two kinds of remote connections 🙂
  • g

    gorgeous-iron-50959

    09/16/2020, 12:12 PM
    @User updating findElementToProcess did the job.
  • m

    mysterious-toddler-20573

    09/16/2020, 1:39 PM
    ☝️ explaining attribute settling in htmx
  • m

    mysterious-toddler-20573

    09/16/2020, 1:39 PM
    @User sorry about that, next release will be better!
  • p

    powerful-plumber-39972

    09/17/2020, 10:38 AM
    How can I trigger an HTMX AJAX request programatically from JavaScript? My use case is I want to trigger an HTMX request on page load, but I need to run some JavaScript first to compute a request parameter. I've attempted to do it by calling
    dispatchEvent(new Event("change"))
    on a form input element with HTMX attributes describing the request I want to make. This basically works, but there's a quirk. If I trigger this programatic request before triggering the form field manually, then my CSS transitions aren't working properly on the loaded content. However the transitions do work correctly when I trigger the form field manually, or when I trigger the form field programatically after a previous manual interaction. Wondering if there's some HTMX initialisation code that is being run when triggered manually but not from my programatic event dispatch? Is there a best practice for triggering HTMX from custom events?
  • b

    big-airline-13935

    09/17/2020, 11:09 AM
    > My use case is I want to trigger an HTMX request on page load, but I need to run some JavaScript first to compute a request parameter. @User you could listen for the
    htmx:beforeRequest
    (https://htmx.org/events/#htmx:beforeRequest) event and set the parameter then, or use
    hx-vars
    (https://htmx.org/attributes/hx-vars/) which can compute an expression.
  • m

    millions-apartment-38225

    09/17/2020, 2:06 PM
    Does something like the 'show:top' modifier for hx-swap, work with hx-swap-oob?
  • m

    mysterious-toddler-20573

    09/17/2020, 3:46 PM
    looking at the code, no, it doesn't appear so
  • m

    mysterious-toddler-20573

    09/17/2020, 3:47 PM
    i would call that a bug
  • m

    mysterious-toddler-20573

    09/17/2020, 8:12 PM
    @here htmx 0.1 should drop tomorrow, along w/ hyperscript 0.0.1
  • m

    mysterious-toddler-20573

    09/17/2020, 8:12 PM
    test suite is here: https://dev.htmx.org/test/0.1.0/test/
  • w

    wooden-wall-85896

    09/17/2020, 8:17 PM
    Very cool!
  • b

    big-airline-13935

    09/17/2020, 9:18 PM
    Woohoo!! I currently see 1 failure... is that expected?
  • m

    mysterious-toddler-20573

    09/17/2020, 9:41 PM
    looks like a test framework gremlin
  • m

    millions-apartment-38225

    09/18/2020, 11:38 AM
    Oh so is it an intended feature that modifiers work with oob swaps? For now I just used events to get similar functionality.
  • m

    mysterious-toddler-20573

    09/18/2020, 12:22 PM
    I would say that it should work on first glance, but I'd need to look at the code in more depth to say for sure
  • m

    millions-apartment-38225

    09/18/2020, 12:34 PM
    I can't exclude the possibility that I just failed to use it correctly 😅
  • p

    powerful-plumber-39972

    09/18/2020, 1:30 PM
    > @User you could listen for the
    htmx:beforeRequest
    (https://htmx.org/events/#htmx:beforeRequest) event and set the parameter then, or use
    hx-vars
    (https://htmx.org/attributes/hx-vars/) which can compute an expression. @User Thanks, I'll check that out.
  • m

    mysterious-toddler-20573

    09/18/2020, 1:41 PM
    htmx 0.1.0 has been released: https://twitter.com/htmx_org/status/1306944983400763401
1...303132...1146Latest