1. A computer-implemented method of generating interactive electronic documents, the method comprising: by a computer system comprising one or more hardware processors, generating a plurality of electronic documents, each of the electronic documents generated as an object having a non-variable first part, the non-variable first part comprising instructions configured to direct a processing unit to perform a function call in response to a user interaction, and a variable second part separate from the non-variable first part, the variable second part comprising variable data and functions defined to return the variable data in response to the function call.