Files
codeql/javascript/ql/test/query-tests/LanguageFeatures/SpuriousArguments/reflection.js
2025-02-28 13:29:17 +01:00

25 lines
402 B
JavaScript

function f0() {return;}
function f1(x) {return;}
f0.call();
f0.call(this);
f0.call(this, 1); // $ Alert
f0.call(this, 1, 2); // $ Alert
f1.call();
f1.call(this);
f1.call(this, 1);
f1.call(this, 1, 2); // $ Alert
f0.apply();
f0.apply(this);
f0.apply(this, []);
f0.apply(this, [1]);
f0.apply(this, [1, 2]);
f1.apply();
f1.apply(this);
f1.apply(this, []);
f1.apply(this, [1]);
f1.apply(this, [1, 2]);