In some cases the analysis minifies a selector in the wrong way. Unfortunately, because this is for internal code, I cannot post the full HTML on GitHub. If you want it though, I am happy to send it to you privately.
Hopefully I can describe the issue enough to make it reproducible. Take an HTML form that calls some javascript:
<form action="#" onsubmit="return validate(this);">
<input type="url" id="url" class="custom-search-input" onkeyup="check(this);" placeholder="https://en.wikipedia.org/wiki/Minification_(programming)">
<textarea name="message" id="message" class="custom-search-textarea" placeholder="Add a message here"></textarea>
<button class="custom-search-botton" id="button" type="submit">do it</button>
</form>
The problem now occurs for id url and message. Assume I have this as my JS:
function check(input) {
...
let url = document.getElementById("url");
...
}
then url gets minified. However:
function validate(form) {
next_step(form.url.value, form.message.value);
}
the use of url and message here will not be detected. As a result message does not get minified, while url gets minified but the above code line would not be updated.
edit: sorry, I hit submit too early. Updated to finish the explanation.
edit 2: a further minification could be to also rename JavaScript functions.
In some cases the analysis minifies a selector in the wrong way. Unfortunately, because this is for internal code, I cannot post the full HTML on GitHub. If you want it though, I am happy to send it to you privately.
Hopefully I can describe the issue enough to make it reproducible. Take an HTML form that calls some javascript:
The problem now occurs for id
urlandmessage. Assume I have this as my JS:then
urlgets minified. However:the use of
urlandmessagehere will not be detected. As a resultmessagedoes not get minified, whileurlgets minified but the above code line would not be updated.edit: sorry, I hit submit too early. Updated to finish the explanation.
edit 2: a further minification could be to also rename JavaScript functions.