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

    mysterious-toddler-20573

    10/27/2020, 4:45 PM
    but you want to take advantage of bubbling here I think
  • a

    ancient-soccer-8576

    10/27/2020, 4:48 PM
    where can I see bubbling in the docs?
  • m

    mysterious-toddler-20573

    10/27/2020, 5:03 PM
    it's the normal DOM bubbling of events https://en.wikipedia.org/wiki/Event_bubbling
  • a

    ancient-soccer-8576

    10/27/2020, 5:24 PM
    I moved "hx-trigger" to the form element but it does not work
  • a

    ancient-soccer-8576

    10/27/2020, 5:26 PM
    you mean i shlould add something like this: htmx.on("htmx:load", function(evt) { myJavascriptLib.init(evt.details.elt); }); ??
  • a

    ancient-soccer-8576

    10/27/2020, 5:37 PM
    maybe bubbling does not work if I consume the event? (onkeyup="")
  • a

    ancient-soccer-8576

    10/27/2020, 5:48 PM
    anyway: what i found is that "hx-trigger" and "onkeyup" events can live together on the same "input" and fire both,
  • m

    mysterious-toddler-20573

    10/27/2020, 6:41 PM
    ah, yeah, as long as the rest of the trigger behavior is the same
  • m

    mysterious-toddler-20573

    10/27/2020, 6:41 PM
    :/
  • m

    mysterious-toddler-20573

    10/27/2020, 6:41 PM
    sorry
  • m

    mysterious-toddler-20573

    10/27/2020, 11:06 PM
    https://twitter.com/htmx_org/status/1321226678639747072
  • b

    big-airline-13935

    10/28/2020, 11:00 AM
    Woohoo congrats 🎉
  • b

    broad-breakfast-38211

    10/28/2020, 12:08 PM
    Hello, if I want to fill a edit box with some string extracted from the page's url after the page is loaded, I should use something like jQuery, right?
  • b

    broad-breakfast-38211

    10/28/2020, 12:08 PM
    I assume it's not a task within htmx's scope? Thanks.
  • m

    mysterious-toddler-20573

    10/28/2020, 12:37 PM
    Edwin, yeah, that's correct, that's not part of htmx
  • b

    broad-breakfast-38211

    10/28/2020, 12:43 PM
    @User , I got it, thanks!
  • m

    mysterious-toddler-20573

    10/29/2020, 4:35 PM
    https://htmx.org/essays/spa-alternative/
  • m

    mysterious-toddler-20573

    10/29/2020, 4:36 PM
    https://htmx.org/essays/complexity-budget/
  • u

    user

    10/30/2020, 12:16 PM
    Hi, is there support for tracking if static assets have changed like in Phoenix LiveView https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#static_changed?/1?
  • m

    mysterious-toddler-20573

    10/30/2020, 12:55 PM
    Hi Neil, can you explain more how that works? I don't think I have a good handle on it, but given my understanding I think you could implement something similar to that using websockets in htmx
  • m

    mysterious-toddler-20573

    10/30/2020, 12:56 PM
    htmx doesn't have a server side component, by design, however, so we can't offer the same level of integration that something like liveview does
  • u

    user

    10/30/2020, 1:01 PM
    Hi 1cg, here is another example from turbolinks https://github.com/turbolinks/turbolinks#reloading-when-assets-change
  • u

    user

    10/30/2020, 1:08 PM
    useful for when you deploy. basically if a user has v1 of styles in the browser, then I deploy v2 styles, then they make ajax requests with htmx, the user will receive html expecting v2 styles to be in their browser but they only have v1 styles so things could look broken.
  • u

    user

    10/30/2020, 1:10 PM
    really like htmx by the way! 😀
  • m

    mysterious-toddler-20573

    10/30/2020, 1:10 PM
    ah, the CSS has changed
  • m

    mysterious-toddler-20573

    10/30/2020, 1:11 PM
    So one approach I have seen with that in intercooler.js is to track the app version in the session and, if the version id updates, issue a trigger via a header to do a full page refresh
  • m

    mysterious-toddler-20573

    10/30/2020, 1:11 PM
    But I will think more about how htmx can handle something like this
  • m

    mysterious-toddler-20573

    10/30/2020, 1:11 PM
    it's tricky in the htmx context since I am trying to keep it as server agnostic as possible
  • m

    mysterious-toddler-20573

    10/30/2020, 1:12 PM
    which means that is is more compatible (and more focused) by just trying to complete HTML, but also it doesn't provide the server/client integration that many frameworks do
  • m

    mysterious-toddler-20573

    10/30/2020, 1:12 PM
    great to hear, I hope it is helpful 🙂
1...666768...1146Latest