Changed char to chr since char since Google Closure compiler complains that char is a reserved word.