toAttribute(value, type) {
        switch (type) {
            case Boolean:
                return value ? '' : null;
            case Object:
            case Array:
                // if the value is `null` or `undefined` pass this through
                // to allow removing/no change behavior.
                return value == null ? value : JSON.stringify(value);
        }
        return value;
    }
When using Closure Compiler, JSCompiler_renameProperty(property, object) is
replaced at compile time by the munged name for object[property]. We cannot
alias this function, so we have to use a small shim that has the same
behavior when not compiling.