feat(web-workers) Add WebWorker Renderer

Allows angular apps to be rendered from the webworker!
Closes #3052, #3053, and #3097
This commit is contained in:
Jason Teplitz
2015-07-10 16:09:18 -07:00
parent 21b988f554
commit 771c0170d9
45 changed files with 3864 additions and 476 deletions

View File

@ -39,6 +39,19 @@ bool isDate(obj) => obj is DateTime;
String stringify(obj) => obj.toString();
int serializeEnum(val) {
return val.index;
}
/**
* Deserializes an enum
* val should be the indexed value of the enum (sa returned from @Link{serializeEnum})
* values should be a map from indexes to values for the enum that you want to deserialize.
*/
dynamic deserializeEnum(int val, Map<int, dynamic> values) {
return values[val];
}
class StringWrapper {
static String fromCharCode(int code) {
return new String.fromCharCode(code);