The JavaScript version requires the individual event instances to be passed to the component. So handling the recurrence is fully in you hands (on the server side).
You'd have to store the rule with the master event and also the individual occurrences to make them accessible to select queries. Depending on the rules you want to support, it can get quite complex (especially if you also want to support exceptions from the generated occurrences).