code-dot-org/code-dot-org — pull request #191 by cpirich (2014-10-15 21:10:14+00:00)
Title: Webapp: add createHtmlBlock

Added a new createHtmlBlock to webapp - exposed in blockly blocks, droplet/ice block, and JavaScript. This can be used to create arbitrary HTML in the playspace:

![screen shot 2014-10-15 at 1 51 02 pm](https://cloud.githubusercontent.com/assets/5429146/4653625/63f41a58-54af-11e4-95c0-6dbfaee18f74.png)
![screen shot 2014-10-15 at 1 51 40 pm](https://cloud.githubusercontent.com/assets/5429146/4653632/704ddc1c-54af-11e4-8182-2942cda76c78.png)

Also, removed part of my recent codegen.js change to create "global" functions. It wasn't needed as long as we have the current wrappers/aliases code in place.

Modified the generateCodeAliases() function to take a parentObject. Also, update codeFunctions table to take params. Our wrappers will now pass arguments through, inserting the proper 'this' parameter (from the parent object), and inserting an empty string variable as the first agument which is the blockly block id. Apps no longer need to provide the 'alias' parameter in codeFunctions (it is generated automatically). Also, update the droplet palette creation code to leverage the codeFunctions params field.

Modified webapp's api routing to propagate return values back up. This will probably be needed for the next step. For now, createHtmlBlock returns the HTML DOM element for the wrapping div.