Can you call a custom javascript function at a specific timeline frame

Is it possible to call a specific function in a JavaScript file at a specific time on the timeline?

I understand that update() is triggered each frame, but wanted the flexibility to call a specific JS function, synchronized with some keyframe animation on the notch timeline

Any help would be gratefully appreciated.
Thanks

Can you simply call a function when an input value reaches 1?

Define an input variable so the javascript node has a spout to input a modifier
then
reference that variable in your code to call a function when the condition of 1 is met?

As for triggering it at a certain point: You could have an envelope with a value of 1 and in the time line you could position its layer at a specific point and effectively it would trigger wherever you place it.

I’ll try to dig up an example but perhaps this is helpful in the meantime.

This is really helpful thanks for the detailed explanation. I think this should work fine.

Much appreciated :+1: