You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compilation of a file, which contains only one line: document.querySelector(".test").some_prop = true;
leads to an empty output when using the compiler with these flags: java -jar compiler.jar --compilation_level=ADVANCED_OPTIMIZATIONS --jscomp_off=checkTypes --js=in.js --js_output_file=out.js
However, enabling the checkTypes warnings (--jscomp_warning=checkTypes) fixes it and the output is ok: document.querySelector(".test").a=!0;
It doesn't matter if the altered property is a custom "some_prop" or a built-in one like the "className" or "id". Also, the querySelectorAll method doesn't have such an issue and the following code is compiled without problems: document.querySelectorAll(".test")[0].some_prop = true;