google / google/closure-compiler

Element.style.float improperly compiled

Open
#2,405 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

Hi there,

Here's a little TODO from my codebase:

```
// TODO(rrodriguez): report compiler bug - obfuscation of "float" property.
leftHelper.style['float'] = 'left';
leftHelper.innerText = 'Not at all likely';
```

When I compile, the element doesn't float properly. Unminified, the element does exactly what it's supposed to. This happens anywhere I try Element.style.float. It does not occur for any other style properties. So, this probably means that the "float" style property is being treated like a regular old property for some reason.

Here's my compiler info:

**VERSION**: 20161201.0.0

**FLAGS**:
java -jar
node_modules/google-closure-compiler/compiler.jar
--js="nps-plugin/index.js"
--js="node_modules/google-closure-library/closure/goog/.js"
--js="!node_modules/google-closure-library/closure/goog/_test.js"
--dependency_mode=STRICT
--compilation_level=ADVANCED_OPTIMIZATIONS
--entry_point=lnkd.NpsPlugin
--output_wrapper="(function(){%output%})();"
--new_type_inf
--jscomp_warning=newCheckTypes
--jscomp_off=newCheckTypesExtraChecks
--hide_warnings_for=node_modules/google-closure-library/
--output_manifest="build/report/manifest.MF"
--js_output_file=nps-plugin.js

Let me know if you can repro. Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.