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.
Thanks! This should be fixed now - let me know if not, or if there are any related / follow-on issues.
👍
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.worksThe 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.
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. 👍
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 🤞
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.