Call setTimeout with function expression.#155
Conversation
In order to prevent vulnerabilities, the `setTimeout` and `setInterval` functions should be called only with function expressions as their first argument.
|
I'm not sure I understand. I think you're referring to the use of a string as the first arg, which doesn't apply here. Can you point to a reference that supports your suggestion? |
|
Hi @dmethvin I'm submitting an add-on to the Mozilla website (addons.mozilla.org) containing your lib, and their code validator is complaining with the following: Apparently the main concern here is that the validator has no reliably way of knowing if |
|
Okay, so it's a limitation in their tool. I don't see any harm in this change and would have done it this way to begin with, so LGTM. I just wanted to be sure I understood why the change was being made. |
|
Thank you! (as long LGTM stand for "let's get this merged" :)) Seriously, the Mozilla Editors don't allow including modified vendor files in extensions, hence this getting merged here will make their and my life easier. |
In order to prevent vulnerabilities, the
setTimeoutandsetIntervalfunctions should be called only with function expressions as their first argument.