Maybe there’s some way of doing this, not sure. But if you’ve got some function that returns HTML, and use it like [fn()] in your HTML, then use update(), that function will be called again, right? There’s no way of blocking that, as far as I know–which could do things like reset state and such.

Not even sure how you’d implement such a feature. Maybe pass an argument to the function telling it it’s updating or something? Or mark the code as only-run-once somehow? [:code run once]? Not sure… Could be useful for certain plug-ins though to avoid users of the plugin accidentally messing it up by using update().

  • @wthit56OP
    link
    English
    24 months ago

    Ah I see, that seems to work about as expected. Only annoyance is, the user of the plugin has to come up with a unique name and track those, make sure they don’t use the same name twice or whatever.

    This method would work, which is cool. I still feel like it would be a useful feature for the engine anyway. If only to save on processing those code blocks that the user only wants to “run once.”