I would recommend using frames for short durations, whether online or locally but these times is sort of at the borderline where I would get tempted to switch so I think it’s a coin-toss on this occasion. Let me just spell out the logic and let you decide.
In short, using time increases the chance of being out by a single frame (important for short stimuli) but limits that error to being out by only a single frame (important for longer duration stimuli if the computer might not be keeping up).
Why select frames for short durations? Using time instead of frame counts means that psychopy/js has to guess at each point in time whether it should try to squeeze in one more frame of stimulus presentation. That decision isn’t as straightforward as you would think. e.g. if the decision is being made with 5 ms left before the frame deadline should we risk it? Using frame counts makes that decision more straightforward and reduces the chances of over/undershooting by a frame. If you have very brief stimulus durations overshooting by a single frame could be a big deal. Timing would overshoot if frames are being dropped but the chances of this a smaller if stimuli are only short.
Why select time for longer times? For longer stimulus durations, the chance of being out by a single frame is not likely to be such a big deal, but the chance of occasional dropped frames starts to increase the longer your stimulus is on screen (depending on the power of the computer and the complexity of the stimuli but let’s say online that can’t be trusted). If you present a stimulus for 1000 frames and you drop 1% of frames you might now be out by 167ms and that’s become an issue. Using time has the advantage that, if frames are being dropped they won’t impact the final time of offset because the only issue there is the decision time at the final frame.
Hope that helps