I guess because you’re always copying everything onto the window object?

So if you then call it yourself, because “you don’t think it’s been called automatically, because why would it? You haven’t told it to do that”… it’s actually being called twice.

  • perchance@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 months ago

    I guess because you’re always copying everything onto the window object?

    Update: I’ve now added a more general fix so I don’t need to do this copy-everything-to-window stuff anymore. Along with solving some miscellaneous bugs, it also fixes the annoying thing where the engine needed to overwrite inline onclick/etc resulting in them ‘disappearing’ when you look for them in DevTools. Hopefully this fix hasn’t introduced any bugs. Please let me know if you spot any issues! @VioneT@lemmy.world @BluePower@sh.itjust.works

    The overall goal here is to push the engine closer and closer to “It’s just HTML/JS/CSS (plus some Perchance stuff on top)”, instead of having all sorts of engine implementation details “getting in the way” of HTML/JS that should work fine.

    Edit: Had to disable the new approach due to an issue, but will hopefully be able to re-enable it tomorrow if all goes well.

    • wthit56@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Ah great! Those were both pet peeves of mine, but I thought they’re probably way too deeply embedded to change at this point. Thanks for this! I’ll let you know if I find any new bugs from it. 👍

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

        Heads up: Just found a critical issue with the new approach - had to disable it for now, so it’s back to the old approach. Need to sleep soon so probably won’t solve it today, but will hopefully get it solved tomorrow 🤞

        • wthit56@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 months ago

          Cool cool. Do you have any sort of testing set up for perchance? Could be useful for making sure things like this don’t break capabilities.