When executing a R script from opencpu, we generate the data input dialog UI code (in rscriptwrapper) and inject it to the current page (rscriptwrapper sends message to the background page, which calls the injectJavascript function in util.js).

 Note that rscriptwrapper is also injected to the page, and handles the execution logic (using opencpu-0.4.js). When execution completes, it retrieves session information and sends a RScriptEvent to the background page with the output page url (The output page name is [function name]_output.html, together with the opencpu session id and the opencpu server url as query strings). The background page opens the url in a new tab subsequently.