Example: https://perchance.org/3o1sbun1w3#edit

Seems like what’s returned at the end of the square brackets is somehow added, instead of setting what replaces the square brackets. Potentially, it’s cleared, then the square brackets are processed, then the result of the square brackets is added?

  • perchance@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 month ago

    Hmm, it’s hard to say whether this should be expected behavior. I think messing with the innerHTML/innerText/textContent of a ‘templated’ HTML node is currently undefined/unspecified behavior unless someone has strong opinions that they can defend here.

    Are there use cases that you can point to, which point to a desirable behavior here? Or anything that points to clearly-wrong behavior?

    In any case, I’ve added it to https://perchance.org/known-bugs as something to think about

    • TAPgiles@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      In another comment on this post I talked about my own expectations.

      And that example I linked to in the post has some very weird behaviour being demonstrated.