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

    mysterious-toddler-20573

    08/31/2020, 2:28 AM
    @User I'm starting to dig out from under the avalanche and review pull requests. I haven't gotten up the courage to look at the SSE stuff yet, but should get to it by the end of the week.
  • g

    gorgeous-ghost-95789

    08/31/2020, 2:48 AM
    That's cool. I'm glad to hear that life is getting under control. All the SSE code can wait until you have a nice chair and desk set up.
  • w

    wooden-wall-85896

    08/31/2020, 5:06 PM
    🎙 devMode podcast episode 85: "Sprig brings Reactivity to Twig" is out! 🌿 https://devmode.fm/episodes/sprig-brings-reactivity-to-twig
  • w

    wooden-wall-85896

    08/31/2020, 5:06 PM
    ^ uses htmx, and is mentioned a bunch @User
  • b

    big-airline-13935

    08/31/2020, 5:37 PM
    @User Top of my wish list for hyperscript is for it to self-initialise. Why require people to output
    _hyperscript.start();
    ? (when not used with htmx)
  • m

    mysterious-toddler-20573

    08/31/2020, 8:45 PM
    short answer: it should self initialize
  • m

    mysterious-toddler-20573

    08/31/2020, 8:46 PM
    long answer: I am building the compiler in a somewhat experimental way where you can add new expression and statements to the language, and I wanted an "OK, the language is done" spot.
  • m

    mysterious-toddler-20573

    08/31/2020, 8:46 PM
    but that isn't the common case, so it should self init and make the uncommon cases possible
  • m

    mysterious-toddler-20573

    08/31/2020, 8:46 PM
    @User ☝️
  • b

    big-airline-13935

    08/31/2020, 9:43 PM
    Ah perfect!
  • m

    mysterious-toddler-20573

    09/01/2020, 3:01 AM
    @User @User great interview, just relistened
  • w

    wooden-wall-85896

    09/01/2020, 3:01 AM
    Thanks @User -- yours comes out next Monday!
  • m

    mysterious-toddler-20573

    09/01/2020, 3:04 AM
    awesome
  • b

    big-airline-13935

    09/01/2020, 7:51 AM
    > short answer: it should self initialize @User Perhaps the quickstart section of the docs could use some TLC 😉
  • m

    mysterious-toddler-20573

    09/01/2020, 1:34 PM
    yeah, when I say it should, I mean in a future release
  • m

    mysterious-toddler-20573

    09/01/2020, 1:34 PM
    by the end of september, for sure
  • m

    mysterious-toddler-20573

    09/01/2020, 1:35 PM
    currently figuring out where in my schedule this work is gonna get done
  • m

    mysterious-toddler-20573

    09/01/2020, 2:13 PM
    thinking about it: htmx shouldn't need to know about hyperscript at all
  • m

    mysterious-toddler-20573

    09/01/2020, 2:13 PM
    hyperscript should plug in to htmx events instead
  • m

    mysterious-toddler-20573

    09/01/2020, 2:14 PM
    I'll need to work that out over the next few weeks
  • m

    mysterious-toddler-20573

    09/01/2020, 2:14 PM
    but hyperscript should be listening for the load event
  • b

    big-airline-13935

    09/01/2020, 2:21 PM
    Thanks for the clarifications and keep up the excellent work @mysterious-toddler-20573 !!
  • m

    most-jelly-15242

    09/01/2020, 3:53 PM
    I am having an issue with the
    htmx:afterRequest
    event not getting triggered, even though it shows up with
    htmx.logAll()
    . Similar to what it's mentioned here https://github.com/bigskysoftware/htmx/issues/79 I am using this to test:
    Copy code
    js
    htmx.on('htmx:afterRequest', () => console.log('htmx:afterRequest'));
    Is there another way to get this working or is it still an issue?
  • m

    most-jelly-15242

    09/01/2020, 4:00 PM
    I tried it with an extension to see if it made a different, but no.
    Copy code
    js
    htmx.defineExtension('test', {
        onEvent: function (name, evt) {
            console.log(name);
        }
    }
    Only these show up:
  • m

    most-jelly-15242

    09/01/2020, 4:02 PM
    htmx:configRequest htmx:beforeRequest htmx:beforeOnLoad htmx:beforeSwap htmx:afterSwap htmx:processedNode htmx:processedNode htmx:load htmx:afterSettle
  • m

    most-jelly-15242

    09/01/2020, 4:33 PM
    Here's my interim solution for doing something after the request is complete.
    Copy code
    js
    htmx.on('htmx:beforeRequest', (event) => {
        let xhr = event.detail.xhr;
        const onload = xhr.onload;
        xhr.onload = function (callback) {
            // do something
            onload.apply(this, arguments);
        }                
    });
  • m

    mysterious-toddler-20573

    09/01/2020, 4:36 PM
    is your swap an outerHTML ?
  • m

    mysterious-toddler-20573

    09/01/2020, 4:36 PM
    I wonder if we are firing it on the node that was swapped out, rather than the node that was swapped in
  • m

    most-jelly-15242

    09/01/2020, 4:38 PM
    No, it's innerHTML
  • m

    most-jelly-15242

    09/01/2020, 4:40 PM
    Btw, here's oob swapping in action. Very cool!
1...202122...1146Latest